Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Pfister <steve.pfister@microsoft.com>2022-10-02 00:11:06 +0300
committerSteve Pfister <steve.pfister@microsoft.com>2022-10-02 00:11:06 +0300
commit8e75a196502f017cd6f4f2dd0db8bc613aec57b0 (patch)
tree8d35cc8d72ce48b3a069be48fcada648e2809d10
parent74f23f1f36214674802605808c9617ba40231f7b (diff)
parentd320fd90a2976b388169dd51b3732ad01bcb4266 (diff)
Merge remote-tracking branch 'upstream/main' into joshield/split-runtime-extra-platformsjoshield/split-runtime-extra-platforms
-rw-r--r--.config/dotnet-tools.json4
-rw-r--r--.devcontainer/libraries/Dockerfile29
-rw-r--r--.devcontainer/libraries/devcontainer.json55
-rwxr-xr-x.devcontainer/scripts/onCreateCommand.sh28
-rw-r--r--.devcontainer/wasm/Dockerfile (renamed from .devcontainer/Dockerfile)34
-rw-r--r--.devcontainer/wasm/devcontainer.json (renamed from .devcontainer/devcontainer.json)45
-rw-r--r--.github/fabricbot.json173
-rw-r--r--Build.proj2
-rw-r--r--Directory.Build.props3
-rw-r--r--docs/area-owners.json49
-rw-r--r--docs/area-owners.md10
-rw-r--r--docs/design/features/cet-feature.md28
-rw-r--r--docs/design/features/images/intel-cet-dotnet6-fig1.pngbin0 -> 16585 bytes
-rw-r--r--docs/workflow/Codespaces.md37
-rw-r--r--docs/workflow/codespace-dev-container-configuration.pngbin0 -> 55154 bytes
-rw-r--r--docs/workflow/testing/coreclr/disasm-checks.md143
-rw-r--r--docs/workflow/testing/mono/testing.md4
-rw-r--r--eng/SourceBuild.props21
-rw-r--r--eng/Subsets.props2
-rw-r--r--eng/Version.Details.xml260
-rw-r--r--eng/Versions.props130
-rwxr-xr-xeng/build.sh16
-rw-r--r--eng/common/generate-locproject.ps12
-rw-r--r--eng/common/init-tools-native.ps15
-rw-r--r--eng/common/sdl/NuGet.config5
-rw-r--r--eng/common/sdl/sdl.ps11
-rw-r--r--eng/common/templates/job/execute-sdl.yml4
-rw-r--r--eng/common/templates/job/job.yml37
-rw-r--r--eng/common/templates/steps/execute-sdl.yml6
-rw-r--r--eng/common/templates/steps/source-build.yml6
-rw-r--r--eng/liveBuilds.targets4
-rwxr-xr-xeng/native/build-commons.sh16
-rw-r--r--eng/native/configurecompiler.cmake2
-rw-r--r--eng/native/configureplatform.cmake8
-rw-r--r--eng/native/tryrun.cmake2
-rw-r--r--eng/packaging.targets3
-rw-r--r--eng/pipelines/common/evaluate-default-paths.yml52
-rw-r--r--eng/pipelines/common/global-build-job.yml14
-rw-r--r--eng/pipelines/common/platform-matrix.yml4
-rw-r--r--eng/pipelines/common/templates/runtimes/build-test-job.yml8
-rw-r--r--eng/pipelines/coreclr/nativeaot-post-build-steps.yml6
-rw-r--r--eng/pipelines/coreclr/perf.yml22
-rw-r--r--eng/pipelines/coreclr/perf_slow.yml20
-rw-r--r--eng/pipelines/coreclr/templates/build-jit-job.yml4
-rw-r--r--eng/pipelines/coreclr/templates/build-job.yml4
-rw-r--r--eng/pipelines/coreclr/templates/build-perf-maui-apps-net6.yml3
-rw-r--r--eng/pipelines/coreclr/templates/helix-queues-setup.yml4
-rw-r--r--eng/pipelines/coreclr/templates/run-performance-job.yml1
-rw-r--r--eng/pipelines/coreclr/templates/run-scenarios-job.yml1
-rw-r--r--eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml2
-rw-r--r--eng/pipelines/global-build.yml14
-rw-r--r--eng/pipelines/installer/jobs/build-job.yml20
-rw-r--r--eng/pipelines/libraries/base-job.yml14
-rw-r--r--eng/pipelines/libraries/helix-queues-setup.yml8
-rw-r--r--eng/pipelines/runtime.yml8
-rw-r--r--eng/testing/linker/SupportFiles/Directory.Build.props1
-rw-r--r--eng/testing/linker/SupportFiles/Directory.Build.targets4
-rw-r--r--eng/testing/linker/project.csproj.template10
-rw-r--r--eng/testing/linker/trimmingTests.targets12
-rw-r--r--eng/testing/performance/microbenchmarks.proj3
-rw-r--r--eng/testing/tests.singlefile.targets3
-rw-r--r--eng/testing/tests.wasm.targets4
-rw-r--r--global.json8
-rw-r--r--src/coreclr/.nuget/Directory.Build.props5
-rw-r--r--src/coreclr/System.Private.CoreLib/MatchingRefApiCompatBaseline.txt34
-rw-r--r--src/coreclr/System.Private.CoreLib/System.Private.CoreLib.csproj3
-rw-r--r--src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivationContextInternal.cs3
-rw-r--r--src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivator.PlatformNotSupported.cs2
-rw-r--r--src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivator.cs2
-rw-r--r--src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComponentActivator.CoreCLR.cs2
-rw-r--r--src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/InMemoryAssemblyLoader.PlatformNotSupported.cs2
-rw-r--r--src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/InMemoryAssemblyLoader.cs2
-rw-r--r--src/coreclr/System.Private.CoreLib/src/System/Collections/Generic/ArraySortHelper.CoreCLR.cs2
-rw-r--r--src/coreclr/System.Private.CoreLib/src/System/Collections/Generic/Comparer.CoreCLR.cs1
-rw-r--r--src/coreclr/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.CoreCLR.cs1
-rw-r--r--src/coreclr/System.Private.CoreLib/src/System/Enum.CoreCLR.cs13
-rw-r--r--src/coreclr/System.Private.CoreLib/src/System/Environment.CoreCLR.cs2
-rw-r--r--src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicILGenerator.cs18
-rw-r--r--src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.CoreCLR.cs305
-rw-r--r--src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilder.cs4
-rw-r--r--src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeCustomAttributeData.cs83
-rw-r--r--src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeModule.cs2
-rw-r--r--src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeParameterInfo.cs11
-rw-r--r--src/coreclr/System.Private.CoreLib/src/System/Runtime/CompilerServices/CastHelpers.cs7
-rw-r--r--src/coreclr/System.Private.CoreLib/src/System/Runtime/CompilerServices/TypeDependencyAttribute.cs20
-rw-r--r--src/coreclr/System.Private.CoreLib/src/System/Runtime/InteropServices/IException.cs35
-rw-r--r--src/coreclr/System.Private.CoreLib/src/System/WeakReference.CoreCLR.cs7
-rw-r--r--src/coreclr/debug/debug-pal/unix/diagnosticsipc.cpp423
-rw-r--r--src/coreclr/debug/debug-pal/win/diagnosticsipc.cpp548
-rw-r--r--src/coreclr/debug/ee/rcthread.cpp6
-rw-r--r--src/coreclr/debug/inc/diagnosticsipc.h149
-rw-r--r--src/coreclr/debug/shared/dbgtransportsession.cpp2
-rw-r--r--src/coreclr/gc/env/gcenv.os.h2
-rw-r--r--src/coreclr/gc/env/volatile.h6
-rw-r--r--src/coreclr/gc/gc.cpp224
-rw-r--r--src/coreclr/gc/gcpriv.h6
-rw-r--r--src/coreclr/gc/sample/gcenv.h2
-rw-r--r--src/coreclr/gc/unix/config.gc.h.in1
-rw-r--r--src/coreclr/gc/unix/configure.cmake14
-rw-r--r--src/coreclr/gc/unix/gcenv.unix.cpp57
-rw-r--r--src/coreclr/gc/vxsort/machine_traits.avx2.cpp4
-rw-r--r--src/coreclr/gc/vxsort/machine_traits.avx2.h16
-rw-r--r--src/coreclr/gc/vxsort/smallsort/avx2_load_mask_tables.cpp12
-rw-r--r--src/coreclr/gc/vxsort/smallsort/bitonic_sort.AVX2.int32_t.generated.h4
-rw-r--r--src/coreclr/gc/vxsort/smallsort/bitonic_sort.AVX2.int64_t.generated.h4
-rw-r--r--src/coreclr/gc/vxsort/smallsort/bitonic_sort.h8
-rw-r--r--src/coreclr/gc/windows/gcenv.windows.cpp4
-rw-r--r--src/coreclr/hosts/corerun/corerun.hpp2
-rw-r--r--src/coreclr/ilasm/asmman.cpp2
-rw-r--r--src/coreclr/inc/clr_std/vector27
-rw-r--r--src/coreclr/inc/clrconfigvalues.h20
-rw-r--r--src/coreclr/inc/clrhost.h8
-rw-r--r--src/coreclr/inc/corhlpr.cpp2
-rw-r--r--src/coreclr/inc/corinfoinstructionset.h252
-rw-r--r--src/coreclr/inc/getproductversionnumber.h76
-rw-r--r--src/coreclr/inc/jiteeversionguid.h10
-rw-r--r--src/coreclr/inc/mscoree.idl (renamed from src/coreclr/inc/MSCOREE.IDL)0
-rw-r--r--src/coreclr/inc/ostype.h7
-rw-r--r--src/coreclr/inc/readytoruninstructionset.h8
-rw-r--r--src/coreclr/inc/volatile.h7
-rw-r--r--src/coreclr/jit/CMakeLists.txt1
-rw-r--r--src/coreclr/jit/_typeinfo.h404
-rw-r--r--src/coreclr/jit/assertionprop.cpp52
-rw-r--r--src/coreclr/jit/block.h23
-rw-r--r--src/coreclr/jit/codegen.h2
-rw-r--r--src/coreclr/jit/codegenarm64.cpp185
-rw-r--r--src/coreclr/jit/codegenarmarch.cpp102
-rw-r--r--src/coreclr/jit/codegencommon.cpp24
-rw-r--r--src/coreclr/jit/codegenlinear.cpp77
-rw-r--r--src/coreclr/jit/codegenloongarch64.cpp50
-rw-r--r--src/coreclr/jit/codegenxarch.cpp79
-rw-r--r--src/coreclr/jit/compiler.cpp63
-rw-r--r--src/coreclr/jit/compiler.h172
-rw-r--r--src/coreclr/jit/compiler.hpp61
-rw-r--r--src/coreclr/jit/compphases.h175
-rw-r--r--src/coreclr/jit/emitxarch.cpp160
-rw-r--r--src/coreclr/jit/emitxarch.h3
-rw-r--r--src/coreclr/jit/fgdiagnostic.cpp2
-rw-r--r--src/coreclr/jit/fginline.cpp5
-rw-r--r--src/coreclr/jit/fgopt.cpp6
-rw-r--r--src/coreclr/jit/flowgraph.cpp6
-rw-r--r--src/coreclr/jit/forwardsub.cpp70
-rw-r--r--src/coreclr/jit/gentree.cpp362
-rw-r--r--src/coreclr/jit/gentree.h154
-rw-r--r--src/coreclr/jit/gtlist.h1
-rw-r--r--src/coreclr/jit/hwintrinsic.cpp34
-rw-r--r--src/coreclr/jit/hwintrinsic.h17
-rw-r--r--src/coreclr/jit/hwintrinsicarm64.cpp33
-rw-r--r--src/coreclr/jit/hwintrinsiclistarm64.h8
-rw-r--r--src/coreclr/jit/hwintrinsiclistxarch.h12
-rw-r--r--src/coreclr/jit/hwintrinsicxarch.cpp6
-rw-r--r--src/coreclr/jit/importer.cpp1152
-rw-r--r--src/coreclr/jit/importer_vectorization.cpp2
-rw-r--r--src/coreclr/jit/jit.h3
-rw-r--r--src/coreclr/jit/jitconfigvalues.h16
-rw-r--r--src/coreclr/jit/lclmorph.cpp48
-rw-r--r--src/coreclr/jit/lclvars.cpp49
-rw-r--r--src/coreclr/jit/lower.cpp30
-rw-r--r--src/coreclr/jit/lowerarmarch.cpp304
-rw-r--r--src/coreclr/jit/lowerxarch.cpp94
-rw-r--r--src/coreclr/jit/lsra.cpp32
-rw-r--r--src/coreclr/jit/lsraarm64.cpp1
-rw-r--r--src/coreclr/jit/lsraarmarch.cpp12
-rw-r--r--src/coreclr/jit/lsrabuild.cpp27
-rw-r--r--src/coreclr/jit/morph.cpp108
-rw-r--r--src/coreclr/jit/morphblock.cpp63
-rw-r--r--src/coreclr/jit/optcse.cpp3
-rw-r--r--src/coreclr/jit/optimizer.cpp58
-rw-r--r--src/coreclr/jit/rationalize.cpp2
-rw-r--r--src/coreclr/jit/redundantbranchopts.cpp875
-rw-r--r--src/coreclr/jit/regset.cpp147
-rw-r--r--src/coreclr/jit/simd.cpp24
-rw-r--r--src/coreclr/jit/simdashwintrinsic.cpp20
-rw-r--r--src/coreclr/jit/simdashwintrinsic.h3
-rw-r--r--src/coreclr/jit/typeinfo.cpp345
-rw-r--r--src/coreclr/jit/valuenum.cpp141
-rw-r--r--src/coreclr/jit/valuenum.h10
-rw-r--r--src/coreclr/md/compiler/CMakeLists.txt1
-rw-r--r--src/coreclr/md/compiler/assemblymd.cpp26
-rw-r--r--src/coreclr/md/compiler/assemblymd_emit.cpp20
-rw-r--r--src/coreclr/md/compiler/custattr_emit.cpp5
-rw-r--r--src/coreclr/md/compiler/custattr_import.cpp7
-rw-r--r--src/coreclr/md/compiler/emit.cpp89
-rw-r--r--src/coreclr/md/compiler/import.cpp95
-rw-r--r--src/coreclr/md/compiler/mdperf.cpp95
-rw-r--r--src/coreclr/md/compiler/mdperf.h241
-rw-r--r--src/coreclr/md/compiler/regmeta.cpp1
-rw-r--r--src/coreclr/md/compiler/regmeta.h7
-rw-r--r--src/coreclr/md/compiler/regmeta_compilersupport.cpp1
-rw-r--r--src/coreclr/md/compiler/regmeta_emit.cpp23
-rw-r--r--src/coreclr/md/compiler/regmeta_import.cpp33
-rw-r--r--src/coreclr/md/compiler/regmeta_vm.cpp5
-rw-r--r--src/coreclr/nativeaot/Bootstrap/main.cpp3
-rw-r--r--src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILCompiler.SingleEntry.targets2
-rw-r--r--src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets8
-rw-r--r--src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets1
-rw-r--r--src/coreclr/nativeaot/Runtime/CommonMacros.h2
-rw-r--r--src/coreclr/nativeaot/Runtime/IntrinsicConstants.h8
-rw-r--r--src/coreclr/nativeaot/Runtime/ObjectLayout.h3
-rw-r--r--src/coreclr/nativeaot/Runtime/PalRedhawk.h5
-rw-r--r--src/coreclr/nativeaot/Runtime/PalRedhawkFunctions.h12
-rw-r--r--src/coreclr/nativeaot/Runtime/RhConfigValues.h1
-rw-r--r--src/coreclr/nativeaot/Runtime/amd64/GC.asm15
-rw-r--r--src/coreclr/nativeaot/Runtime/eventtrace.cpp3
-rw-r--r--src/coreclr/nativeaot/Runtime/gcrhenv.cpp13
-rw-r--r--src/coreclr/nativeaot/Runtime/rhcommon.h16
-rw-r--r--src/coreclr/nativeaot/Runtime/startup.cpp47
-rw-r--r--src/coreclr/nativeaot/Runtime/stressLog.cpp16
-rw-r--r--src/coreclr/nativeaot/Runtime/thread.cpp14
-rw-r--r--src/coreclr/nativeaot/Runtime/thread.h2
-rw-r--r--src/coreclr/nativeaot/Runtime/threadstore.cpp11
-rw-r--r--src/coreclr/nativeaot/Runtime/unix/PalRedhawkUnix.cpp76
-rw-r--r--src/coreclr/nativeaot/Runtime/windows/PalRedhawkMinWin.cpp35
-rw-r--r--src/coreclr/nativeaot/Runtime/yieldprocessornormalized.cpp12
-rw-r--r--src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerHelpers/RuntimeInteropData.cs10
-rw-r--r--src/coreclr/nativeaot/System.Private.CoreLib/src/MatchingRefApiCompatBaseline.txt24
-rw-r--r--src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj2
-rw-r--r--src/coreclr/nativeaot/System.Private.CoreLib/src/System/GC.NativeAot.cs2
-rw-r--r--src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/EnumInfo.cs11
-rw-r--r--src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/Modules/RuntimeModule.cs2
-rw-r--r--src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/GCHandle.NativeAot.cs8
-rw-r--r--src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.NativeAot.cs23
-rw-r--r--src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/PInvokeMarshal.cs6
-rw-r--r--src/coreclr/nativeaot/System.Private.CoreLib/src/System/WeakReference.NativeAot.cs165
-rw-r--r--src/coreclr/nativeaot/System.Private.CoreLib/src/System/WeakReference.T.NativeAot.cs122
-rw-r--r--src/coreclr/pal/inc/pal.h4
-rw-r--r--src/coreclr/pal/src/arch/amd64/processor.cpp29
-rw-r--r--src/coreclr/pal/src/exception/seh-unwind.cpp4
-rw-r--r--src/coreclr/pal/src/misc/jitsupport.cpp9
-rw-r--r--src/coreclr/pal/src/misc/sysinfo.cpp5
-rw-r--r--src/coreclr/pal/src/synchmgr/synchmanager.cpp4
-rw-r--r--src/coreclr/pal/src/synchobj/mutex.cpp130
-rw-r--r--src/coreclr/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/hpitinterlock.s167
-rw-r--r--src/coreclr/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/notes.txt15
-rw-r--r--src/coreclr/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/readme.txt39
-rw-r--r--src/coreclr/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/sparcinterloc.s72
-rw-r--r--src/coreclr/scripts/jitrollingbuild.py130
-rw-r--r--src/coreclr/scripts/superpmi.py374
-rw-r--r--src/coreclr/scripts/superpmi_collect_setup.py50
-rw-r--r--src/coreclr/scripts/superpmi_diffs.py3
-rw-r--r--src/coreclr/scripts/superpmi_diffs_summarize.py37
-rw-r--r--src/coreclr/tools/Common/CommandLineHelpers.cs344
-rw-r--r--src/coreclr/tools/Common/Compiler/DisplayNameHelpers.cs20
-rw-r--r--src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSet.cs8
-rw-r--r--src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSetHelper.cs32
-rw-r--r--src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs61
-rw-r--r--src/coreclr/tools/Common/JitInterface/CorInfoInstructionSet.cs302
-rw-r--r--src/coreclr/tools/Common/JitInterface/IJitHashableOnly.cs45
-rw-r--r--src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt26
-rw-r--r--src/coreclr/tools/Common/JitInterface/UnboxingMethodDesc.cs11
-rw-r--r--src/coreclr/tools/Common/TypeSystem/Common/InstantiatedType.cs11
-rw-r--r--src/coreclr/tools/Common/TypeSystem/Common/TypeDesc.cs1
-rw-r--r--src/coreclr/tools/Common/TypeSystem/Ecma/EcmaType.cs18
-rw-r--r--src/coreclr/tools/Common/TypeSystem/IL/ILImporter.cs4
-rw-r--r--src/coreclr/tools/Common/TypeSystem/IL/Stubs/ComparerIntrinsics.cs113
-rw-r--r--src/coreclr/tools/Common/TypeSystem/IL/Stubs/RuntimeHelpersIntrinsics.cs25
-rw-r--r--src/coreclr/tools/SuperFileCheck/Program.cs760
-rw-r--r--src/coreclr/tools/SuperFileCheck/SuperFileCheck.csproj51
-rw-r--r--src/coreclr/tools/aot/ILCompiler.Compiler.Tests/DependencyGraphTests.cs2
-rw-r--r--src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilerTypeSystemContext.ValueTypeMethods.cs117
-rw-r--r--src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ConstructedEETypeNode.cs3
-rw-r--r--src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/EETypeNode.cs8
-rw-r--r--src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/FrozenObjectNode.cs9
-rw-r--r--src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/FrozenStringNode.cs8
-rw-r--r--src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/InterfaceDispatchMapNode.cs1
-rw-r--r--src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/NativeLayoutVertexNode.cs25
-rw-r--r--src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ObjectWriter.cs14
-rw-r--r--src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/HardwareIntrinsicHelpers.Aot.cs24
-rw-r--r--src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/UsageBasedMetadataManager.cs2
-rw-r--r--src/coreclr/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyAnalyzer.cs2
-rw-r--r--src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ModuleTokenResolver.cs121
-rw-r--r--src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCodegenCompilation.cs125
-rw-r--r--src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCompilationModuleGroupBase.cs33
-rw-r--r--src/coreclr/tools/aot/ILCompiler.ReadyToRun/IL/Stubs/PInvokeILEmitter.cs14
-rw-r--r--src/coreclr/tools/aot/ILCompiler.ReadyToRun/ILCompiler.ReadyToRun.csproj3
-rw-r--r--src/coreclr/tools/aot/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs81
-rw-r--r--src/coreclr/tools/aot/ILCompiler.RyuJit/ILCompiler.RyuJit.csproj3
-rw-r--r--src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj2
-rw-r--r--src/coreclr/tools/aot/ILCompiler/ILCompiler.props21
-rw-r--r--src/coreclr/tools/aot/ILCompiler/ILCompilerRootCommand.cs390
-rw-r--r--src/coreclr/tools/aot/ILCompiler/Program.cs692
-rw-r--r--src/coreclr/tools/aot/ILCompiler/repro/repro.csproj2
-rw-r--r--src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/ILCompilerDriver.cs1
-rw-r--r--src/coreclr/tools/aot/crossgen2/CommandLineOptions.cs266
-rw-r--r--src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.cs376
-rw-r--r--src/coreclr/tools/aot/crossgen2/Program.cs495
-rw-r--r--src/coreclr/tools/aot/crossgen2/Properties/Resources.resx5
-rw-r--r--src/coreclr/tools/aot/crossgen2/crossgen2.csproj3
-rw-r--r--src/coreclr/tools/aot/crossgen2/crossgen2.props21
-rw-r--r--src/coreclr/tools/dotnet-pgo/dotnet-pgo.csproj3
-rw-r--r--src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp8
-rw-r--r--src/coreclr/tools/superpmi/superpmi-shared/methodcontext.h11
-rw-r--r--src/coreclr/tools/superpmi/superpmi-shared/standardpch.h4
-rw-r--r--src/coreclr/tools/superpmi/superpmi/CMakeLists.txt1
-rw-r--r--src/coreclr/tools/superpmi/superpmi/commandline.cpp19
-rw-r--r--src/coreclr/tools/superpmi/superpmi/commandline.h6
-rw-r--r--src/coreclr/tools/superpmi/superpmi/fileio.cpp115
-rw-r--r--src/coreclr/tools/superpmi/superpmi/fileio.h133
-rw-r--r--src/coreclr/tools/superpmi/superpmi/jitinstance.cpp26
-rw-r--r--src/coreclr/tools/superpmi/superpmi/jitinstance.h2
-rw-r--r--src/coreclr/tools/superpmi/superpmi/metricssummary.cpp159
-rw-r--r--src/coreclr/tools/superpmi/superpmi/metricssummary.h22
-rw-r--r--src/coreclr/tools/superpmi/superpmi/parallelsuperpmi.cpp89
-rw-r--r--src/coreclr/tools/superpmi/superpmi/superpmi.cpp193
-rw-r--r--src/coreclr/utilcode/util_nodependencies.cpp55
-rw-r--r--src/coreclr/vm/amd64/AsmHelpers.asm16
-rw-r--r--src/coreclr/vm/amd64/unixstubs.cpp12
-rw-r--r--src/coreclr/vm/appdomain.cpp1
-rw-r--r--src/coreclr/vm/arm/asmconstants.h3
-rw-r--r--src/coreclr/vm/array.cpp2
-rw-r--r--src/coreclr/vm/ceemain.cpp1
-rw-r--r--src/coreclr/vm/cgensys.h1
-rw-r--r--src/coreclr/vm/class.cpp1
-rw-r--r--src/coreclr/vm/classnames.h2
-rw-r--r--src/coreclr/vm/clrtocomcall.cpp2
-rw-r--r--src/coreclr/vm/codeman.cpp139
-rw-r--r--src/coreclr/vm/comcallablewrapper.cpp76
-rw-r--r--src/coreclr/vm/comcallablewrapper.h8
-rw-r--r--src/coreclr/vm/comutilnative.cpp4
-rw-r--r--src/coreclr/vm/comutilnative.h2
-rw-r--r--src/coreclr/vm/dllimport.cpp4
-rw-r--r--src/coreclr/vm/dynamicmethod.cpp2
-rw-r--r--src/coreclr/vm/eepolicy.cpp4
-rw-r--r--src/coreclr/vm/eventing/eventpipe/ep-rt-coreclr.h53
-rw-r--r--src/coreclr/vm/excep.cpp25
-rw-r--r--src/coreclr/vm/fieldmarshaler.cpp4
-rw-r--r--src/coreclr/vm/gcenv.ee.cpp2
-rw-r--r--src/coreclr/vm/gcenv.os.cpp4
-rw-r--r--src/coreclr/vm/gcinfodecoder.cpp46
-rw-r--r--src/coreclr/vm/gdbjit.cpp4
-rw-r--r--src/coreclr/vm/genmeth.cpp7
-rw-r--r--src/coreclr/vm/hosting.cpp48
-rw-r--r--src/coreclr/vm/i386/asmconstants.h3
-rw-r--r--src/coreclr/vm/i386/cgenx86.cpp37
-rw-r--r--src/coreclr/vm/ilstubcache.cpp1
-rw-r--r--src/coreclr/vm/jithelpers.cpp197
-rw-r--r--src/coreclr/vm/jitinterface.cpp29
-rw-r--r--src/coreclr/vm/method.cpp18
-rw-r--r--src/coreclr/vm/method.hpp31
-rw-r--r--src/coreclr/vm/method.inl25
-rw-r--r--src/coreclr/vm/methodtablebuilder.cpp33
-rw-r--r--src/coreclr/vm/mngstdinterfaces.cpp1
-rw-r--r--src/coreclr/vm/prestub.cpp2
-rw-r--r--src/coreclr/vm/stdinterfaces.cpp121
-rw-r--r--src/coreclr/vm/stdinterfaces_internal.h28
-rw-r--r--src/coreclr/vm/stubhelpers.cpp2
-rw-r--r--src/coreclr/vm/threads.cpp2
-rw-r--r--src/coreclr/vm/threads.h2
-rw-r--r--src/coreclr/vm/threads.inl4
-rw-r--r--src/coreclr/vm/threadsuspend.cpp26
-rw-r--r--src/coreclr/vm/typestring.h1
-rw-r--r--src/coreclr/vm/weakreferencenative.cpp1
-rw-r--r--src/coreclr/vm/wellknownattributes.h3
-rw-r--r--src/installer/managed/Microsoft.NET.HostModel/AppHost/AppHostExceptions.cs14
-rw-r--r--src/installer/managed/Microsoft.NET.HostModel/AppHost/HostWriter.cs4
-rw-r--r--src/installer/managed/Microsoft.NET.HostModel/AppHost/PEUtils.cs6
-rw-r--r--src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.AppHost.Tests/AppHostUpdateTests.cs1
-rw-r--r--src/libraries/Common/src/Interop/Android/System.Security.Cryptography.Native.Android/Interop.Cipher.cs28
-rw-r--r--src/libraries/Common/src/Interop/OSX/System.Native/Interop.SearchPath.cs1
-rw-r--r--src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Aead.cs120
-rw-r--r--src/libraries/Common/src/Interop/Windows/BCrypt/BCryptAlgorithmCache.cs30
-rw-r--r--src/libraries/Common/src/Interop/Windows/BCrypt/Cng.cs5
-rw-r--r--src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptEncryptDecrypt.RSA.cs205
-rw-r--r--src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptExportKey.cs32
-rw-r--r--src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptFinalizeKey.cs28
-rw-r--r--src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptGenerateKeyPair.cs38
-rw-r--r--src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptGetProperty.cs36
-rw-r--r--src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptImportKeyPair.cs52
-rw-r--r--src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptOpenAlgorithmProvider.cs27
-rw-r--r--src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptPropertyStrings.cs1
-rw-r--r--src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptSignHash.cs77
-rw-r--r--src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptVerifySignature.cs88
-rw-r--r--src/libraries/Common/src/Interop/Windows/BCrypt/Interop.Blobs.cs13
-rw-r--r--src/libraries/Common/src/Interop/Windows/BCrypt/Interop.NTSTATUS.cs2
-rw-r--r--src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertCreateCertificateContext.cs17
-rw-r--r--src/libraries/Common/src/System/IO/PathInternal.Unix.cs1
-rw-r--r--src/libraries/Common/src/System/IO/PathInternal.Windows.cs1
-rw-r--r--src/libraries/Common/src/System/Reflection/AssemblyMetadataAttribute.cs28
-rw-r--r--src/libraries/Common/src/System/Runtime/InteropServices/ComEventsMethod.cs108
-rw-r--r--src/libraries/Common/src/System/Runtime/InteropServices/WindowsRuntime/WindowsRuntimeImportAttribute.cs12
-rw-r--r--src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanAndroid.cs6
-rw-r--r--src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanCng.cs13
-rw-r--r--src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanOpenSsl.cs6
-rw-r--r--src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanSecurityTransforms.cs14
-rw-r--r--src/libraries/Common/src/System/Security/Cryptography/ECDsaAndroid.cs13
-rw-r--r--src/libraries/Common/src/System/Security/Cryptography/ECDsaCng.cs13
-rw-r--r--src/libraries/Common/src/System/Security/Cryptography/ECDsaOpenSsl.cs13
-rw-r--r--src/libraries/Common/src/System/Security/Cryptography/ECDsaSecurityTransforms.cs13
-rw-r--r--src/libraries/Common/src/System/Security/Cryptography/RSACng.ImportExport.cs424
-rw-r--r--src/libraries/Common/src/System/Security/Cryptography/RSACng.SignVerify.cs2
-rw-r--r--src/libraries/Common/src/System/SerializableAttribute.cs11
-rw-r--r--src/libraries/Common/tests/StaticTestGenerator/Program.cs11
-rw-r--r--src/libraries/Common/tests/StaticTestGenerator/StaticTestGenerator.csproj3
-rw-r--r--src/libraries/Common/tests/System/Collections/IDictionary.Generic.Tests.cs12
-rw-r--r--src/libraries/Common/tests/System/Collections/IEnumerable.Generic.Tests.cs18
-rw-r--r--src/libraries/Common/tests/System/Collections/TestBase.Generic.cs71
-rw-r--r--src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs1
-rw-r--r--src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs2
-rw-r--r--src/libraries/Directory.Build.props10
-rw-r--r--src/libraries/Directory.Build.targets2
-rw-r--r--src/libraries/Microsoft.Extensions.Caching.Memory/Microsoft.Extensions.Caching.Memory.sln7
-rw-r--r--src/libraries/Microsoft.Extensions.Configuration.Json/Microsoft.Extensions.Configuration.Json.sln7
-rw-r--r--src/libraries/Microsoft.Extensions.Configuration.Json/src/Microsoft.Extensions.Configuration.Json.csproj4
-rw-r--r--src/libraries/Microsoft.Extensions.Configuration.Json/src/README.md66
-rw-r--r--src/libraries/Microsoft.Extensions.Configuration.UserSecrets/Microsoft.Extensions.Configuration.UserSecrets.sln7
-rw-r--r--src/libraries/Microsoft.Extensions.Configuration/Microsoft.Extensions.Configuration.sln7
-rw-r--r--src/libraries/Microsoft.Extensions.DependencyModel/Microsoft.Extensions.DependencyModel.sln7
-rw-r--r--src/libraries/Microsoft.Extensions.HostFactoryResolver/Microsoft.Extensions.HostFactoryResolver.sln14
-rw-r--r--src/libraries/Microsoft.Extensions.Hosting.Systemd/Microsoft.Extensions.Hosting.Systemd.sln14
-rw-r--r--src/libraries/Microsoft.Extensions.Hosting.WindowsServices/Microsoft.Extensions.Hosting.WindowsServices.sln14
-rw-r--r--src/libraries/Microsoft.Extensions.Hosting/Microsoft.Extensions.Hosting.sln14
-rw-r--r--src/libraries/Microsoft.Extensions.Hosting/src/HostBuilder.cs2
-rw-r--r--src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Microsoft.Extensions.Hosting.Unit.Tests.csproj1
-rw-r--r--src/libraries/Microsoft.Extensions.Http/Microsoft.Extensions.Http.sln7
-rw-r--r--src/libraries/Microsoft.Extensions.Logging.Abstractions/Microsoft.Extensions.Logging.Abstractions.sln7
-rw-r--r--src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/LoggerMessageGenerator.Parser.cs5
-rw-r--r--src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/LoggerMessageGenerator.Roslyn4.0.cs4
-rw-r--r--src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Microsoft.Extensions.Logging.Generators.Roslyn4.4.csproj20
-rw-r--r--src/libraries/Microsoft.Extensions.Logging.Abstractions/src/Microsoft.Extensions.Logging.Abstractions.csproj3
-rw-r--r--src/libraries/Microsoft.Extensions.Logging.Abstractions/tests/Microsoft.Extensions.Logging.Generators.Tests/LoggerMessageGeneratorParserTests.cs17
-rw-r--r--src/libraries/Microsoft.Extensions.Logging.Configuration/Microsoft.Extensions.Logging.Configuration.sln7
-rw-r--r--src/libraries/Microsoft.Extensions.Logging.Console/Microsoft.Extensions.Logging.Console.sln14
-rw-r--r--src/libraries/Microsoft.Extensions.Logging.Console/src/ConsoleLoggerExtensions.cs3
-rw-r--r--src/libraries/Microsoft.Extensions.Logging.Console/src/Microsoft.Extensions.Logging.Console.csproj1
-rw-r--r--src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/ConsoleLoggerExtensionsTests.cs1
-rw-r--r--src/libraries/Microsoft.Extensions.Logging.Console/tests/TrimmingTests/JsonFormattingTests.cs120
-rw-r--r--src/libraries/Microsoft.Extensions.Logging.Console/tests/TrimmingTests/Microsoft.Extensions.Logging.Console.TrimmingTests.proj1
-rw-r--r--src/libraries/Microsoft.Extensions.Logging.Debug/Microsoft.Extensions.Logging.Debug.sln7
-rw-r--r--src/libraries/Microsoft.Extensions.Logging.EventLog/Microsoft.Extensions.Logging.EventLog.sln7
-rw-r--r--src/libraries/Microsoft.Extensions.Logging.EventSource/Microsoft.Extensions.Logging.EventSource.sln14
-rw-r--r--src/libraries/Microsoft.Extensions.Logging.EventSource/tests/Microsoft.Extensions.Logging.EventSource.Tests.csproj1
-rw-r--r--src/libraries/Microsoft.Extensions.Logging.TraceSource/Microsoft.Extensions.Logging.TraceSource.sln7
-rw-r--r--src/libraries/Microsoft.Extensions.Logging/Microsoft.Extensions.Logging.sln14
-rw-r--r--src/libraries/Microsoft.Extensions.Options/Microsoft.Extensions.Options.sln14
-rw-r--r--src/libraries/Microsoft.Extensions.Primitives/src/ChangeToken.cs1
-rw-r--r--src/libraries/Microsoft.Extensions.Primitives/src/Extensions.cs3
-rw-r--r--src/libraries/Microsoft.Extensions.Primitives/src/StringSegment.cs6
-rw-r--r--src/libraries/Microsoft.Extensions.Primitives/src/StringSegmentComparer.cs14
-rw-r--r--src/libraries/Microsoft.Extensions.Primitives/src/StringTokenizer.cs13
-rw-r--r--src/libraries/Microsoft.Extensions.Primitives/src/StringValues.cs11
-rw-r--r--src/libraries/Microsoft.Internal.Runtime.AspNetCore.Transport/src/Microsoft.Internal.Runtime.AspNetCore.Transport.proj10
-rw-r--r--src/libraries/Microsoft.Internal.Runtime.WindowsDesktop.Transport/src/Microsoft.Internal.Runtime.WindowsDesktop.Transport.proj6
-rw-r--r--src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj7
-rw-r--r--src/libraries/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs2
-rw-r--r--src/libraries/Microsoft.Win32.Primitives/Microsoft.Win32.Primitives.sln42
-rw-r--r--src/libraries/NetCoreAppLibrary.props2
-rw-r--r--src/libraries/System.AppContext/System.AppContext.sln42
-rw-r--r--src/libraries/System.Buffers/System.Buffers.sln42
-rw-r--r--src/libraries/System.Collections.Concurrent/System.Collections.Concurrent.sln60
-rw-r--r--src/libraries/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentDictionary.cs24
-rw-r--r--src/libraries/System.Collections.Immutable/tests/System.Collections.Immutable.Tests.csproj2
-rw-r--r--src/libraries/System.Collections.NonGeneric/tests/QueueTests.cs2
-rw-r--r--src/libraries/System.Collections.NonGeneric/tests/SortedListTests.cs4
-rw-r--r--src/libraries/System.Collections.NonGeneric/tests/StackTests.cs2
-rw-r--r--src/libraries/System.Collections.NonGeneric/tests/System.Collections.NonGeneric.Tests.csproj2
-rw-r--r--src/libraries/System.Collections/System.Collections.sln123
-rw-r--r--src/libraries/System.Collections/ref/System.Collections.cs26
-rw-r--r--src/libraries/System.Collections/src/MatchingRefApiCompatBaseline.txt2
-rw-r--r--src/libraries/System.Collections/src/System.Collections.csproj1
-rw-r--r--src/libraries/System.Collections/src/System/Collections/Generic/CollectionExtensions.cs78
-rw-r--r--src/libraries/System.Collections/src/System/Collections/Generic/PriorityQueue.cs48
-rw-r--r--src/libraries/System.Collections/src/System/Collections/Generic/SortedDictionary.cs2
-rw-r--r--src/libraries/System.Collections/tests/Generic/Dictionary/Dictionary.Generic.Tests.ConcurrentAccessDetection.cs2
-rw-r--r--src/libraries/System.Collections/tests/Generic/List/List.Generic.Tests.AddRange.cs29
-rw-r--r--src/libraries/System.Collections/tests/Generic/List/List.Generic.Tests.CopyTo.cs45
-rw-r--r--src/libraries/System.Collections/tests/Generic/List/List.Generic.Tests.InsertRange.cs51
-rw-r--r--src/libraries/System.Collections/tests/Generic/List/List.Generic.cs4
-rw-r--r--src/libraries/System.Collections/tests/Generic/PriorityQueue/PriorityQueue.Generic.Tests.cs24
-rw-r--r--src/libraries/System.Collections/tests/Generic/PriorityQueue/PriorityQueue.Tests.cs49
-rw-r--r--src/libraries/System.Collections/tests/System.Collections.Tests.csproj4
-rw-r--r--src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/ReflectTypeDescriptionProvider.cs3
-rw-r--r--src/libraries/System.Configuration.ConfigurationManager/System.Configuration.ConfigurationManager.sln57
-rw-r--r--src/libraries/System.Console/src/System/IO/KeyParser.cs8
-rw-r--r--src/libraries/System.Console/tests/KeyParserTests.cs8
-rw-r--r--src/libraries/System.Data.Common/System.Data.Common.sln96
-rw-r--r--src/libraries/System.Data.Common/ref/System.Data.Common.cs5
-rw-r--r--src/libraries/System.Data.OleDb/System.Data.Oledb.sln21
-rw-r--r--src/libraries/System.Diagnostics.Contracts/System.Diagnostics.Contracts.sln42
-rw-r--r--src/libraries/System.Diagnostics.Debug/System.Diagnostics.Debug.sln60
-rw-r--r--src/libraries/System.Diagnostics.DiagnosticSource/ref/System.Diagnostics.DiagnosticSource.cs2
-rw-r--r--src/libraries/System.Diagnostics.DiagnosticSource/ref/System.Diagnostics.DiagnosticSourceActivity.cs2
-rw-r--r--src/libraries/System.Diagnostics.DiagnosticSource/src/System.Diagnostics.DiagnosticSource.csproj4
-rw-r--r--src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticListener.cs3
-rw-r--r--src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticSource.cs2
-rw-r--r--src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticSourceActivity.cs2
-rw-r--r--src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticSourceEventSource.cs167
-rw-r--r--src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/HttpHandlerDiagnosticListener.cs5
-rw-r--r--src/libraries/System.Diagnostics.DiagnosticSource/tests/NativeAotTests/DiagnosticSourceEventSourceTests.cs110
-rw-r--r--src/libraries/System.Diagnostics.DiagnosticSource/tests/NativeAotTests/System.Diagnostics.DiagnosticSource.NativeAotTests.proj10
-rw-r--r--src/libraries/System.Diagnostics.PerformanceCounter/System.Diagnostics.PerformanceCounter.sln21
-rw-r--r--src/libraries/System.Diagnostics.StackTrace/System.Diagnostics.StackTrace.sln87
-rw-r--r--src/libraries/System.Diagnostics.Tools/System.Diagnostics.Tools.sln42
-rw-r--r--src/libraries/System.Diagnostics.TraceSource/System.Diagnostics.TraceSource.sln574
-rw-r--r--src/libraries/System.Diagnostics.Tracing/System.Diagnostics.Tracing.sln42
-rw-r--r--src/libraries/System.DirectoryServices.AccountManagement/System.DirectoryServices.AccountManagement.sln21
-rw-r--r--src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/Interop/LdapPal.Linux.cs4
-rw-r--r--src/libraries/System.Formats.Asn1/src/System/Formats/Asn1/AsnWriter.cs17
-rw-r--r--src/libraries/System.Formats.Asn1/src/System/Formats/Asn1/SetOfValueComparer.cs9
-rw-r--r--src/libraries/System.Formats.Tar/System.Formats.Tar.sln7
-rw-r--r--src/libraries/System.Formats.Tar/src/Resources/Strings.resx59
-rw-r--r--src/libraries/System.Formats.Tar/src/System.Formats.Tar.csproj1
-rw-r--r--src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarHeader.Read.cs4
-rw-r--r--src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarHeader.Write.cs190
-rw-r--r--src/libraries/System.Formats.Tar/tests/System.Formats.Tar.Tests.csproj2
-rw-r--r--src/libraries/System.Formats.Tar/tests/TarTestsBase.cs176
-rw-r--r--src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.Tests.cs38
-rw-r--r--src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntry.Entry.Roundtrip.Tests.cs151
-rw-r--r--src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntry.Tests.cs99
-rw-r--r--src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntryAsync.Entry.Roundtrip.Tests.cs100
-rw-r--r--src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntryAsync.Tests.cs57
-rw-r--r--src/libraries/System.Globalization.Calendars/System.Globalization.Calendars.sln45
-rw-r--r--src/libraries/System.Globalization/System.Globalization.sln51
-rw-r--r--src/libraries/System.IO.FileSystem/tests/FileStream/FileStreamConformanceTests.Windows.cs16
-rw-r--r--src/libraries/System.IO.IsolatedStorage/src/System.IO.IsolatedStorage.csproj12
-rw-r--r--src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/Helper.AnyMobile.cs10
-rw-r--r--src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/Helper.NonMobile.cs10
-rw-r--r--src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/Helper.Win32Unix.cs2
-rw-r--r--src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/Helper.cs6
-rw-r--r--src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/IsolatedStorageFile.AnyMobile.cs13
-rw-r--r--src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/IsolatedStorageFile.NonMobile.cs19
-rw-r--r--src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/IsolatedStorageFile.cs4
-rw-r--r--src/libraries/System.IO.IsolatedStorage/tests/System.IO.IsolatedStorage.Tests.csproj12
-rw-r--r--src/libraries/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/HelperTests.cs2
-rw-r--r--src/libraries/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/TestHelper.AnyMobile.cs23
-rw-r--r--src/libraries/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/TestHelper.NonMobile.cs36
-rw-r--r--src/libraries/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/TestHelper.cs25
-rw-r--r--src/libraries/System.IO.Pipes/System.IO.Pipes.sln21
-rw-r--r--src/libraries/System.IO.UnmanagedMemoryStream/System.IO.UnmanagedMemoryStream.sln51
-rw-r--r--src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/ILGen.cs26
-rw-r--r--src/libraries/System.Linq.Expressions/tests/Convert/ConvertTests.cs80
-rw-r--r--src/libraries/System.Linq.Expressions/tests/ILReader/ILReaderFactory.cs2
-rw-r--r--src/libraries/System.Linq/src/System.Linq.csproj2
-rw-r--r--src/libraries/System.Linq/src/System/Linq/Max.cs99
-rw-r--r--src/libraries/System.Linq/src/System/Linq/MaxMin.cs118
-rw-r--r--src/libraries/System.Linq/src/System/Linq/Min.cs103
-rw-r--r--src/libraries/System.Linq/tests/MaxTests.cs96
-rw-r--r--src/libraries/System.Linq/tests/MinTests.cs92
-rw-r--r--src/libraries/System.Memory.Data/System.Memory.Data.sln7
-rw-r--r--src/libraries/System.Memory/System.Memory.sln42
-rw-r--r--src/libraries/System.Memory/tests/Span/SequenceEqual.T.cs179
-rw-r--r--src/libraries/System.Net.Http.Json/System.Net.Http.Json.sln7
-rw-r--r--src/libraries/System.Net.Http.WinHttpHandler/System.Net.Http.WinHttpHandler.sln7
-rw-r--r--src/libraries/System.Net.Http/System.Net.Http.sln28
-rw-r--r--src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj1
-rw-r--r--src/libraries/System.Net.Http/tests/StressTests/HttpStress/HttpStress.csproj1
-rw-r--r--src/libraries/System.Net.Mail/src/System/Net/Mime/MimeBasePart.cs3
-rw-r--r--src/libraries/System.Net.Mail/tests/Functional/System.Net.Mail.Functional.Tests.csproj1
-rw-r--r--src/libraries/System.Net.NameResolution/tests/FunctionalTests/System.Net.NameResolution.Functional.Tests.csproj1
-rw-r--r--src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/LinuxIPv4InterfaceProperties.cs3
-rw-r--r--src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/StringParsingHelpers.Connections.cs14
-rw-r--r--src/libraries/System.Net.NetworkInformation/tests/FunctionalTests/System.Net.NetworkInformation.Functional.Tests.csproj1
-rw-r--r--src/libraries/System.Net.Primitives/src/System.Net.Primitives.csproj3
-rw-r--r--src/libraries/System.Net.Primitives/src/System/Net/IPAddress.cs108
-rw-r--r--src/libraries/System.Net.Quic/ref/System.Net.Quic.cs1
-rw-r--r--src/libraries/System.Net.Quic/src/Resources/Strings.resx3
-rw-r--r--src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/ThrowHelper.cs2
-rw-r--r--src/libraries/System.Net.Quic/src/System/Net/Quic/Interop/msquic.cs1
-rw-r--r--src/libraries/System.Net.Quic/src/System/Net/Quic/Interop/msquic_generated.cs86
-rw-r--r--src/libraries/System.Net.Quic/src/System/Net/Quic/Interop/msquic_generated_linux.cs3
-rw-r--r--src/libraries/System.Net.Quic/src/System/Net/Quic/Interop/msquic_generated_macos.cs3
-rw-r--r--src/libraries/System.Net.Quic/src/System/Net/Quic/Interop/msquic_generated_windows.cs3
-rw-r--r--src/libraries/System.Net.Quic/src/System/Net/Quic/QuicError.cs5
-rw-r--r--src/libraries/System.Net.Quic/src/System/Net/Quic/QuicStream.Stream.cs2
-rw-r--r--src/libraries/System.Net.Quic/tests/FunctionalTests/QuicListenerTests.cs11
-rw-r--r--src/libraries/System.Net.Quic/tests/FunctionalTests/QuicTestBase.cs1
-rw-r--r--src/libraries/System.Net.Requests/tests/System.Net.Requests.Tests.csproj1
-rw-r--r--src/libraries/System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj1
-rw-r--r--src/libraries/System.Net.Security/tests/UnitTests/System.Net.Security.Unit.Tests.csproj2
-rw-r--r--src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Unix.cs49
-rw-r--r--src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEventArgs.Unix.cs23
-rw-r--r--src/libraries/System.Net.Sockets/tests/FunctionalTests/System.Net.Sockets.Tests.csproj1
-rw-r--r--src/libraries/System.Net.WebClient/src/System.Net.WebClient.csproj1
-rw-r--r--src/libraries/System.Net.WebClient/src/System/Net/WebClient.cs116
-rw-r--r--src/libraries/System.Numerics.Vectors/System.Numerics.Vectors.sln42
-rw-r--r--src/libraries/System.Numerics.Vectors/tests/GenericVectorTests.cs7
-rw-r--r--src/libraries/System.Private.CoreLib/gen/EventSourceGenerator.Parser.cs1
-rw-r--r--src/libraries/System.Private.CoreLib/gen/EventSourceGenerator.cs2
-rw-r--r--src/libraries/System.Private.CoreLib/gen/System.Private.CoreLib.Generators.csproj11
-rw-r--r--src/libraries/System.Private.CoreLib/src/ILLink/ILLink.Descriptors.LibraryBuild.xml22
-rw-r--r--src/libraries/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComponentActivator.cs2
-rw-r--r--src/libraries/System.Private.CoreLib/src/Resources/Strings.resx3
-rw-r--r--src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems8
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/AppContext.cs6
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Array.cs31
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Collections/Generic/CollectionExtensions.cs164
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Collections/Generic/Dictionary.cs323
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.cs39
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Collections/Generic/HashSet.cs170
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Collections/Generic/IInternalStringEqualityComparer.cs8
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Collections/Generic/List.cs43
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Collections/Generic/NonRandomizedStringEqualityComparer.cs11
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Collections/ObjectModel/ReadOnlyCollection.cs13
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Collections/ObjectModel/ReadOnlyDictionary.cs2
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/DateTimeOffset.Android.cs66
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Decimal.cs1
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventCounter.cs2
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs6
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventTypes.cs2
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Double.cs3
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Enum.EnumInfo.cs12
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Enum.cs55
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Environment.Android.cs6
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Environment.GetFolderPathCore.Unix.cs61
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Half.cs1
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/IO/DirectoryInfo.cs15
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/IO/FileInfo.cs15
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/IO/FileSystemInfo.cs24
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Int128.cs1
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Int16.cs1
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Int32.cs1
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Int64.cs1
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/IntPtr.cs1
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Math.cs20
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/MathF.cs20
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/MemoryExtensions.cs2
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Numerics/INumberBase.cs4
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Numerics/TotalOrderIeee754Comparer.cs233
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Numerics/Vector.cs2
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.cs (renamed from src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.cs)445
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Reflection/Module.cs2
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Resources/ResourceManager.cs2
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Resources/ResourceSet.cs2
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/RuntimeInformation.cs21
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/UnmanagedFunctionPointerAttribute.cs5
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Crc32.PlatformNotSupported.cs2
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector128.cs2
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector256.cs2
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector64.cs2
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Runtime/MemoryFailPoint.Windows.cs4
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SerializationInfo.SerializationGuard.cs14
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SerializationInfo.cs2
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/SByte.cs1
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Single.cs1
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/SpanHelpers.Mono.cs2697
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/SpanHelpers.T.cs244
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.GateThread.cs2
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.WaitThread.cs2
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs25
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPoolWorkQueue.cs2
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.cs28
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Type.cs12
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/UInt128.cs1
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/UInt16.cs1
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/UInt32.cs1
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/UInt64.cs1
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/UIntPtr.cs1
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/WeakReference.T.cs80
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/WeakReference.cs118
-rw-r--r--src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlCanonicalWriter.cs7
-rw-r--r--src/libraries/System.Private.Uri/System.Private.Uri.sln44
-rw-r--r--src/libraries/System.Private.Xml.Linq/System.Private.Xml.Linq.sln7
-rw-r--r--src/libraries/System.Private.Xml/System.Private.Xml.sln22
-rw-r--r--src/libraries/System.Private.Xml/src/System/Xml/Core/ReadOnlyTernaryTree.cs1
-rw-r--r--src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReaderImpl.cs2
-rw-r--r--src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextWriter.cs20
-rw-r--r--src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWellFormedWriterHelpers.cs5
-rw-r--r--src/libraries/System.Private.Xml/src/System/Xml/Dom/XmlNode.cs2
-rw-r--r--src/libraries/System.Private.Xml/src/System/Xml/Schema/FacetChecker.cs11
-rw-r--r--src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlValueConverter.cs2
-rw-r--r--src/libraries/System.Private.Xml/src/System/Xml/Serialization/Xmlcustomformatter.cs3
-rw-r--r--src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/XPathScanner.cs14
-rw-r--r--src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathNavigatorReader.cs2
-rw-r--r--src/libraries/System.Private.Xml/src/System/Xml/XmlCharType.cs5
-rw-r--r--src/libraries/System.Private.Xml/src/System/Xml/XmlComplianceUtil.cs6
-rw-r--r--src/libraries/System.Private.Xml/src/System/Xml/XmlConvert.cs257
-rw-r--r--src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/SortAction.cs2
-rw-r--r--src/libraries/System.Private.Xml/src/Utils/System.Xml.Utils.txt15
-rw-r--r--src/libraries/System.Private.Xml/src/Utils/native.rc4
-rw-r--r--src/libraries/System.Private.Xml/tests/ExceptionVerifier.cs (renamed from src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ExceptionVerifier.cs)17
-rw-r--r--src/libraries/System.Private.Xml/tests/System.Private.Xml.Tests.csproj3
-rw-r--r--src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/Initialize_EndValidation.cs1
-rw-r--r--src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/PropertiesTests.cs1
-rw-r--r--src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateAttribute.cs1
-rw-r--r--src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateAttribute_String.cs1
-rw-r--r--src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateElement.cs1
-rw-r--r--src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateText_EndElement.cs1
-rw-r--r--src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateText_String.cs1
-rw-r--r--src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateWhitespace_String.cs1
-rw-r--r--src/libraries/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.RuntimeOnly.cs4
-rw-r--r--src/libraries/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.cs21
-rw-r--r--src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/Errata4.cs1
-rw-r--r--src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/OutputSettings.cs1
-rw-r--r--src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/TempFiles.cs1
-rw-r--r--src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslCompiledTransform.cs15
-rw-r--r--src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslCompilerTests.cs1
-rw-r--r--src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslTransformMultith.cs2
-rw-r--r--src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltApiV2.cs1
-rw-r--r--src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltArgumentList.cs1
-rw-r--r--src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltArgumentListMultith.cs3
-rw-r--r--src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltSettings.cs1
-rw-r--r--src/libraries/System.Private.Xml/tests/Xslt/XslTransformApi/ExceptionVerifier.cs397
-rw-r--r--src/libraries/System.Reflection.Context/tests/CustomReflectionContextTests.cs2
-rw-r--r--src/libraries/System.Reflection.Emit.ILGeneration/System.Reflection.Emit.ILGeneration.sln51
-rw-r--r--src/libraries/System.Reflection.Emit.Lightweight/System.Reflection.Emit.Lightweight.sln54
-rw-r--r--src/libraries/System.Reflection.Emit.Lightweight/tests/DynamicMethodCtor.cs1
-rw-r--r--src/libraries/System.Reflection.Emit/System.Reflection.Emit.sln54
-rw-r--r--src/libraries/System.Reflection.Metadata/tests/Resources/Interop/Interop.Mock01.cs1
-rw-r--r--src/libraries/System.Reflection.MetadataLoadContext/tests/src/Tests/CustomAttributes/CustomAttributeTests.cs16
-rw-r--r--src/libraries/System.Reflection.Primitives/System.Reflection.Primitives.sln36
-rw-r--r--src/libraries/System.Reflection.TypeExtensions/System.Reflection.TypeExtensions.sln42
-rw-r--r--src/libraries/System.Reflection/System.Reflection.sln96
-rw-r--r--src/libraries/System.Reflection/tests/AssemblyTests.cs15
-rw-r--r--src/libraries/System.Reflection/tests/System.Reflection.Tests.csproj2
-rw-r--r--src/libraries/System.Resources.ResourceManager/System.Resources.ResourceManager.sln60
-rw-r--r--src/libraries/System.Runtime.Caching/System.Runtime.Caching.sln21
-rw-r--r--src/libraries/System.Runtime.CompilerServices.Unsafe/System.Runtime.CompilerServices.Unsafe.sln42
-rw-r--r--src/libraries/System.Runtime.Extensions/System.Runtime.Extensions.sln63
-rw-r--r--src/libraries/System.Runtime.Extensions/tests/System/EnvironmentTests.cs25
-rw-r--r--src/libraries/System.Runtime.InteropServices.JavaScript/System.Runtime.InteropServices.JavaScript.sln7
-rw-r--r--src/libraries/System.Runtime.InteropServices.JavaScript/ref/System.Runtime.InteropServices.JavaScript.cs2
-rw-r--r--src/libraries/System.Runtime.InteropServices.JavaScript/src/System.Runtime.InteropServices.JavaScript.csproj18
-rw-r--r--src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Interop/JavaScriptExports.cs28
-rw-r--r--src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Task.cs2
-rw-r--r--src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System/Runtime/InteropServices/JavaScript/JSImportExportTest.cs36
-rw-r--r--src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System/Runtime/InteropServices/JavaScript/JavaScriptTestHelper.cs58
-rw-r--r--src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System/Runtime/InteropServices/JavaScript/JavaScriptTestHelper.mjs26
-rw-r--r--src/libraries/System.Runtime.InteropServices/System.Runtime.InteropServices.sln63
-rw-r--r--src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/ConvertToLibraryImportFixer.cs2
-rw-r--r--src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/SyntaxExtensions.cs15
-rw-r--r--src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/LibraryImportGenerator.cs2
-rw-r--r--src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/LibraryImportGenerator.csproj8
-rw-r--r--src/libraries/System.Runtime.InteropServices/src/MatchingRefApiCompatBaseline.txt2
-rw-r--r--src/libraries/System.Runtime.InteropServices/src/System.Runtime.InteropServices.csproj2
-rw-r--r--src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/IDispatchImplAttribute.cs18
-rw-r--r--src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/IDispatchImplType.cs13
-rw-r--r--src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/NativeMarshallingAttributeAnalyzerTests.cs10
-rw-r--r--src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System.Runtime.InteropServices.Tests.csproj1
-rw-r--r--src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/IDispatchImplAttributeTests.cs27
-rw-r--r--src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/AddRefTests.cs1
-rw-r--r--src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/DestroyStructureTests.cs2
-rw-r--r--src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/GetExceptionCodeTests.cs2
-rw-r--r--src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/GetExceptionForHRTests.cs1
-rw-r--r--src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/GetExceptionPointersTests.cs3
-rw-r--r--src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/GetFunctionPointerForDelegateTests.cs4
-rw-r--r--src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/OffsetOfTests.cs6
-rw-r--r--src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/PrelinkTests.cs2
-rw-r--r--src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/PtrToStructureTests.cs3
-rw-r--r--src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/QueryInterfaceTests.cs2
-rw-r--r--src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/ReleaseTests.cs1
-rw-r--r--src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/SizeOfTests.cs4
-rw-r--r--src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/StructureToPtrTests.cs3
-rw-r--r--src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/ThrowExceptionForHRTests.cs1
-rw-r--r--src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/ObjectiveC/MessageSendTests.cs1
-rw-r--r--src/libraries/System.Runtime.InteropServices/tests/TestAssets/NativeExports/NativeExports.csproj11
-rw-r--r--src/libraries/System.Runtime.Intrinsics/System.Runtime.Intrinsics.sln48
-rw-r--r--src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs7
-rw-r--r--src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs7
-rw-r--r--src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector64Tests.cs7
-rw-r--r--src/libraries/System.Runtime.Loader/System.Runtime.Loader.sln117
-rw-r--r--src/libraries/System.Runtime.Serialization.Formatters/System.Runtime.Serialization.Formatters.sln189
-rw-r--r--src/libraries/System.Runtime.Serialization.Schema/Directory.Build.props5
-rw-r--r--src/libraries/System.Runtime.Serialization.Schema/System.Runtime.Serialization.Schema.sln30
-rw-r--r--src/libraries/System.Runtime.Serialization.Schema/src/System.Runtime.Serialization.Schema.csproj1
-rw-r--r--src/libraries/System.Runtime.Serialization.Xml/System.Runtime.Serialization.Xml.sln7
-rw-r--r--src/libraries/System.Runtime/System.Runtime.sln312
-rw-r--r--src/libraries/System.Runtime/ref/System.Runtime.cs15
-rw-r--r--src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj7
-rw-r--r--src/libraries/System.Runtime/tests/System/DoubleTests.cs12
-rw-r--r--src/libraries/System.Runtime/tests/System/Numerics/TotalOrderIeee754ComparerTests.cs104
-rw-r--r--src/libraries/System.Runtime/tests/System/Reflection/ModuleTests.cs2
-rw-r--r--src/libraries/System.Runtime/tests/System/SingleTests.cs12
-rw-r--r--src/libraries/System.Runtime/tests/TestModule/System.Reflection.TestModule.il2
-rw-r--r--src/libraries/System.Security.Cryptography.Pkcs/src/System.Security.Cryptography.Pkcs.csproj2
-rw-r--r--src/libraries/System.Security.Cryptography.X509Certificates/System.Security.Cryptography.X509Certificates.sln37
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/ref/System.Security.Cryptography.Xml.cs182
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/ref/System.Security.Cryptography.Xml.csproj2
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System.Security.Cryptography.Xml.csproj2
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/AncestralNamespaceContextManager.cs10
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/AttributeSortOrder.cs6
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/C14NAncestralNamespaceContextManager.cs10
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXml.cs22
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlAttribute.cs2
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlCDataSection.cs2
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlComment.cs4
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlDocument.cs20
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlElement.cs14
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlNodeList.cs14
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlSignificantWhitespace.cs2
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlText.cs2
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlWhitespace.cs2
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CipherData.cs18
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CipherReference.cs10
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CryptoHelpers.cs4
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/DSAKeyValue.cs24
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/DSASignatureDescription.cs4
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/DataObject.cs18
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptedData.cs20
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptedKey.cs40
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptedReference.cs18
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptedType.cs31
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptedXml.cs120
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptionMethod.cs14
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptionProperty.cs19
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptionPropertyCollection.cs16
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/ExcAncestralNamespaceContextManager.cs6
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/ExcCanonicalXml.cs14
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/KeyInfo.cs18
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/KeyInfoEncryptedKey.cs4
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/KeyInfoName.cs6
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/KeyInfoNode.cs6
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/KeyInfoRetrievalMethod.cs10
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/KeyInfoX509Data.cs36
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/MyXmlDocument.cs2
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/NamespaceFrame.cs8
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/NamespaceSortOrder.cs6
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/RSAKeyValue.cs10
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/RSAPKCS1SignatureDescription.cs8
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/Reference.cs122
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/ReferenceList.cs21
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/Signature.cs42
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/SignedInfo.cs43
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/SignedXml.cs182
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/SignedXmlDebugLog.cs52
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/SymmetricKeyWrap.cs20
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/Transform.cs42
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/TransformChain.cs32
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/Utils.cs70
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDecryptionTransform.cs46
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDsigBase64Transform.cs12
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDsigC14NTransform.cs14
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDsigEnvelopedSignatureTransform.cs24
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDsigExcC14NTransform.cs24
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDsigXPathTransform.cs28
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDsigXsltTransform.cs20
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlLicenseTransform.cs57
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/tests/SignedXmlTest.cs89
-rw-r--r--src/libraries/System.Security.Cryptography.Xml/tests/System.Security.Cryptography.Xml.Tests.csproj1
-rw-r--r--src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.cs6
-rw-r--r--src/libraries/System.Security.Cryptography/src/System.Security.Cryptography.csproj20
-rw-r--r--src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AeadCommon.Windows.cs2
-rw-r--r--src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AesCcm.Android.cs19
-rw-r--r--src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AesCcm.OpenSsl.cs2
-rw-r--r--src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AesGcm.Android.cs19
-rw-r--r--src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AesGcm.OpenSsl.cs2
-rw-r--r--src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AuthenticationTagMismatchException.cs47
-rw-r--r--src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/ChaCha20Poly1305.Android.cs19
-rw-r--r--src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/ChaCha20Poly1305.OpenSsl.cs2
-rw-r--r--src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/ChaCha20Poly1305.macOS.cs72
-rw-r--r--src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngHelpers.cs191
-rw-r--r--src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/ECAlgorithm.cs6
-rw-r--r--src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RSA.Create.Windows.cs2
-rw-r--r--src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RSABCrypt.cs433
-rw-r--r--src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RSACng.ImportExport.cs2
-rw-r--r--src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/Utils.cs25
-rw-r--r--src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Certificate2.cs20
-rw-r--r--src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Pal.Windows.PublicKey.cs39
-rw-r--r--src/libraries/System.Security.Cryptography/tests/AesCcmTests.cs8
-rw-r--r--src/libraries/System.Security.Cryptography/tests/AesGcmTests.cs8
-rw-r--r--src/libraries/System.Security.Cryptography/tests/ChaCha20Poly1305Tests.cs14
-rw-r--r--src/libraries/System.Security.Principal/System.Security.Principal.sln36
-rw-r--r--src/libraries/System.Text.Encoding.Extensions/System.Text.Encoding.Extensions.sln42
-rw-r--r--src/libraries/System.Text.Encoding/System.Text.Encoding.sln51
-rw-r--r--src/libraries/System.Text.Json/Common/JsonConstants.cs3
-rw-r--r--src/libraries/System.Text.Json/System.Text.Json.sln21
-rw-r--r--src/libraries/System.Text.Json/gen/JsonSourceGenerator.Emitter.cs5
-rw-r--r--src/libraries/System.Text.Json/gen/JsonSourceGenerator.Roslyn4.0.cs4
-rw-r--r--src/libraries/System.Text.Json/gen/System.Text.Json.SourceGeneration.Roslyn4.4.csproj20
-rw-r--r--src/libraries/System.Text.Json/src/Resources/Strings.resx3
-rw-r--r--src/libraries/System.Text.Json/src/System.Text.Json.csproj1
-rw-r--r--src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Object/ObjectWithParameterizedConstructorConverter.Large.cs13
-rw-r--r--src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonPolymorphismOptions.cs7
-rw-r--r--src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/MemberAccessor.cs2
-rw-r--r--src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/ReflectionEmitCachingMemberAccessor.cs2
-rw-r--r--src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/ReflectionEmitMemberAccessor.cs13
-rw-r--r--src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/ReflectionMemberAccessor.cs7
-rw-r--r--src/libraries/System.Text.Json/src/System/Text/Json/ThrowHelper.Serialization.cs6
-rw-r--r--src/libraries/System.Text.Json/tests/Common/ConstructorTests/ConstructorTests.ParameterMatching.cs20
-rw-r--r--src/libraries/System.Text.Json/tests/Common/ConstructorTests/ConstructorTests.Stream.cs7
-rw-r--r--src/libraries/System.Text.Json/tests/Common/TestClasses/TestClasses.Constructor.cs208
-rw-r--r--src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/Serialization/ConstructorTests.cs2
-rw-r--r--src/libraries/System.Text.RegularExpressions/gen/RegexGenerator.cs2
-rw-r--r--src/libraries/System.Text.RegularExpressions/gen/System.Text.RegularExpressions.Generator.csproj10
-rw-r--r--src/libraries/System.Text.RegularExpressions/tools/GenerateRegexCasingTable.csproj3
-rw-r--r--src/libraries/System.Threading.Overlapped/System.Threading.Overlapped.sln42
-rw-r--r--src/libraries/System.Threading.RateLimiting/ref/System.Threading.RateLimiting.cs8
-rw-r--r--src/libraries/System.Threading.RateLimiting/src/Resources/Strings.resx9
-rw-r--r--src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/ConcurrencyLimiter.cs4
-rw-r--r--src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/FixedWindowRateLimiter.cs8
-rw-r--r--src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/FixedWindowRateLimiterOptions.cs3
-rw-r--r--src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/SlidingWindowRateLimiter.cs14
-rw-r--r--src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/SlidingWindowRateLimiterOptions.cs3
-rw-r--r--src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/TokenBucketRateLimiter.cs14
-rw-r--r--src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/TokenBucketRateLimiterOptions.cs3
-rw-r--r--src/libraries/System.Threading.RateLimiting/tests/ConcurrencyLimiterTests.cs4
-rw-r--r--src/libraries/System.Threading.RateLimiting/tests/FixedWindowRateLimiterTests.cs17
-rw-r--r--src/libraries/System.Threading.RateLimiting/tests/SlidingWindowRateLimiterTests.cs20
-rw-r--r--src/libraries/System.Threading.RateLimiting/tests/TokenBucketRateLimiterTests.cs20
-rw-r--r--src/libraries/System.Threading.Tasks.Extensions/System.Threading.Tasks.Extensions.sln42
-rw-r--r--src/libraries/System.Threading.Tasks/System.Threading.Tasks.sln42
-rw-r--r--src/libraries/System.Threading.Tasks/tests/Task/TaskRtTests.cs24
-rw-r--r--src/libraries/System.Threading.Thread/System.Threading.Thread.sln54
-rw-r--r--src/libraries/System.Threading.ThreadPool/System.Threading.ThreadPool.sln45
-rw-r--r--src/libraries/System.Threading.Timer/System.Threading.Timer.sln42
-rw-r--r--src/libraries/System.Threading/System.Threading.sln42
-rw-r--r--src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcProxyShimFactory.cs18
-rw-r--r--src/libraries/System.Transactions.Local/src/System/Transactions/TransactionState.cs24
-rw-r--r--src/libraries/System.Transactions.Local/tests/OleTxTests.cs85
-rw-r--r--src/libraries/oob-all.proj3
-rw-r--r--src/libraries/oob-src.proj3
-rw-r--r--src/libraries/pretest.proj2
-rw-r--r--src/libraries/sendtohelixhelp.proj2
-rw-r--r--src/libraries/tests.proj77
-rw-r--r--src/mono/System.Private.CoreLib/MatchingRefApiCompatBaseline.txt28
-rw-r--r--src/mono/System.Private.CoreLib/System.Private.CoreLib.csproj7
-rw-r--r--src/mono/System.Private.CoreLib/src/System/Delegate.Mono.cs6
-rw-r--r--src/mono/System.Private.CoreLib/src/System/Environment.Mono.cs2
-rw-r--r--src/mono/System.Private.CoreLib/src/System/Reflection/CustomAttribute.cs36
-rw-r--r--src/mono/System.Private.CoreLib/src/System/Reflection/Emit/AssemblyBuilder.Mono.cs15
-rw-r--r--src/mono/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.Mono.cs178
-rw-r--r--src/mono/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.cs523
-rw-r--r--src/mono/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.notsupported.cs157
-rw-r--r--src/mono/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilder.Mono.cs19
-rw-r--r--src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeModule.cs2
-rw-r--r--src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeParameterInfo.cs26
-rw-r--r--src/mono/System.Private.CoreLib/src/System/Runtime/InteropServices/GCHandle.Mono.cs8
-rw-r--r--src/mono/System.Private.CoreLib/src/System/WeakReference.Mono.cs49
-rw-r--r--src/mono/System.Private.CoreLib/src/System/WeakReference.T.Mono.cs48
-rw-r--r--src/mono/cmake/config.h.in3
-rw-r--r--src/mono/cmake/configure.cmake4
-rw-r--r--src/mono/dlls/mscordbi/cordb-assembly.cpp1
-rw-r--r--src/mono/mono/component/debugger-agent.c11
-rw-r--r--src/mono/mono/eventpipe/ep-rt-mono.c6
-rw-r--r--src/mono/mono/eventpipe/ep-rt-mono.h10
-rw-r--r--src/mono/mono/metadata/appdomain.c2
-rw-r--r--src/mono/mono/metadata/assembly.c2
-rw-r--r--src/mono/mono/metadata/boehm-gc.c4
-rw-r--r--src/mono/mono/metadata/class-init.c4
-rw-r--r--src/mono/mono/metadata/class-internals.h2
-rw-r--r--src/mono/mono/metadata/class-setup-vtable.c4
-rw-r--r--src/mono/mono/metadata/domain.c7
-rw-r--r--src/mono/mono/metadata/exception.c4
-rw-r--r--src/mono/mono/metadata/icall-def.h2
-rw-r--r--src/mono/mono/metadata/icall.c6
-rw-r--r--src/mono/mono/metadata/loader.c2
-rw-r--r--src/mono/mono/metadata/object-internals.h9
-rw-r--r--src/mono/mono/metadata/sgen-mono.c17
-rw-r--r--src/mono/mono/metadata/sgen-stw.c2
-rw-r--r--src/mono/mono/metadata/sre.c28
-rw-r--r--src/mono/mono/mini/aot-compiler.c70
-rw-r--r--src/mono/mono/mini/exceptions-amd64.c4
-rw-r--r--src/mono/mono/mini/exceptions-x86.c4
-rw-r--r--src/mono/mono/mini/interp/interp-internals.h3
-rw-r--r--src/mono/mono/mini/interp/interp.c12
-rw-r--r--src/mono/mono/mini/interp/mintops.def5
-rw-r--r--src/mono/mono/mini/interp/transform.c116
-rw-r--r--src/mono/mono/mini/jit-icalls.c6
-rw-r--r--src/mono/mono/mini/llvm-intrinsics.h2
-rw-r--r--src/mono/mono/mini/llvm-jit.cpp4
-rw-r--r--src/mono/mono/mini/method-to-ir.c33
-rw-r--r--src/mono/mono/mini/mini-llvm.c79
-rw-r--r--src/mono/mono/mini/mini-ops.h13
-rw-r--r--src/mono/mono/mini/mini-runtime.c2
-rw-r--r--src/mono/mono/mini/mini.c2
-rw-r--r--src/mono/mono/mini/mini.h1
-rw-r--r--src/mono/mono/mini/simd-intrinsics.c159
-rw-r--r--src/mono/mono/mini/simd-methods.h1
-rw-r--r--src/mono/mono/mini/trace.c2
-rw-r--r--src/mono/mono/sgen/sgen-client.h6
-rw-r--r--src/mono/mono/sgen/sgen-fin-weak-hash.c7
-rw-r--r--src/mono/mono/sgen/sgen-gc.c2
-rw-r--r--src/mono/mono/utils/mach-support-amd64.c6
-rw-r--r--src/mono/mono/utils/mach-support-arm.c6
-rw-r--r--src/mono/mono/utils/mach-support-arm64.c6
-rw-r--r--src/mono/mono/utils/mach-support-unknown.c6
-rw-r--r--src/mono/mono/utils/mach-support-x86.c6
-rw-r--r--src/mono/mono/utils/mono-cgroup.c8
-rw-r--r--src/mono/mono/utils/mono-log-android.c2
-rw-r--r--src/mono/mono/utils/mono-log-common.c2
-rw-r--r--src/mono/mono/utils/mono-log-darwin.c2
-rw-r--r--src/mono/mono/utils/mono-log-posix.c2
-rw-r--r--src/mono/mono/utils/mono-log-windows.c2
-rw-r--r--src/mono/mono/utils/mono-proclib.c2
-rw-r--r--src/mono/mono/utils/mono-signal-handler.c2
-rw-r--r--src/mono/mono/utils/mono-threads-mach-helper.c6
-rw-r--r--src/mono/msbuild/apple/build/AppleApp.targets2
-rw-r--r--src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/Microsoft.NET.Workload.Mono.Toolchain.Manifest.pkgproj3
-rw-r--r--src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/WorkloadManifest.targets.in4
-rw-r--r--src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest.pkgproj8
-rw-r--r--src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/WorkloadManifest.json.in2
-rw-r--r--src/mono/sample/wasm/Directory.Build.targets1
-rw-r--r--src/mono/wasi/README.md2
-rw-r--r--src/mono/wasi/mono-wasi-driver/driver.c4
-rw-r--r--src/mono/wasi/mono-wasi-driver/stubs.c2
-rw-r--r--src/mono/wasm/Makefile2
-rw-r--r--src/mono/wasm/README.md2
-rw-r--r--src/mono/wasm/Wasm.Build.Tests/BrowserRunner.cs10
-rw-r--r--src/mono/wasm/Wasm.Build.Tests/BuildEnvironment.cs5
-rw-r--r--src/mono/wasm/Wasm.Build.Tests/BuildTestBase.cs22
-rw-r--r--src/mono/wasm/Wasm.Build.Tests/DotNetCommand.cs2
-rw-r--r--src/mono/wasm/Wasm.Build.Tests/RunCommand.cs2
-rw-r--r--src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj3
-rw-r--r--src/mono/wasm/Wasm.Build.Tests/WasmTemplateTests.cs62
-rw-r--r--src/mono/wasm/build/WasmApp.targets5
-rw-r--r--src/mono/wasm/debugger/BrowserDebugHost/DebugProxyHost.cs1
-rw-r--r--src/mono/wasm/debugger/BrowserDebugProxy/MemberObjectsExplorer.cs56
-rw-r--r--src/mono/wasm/debugger/BrowserDebugProxy/MonoSDBHelper.cs11
-rw-r--r--src/mono/wasm/debugger/BrowserDebugProxy/ValueTypeClass.cs7
-rw-r--r--src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestBase.cs9
-rw-r--r--src/mono/wasm/debugger/DebuggerTestSuite/GetPropertiesTests.cs113
-rw-r--r--src/mono/wasm/debugger/DebuggerTestSuite/MiscTests.cs31
-rw-r--r--src/mono/wasm/debugger/tests/debugger-test-with-non-user-code-class/test.cs4
-rw-r--r--src/mono/wasm/debugger/tests/debugger-test-without-debug-symbols-to-load/test.cs4
-rw-r--r--src/mono/wasm/debugger/tests/debugger-test/debugger-get-properties-test.cs41
-rw-r--r--src/mono/wasm/debugger/tests/debugger-test/debugger-test.cs21
-rw-r--r--src/mono/wasm/host/BrowserHost.cs10
-rw-r--r--src/mono/wasm/host/WebServer.cs33
-rw-r--r--src/mono/wasm/host/WebServerOptions.cs2
-rw-r--r--src/mono/wasm/host/WebServerStartup.cs124
-rw-r--r--src/mono/wasm/runtime/corebindings.c2
-rw-r--r--src/mono/wasm/runtime/driver.c8
-rw-r--r--src/mono/wasm/runtime/logging.ts5
-rw-r--r--src/mono/wasm/runtime/managed-exports.ts21
-rw-r--r--src/mono/wasm/runtime/marshal-to-js.ts8
-rw-r--r--src/mono/wasm/runtime/marshal.ts30
-rw-r--r--src/mono/wasm/runtime/types.ts3
-rw-r--r--src/mono/wasm/templates/templates/browser/.template.config/template.json41
-rw-r--r--src/mono/wasm/templates/templates/browser/Properties/launchSettings.json13
-rw-r--r--src/mono/wasm/templates/templates/browser/main.js11
-rw-r--r--src/mono/wasm/templates/templates/console/.template.config/template.json22
-rw-r--r--src/mono/wasm/templates/templates/console/main.mjs9
-rw-r--r--src/mono/wasm/wasm.proj3
-rwxr-xr-xsrc/native/corehost/build.sh7
-rw-r--r--src/native/corehost/corehost.proj1
-rw-r--r--src/native/corehost/fxr/hostfxr.cpp35
-rw-r--r--src/native/corehost/hostfxr.h41
-rw-r--r--src/native/eventpipe/ds-server.c6
-rw-r--r--src/native/eventpipe/ep-rt.h4
-rw-r--r--src/native/external/cgmanifest.json125
-rw-r--r--src/native/libs/CMakeLists.txt1
-rw-r--r--src/native/libs/System.Globalization.Native/pal_calendarData.c2
-rw-r--r--src/native/libs/System.Globalization.Native/pal_icushim.c8
-rw-r--r--src/native/libs/System.Globalization.Native/pal_locale.c2
-rw-r--r--src/native/libs/System.Globalization.Native/pal_localeNumberData.c13
-rw-r--r--src/native/libs/System.Globalization.Native/pal_normalization.c6
-rw-r--r--src/native/libs/System.IO.Compression.Native/CMakeLists.txt8
-rw-r--r--src/native/libs/System.Native/CMakeLists.txt5
-rw-r--r--src/native/libs/System.Native/pal_console.c16
-rw-r--r--src/native/libs/System.Native/pal_datetime.c4
-rw-r--r--src/native/libs/System.Native/pal_environment.c2
-rw-r--r--src/native/libs/System.Native/pal_io.c2
-rw-r--r--src/native/libs/System.Native/pal_networkstatistics.c6
-rw-r--r--src/native/libs/System.Native/pal_process.c28
-rw-r--r--src/native/libs/System.Native/pal_runtimeinformation.c4
-rw-r--r--src/native/libs/System.Native/pal_searchpath.c2
-rw-r--r--src/native/libs/System.Native/pal_signal.c16
-rw-r--r--src/native/libs/System.Native/pal_threading.c6
-rw-r--r--src/native/libs/System.Native/pal_time.c4
-rw-r--r--src/native/libs/System.Native/pal_uid.c4
-rw-r--r--src/native/libs/System.Net.Security.Native/pal_gssapi.c6
-rw-r--r--src/native/libs/System.Security.Cryptography.Native.Android/pal_cipher.c42
-rw-r--r--src/native/libs/System.Security.Cryptography.Native.Android/pal_cipher.h1
-rw-r--r--src/native/libs/System.Security.Cryptography.Native.Android/pal_err.c6
-rw-r--r--src/native/libs/System.Security.Cryptography.Native.Android/pal_evp.c12
-rw-r--r--src/native/libs/System.Security.Cryptography.Native.Android/pal_jni.c9
-rw-r--r--src/native/libs/System.Security.Cryptography.Native.Android/pal_jni.h3
-rw-r--r--src/native/libs/System.Security.Cryptography.Native.Android/pal_misc.c2
-rw-r--r--src/native/libs/System.Security.Cryptography.Native.Android/pal_rsa.c2
-rw-r--r--src/native/libs/System.Security.Cryptography.Native.Apple/CMakeLists.txt19
-rw-r--r--src/native/libs/System.Security.Cryptography.Native.Apple/entrypoints.c3
-rw-r--r--src/native/libs/System.Security.Cryptography.Native.Apple/extra_libs.cmake6
-rw-r--r--src/native/libs/System.Security.Cryptography.Native.Apple/pal_ssl.c4
-rw-r--r--src/native/libs/System.Security.Cryptography.Native.Apple/pal_swiftbindings.h35
-rw-r--r--src/native/libs/System.Security.Cryptography.Native.Apple/pal_swiftbindings.swift88
-rw-r--r--src/native/libs/System.Security.Cryptography.Native.Apple/pal_x509.c2
-rw-r--r--src/native/libs/System.Security.Cryptography.Native.Apple/pal_x509chain.c4
-rw-r--r--src/native/libs/System.Security.Cryptography.Native/apibridge.c6
-rw-r--r--src/native/libs/System.Security.Cryptography.Native/openssl.c20
-rw-r--r--src/native/libs/System.Security.Cryptography.Native/opensslshim.c4
-rw-r--r--src/native/libs/System.Security.Cryptography.Native/pal_asn1.c2
-rw-r--r--src/native/libs/System.Security.Cryptography.Native/pal_bio.c2
-rw-r--r--src/native/libs/System.Security.Cryptography.Native/pal_err.c6
-rw-r--r--src/native/libs/System.Security.Cryptography.Native/pal_evp.c12
-rw-r--r--src/native/libs/System.Security.Cryptography.Native/pal_evp_cipher.c56
-rw-r--r--src/native/libs/System.Security.Cryptography.Native/pal_evp_pkey.c2
-rw-r--r--src/native/libs/System.Security.Cryptography.Native/pal_ssl.c10
-rw-r--r--src/native/libs/System.Security.Cryptography.Native/pal_x509.c13
-rw-r--r--src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs20
-rw-r--r--src/tests/Common/CLRTest.Execute.Bash.targets10
-rw-r--r--src/tests/Common/CLRTest.Execute.Batch.targets9
-rw-r--r--src/tests/Common/CLRTest.Jit.targets128
-rw-r--r--src/tests/Common/Directory.Build.targets5
-rwxr-xr-xsrc/tests/Common/scripts/arm32_ci_script.sh611
-rwxr-xr-xsrc/tests/Common/scripts/arm32_ci_test.sh115
-rwxr-xr-xsrc/tests/Common/scripts/run-pmi-diffs.py719
-rwxr-xr-xsrc/tests/Common/scripts/x86_ci_script.sh58
-rw-r--r--src/tests/Common/wasm-test-runner/WasmTestRunner.proj8
-rw-r--r--src/tests/Directory.Build.targets7
-rw-r--r--src/tests/JIT/Regression/JitBlue/ImageSharp_2117/ImageSharp_2117.cs37
-rw-r--r--src/tests/JIT/Regression/JitBlue/ImageSharp_2117/ImageSharp_2117.csproj13
-rw-r--r--src/tests/JIT/Regression/JitBlue/Runtime_33972/Runtime_33972.cs90
-rw-r--r--src/tests/JIT/Regression/JitBlue/Runtime_33972/Runtime_33972.csproj16
-rw-r--r--src/tests/JIT/Regression/JitBlue/Runtime_34937/Runtime_34937.cs29
-rw-r--r--src/tests/JIT/Regression/JitBlue/Runtime_34937/Runtime_34937.csproj14
-rw-r--r--src/tests/JIT/Regression/JitBlue/Runtime_72767/Runtime_72767.cs88
-rw-r--r--src/tests/JIT/Regression/JitBlue/Runtime_72767/Runtime_72767.csproj9
-rw-r--r--src/tests/JIT/Regression/JitBlue/Runtime_73681/Runtime_73681.cs32
-rw-r--r--src/tests/JIT/Regression/JitBlue/Runtime_73681/Runtime_73681.csproj11
-rw-r--r--src/tests/JIT/Regression/JitBlue/Runtime_75828/Runtime_75828.cs30
-rw-r--r--src/tests/JIT/Regression/JitBlue/Runtime_75828/Runtime_75828.csproj9
-rw-r--r--src/tests/JIT/Regression/JitBlue/Runtime_76051/Runtime_76051.cs19
-rw-r--r--src/tests/JIT/Regression/JitBlue/Runtime_76051/Runtime_76051.csproj10
-rw-r--r--src/tests/JIT/Regression/JitBlue/Runtime_76096/Runtime_76096.cs63
-rw-r--r--src/tests/JIT/Regression/JitBlue/Runtime_76096/Runtime_76096.csproj10
-rw-r--r--src/tests/JIT/Regression/JitBlue/Runtime_76273/Runtime_76273.cs73
-rw-r--r--src/tests/JIT/Regression/JitBlue/Runtime_76273/Runtime_76273.csproj9
-rw-r--r--src/tests/JIT/opt/RedundantBranch/RedundantBranchUnsigned.cs42
-rw-r--r--src/tests/JIT/opt/RedundantBranch/RedundantBranchUnsigned.csproj10
-rw-r--r--src/tests/JIT/superpmi/superpmicollect.cs48
-rw-r--r--src/tests/JIT/superpmi/superpmicollect.csproj7
-rw-r--r--src/tests/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/OverrideReabstracted.cs52
-rw-r--r--src/tests/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/OverrideReabstracted.csproj (renamed from src/tests/baseservices/critical_finalization/critical_finalization.csproj)3
-rw-r--r--src/tests/Regressions/coreclr/GitHub_49826/test49826.csproj1
-rw-r--r--src/tests/Regressions/coreclr/GitHub_49982/test49982.csproj1
-rw-r--r--src/tests/baseservices/critical_finalization/critical_finalization.cs53
-rw-r--r--src/tests/baseservices/finalization/CriticalFinalizer.cs73
-rw-r--r--src/tests/baseservices/finalization/CriticalFinalizer.csproj8
-rw-r--r--src/tests/baseservices/typeequivalence/pia/PIAContract.csproj9
-rw-r--r--src/tests/baseservices/typeequivalence/pia/Types.cs19
-rw-r--r--src/tests/baseservices/typeequivalence/simple/Simple.cs16
-rw-r--r--src/tests/baseservices/typeequivalence/simple/Simple.csproj1
-rw-r--r--src/tests/issues.targets177
1121 files changed, 24811 insertions, 18812 deletions
diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json
index 4fc2d315fd7..7d90837b3ad 100644
--- a/.config/dotnet-tools.json
+++ b/.config/dotnet-tools.json
@@ -15,13 +15,13 @@
]
},
"microsoft.dotnet.xharness.cli": {
- "version": "1.0.0-prerelease.22456.1",
+ "version": "1.0.0-prerelease.22473.1",
"commands": [
"xharness"
]
},
"microsoft.visualstudio.slngen.tool": {
- "version": "8.1.6",
+ "version": "8.5.17",
"commands": [
"slngen"
]
diff --git a/.devcontainer/libraries/Dockerfile b/.devcontainer/libraries/Dockerfile
new file mode 100644
index 00000000000..ff924ca7466
--- /dev/null
+++ b/.devcontainer/libraries/Dockerfile
@@ -0,0 +1,29 @@
+# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.192.0/containers/dotnet/.devcontainer/base.Dockerfile
+# For details on dotnet specific container, see: https://github.com/microsoft/vscode-dev-containers/tree/main/containers/dotnet
+
+# [Choice] .NET version: 6.0, 3.1
+ARG VARIANT="6.0-focal"
+FROM mcr.microsoft.com/devcontainers/dotnet:0-${VARIANT}
+
+# Set up machine requirements to build the repo and the gh CLI
+RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
+ && apt-get -y install --no-install-recommends \
+ cmake \
+ llvm-10 \
+ clang-10 \
+ build-essential \
+ python \
+ curl \
+ git \
+ lldb-6.0 \
+ liblldb-6.0-dev \
+ libunwind8 \
+ libunwind8-dev \
+ gettext \
+ libicu-dev \
+ liblttng-ust-dev \
+ libssl-dev \
+ libnuma-dev \
+ libkrb5-dev \
+ zlib1g-dev \
+ ninja-build
diff --git a/.devcontainer/libraries/devcontainer.json b/.devcontainer/libraries/devcontainer.json
new file mode 100644
index 00000000000..09daf0ecf6c
--- /dev/null
+++ b/.devcontainer/libraries/devcontainer.json
@@ -0,0 +1,55 @@
+// For format details, see https://aka.ms/devcontainer.json.
+{
+ "name": "C# (.NET)",
+ "build": {
+ "dockerfile": "Dockerfile",
+ "args": {
+ // Update 'VARIANT' to pick a .NET Core version: 3.1, 6.0
+ // Append -bullseye or -focal to pin to an OS version.
+ "VARIANT": "6.0-focal"
+ }
+ },
+ "hostRequirements": {
+ "cpus": 4,
+ "memory": "8gb"
+ },
+
+ "features": {
+ "ghcr.io/devcontainers/features/github-cli:1": {}
+ },
+
+ // Configure tool-specific properties.
+ "customizations": {
+ // Configure properties specific to VS Code.
+ "vscode": {
+ // Add the IDs of extensions you want installed when the container is created.
+ "extensions": [
+ "ms-dotnettools.csharp"
+ ],
+ "settings": {
+ // Loading projects on demand is better for larger codebases
+ "omnisharp.enableMsBuildLoadProjectsOnDemand": true,
+ "omnisharp.enableRoslynAnalyzers": true,
+ "omnisharp.enableEditorConfigSupport": true,
+ "omnisharp.enableAsyncCompletion": true,
+ "omnisharp.testRunSettings": "${containerWorkspaceFolder}/artifacts/obj/vscode/.runsettings"
+ }
+ }
+ },
+
+ // Use 'onCreateCommand' to run pre-build commands inside the codespace
+ "onCreateCommand": "${containerWorkspaceFolder}/.devcontainer/scripts/onCreateCommand.sh libraries",
+
+ // Use 'postCreateCommand' to run commands after the container is created.
+ "postCreateCommand": "${containerWorkspaceFolder}/.devcontainer/scripts/postCreateCommand.sh",
+
+ // Add the locally installed dotnet to the path to ensure that it is activated
+ // This allows developers to just use 'dotnet build' on the command-line, and the local dotnet version will be used.
+ "remoteEnv": {
+ "PATH": "${containerWorkspaceFolder}/.dotnet:${containerEnv:PATH}",
+ "DOTNET_MULTILEVEL_LOOKUP": "0"
+ },
+
+ // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
+ "remoteUser": "vscode"
+}
diff --git a/.devcontainer/scripts/onCreateCommand.sh b/.devcontainer/scripts/onCreateCommand.sh
index 48850f5f00b..f84c90b1878 100755
--- a/.devcontainer/scripts/onCreateCommand.sh
+++ b/.devcontainer/scripts/onCreateCommand.sh
@@ -2,18 +2,26 @@
set -e
-# prebuild the repo, so it is ready for development
-./build.sh libs+clr -rc Release
-# restore libs tests so that the project is ready to be loaded by OmniSharp
-./build.sh libs.tests -restore
+opt=$1
+case "$opt" in
-# prebuild for WASM, so it is ready for wasm development
-make -C src/mono/wasm provision-wasm
-export EMSDK_PATH=$PWD/src/mono/wasm/emsdk
-./build.sh mono+libs -os Browser -c release
+ libraries)
+ # prebuild the repo, so it is ready for development
+ ./build.sh libs+clr -rc Release
+ # restore libs tests so that the project is ready to be loaded by OmniSharp
+ ./build.sh libs.tests -restore
+ ;;
-# install dotnet-serve for running wasm samples
-./dotnet.sh tool install dotnet-serve --tool-path ./.dotnet-tools-global
+ wasm)
+ # prebuild for WASM, so it is ready for wasm development
+ make -C src/mono/wasm provision-wasm
+ export EMSDK_PATH=$PWD/src/mono/wasm/emsdk
+ ./build.sh mono+libs -os Browser -c Release
+
+ # install dotnet-serve for running wasm samples
+ ./dotnet.sh tool install dotnet-serve --tool-path ./.dotnet-tools-global
+ ;;
+esac
# save the commit hash of the currently built assemblies, so developers know which version was built
git rev-parse HEAD > ./artifacts/prebuild.sha
diff --git a/.devcontainer/Dockerfile b/.devcontainer/wasm/Dockerfile
index 54f5f2ff58b..cd29264dbff 100644
--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/wasm/Dockerfile
@@ -1,22 +1,32 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.192.0/containers/dotnet/.devcontainer/base.Dockerfile
# For details on dotnet specific container, see: https://github.com/microsoft/vscode-dev-containers/tree/main/containers/dotnet
-# [Choice] .NET version: 6.0, 5.0, 3.1, 2.1
+# [Choice] .NET version: 6.0, 3.1
ARG VARIANT="6.0-focal"
-FROM mcr.microsoft.com/vscode/devcontainers/dotnet:0-${VARIANT}
-
-# Setup the gh (GitHub) CLI signing key.
-RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg && \
- chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg && \
- echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null
+FROM mcr.microsoft.com/devcontainers/dotnet:0-${VARIANT}
# Set up machine requirements to build the repo and the gh CLI
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
- && apt-get -y install --no-install-recommends cmake llvm-10 clang-10 \
- build-essential python curl git lldb-6.0 liblldb-6.0-dev \
- libunwind8 libunwind8-dev gettext libicu-dev liblttng-ust-dev \
- libssl-dev libnuma-dev libkrb5-dev zlib1g-dev ninja-build \
- gh
+ && apt-get -y install --no-install-recommends \
+ cmake \
+ llvm-10 \
+ clang-10 \
+ build-essential \
+ python \
+ curl \
+ git \
+ lldb-6.0 \
+ liblldb-6.0-dev \
+ libunwind8 \
+ libunwind8-dev \
+ gettext \
+ libicu-dev \
+ liblttng-ust-dev \
+ libssl-dev \
+ libnuma-dev \
+ libkrb5-dev \
+ zlib1g-dev \
+ ninja-build
# Install V8 Engine
SHELL ["/bin/bash", "-c"]
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/wasm/devcontainer.json
index d7b5a8b0efb..44fca507839 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/wasm/devcontainer.json
@@ -1,31 +1,44 @@
-// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
-// https://github.com/microsoft/vscode-dev-containers/tree/v0.192.0/containers/dotnet
+// For format details, see https://aka.ms/devcontainer.json.
{
"name": "C# (.NET)",
"build": {
"dockerfile": "Dockerfile",
"args": {
- // Update 'VARIANT' to pick a .NET Core version: 2.1, 3.1, 5.0
- "VARIANT": "5.0",
+ // Update 'VARIANT' to pick a .NET Core version: 3.1, 6.0
+ // Append -bullseye or -focal to pin to an OS version.
+ "VARIANT": "6.0-focal"
}
},
+ "hostRequirements": {
+ "cpus": 4,
+ "memory": "8gb"
+ },
- "settings": {
- // Loading projects on demand is better for larger codebases
- "omnisharp.enableMsBuildLoadProjectsOnDemand": true,
- "omnisharp.enableRoslynAnalyzers": true,
- "omnisharp.enableEditorConfigSupport": true,
- "omnisharp.enableAsyncCompletion": true,
- "omnisharp.testRunSettings": "${containerWorkspaceFolder}/artifacts/obj/vscode/.runsettings"
+ "features": {
+ "ghcr.io/devcontainers/features/github-cli:1": {}
},
- // Add the IDs of extensions you want installed when the container is created.
- "extensions": [
- "ms-dotnettools.csharp"
- ],
+ // Configure tool-specific properties.
+ "customizations": {
+ // Configure properties specific to VS Code.
+ "vscode": {
+ // Add the IDs of extensions you want installed when the container is created.
+ "extensions": [
+ "ms-dotnettools.csharp"
+ ],
+ "settings": {
+ // Loading projects on demand is better for larger codebases
+ "omnisharp.enableMsBuildLoadProjectsOnDemand": true,
+ "omnisharp.enableRoslynAnalyzers": true,
+ "omnisharp.enableEditorConfigSupport": true,
+ "omnisharp.enableAsyncCompletion": true,
+ "omnisharp.testRunSettings": "${containerWorkspaceFolder}/artifacts/obj/vscode/.runsettings"
+ }
+ }
+ },
// Use 'onCreateCommand' to run pre-build commands inside the codespace
- "onCreateCommand": "${containerWorkspaceFolder}/.devcontainer/scripts/onCreateCommand.sh",
+ "onCreateCommand": "${containerWorkspaceFolder}/.devcontainer/scripts/onCreateCommand.sh wasm",
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "${containerWorkspaceFolder}/.devcontainer/scripts/postCreateCommand.sh",
diff --git a/.github/fabricbot.json b/.github/fabricbot.json
index e60a1774a75..78a3dfe6b00 100644
--- a/.github/fabricbot.json
+++ b/.github/fabricbot.json
@@ -76,6 +76,14 @@
},
{
"labels": [
+ "area-System.Transactions"
+ ],
+ "mentionees": [
+ "roji"
+ ]
+ },
+ {
+ "labels": [
"area-GC-mono"
],
"mentionees": [
@@ -13987,12 +13995,12 @@
"subCapability": "IssuesOnlyResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Eric / Maryam / Nick / Tarek - Issue Triage] Moved to Another Area",
+ "taskName": "[Area Pod: Maryam / Nick / Tarek - Issue Triage] Moved to Another Area",
"actions": [
{
"name": "removeFromProject",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - Issue Triage",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - Issue Triage",
"isOrgProject": true
}
}
@@ -14161,7 +14169,7 @@
{
"name": "isInProject",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - Issue Triage",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - Issue Triage",
"isOrgProject": true
}
}
@@ -14176,19 +14184,19 @@
"subCapability": "IssuesOnlyResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Eric / Maryam / Nick / Tarek - Issue Triage] Needs Triage",
+ "taskName": "[Area Pod: Maryam / Nick / Tarek - Issue Triage] Needs Triage",
"actions": [
{
"name": "removeFromProject",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - Issue Triage",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - Issue Triage",
"isOrgProject": true
}
},
{
"name": "addToProject",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - Issue Triage",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - Issue Triage",
"columnName": "Needs Triage",
"isOrgProject": true
}
@@ -14410,7 +14418,7 @@
{
"name": "isInProject",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - Issue Triage",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - Issue Triage",
"isOrgProject": true
}
}
@@ -14419,7 +14427,7 @@
{
"name": "isInProjectColumn",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - Issue Triage",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - Issue Triage",
"isOrgProject": true,
"columnName": "Triaged"
}
@@ -14437,19 +14445,19 @@
"subCapability": "IssueCommentResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Eric / Maryam / Nick / Tarek - Issue Triage] Needs Further Triage",
+ "taskName": "[Area Pod: Maryam / Nick / Tarek - Issue Triage] Needs Further Triage",
"actions": [
{
"name": "removeFromProject",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - Issue Triage",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - Issue Triage",
"isOrgProject": true
}
},
{
"name": "addToProject",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - Issue Triage",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - Issue Triage",
"columnName": "Needs Triage",
"isOrgProject": true
}
@@ -14569,7 +14577,7 @@
{
"name": "isInProject",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - Issue Triage",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - Issue Triage",
"isOrgProject": true
}
}
@@ -14578,7 +14586,7 @@
{
"name": "isInProjectColumn",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - Issue Triage",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - Issue Triage",
"columnName": "Triaged",
"isOrgProject": true
}
@@ -14596,12 +14604,12 @@
"subCapability": "IssuesOnlyResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Eric / Maryam / Nick / Tarek - Issue Triage] Triaged",
+ "taskName": "[Area Pod: Maryam / Nick / Tarek - Issue Triage] Triaged",
"actions": [
{
"name": "addToProject",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - Issue Triage",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - Issue Triage",
"columnName": "Triaged",
"isOrgProject": true
}
@@ -14623,7 +14631,7 @@
{
"name": "isInProject",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - Issue Triage",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - Issue Triage",
"isOrgProject": true
}
},
@@ -14665,12 +14673,12 @@
"subCapability": "IssuesOnlyResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Eric / Maryam / Nick / Tarek - Issue Triage] Maryam Updated Issue",
+ "taskName": "[Area Pod: Maryam / Nick / Tarek - Issue Triage] Maryam Updated Issue",
"actions": [
{
"name": "moveToProjectColumn",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - Issue Triage",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - Issue Triage",
"columnName": "Triage: Maryam",
"isOrgProject": true
}
@@ -14686,7 +14694,7 @@
{
"name": "isInProjectColumn",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - Issue Triage",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - Issue Triage",
"isOrgProject": true,
"columnName": "Needs Triage"
}
@@ -14743,12 +14751,12 @@
"subCapability": "IssueCommentResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Eric / Maryam / Nick / Tarek - Issue Triage] Maryam Commented",
+ "taskName": "[Area Pod: Maryam / Nick / Tarek - Issue Triage] Maryam Commented",
"actions": [
{
"name": "moveToProjectColumn",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - Issue Triage",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - Issue Triage",
"columnName": "Triage: Maryam",
"isOrgProject": true
}
@@ -14764,7 +14772,7 @@
{
"name": "isInProjectColumn",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - Issue Triage",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - Issue Triage",
"isOrgProject": true,
"columnName": "Needs Triage"
}
@@ -14821,12 +14829,12 @@
"subCapability": "IssuesOnlyResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Eric / Maryam / Nick / Tarek - Issue Triage] Nick Updated Issue",
+ "taskName": "[Area Pod: Maryam / Nick / Tarek - Issue Triage] Nick Updated Issue",
"actions": [
{
"name": "moveToProjectColumn",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - Issue Triage",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - Issue Triage",
"columnName": "Triage: Nick",
"isOrgProject": true
}
@@ -14842,7 +14850,7 @@
{
"name": "isInProjectColumn",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - Issue Triage",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - Issue Triage",
"isOrgProject": true,
"columnName": "Needs Triage"
}
@@ -14899,12 +14907,12 @@
"subCapability": "IssueCommentResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Eric / Maryam / Nick / Tarek - Issue Triage] Nick Commented",
+ "taskName": "[Area Pod: Maryam / Nick / Tarek - Issue Triage] Nick Commented",
"actions": [
{
"name": "moveToProjectColumn",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - Issue Triage",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - Issue Triage",
"columnName": "Triage: Nick",
"isOrgProject": true
}
@@ -14920,7 +14928,7 @@
{
"name": "isInProjectColumn",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - Issue Triage",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - Issue Triage",
"isOrgProject": true,
"columnName": "Needs Triage"
}
@@ -14977,12 +14985,12 @@
"subCapability": "IssuesOnlyResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Eric / Maryam / Nick / Tarek - Issue Triage] Tarek Updated Issue",
+ "taskName": "[Area Pod: Maryam / Nick / Tarek - Issue Triage] Tarek Updated Issue",
"actions": [
{
"name": "moveToProjectColumn",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - Issue Triage",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - Issue Triage",
"columnName": "Triage: Tarek",
"isOrgProject": true
}
@@ -14998,7 +15006,7 @@
{
"name": "isInProjectColumn",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - Issue Triage",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - Issue Triage",
"isOrgProject": true,
"columnName": "Needs Triage"
}
@@ -15055,12 +15063,12 @@
"subCapability": "IssueCommentResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Eric / Maryam / Nick / Tarek - Issue Triage] Tarek Commented",
+ "taskName": "[Area Pod: Maryam / Nick / Tarek - Issue Triage] Tarek Commented",
"actions": [
{
"name": "moveToProjectColumn",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - Issue Triage",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - Issue Triage",
"columnName": "Triage: Tarek",
"isOrgProject": true
}
@@ -15076,7 +15084,7 @@
{
"name": "isInProjectColumn",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - Issue Triage",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - Issue Triage",
"isOrgProject": true,
"columnName": "Needs Triage"
}
@@ -15133,12 +15141,12 @@
"subCapability": "PullRequestResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Eric / Maryam / Nick / Tarek - PRs] Closed, Merged, or Moved",
+ "taskName": "[Area Pod: Maryam / Nick / Tarek - PRs] Closed, Merged, or Moved",
"actions": [
{
"name": "moveToProjectColumn",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - PRs",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - PRs",
"columnName": "Done",
"isOrgProject": true
}
@@ -15154,7 +15162,7 @@
{
"name": "isInProject",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - PRs",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - PRs",
"isOrgProject": true
}
},
@@ -15164,7 +15172,7 @@
{
"name": "isInProjectColumn",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - PRs",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - PRs",
"columnName": "Done",
"isOrgProject": true
}
@@ -15344,12 +15352,12 @@
"subCapability": "PullRequestResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Eric / Maryam / Nick / Tarek - PRs] New PR Needs Champion",
+ "taskName": "[Area Pod: Maryam / Nick / Tarek - PRs] New PR Needs Champion",
"actions": [
{
"name": "addToProject",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - PRs",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - PRs",
"columnName": "Needs Champion",
"isOrgProject": true
}
@@ -15459,30 +15467,6 @@
{
"name": "isAssignedToUser",
"parameters": {
- "user": "eerhardt"
- }
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "isActivitySender",
- "parameters": {
- "user": "eerhardt"
- }
- }
- ]
- }
- ],
- [
- {
- "operator": "not",
- "operands": [
- {
- "name": "isAssignedToUser",
- "parameters": {
"user": "maryamariyan"
}
}
@@ -15558,7 +15542,7 @@
{
"name": "isInProject",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - PRs",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - PRs",
"isOrgProject": true
}
}
@@ -15567,7 +15551,7 @@
{
"name": "isInProjectColumn",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - PRs",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - PRs",
"columnName": "Done",
"isOrgProject": true
}
@@ -15585,19 +15569,19 @@
"subCapability": "PullRequestResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Eric / Maryam / Nick / Tarek - PRs] Updated PR Needs Champion",
+ "taskName": "[Area Pod: Maryam / Nick / Tarek - PRs] Updated PR Needs Champion",
"actions": [
{
"name": "removeFromProject",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - PRs",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - PRs",
"isOrgProject": true
}
},
{
"name": "addToProject",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - PRs",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - PRs",
"columnName": "Needs Champion",
"isOrgProject": true
}
@@ -15714,17 +15698,6 @@
{
"name": "isAssignedToUser",
"parameters": {
- "user": "eerhardt"
- }
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "isAssignedToUser",
- "parameters": {
"user": "maryamariyan"
}
}
@@ -15761,7 +15734,7 @@
{
"name": "isInProject",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - PRs",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - PRs",
"isOrgProject": true
}
}
@@ -15770,7 +15743,7 @@
{
"name": "isInProjectColumn",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - PRs",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - PRs",
"columnName": "Done",
"isOrgProject": true
}
@@ -15788,19 +15761,19 @@
"subCapability": "PullRequestResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Eric / Maryam / Nick / Tarek - PRs] Maryam Assigned as Champion",
+ "taskName": "[Area Pod: Maryam / Nick / Tarek - PRs] Maryam Assigned as Champion",
"actions": [
{
"name": "removeFromProject",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - PRs",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - PRs",
"isOrgProject": true
}
},
{
"name": "addToProject",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - PRs",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - PRs",
"columnName": "Champion: Maryam",
"isOrgProject": true
}
@@ -15937,7 +15910,7 @@
{
"name": "isInProject",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - PRs",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - PRs",
"isOrgProject": true
}
}
@@ -15946,7 +15919,7 @@
{
"name": "isInProjectColumn",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - PRs",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - PRs",
"columnName": "Needs Champion",
"isOrgProject": true
}
@@ -15954,7 +15927,7 @@
{
"name": "isInProjectColumn",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - PRs",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - PRs",
"columnName": "Done",
"isOrgProject": true
}
@@ -15972,19 +15945,19 @@
"subCapability": "PullRequestResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Eric / Maryam / Nick / Tarek - PRs] Nick Assigned as Champion",
+ "taskName": "[Area Pod: Maryam / Nick / Tarek - PRs] Nick Assigned as Champion",
"actions": [
{
"name": "removeFromProject",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - PRs",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - PRs",
"isOrgProject": true
}
},
{
"name": "addToProject",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - PRs",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - PRs",
"columnName": "Champion: Nick",
"isOrgProject": true
}
@@ -16121,7 +16094,7 @@
{
"name": "isInProject",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - PRs",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - PRs",
"isOrgProject": true
}
}
@@ -16130,7 +16103,7 @@
{
"name": "isInProjectColumn",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - PRs",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - PRs",
"columnName": "Needs Champion",
"isOrgProject": true
}
@@ -16138,7 +16111,7 @@
{
"name": "isInProjectColumn",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - PRs",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - PRs",
"columnName": "Done",
"isOrgProject": true
}
@@ -16156,19 +16129,19 @@
"subCapability": "PullRequestResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Eric / Maryam / Nick / Tarek - PRs] Tarek Assigned as Champion",
+ "taskName": "[Area Pod: Maryam / Nick / Tarek - PRs] Tarek Assigned as Champion",
"actions": [
{
"name": "removeFromProject",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - PRs",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - PRs",
"isOrgProject": true
}
},
{
"name": "addToProject",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - PRs",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - PRs",
"columnName": "Champion: Tarek",
"isOrgProject": true
}
@@ -16305,7 +16278,7 @@
{
"name": "isInProject",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - PRs",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - PRs",
"isOrgProject": true
}
}
@@ -16314,7 +16287,7 @@
{
"name": "isInProjectColumn",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - PRs",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - PRs",
"columnName": "Needs Champion",
"isOrgProject": true
}
@@ -16322,7 +16295,7 @@
{
"name": "isInProjectColumn",
"parameters": {
- "projectName": "Area Pod: Eric / Maryam / Nick / Tarek - PRs",
+ "projectName": "Area Pod: Maryam / Nick / Tarek - PRs",
"columnName": "Done",
"isOrgProject": true
}
diff --git a/Build.proj b/Build.proj
index bff94b97a7a..5f47e869fb6 100644
--- a/Build.proj
+++ b/Build.proj
@@ -10,7 +10,7 @@
<Import Project="$(RepositoryEngineeringDir)SubsetValidation.targets" />
<!-- Upfront restore hooks -->
- <Import Project="$(RepositoryEngineeringDir)restore\docs.targets" Condition="'$(DotNetBuildFromSource)' != 'true'" />
+ <Import Project="$(RepositoryEngineeringDir)restore\docs.targets" />
<Import Project="$(RepositoryEngineeringDir)restore\optimizationData.targets" Condition="'$(DotNetBuildFromSource)' != 'true'" />
<Target Name="BuildLocalTasks"
diff --git a/Directory.Build.props b/Directory.Build.props
index 6f9b97c0a9c..3e760224879 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -22,7 +22,6 @@
<TargetOS Condition="'$(TargetOS)' == ''">$(_hostOS)</TargetOS>
<TargetsMobile Condition="'$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'iOSSimulator' or '$(TargetOS)' == 'MacCatalyst' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'tvOSSimulator' or '$(TargetOS)' == 'Android' or '$(TargetOS)' == 'Browser'">true</TargetsMobile>
<TargetsAppleMobile Condition="'$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'iOSSimulator' or '$(TargetOS)' == 'MacCatalyst' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'tvOSSimulator'">true</TargetsAppleMobile>
- <TargetsLinuxBionic Condition="$(OutputRid.StartsWith('linux-bionic'))">true</TargetsLinuxBionic>
</PropertyGroup>
<!-- Platform property is required by RepoLayout.props in Arcade SDK. -->
@@ -200,6 +199,7 @@
<OutputRid Condition="'$(OutputRid)' == ''">$(PackageRID)</OutputRid>
<OutputRid Condition="'$(PortableBuild)' == 'true'">$(_portableOS)-$(TargetArchitecture)</OutputRid>
+ <TargetsLinuxBionic Condition="$(OutputRid.StartsWith('linux-bionic'))">true</TargetsLinuxBionic>
</PropertyGroup>
<PropertyGroup Label="CalculateTargetOSName" Condition="'$(SkipInferTargetOSName)' != 'true'">
@@ -274,7 +274,6 @@
<PackageProjectUrl>https://dot.net</PackageProjectUrl>
<Owners>microsoft,dotnetframework</Owners>
<IncludeSymbols>true</IncludeSymbols>
- <RuntimeIdGraphDefinitionFile>$([MSBuild]::NormalizePath('$(LibrariesProjectRoot)', 'Microsoft.NETCore.Platforms', 'src', 'runtime.json'))</RuntimeIdGraphDefinitionFile>
<LicenseFile>$(MSBuildThisFileDirectory)LICENSE.TXT</LicenseFile>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
diff --git a/docs/area-owners.json b/docs/area-owners.json
index 55724212139..5e2edefbf48 100644
--- a/docs/area-owners.json
+++ b/docs/area-owners.json
@@ -97,7 +97,6 @@
{
"lead": "dotnet/dnr-codeflow",
"owners": [
- "danmoseley",
"jeffschwMSFT",
"marek-safar",
"dotnet/dnr-codeflow"
@@ -206,9 +205,8 @@
},
{
"lead": "ericstj",
- "pod": "eric-maryam-nick-tarek",
+ "pod": "maryam-nick-tarek",
"owners": [
- "eerhardt",
"ericstj",
"jeffhandley",
"maryamariyan",
@@ -249,9 +247,8 @@
},
{
"lead": "ericstj",
- "pod": "eric-maryam-nick-tarek",
+ "pod": "maryam-nick-tarek",
"owners": [
- "eerhardt",
"ericstj",
"jeffhandley",
"maryamariyan",
@@ -263,9 +260,8 @@
},
{
"lead": "ericstj",
- "pod": "eric-maryam-nick-tarek",
+ "pod": "maryam-nick-tarek",
"owners": [
- "eerhardt",
"ericstj",
"jeffhandley",
"maryamariyan",
@@ -277,9 +273,8 @@
},
{
"lead": "ericstj",
- "pod": "eric-maryam-nick-tarek",
+ "pod": "maryam-nick-tarek",
"owners": [
- "eerhardt",
"ericstj",
"jeffhandley",
"maryamariyan",
@@ -294,7 +289,6 @@
"pod": "adam-david",
"owners": [
"adamsitnik",
- "eerhardt",
"ericstj",
"jeffhandley",
"Jozkee",
@@ -305,9 +299,8 @@
},
{
"lead": "ericstj",
- "pod": "eric-maryam-nick-tarek",
+ "pod": "maryam-nick-tarek",
"owners": [
- "eerhardt",
"ericstj",
"jeffhandley",
"maryamariyan",
@@ -336,9 +329,8 @@
},
{
"lead": "ericstj",
- "pod": "eric-maryam-nick-tarek",
+ "pod": "maryam-nick-tarek",
"owners": [
- "eerhardt",
"ericstj",
"jeffhandley",
"maryamariyan",
@@ -350,9 +342,8 @@
},
{
"lead": "ericstj",
- "pod": "eric-maryam-nick-tarek",
+ "pod": "maryam-nick-tarek",
"owners": [
- "eerhardt",
"ericstj",
"jeffhandley",
"maryamariyan",
@@ -364,9 +355,8 @@
},
{
"lead": "ericstj",
- "pod": "eric-maryam-nick-tarek",
+ "pod": "maryam-nick-tarek",
"owners": [
- "eerhardt",
"ericstj",
"jeffhandley",
"maryamariyan",
@@ -503,10 +493,9 @@
"label": "area-Interop-mono"
},
{
- "lead": "danmoseley",
+ "lead": "jeffhandley",
"pod": "eric-jeff",
"owners": [
- "danmoseley",
"ericstj",
"jeffhandley",
"dotnet/area-meta"
@@ -653,9 +642,8 @@
},
{
"lead": "ericstj",
- "pod": "eric-maryam-nick-tarek",
+ "pod": "maryam-nick-tarek",
"owners": [
- "eerhardt",
"ericstj",
"jeffhandley",
"maryamariyan",
@@ -667,9 +655,8 @@
},
{
"lead": "ericstj",
- "pod": "eric-maryam-nick-tarek",
+ "pod": "maryam-nick-tarek",
"owners": [
- "eerhardt",
"ericstj",
"jeffhandley",
"maryamariyan",
@@ -689,9 +676,8 @@
},
{
"lead": "ericstj",
- "pod": "eric-maryam-nick-tarek",
+ "pod": "maryam-nick-tarek",
"owners": [
- "eerhardt",
"ericstj",
"jeffhandley",
"maryamariyan",
@@ -783,7 +769,6 @@
{
"lead": "tommcdon",
"owners": [
- "eerhardt",
"maryamariyan",
"tarekgh"
],
@@ -917,9 +902,8 @@
},
{
"lead": "ericstj",
- "pod": "eric-maryam-nick-tarek",
+ "pod": "maryam-nick-tarek",
"owners": [
- "eerhardt",
"ericstj",
"jeffhandley",
"maryamariyan",
@@ -1297,9 +1281,9 @@
"label": "area-System.ServiceProcess"
},
{
- "lead": "danmoseley",
+ "lead": "jeffhandley",
"owners": [
- "danmoseley"
+ "jeffhandley"
],
"label": "area-System.Speech"
},
@@ -1402,7 +1386,8 @@
{
"lead": "HongGit",
"owners": [
- "HongGit"
+ "HongGit",
+ "roji"
],
"label": "area-System.Transactions"
},
diff --git a/docs/area-owners.md b/docs/area-owners.md
index b86675006cd..80a3f09df4b 100644
--- a/docs/area-owners.md
+++ b/docs/area-owners.md
@@ -49,7 +49,7 @@ Note: Editing this file doesn't update the mapping used by `@msftbot` for area-s
| area-Infrastructure-mono | @steveisok | @directhex | |
| area-Interop-coreclr | @jeffschwMSFT | @jeffschwMSFT @AaronRobinsonMSFT | |
| area-Interop-mono | @marek-safar | @lambdageek | |
-| area-Meta | @danmoseley | @dotnet/area-meta | Cross-cutting concerns that span many or all areas, including project-wide code/test patterns and documentation. |
+| area-Meta | @jeffhandley | @dotnet/area-meta | Cross-cutting concerns that span many or all areas, including project-wide code/test patterns and documentation. |
| area-Microsoft.CSharp | @jaredpar | @cston @333fred | Archived component - limited churn/contributions (see [#27790](https://github.com/dotnet/runtime/issues/27790)) |
| area-Microsoft.VisualBasic | @jaredpar | @cston @333fred | Archived component - limited churn/contributions (see [#27790](https://github.com/dotnet/runtime/issues/27790)) |
| area-Microsoft.Win32 | @ericstj | @dotnet/area-microsoft-win32 | Including System.Windows.Extensions |
@@ -78,7 +78,7 @@ Note: Editing this file doesn't update the mapping used by `@msftbot` for area-s
| area-System.Diagnostics | @tommcdon | @tommcdon | |
| area-System.Diagnostics-coreclr | @tommcdon | @tommcdon | |
| area-System.Diagnostics-mono | @lewing | @thaystg @radical | |
-| area-System.Diagnostics.Activity | @tommcdon | @eerhardt @maryamariyan @tarekgh | |
+| area-System.Diagnostics.Activity | @tommcdon | @maryamariyan @tarekgh | |
| area-System.Diagnostics.EventLog | @ericstj | @dotnet/area-system-diagnostics-eventlog | |
| area-System.Diagnostics.Metric | @tommcdon | @noahfalk | |
| area-System.Diagnostics.PerformanceCounter | @ericstj | @dotnet/area-system-diagnostics-performancecounter | |
@@ -121,16 +121,16 @@ Note: Editing this file doesn't update the mapping used by `@msftbot` for area-s
| area-System.ServiceModel | @HongGit | @HongGit @mconnew | Repo: https://github.com/dotnet/WCF<br>Packages:<ul><li>System.ServiceModel.Primitives</li><li>System.ServiceModel.Http</li><li>System.ServiceModel.NetTcp</li><li>System.ServiceModel.Duplex</li><li>System.ServiceModel.Security</li></ul> |
| area-System.ServiceModel.Syndication | @HongGit | @StephenMolloy @HongGit | |
| area-System.ServiceProcess | @ericstj | @dotnet/area-system-serviceprocess | |
-| area-System.Speech | @danmoseley | @danmoseley | |
+| area-System.Speech | @jeffhandley | @jeffhandley | |
| area-System.Text.Encoding | @jeffhandley | @dotnet/area-system-text-encoding | |
| area-System.Text.Encodings.Web | @jeffhandley | @dotnet/area-system-text-encodings-web | |
| area-System.Text.Json | @jeffhandley | @dotnet/area-system-text-json | |
| area-System.Text.RegularExpressions | @ericstj | @dotnet/area-system-text-regularexpressions | Consultants: @stephentoub |
| area-System.Threading | @mangod9 | @kouvel | |
| area-System.Threading.Channels | @ericstj | @dotnet/area-system-threading-channels | Consultants: @stephentoub |
-| area-System.Threading.RateLimiting | @rafikiassumani-msft | @BrennanConroy @halter73 | Consultants: @eerhardt |
+| area-System.Threading.RateLimiting | @rafikiassumani-msft | @BrennanConroy @halter73 | |
| area-System.Threading.Tasks | @ericstj | @dotnet/area-system-threading-tasks | Consultants: @stephentoub |
-| area-System.Transactions | @HongGit | @HongGit | |
+| area-System.Transactions | @HongGit | @HongGit | Consultants: @roji |
| area-System.Xml | @jeffhandley | @dotnet/area-system-xml | |
| area-Threading-mono | @SamMonoRT | @lambdageek | |
| area-TieredCompilation-coreclr | @mangod9 | @kouvel | |
diff --git a/docs/design/features/cet-feature.md b/docs/design/features/cet-feature.md
new file mode 100644
index 00000000000..11ca410a940
--- /dev/null
+++ b/docs/design/features/cet-feature.md
@@ -0,0 +1,28 @@
+# .NET 7 support for Intel CET shadow stacks (requires Windows)
+
+Intel's [Control-flow Enforcement Technology (CET)](https://newsroom.intel.com/editorials/intel-cet-answers-call-protect-common-malware-threats/) is a security feature available in some newer Intel and AMD processors. It adds capabilities to the hardware that protect against some common types of attacks involving control-flow hijacking. With CET shadow stacks, the processor and operating system can track the control flow of calls and returns in a thread in the shadow stack in addition to the data stack, and detect unintended changes to the control flow. The shadow stack is protected from application code memory accesses and helps to defend against attacks involving return-oriented programming (ROP). Windows offers [Hardware-enforced Stack Protection](https://techcommunity.microsoft.com/t5/windows-kernel-internals/understanding-hardware-enforced-stack-protection/ba-p/1247815) for CET shadow stack compatibility and is available as an early preview in [Windows Insider preview builds (Beta channel)](https://insider.windows.com/en-us/understand-flighting).
+
+## Opting into CET shadow stack compatibility
+
+CET compatibility is enabled in .NET 7. In order to receive the security benefits of CET shadow stacks in .NET applications, ensure the following to opt into the feature for an executable:
+- Verify that your processor supports Intel CET. There are Intel and AMD processors currently available with the feature.
+- Ensure that the application is running on a recent build of Windows 11 or Windows Server (Version 22H2) that has Hardware-enforced Stack Protection. The latest versions from [Windows Insider preview builds (Beta channel)](https://insider.windows.com/en-us/understand-flighting) have the feature.
+- Install [.NET 7](https://dotnet.microsoft.com/download/dotnet) RC1 or a more recent release
+- Build or publish your application targeting framework `net7.0` and runtime `win-x64`
+- Open the Windows Security app
+ - Inside the "App & browser control" pane, select "Exploit protection settings"
+ - Under the "Program settings" tab, select "Add program to customize" and "Add by program name"
+ - Enter the file name of your application's executable file and select "Add"
+ - Select the following options and select "Apply":
+
+ ![Hardware-enforced Stack Protection settings](images/intel-cet-dotnet6-fig1.png)
+ - See the [Developer Guidance for Hardware-enforced Stack Protection](https://techcommunity.microsoft.com/t5/windows-kernel-internals/developer-guidance-for-hardware-enforced-stack-protection/ba-p/2163340) for more details
+- Task Managers Details tab has a new column "Hardware-enforced Stack Protection" that shows the compatibility level of a running process. If CET shadow stacks are enabled for the process, the column for the application should say "Compatible modules only".
+
+## Considerations
+
+CET shadow stack compatibility in .NET is new within 7 and should work for most features an opt-in for x64 applications.
+
+When opted in as above, CET shadow stacks are enabled in compatibility mode. Strict mode should be supported unless the application uses native libraries which are not CET compliant.
+
+CET shadow stack compatibility is available to try for Windows x64 applications (on Windows 11 and Server). Support for the feature on Linux is pending and something we will enable in upcoming .NET releases.
diff --git a/docs/design/features/images/intel-cet-dotnet6-fig1.png b/docs/design/features/images/intel-cet-dotnet6-fig1.png
new file mode 100644
index 00000000000..37d2aebb570
--- /dev/null
+++ b/docs/design/features/images/intel-cet-dotnet6-fig1.png
Binary files differ
diff --git a/docs/workflow/Codespaces.md b/docs/workflow/Codespaces.md
index 8473f17beb4..edc0959f1cc 100644
--- a/docs/workflow/Codespaces.md
+++ b/docs/workflow/Codespaces.md
@@ -7,9 +7,20 @@ dotnet/runtime runs a nightly GitHub Action to build the latest code in the repo
1. From https://github.com/dotnet/runtime, drop-down the `Code` button and select the `Codespaces` tab.
-![New codespace button](https://docs.github.com/assets/images/help/codespaces/new-codespace-button.png)
+![New codespace button](https://docs.github.com/assets/cb-138303/images/help/codespaces/new-codespace-button.png)
-2. Select the Machine type. For dotnet/runtime, it is recommended to select at least a `4-core` machine. You can also verify that a "Prebuild" is ready.
+2. Click the drop-down at the side of the `Create codespace on main` button and select `Configure and create codespace`
+
+![Configure and create codespace](https://docs.github.com/assets/cb-49317/images/help/codespaces/default-machine-type.png)
+
+3. Select which Dev container configuration you want to use.
+
+![Dev container configuration](./codespace-dev-container-configuration.png)
+
+ - For `libraries` work, pick `.devcontainer/libraries/devcontainer.json`.
+ - For `WASM` work, pick `.devcontainer/wasm/devcontainer.json`.
+
+4. Select the Machine type. For `dotnet/runtime`, it is recommended to select at least a `4-core` machine. You can also verify that a `Prebuild` is ready.
![Codespace machine size](./codespace-machine-size.png)
@@ -20,21 +31,15 @@ dotnet/runtime runs a nightly GitHub Action to build the latest code in the repo
The Codespaces configuration is spread across the following places:
-1. The [.devcontainer](../../.devcontainer) folder contains:
- - `devcontainer.json` file configures the codespace and mostly has VS Code settings
- - The Dockerfile used to create the image
+1. The [.devcontainer](../../.devcontainer) folder contains folders for each "development scenario":
+ - `libraries` - Used by developers working in `src/libraries`
+ - `wasm` - Used by developers working on the browser-wasm workload
- The `scripts` folder contains any scripts that are executed during the creation of the codespace. This has the build command that builds the entire repo for prebuilds.
-2. The GitHub Action can be configured by following the instructions at https://docs.github.com/codespaces/prebuilding-your-codespaces/configuring-prebuilds.
+2. Each development scenario folder contains:
+ - `devcontainer.json` file configures the codespace and has VS Code / Environment settings
+ - The Dockerfile used to create the Docker image
+3. The GitHub Action can be configured by following the instructions at https://docs.github.com/codespaces/prebuilding-your-codespaces/configuring-prebuilds.
To test out changes to the `.devcontainer` files, you can follow the process in [Applying changes to your configuration](https://docs.github.com/codespaces/customizing-your-codespace/configuring-codespaces-for-your-project#applying-changes-to-your-configuration) docs. This allows you to rebuild the Codespace privately before creating a PR.
-To test out your `.yml` changes, here is the process:
-
-**Note**: *Executing these steps will overwrite the current prebuilt container for the entire repo. Afterwards, anyone creating a new codespace will get a prebuilt machine with your test changes until the Action in `main` is executed again.*
-
-1. Edit and commit the files to a branch.
-2. Push that to a branch on dotnet/runtime. Be careful that you aren't pushing to `main` or some other important branch. Prefix your branch name with your GitHub account name, so others know it is a dev branch. ex. `username/FixCodespaces`.
-3. In the "Actions" tab at the top of dotnet/runtime:
- - Select "Create Codespaces Prebuild" action on the left
- - On the right click "Run workflow" and pick your branch
- - After it runs, try to create a codespace
+To test out your changes you can run the [Codespaces Prebuilds Action](https://github.com/dotnet/runtime/actions/workflows/codespaces/create_codespaces_prebuilds) in your fork against a branch with your changes. \ No newline at end of file
diff --git a/docs/workflow/codespace-dev-container-configuration.png b/docs/workflow/codespace-dev-container-configuration.png
new file mode 100644
index 00000000000..0e03dab4b08
--- /dev/null
+++ b/docs/workflow/codespace-dev-container-configuration.png
Binary files differ
diff --git a/docs/workflow/testing/coreclr/disasm-checks.md b/docs/workflow/testing/coreclr/disasm-checks.md
new file mode 100644
index 00000000000..fe2ad4e6328
--- /dev/null
+++ b/docs/workflow/testing/coreclr/disasm-checks.md
@@ -0,0 +1,143 @@
+# Disassembly output verification checks
+There are tests that the runtime executes that will be able to verify X64/ARM64 assembly output from the JIT.
+The tools used to accomplish this are LLVM FileCheck, SuperFileCheck, and the JIT's ability to output disassembly using `DOTNET_JitDisasm`. LLVM FileCheck is built in https://www.github.com/dotnet/llvm-project and provides several packages for the various platforms. See more about LLVM FileCheck and its syntax here: https://llvm.org/docs/CommandGuide/FileCheck.html. SuperFileCheck is a custom tool located in https://www.github.com/dotnet/runtime. It wraps LLVM FileCheck and provides a simplified workflow for writing these tests in a C# file by leveraging Roslyn's syntax tree APIs.
+# What is FileCheck?
+From https://www.llvm.org/docs/CommandGuide/FileCheck.html:
+
+> **FileCheck** reads two files (one from standard input, and one specified on the command line) and uses one
+to verify the other. This behavior is particularly useful for the testsuite, which wants to verify that the
+output of some tool (e.g. **llc**) contains the expected information (for example, a movsd from esp or
+whatever is interesting). This is similar to using **grep**, but it is optimized for matching multiple
+different inputs in one file in a specific order.
+# Converting an existing test to use disassembly checking
+We will use the existing test `JIT\Regression\JitBlue\Runtime_33972` as an example. The test's intent is to verify that on ARM64, the method `AdvSimd.CompareEqual` behaves correctly when a zero vector is passed as the second argument. Below are snippets of its use:
+```csharp
+ static Vector64<byte> AdvSimd_CompareEqual_Vector64_Byte_Zero(Vector64<byte> left)
+ {
+ return AdvSimd.CompareEqual(left, Vector64<byte>.Zero);
+ }
+...
+...
+ if (!ValidateResult_Vector64<byte>(AdvSimd_CompareEqual_Vector64_Byte_Zero(Vector64<byte>.Zero), Byte.MaxValue))
+ result = -1;
+```
+Currently, the test only verifies that the behavior is correct. It does not verify that the optimal ARM64 instruction was actually used. So now we will add this verification.
+First we need to modify the project file `Runtime_33972.csproj`:
+```xml
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ </PropertyGroup>
+ <PropertyGroup>
+ <DebugType>None</DebugType>
+ <Optimize>True</Optimize>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="$(MSBuildProjectName).cs" />
+ </ItemGroup>
+</Project>
+```
+Looking at the `ItemGroup`:
+```xml
+ <ItemGroup>
+ <Compile Include="$(MSBuildProjectName).cs" />
+ </ItemGroup>
+```
+We want to add `<HasDisasmCheck>true</HasDisasmCheck>` as a child of the `Compile` tag:
+```xml
+ <ItemGroup>
+ <Compile Include="$(MSBuildProjectName).cs">
+ <HasDisasmCheck>true</HasDisasmCheck>
+ </Compile>
+ </ItemGroup>
+```
+Doing this lets the test builder and runner know that this test has assembly that needs to be verified. Finally, we need to write the assembly check and put the `[MethodImpl(MethodImplOptions.NoInlining)]` attribute on the method `AdvSimd_CompareEqual_Vector64_Byte_Zero`:
+```csharp
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static Vector64<byte> AdvSimd_CompareEqual_Vector64_Byte_Zero(Vector64<byte> left)
+ {
+ // ARM64-FULL-LINE: cmeq v0.8b, v0.8b, #0
+ return AdvSimd.CompareEqual(left, Vector64<byte>.Zero);
+ }
+```
+And that is it. A few notes about the above example:
+- `ARM64-FULL-LINE` checks to see if there is an exact line that matches the disassembly output of the method `AdvSimd_CompareEqual_Vector64_Byte_Zero` - leading and trailing spaces are ignored.
+- Method bodies that have FileCheck syntax, e.g. `ARM64-FULL-LINE:`/`X64:`/etc, must have the attribute `[MethodImpl(MethodImplOptions.NoInlining)]`. If it does not, then an error is reported.
+- FileCheck syntax outside of a method body will also report an error.
+# Additional functionality
+LLVM has a different setup where each test file is passed to `lit`, and `RUN:` lines inside the test specify
+configuration details such as architectures to run, FileCheck prefixes to use, etc. In our case, the build
+files handle a lot of this with build conditionals and `.cmd`/`.sh` file generation. Additionally, LLVM tests
+rely on the order of the compiler output corresponding to the order of the input functions in the test file.
+When running under the JIT, the compilation order is dependent on execution, not the source order.
+
+Functionality that has been added or moved to MSBuild:
+- Conditionals controlling test execution
+- Automatic specificiation of `CHECK` and `<architecture>` as check prefixes
+
+Functionality that has been added or moved to SuperFileCheck:
+- Each function is run under a separate invocation of FileCheck. SuperFileCheck adds additional `CHECK` lines
+ that search for the beginning and end of the output for each function. This ensures that output from
+ different functions don't contaminate each other. The separate invocations remove any dependency on the
+ order of the functions.
+- `<check-prefix>-FULL-LINE:` - same as using FileCheck's `<check-prefix>:`, but checks that the line matches exactly; leading and trailing whitespace is ignored.
+- `<check-prefix>-FULL-LINE-NEXT:` - same as using FileCheck's `<check-prefix>-NEXT:`, but checks that the line matches exactly; leading and trailing whitespace is ignored.
+# Test Run Limitations
+1. Disasm checks will not run if these environment variables are set:
+- `COMPlus_JitStress`
+- `COMPlus_JitStressRegs`
+- `COMPlus_TailcallStress`
+- `COMPlus_TieredPGO`
+2. Disasm checks will not run under GCStress test modes.
+3. Disasm checks will not run under heap-verify test modes.
+4. Disasm checks will not run under cross-gen2 test modes.
+# Method Disassembly Limitations
+There are a few limitations when using FileChecked methods that the user should be aware of:
+1. Local functions are not supported.
+2. Conditional defines are not recognized by the `.csproj`.
+3. Overloaded methods are not supported. Snippet below will not work:
+```csharp
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static int Test(int x)
+ {
+ // CHECK: ...
+ return 1;
+ }
+
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static float Test(float x, float y)
+ {
+ // CHECK: ...
+ return 1;
+ }
+```
+4. Using a FileChecked generic method with different type arguments may result in ambiguity when FileCheck looks at the disassembly output. The snippet below will work, but the test itself is brittle and may fail:
+```csharp
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static void Test<T>()
+ {
+ // CHECK: ...
+ (implementation)
+ }
+
+ static int Main(string args[])
+ {
+ // Disassembly output will have two specialized methods, each with different codegen that
+ // is ambiguous with our CHECK:
+ Test<float>();
+ Test<int>();
+ return 200;
+ }
+```
+The reason for these limitations are that SuperFileCheck only relies on the C# syntax tree. In the future, it may be possible to get the semantic model that will allow getting an accurate method signature, complete with types. However, it is non-trivial to resolve all required assemblies from the `.csproj` and feed them into C#'s compilation - it also adds a performance cost when using a full compilation compared to just the syntax tree.
+# Future Improvements
+- SuperFileCheck supports writing FileChecked methods where the methods are in any order. It can do this by determining the *start* and *end* "anchors" of the JIT disassembly output. However, these anchors are not necessarily standardized and changes to its current output would break disasm check tests. We should improve this by being very explicit with the output of the anchors. Below is an example of what the current anchor output is today:
+```
+; Assembly listing for method Program:PerformMod_1(uint):uint <-- start anchor
+.......
+; Total bytes of code 6, prolog size 0, PerfScore 2.10, instruction count 3, allocated bytes for code 6 (MethodHash=e2c7b489) for method Program:PerformMod_1(uint):uint <-- end anchor
+```
+- SuperFileCheck does not use a command line library today due to it being so minimal and most of the heavy lifting is done passing the arguments to FileCheck itself. As SuperFileCheck continues to grow, we will need to use a command line library, such as System.CommandLine.
+- Support various JIT test modes to allow testing codegen under specific scenarios. (Note: these can already be partially done by setting environment variables (like `COMPlus_JITMinOpts`) in the test itself.)
+- JIT IR Testing - we may want to allow testing against certain phases of a method by looking at the IR. There are a lot of unknowns surrounding this, but it would be useful to have a prototype.
diff --git a/docs/workflow/testing/mono/testing.md b/docs/workflow/testing/mono/testing.md
index ebad27a3561..0937132f163 100644
--- a/docs/workflow/testing/mono/testing.md
+++ b/docs/workflow/testing/mono/testing.md
@@ -55,12 +55,10 @@ The last few lines of the build log should contain something like this:
--------------------------------------------------
Example run.sh command
- src/tests/run.sh --coreOverlayDir=<repo_root>artifacts/tests/coreclr/Browser.wasm.Release/Tests/Core_Root --testNativeBinDir=<repo_root>/artifacts/obj/coreclr/Browser.wasm.Release/tests --testRootDir=<repo_root>/artifacts/tests/coreclr/Browser.wasm.Release --copyNativeTestBin Release
+ src/tests/run.sh wasm <Debug|Release>
--------------------------------------------------
```
-To run all tests, execute that command, adding `wasm` to the end.
-
### Android:
Build the runtime tests for Android x64/ARM64
```
diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props
index d574e5a53ce..ebf8e683ed0 100644
--- a/eng/SourceBuild.props
+++ b/eng/SourceBuild.props
@@ -11,14 +11,20 @@
<SourceBuildPortable>true</SourceBuildPortable>
<SourceBuildPortable Condition="'$(SourceBuildNonPortable)' == 'true'">false</SourceBuildPortable>
- <!-- If TargetRid not specified, detect RID based on portability. -->
+ <!-- TargetRid names what gets built. -->
<TargetRid Condition="'$(TargetRid)' == '' and '$(SourceBuildNonPortable)' == 'true'">$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)</TargetRid>
<TargetRid Condition="'$(TargetRid)' == ''">$(__DistroRid)</TargetRid>
<!-- Split e.g. 'fedora.33-x64' into 'fedora.33' and 'x64'. -->
<_targetRidPlatformIndex>$(TargetRid.LastIndexOf('-'))</_targetRidPlatformIndex>
- <TargetRidWithoutPlatform>$(TargetRid.Substring(0, $(_targetRidPlatformIndex)))</TargetRidWithoutPlatform>
- <TargetRidPlatform>$(TargetRid.Substring($(_targetRidPlatformIndex)).TrimStart('-'))</TargetRidPlatform>
+ <TargetArch>$(TargetRid.Substring($(_targetRidPlatformIndex)).TrimStart('-'))</TargetArch>
+
+ <!-- RuntimeOS is the build host rid OS. -->
+ <RuntimeOS>$(TargetRid.Substring(0, $(_targetRidPlatformIndex)))</RuntimeOS>
+
+ <!-- BaseOS is an expected known rid in the graph that TargetRid is compatible with.
+ It's used to add TargetRid in the graph if the parent can't be detected. -->
+ <BaseOS>$(RuntimeOS)</BaseOS>
<LogVerbosity Condition="'$(LogVerbosity)' == ''">minimal</LogVerbosity>
</PropertyGroup>
@@ -26,21 +32,22 @@
<Target Name="GetRuntimeSourceBuildCommandConfiguration"
BeforeTargets="GetSourceBuildCommandConfiguration">
<PropertyGroup>
- <InnerBuildArgs>$(InnerBuildArgs) --arch $(TargetRidPlatform)</InnerBuildArgs>
+ <InnerBuildArgs>$(InnerBuildArgs) --arch $(TargetArch)</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) --configuration $(Configuration)</InnerBuildArgs>
<InnerBuildArgs Condition="'$(SourceBuildNonPortable)' == 'true'">$(InnerBuildArgs) --allconfigurations</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) --verbosity $(LogVerbosity)</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) --nodereuse false</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) --warnAsError false</InnerBuildArgs>
- <InnerBuildArgs>$(InnerBuildArgs) /p:PackageRid=$(TargetRid)</InnerBuildArgs>
+ <InnerBuildArgs>$(InnerBuildArgs) --outputrid $(TargetRid)</InnerBuildArgs>
+ <InnerBuildArgs>$(InnerBuildArgs) --portablebuild $(SourceBuildPortable)</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) /p:NoPgoOptimize=true</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) /p:KeepNativeSymbols=true</InnerBuildArgs>
- <InnerBuildArgs>$(InnerBuildArgs) /p:RuntimeOS=$(TargetRidWithoutPlatform)</InnerBuildArgs>
- <InnerBuildArgs>$(InnerBuildArgs) /p:PortableBuild=$(SourceBuildPortable)</InnerBuildArgs>
+ <InnerBuildArgs>$(InnerBuildArgs) /p:RuntimeOS=$(RuntimeOS)</InnerBuildArgs>
<InnerBuildArgs Condition="'$(OfficialBuildId)' != ''">$(InnerBuildArgs) /p:OfficialBuildId=$(OfficialBuildId)</InnerBuildArgs>
<InnerBuildArgs Condition="'$(ContinuousIntegrationBuild)' != ''">$(InnerBuildArgs) /p:ContinuousIntegrationBuild=$(ContinuousIntegrationBuild)</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) /p:BuildDebPackage=false</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) /p:EnableNgenOptimization=false</InnerBuildArgs>
+ <InnerBuildArgs>$(InnerBuildArgs) /p:AdditionalRuntimeIdentifierParent=$(BaseOS)</InnerBuildArgs>
</PropertyGroup>
</Target>
diff --git a/eng/Subsets.props b/eng/Subsets.props
index 1f4987bfc30..9e666f71fe0 100644
--- a/eng/Subsets.props
+++ b/eng/Subsets.props
@@ -313,6 +313,8 @@
<ProjectToBuild Condition="'$(NativeAotSupported)' == 'true' and '$(TargetArchitecture)' != '$(BuildArchitecture)'" Include="$(CoreClrProjectRoot)tools\aot\ILCompiler\ILCompiler_crossarch.csproj" Category="clr" />
<ProjectToBuild Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)'" Include="$(CoreClrProjectRoot)tools\aot\crossgen2\crossgen2_crossarch.csproj" Category="clr" />
+
+ <ProjectToBuild Condition="'$(TargetOS)' == 'windows' or ('$(TargetOS)' == 'Linux' and ('$(TargetArchitecture)' == 'x64' or '$(TargetArchitecture)' == 'arm64')) or '$(TargetOS)' == 'OSX'" Include="$(CoreClrProjectRoot)tools\SuperFileCheck\SuperFileCheck.csproj" Category="clr" />
</ItemGroup>
<ItemGroup Condition="$(_subset.Contains('+clr.toolstests+'))">
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 8bb2ce24b27..176c545e7e4 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -1,52 +1,84 @@
<Dependencies>
<ProductDependencies>
- <Dependency Name="Microsoft.NETCore.Runtime.ICU.Transport" Version="8.0.0-alpha.1.22462.1">
+ <Dependency Name="Microsoft.NETCore.Runtime.ICU.Transport" Version="8.0.0-alpha.1.22469.1">
<Uri>https://github.com/dotnet/icu</Uri>
- <Sha>2f3a7c33d4f5873a9bb97bb255d8156cd77e3822</Sha>
+ <Sha>c1540f9cd8ea33cf3a21002c3b75cf7fcb91c44e</Sha>
</Dependency>
<Dependency Name="System.Net.MsQuic.Transport" Version="7.0.0-alpha.1.22406.1">
<Uri>https://github.com/dotnet/msquic</Uri>
<Sha>dc012a715ceb9b5d5258f2fda77520586af5a36a</Sha>
</Dependency>
- <Dependency Name="Microsoft.NET.Workload.Emscripten.net7.Manifest-8.0.100" Version="8.0.0-alpha.1.22462.1">
+ <Dependency Name="Microsoft.NET.Workload.Emscripten.net7.Manifest-8.0.100" Version="8.0.0-alpha.1.22476.1">
<Uri>https://github.com/dotnet/emsdk</Uri>
- <Sha>6736b00d7d23b40b8b6975439421cb2e41a781db</Sha>
+ <Sha>19cb1b2e025215a640d942b180b7cd691975d053</Sha>
</Dependency>
<Dependency Name="System.ServiceModel.Primitives" Version="4.9.0-rc2.21473.1">
<Uri>https://github.com/dotnet/wcf</Uri>
<Sha>7f504aabb1988e9a093c1e74d8040bd52feb2f01</Sha>
</Dependency>
- <Dependency Name="runtime.linux-arm64.Microsoft.NETCore.Runtime.ObjWriter" Version="1.0.0-alpha.1.22458.3">
+ <Dependency Name="runtime.linux-arm64.Microsoft.NETCore.Runtime.ObjWriter" Version="1.0.0-alpha.1.22478.1">
<Uri>https://github.com/dotnet/llvm-project</Uri>
- <Sha>8688ea2538ef1287c6619d35a26b5750d355cc18</Sha>
+ <Sha>2e1187ef495010c65842a001f34c46006d5a01bc</Sha>
</Dependency>
- <Dependency Name="runtime.linux-x64.Microsoft.NETCore.Runtime.ObjWriter" Version="1.0.0-alpha.1.22458.3">
+ <Dependency Name="runtime.linux-x64.Microsoft.NETCore.Runtime.ObjWriter" Version="1.0.0-alpha.1.22478.1">
<Uri>https://github.com/dotnet/llvm-project</Uri>
- <Sha>8688ea2538ef1287c6619d35a26b5750d355cc18</Sha>
+ <Sha>2e1187ef495010c65842a001f34c46006d5a01bc</Sha>
</Dependency>
- <Dependency Name="runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.ObjWriter" Version="1.0.0-alpha.1.22458.3">
+ <Dependency Name="runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.ObjWriter" Version="1.0.0-alpha.1.22478.1">
<Uri>https://github.com/dotnet/llvm-project</Uri>
- <Sha>8688ea2538ef1287c6619d35a26b5750d355cc18</Sha>
+ <Sha>2e1187ef495010c65842a001f34c46006d5a01bc</Sha>
</Dependency>
- <Dependency Name="runtime.linux-musl-x64.Microsoft.NETCore.Runtime.ObjWriter" Version="1.0.0-alpha.1.22458.3">
+ <Dependency Name="runtime.linux-musl-x64.Microsoft.NETCore.Runtime.ObjWriter" Version="1.0.0-alpha.1.22478.1">
<Uri>https://github.com/dotnet/llvm-project</Uri>
- <Sha>8688ea2538ef1287c6619d35a26b5750d355cc18</Sha>
+ <Sha>2e1187ef495010c65842a001f34c46006d5a01bc</Sha>
</Dependency>
- <Dependency Name="runtime.win-arm64.Microsoft.NETCore.Runtime.ObjWriter" Version="1.0.0-alpha.1.22458.3">
+ <Dependency Name="runtime.win-arm64.Microsoft.NETCore.Runtime.ObjWriter" Version="1.0.0-alpha.1.22478.1">
<Uri>https://github.com/dotnet/llvm-project</Uri>
- <Sha>8688ea2538ef1287c6619d35a26b5750d355cc18</Sha>
+ <Sha>2e1187ef495010c65842a001f34c46006d5a01bc</Sha>
</Dependency>
- <Dependency Name="runtime.win-x64.Microsoft.NETCore.Runtime.ObjWriter" Version="1.0.0-alpha.1.22458.3">
+ <Dependency Name="runtime.win-x64.Microsoft.NETCore.Runtime.ObjWriter" Version="1.0.0-alpha.1.22478.1">
<Uri>https://github.com/dotnet/llvm-project</Uri>
- <Sha>8688ea2538ef1287c6619d35a26b5750d355cc18</Sha>
+ <Sha>2e1187ef495010c65842a001f34c46006d5a01bc</Sha>
</Dependency>
- <Dependency Name="runtime.osx.11.0-arm64.Microsoft.NETCore.Runtime.ObjWriter" Version="1.0.0-alpha.1.22458.3">
+ <Dependency Name="runtime.osx.11.0-arm64.Microsoft.NETCore.Runtime.ObjWriter" Version="1.0.0-alpha.1.22478.1">
<Uri>https://github.com/dotnet/llvm-project</Uri>
- <Sha>8688ea2538ef1287c6619d35a26b5750d355cc18</Sha>
+ <Sha>2e1187ef495010c65842a001f34c46006d5a01bc</Sha>
</Dependency>
- <Dependency Name="runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.ObjWriter" Version="1.0.0-alpha.1.22458.3">
+ <Dependency Name="runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.ObjWriter" Version="1.0.0-alpha.1.22478.1">
<Uri>https://github.com/dotnet/llvm-project</Uri>
- <Sha>8688ea2538ef1287c6619d35a26b5750d355cc18</Sha>
+ <Sha>2e1187ef495010c65842a001f34c46006d5a01bc</Sha>
+ </Dependency>
+ <Dependency Name="runtime.linux-arm64.Microsoft.NETCore.Runtime.JIT.Tools" Version="1.0.0-alpha.1.22478.1">
+ <Uri>https://github.com/dotnet/llvm-project</Uri>
+ <Sha>2e1187ef495010c65842a001f34c46006d5a01bc</Sha>
+ </Dependency>
+ <Dependency Name="runtime.linux-x64.Microsoft.NETCore.Runtime.JIT.Tools" Version="1.0.0-alpha.1.22478.1">
+ <Uri>https://github.com/dotnet/llvm-project</Uri>
+ <Sha>2e1187ef495010c65842a001f34c46006d5a01bc</Sha>
+ </Dependency>
+ <Dependency Name="runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.JIT.Tools" Version="1.0.0-alpha.1.22478.1">
+ <Uri>https://github.com/dotnet/llvm-project</Uri>
+ <Sha>2e1187ef495010c65842a001f34c46006d5a01bc</Sha>
+ </Dependency>
+ <Dependency Name="runtime.linux-musl-x64.Microsoft.NETCore.Runtime.JIT.Tools" Version="1.0.0-alpha.1.22478.1">
+ <Uri>https://github.com/dotnet/llvm-project</Uri>
+ <Sha>2e1187ef495010c65842a001f34c46006d5a01bc</Sha>
+ </Dependency>
+ <Dependency Name="runtime.win-arm64.Microsoft.NETCore.Runtime.JIT.Tools" Version="1.0.0-alpha.1.22478.1">
+ <Uri>https://github.com/dotnet/llvm-project</Uri>
+ <Sha>2e1187ef495010c65842a001f34c46006d5a01bc</Sha>
+ </Dependency>
+ <Dependency Name="runtime.win-x64.Microsoft.NETCore.Runtime.JIT.Tools" Version="1.0.0-alpha.1.22478.1">
+ <Uri>https://github.com/dotnet/llvm-project</Uri>
+ <Sha>2e1187ef495010c65842a001f34c46006d5a01bc</Sha>
+ </Dependency>
+ <Dependency Name="runtime.osx.11.0-arm64.Microsoft.NETCore.Runtime.JIT.Tools" Version="1.0.0-alpha.1.22478.1">
+ <Uri>https://github.com/dotnet/llvm-project</Uri>
+ <Sha>2e1187ef495010c65842a001f34c46006d5a01bc</Sha>
+ </Dependency>
+ <Dependency Name="runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.JIT.Tools" Version="1.0.0-alpha.1.22478.1">
+ <Uri>https://github.com/dotnet/llvm-project</Uri>
+ <Sha>2e1187ef495010c65842a001f34c46006d5a01bc</Sha>
</Dependency>
<Dependency Name="System.CommandLine" Version="2.0.0-beta4.22355.1">
<Uri>https://github.com/dotnet/command-line-api</Uri>
@@ -54,141 +86,141 @@
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
- <Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.22455.1">
+ <Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.22469.1">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>fca51250390d403827cf50c0df9dbc632514b739</Sha>
+ <Sha>3c58477e970334e718adcd6461638ca844395db2</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="8.0.0-beta.22455.1">
+ <Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="8.0.0-beta.22469.1">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>fca51250390d403827cf50c0df9dbc632514b739</Sha>
+ <Sha>3c58477e970334e718adcd6461638ca844395db2</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.ApiCompat" Version="8.0.0-beta.22455.1">
+ <Dependency Name="Microsoft.DotNet.ApiCompat" Version="8.0.0-beta.22469.1">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>fca51250390d403827cf50c0df9dbc632514b739</Sha>
+ <Sha>3c58477e970334e718adcd6461638ca844395db2</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.GenAPI" Version="8.0.0-beta.22455.1">
+ <Dependency Name="Microsoft.DotNet.GenAPI" Version="8.0.0-beta.22469.1">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>fca51250390d403827cf50c0df9dbc632514b739</Sha>
+ <Sha>3c58477e970334e718adcd6461638ca844395db2</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.GenFacades" Version="8.0.0-beta.22455.1">
+ <Dependency Name="Microsoft.DotNet.GenFacades" Version="8.0.0-beta.22469.1">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>fca51250390d403827cf50c0df9dbc632514b739</Sha>
+ <Sha>3c58477e970334e718adcd6461638ca844395db2</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="8.0.0-beta.22455.1">
+ <Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="8.0.0-beta.22469.1">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>fca51250390d403827cf50c0df9dbc632514b739</Sha>
+ <Sha>3c58477e970334e718adcd6461638ca844395db2</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.XUnitConsoleRunner" Version="2.5.1-beta.22455.1">
+ <Dependency Name="Microsoft.DotNet.XUnitConsoleRunner" Version="2.5.1-beta.22469.1">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>fca51250390d403827cf50c0df9dbc632514b739</Sha>
+ <Sha>3c58477e970334e718adcd6461638ca844395db2</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.Build.Tasks.Archives" Version="8.0.0-beta.22455.1">
+ <Dependency Name="Microsoft.DotNet.Build.Tasks.Archives" Version="8.0.0-beta.22469.1">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>fca51250390d403827cf50c0df9dbc632514b739</Sha>
+ <Sha>3c58477e970334e718adcd6461638ca844395db2</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="8.0.0-beta.22455.1">
+ <Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="8.0.0-beta.22469.1">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>fca51250390d403827cf50c0df9dbc632514b739</Sha>
+ <Sha>3c58477e970334e718adcd6461638ca844395db2</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="8.0.0-beta.22455.1">
+ <Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="8.0.0-beta.22469.1">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>fca51250390d403827cf50c0df9dbc632514b739</Sha>
+ <Sha>3c58477e970334e718adcd6461638ca844395db2</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="8.0.0-beta.22455.1">
+ <Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="8.0.0-beta.22469.1">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>fca51250390d403827cf50c0df9dbc632514b739</Sha>
+ <Sha>3c58477e970334e718adcd6461638ca844395db2</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.Build.Tasks.Workloads" Version="8.0.0-beta.22455.1">
+ <Dependency Name="Microsoft.DotNet.Build.Tasks.Workloads" Version="8.0.0-beta.22469.1">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>fca51250390d403827cf50c0df9dbc632514b739</Sha>
+ <Sha>3c58477e970334e718adcd6461638ca844395db2</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="8.0.0-beta.22455.1">
+ <Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="8.0.0-beta.22469.1">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>fca51250390d403827cf50c0df9dbc632514b739</Sha>
+ <Sha>3c58477e970334e718adcd6461638ca844395db2</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.Build.Tasks.TargetFramework" Version="8.0.0-beta.22455.1">
+ <Dependency Name="Microsoft.DotNet.Build.Tasks.TargetFramework" Version="8.0.0-beta.22469.1">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>fca51250390d403827cf50c0df9dbc632514b739</Sha>
+ <Sha>3c58477e970334e718adcd6461638ca844395db2</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="8.0.0-beta.22455.1">
+ <Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="8.0.0-beta.22469.1">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>fca51250390d403827cf50c0df9dbc632514b739</Sha>
+ <Sha>3c58477e970334e718adcd6461638ca844395db2</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="8.0.0-beta.22455.1">
+ <Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="8.0.0-beta.22469.1">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>fca51250390d403827cf50c0df9dbc632514b739</Sha>
+ <Sha>3c58477e970334e718adcd6461638ca844395db2</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.VersionTools.Tasks" Version="8.0.0-beta.22455.1">
+ <Dependency Name="Microsoft.DotNet.VersionTools.Tasks" Version="8.0.0-beta.22469.1">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>fca51250390d403827cf50c0df9dbc632514b739</Sha>
+ <Sha>3c58477e970334e718adcd6461638ca844395db2</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.SharedFramework.Sdk" Version="8.0.0-beta.22455.1">
+ <Dependency Name="Microsoft.DotNet.SharedFramework.Sdk" Version="8.0.0-beta.22469.1">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>fca51250390d403827cf50c0df9dbc632514b739</Sha>
+ <Sha>3c58477e970334e718adcd6461638ca844395db2</Sha>
</Dependency>
- <Dependency Name="System.ComponentModel.TypeConverter.TestData" Version="7.0.0-beta.22456.1">
+ <Dependency Name="System.ComponentModel.TypeConverter.TestData" Version="7.0.0-beta.22476.1">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
- <Sha>3453104731a7fd5af1b7613bb9dc9dfa6263b312</Sha>
+ <Sha>b496d9ec07e2dec4fe85b63ea80a8b10b608ca59</Sha>
</Dependency>
- <Dependency Name="System.Drawing.Common.TestData" Version="7.0.0-beta.22456.1">
+ <Dependency Name="System.Drawing.Common.TestData" Version="7.0.0-beta.22476.1">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
- <Sha>3453104731a7fd5af1b7613bb9dc9dfa6263b312</Sha>
+ <Sha>b496d9ec07e2dec4fe85b63ea80a8b10b608ca59</Sha>
</Dependency>
- <Dependency Name="System.Formats.Tar.TestData" Version="7.0.0-beta.22456.1">
+ <Dependency Name="System.Formats.Tar.TestData" Version="7.0.0-beta.22476.1">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
- <Sha>3453104731a7fd5af1b7613bb9dc9dfa6263b312</Sha>
+ <Sha>b496d9ec07e2dec4fe85b63ea80a8b10b608ca59</Sha>
</Dependency>
- <Dependency Name="System.IO.Compression.TestData" Version="7.0.0-beta.22456.1">
+ <Dependency Name="System.IO.Compression.TestData" Version="7.0.0-beta.22476.1">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
- <Sha>3453104731a7fd5af1b7613bb9dc9dfa6263b312</Sha>
+ <Sha>b496d9ec07e2dec4fe85b63ea80a8b10b608ca59</Sha>
</Dependency>
- <Dependency Name="System.IO.Packaging.TestData" Version="7.0.0-beta.22456.1">
+ <Dependency Name="System.IO.Packaging.TestData" Version="7.0.0-beta.22476.1">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
- <Sha>3453104731a7fd5af1b7613bb9dc9dfa6263b312</Sha>
+ <Sha>b496d9ec07e2dec4fe85b63ea80a8b10b608ca59</Sha>
</Dependency>
- <Dependency Name="System.Net.TestData" Version="7.0.0-beta.22456.1">
+ <Dependency Name="System.Net.TestData" Version="7.0.0-beta.22476.1">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
- <Sha>3453104731a7fd5af1b7613bb9dc9dfa6263b312</Sha>
+ <Sha>b496d9ec07e2dec4fe85b63ea80a8b10b608ca59</Sha>
</Dependency>
- <Dependency Name="System.Private.Runtime.UnicodeData" Version="7.0.0-beta.22456.1">
+ <Dependency Name="System.Private.Runtime.UnicodeData" Version="7.0.0-beta.22476.1">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
- <Sha>3453104731a7fd5af1b7613bb9dc9dfa6263b312</Sha>
+ <Sha>b496d9ec07e2dec4fe85b63ea80a8b10b608ca59</Sha>
</Dependency>
- <Dependency Name="System.Runtime.TimeZoneData" Version="7.0.0-beta.22456.1">
+ <Dependency Name="System.Runtime.TimeZoneData" Version="7.0.0-beta.22476.1">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
- <Sha>3453104731a7fd5af1b7613bb9dc9dfa6263b312</Sha>
+ <Sha>b496d9ec07e2dec4fe85b63ea80a8b10b608ca59</Sha>
</Dependency>
- <Dependency Name="System.Security.Cryptography.X509Certificates.TestData" Version="7.0.0-beta.22456.1">
+ <Dependency Name="System.Security.Cryptography.X509Certificates.TestData" Version="7.0.0-beta.22476.1">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
- <Sha>3453104731a7fd5af1b7613bb9dc9dfa6263b312</Sha>
+ <Sha>b496d9ec07e2dec4fe85b63ea80a8b10b608ca59</Sha>
</Dependency>
- <Dependency Name="System.Text.RegularExpressions.TestData" Version="7.0.0-beta.22456.1">
+ <Dependency Name="System.Text.RegularExpressions.TestData" Version="7.0.0-beta.22476.1">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
- <Sha>3453104731a7fd5af1b7613bb9dc9dfa6263b312</Sha>
+ <Sha>b496d9ec07e2dec4fe85b63ea80a8b10b608ca59</Sha>
</Dependency>
- <Dependency Name="System.Windows.Extensions.TestData" Version="7.0.0-beta.22456.1">
+ <Dependency Name="System.Windows.Extensions.TestData" Version="7.0.0-beta.22476.1">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
- <Sha>3453104731a7fd5af1b7613bb9dc9dfa6263b312</Sha>
+ <Sha>b496d9ec07e2dec4fe85b63ea80a8b10b608ca59</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.CilStrip.Sources" Version="7.0.0-beta.22456.1">
+ <Dependency Name="Microsoft.DotNet.CilStrip.Sources" Version="7.0.0-beta.22476.1">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
- <Sha>3453104731a7fd5af1b7613bb9dc9dfa6263b312</Sha>
+ <Sha>b496d9ec07e2dec4fe85b63ea80a8b10b608ca59</Sha>
</Dependency>
- <Dependency Name="runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="14.0.0-alpha.1.22462.3">
+ <Dependency Name="runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="14.0.0-alpha.1.22469.3">
<Uri>https://github.com/dotnet/llvm-project</Uri>
- <Sha>5a24b71b87bb01eda1706c25002cc1f07282de93</Sha>
+ <Sha>861112c27d040d04a3c3810a2dfac01d6dde2007</Sha>
</Dependency>
- <Dependency Name="runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="14.0.0-alpha.1.22462.3">
+ <Dependency Name="runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="14.0.0-alpha.1.22469.3">
<Uri>https://github.com/dotnet/llvm-project</Uri>
- <Sha>5a24b71b87bb01eda1706c25002cc1f07282de93</Sha>
+ <Sha>861112c27d040d04a3c3810a2dfac01d6dde2007</Sha>
</Dependency>
- <Dependency Name="runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="14.0.0-alpha.1.22462.3">
+ <Dependency Name="runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="14.0.0-alpha.1.22469.3">
<Uri>https://github.com/dotnet/llvm-project</Uri>
- <Sha>5a24b71b87bb01eda1706c25002cc1f07282de93</Sha>
+ <Sha>861112c27d040d04a3c3810a2dfac01d6dde2007</Sha>
</Dependency>
- <Dependency Name="runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="14.0.0-alpha.1.22462.3">
+ <Dependency Name="runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="14.0.0-alpha.1.22469.3">
<Uri>https://github.com/dotnet/llvm-project</Uri>
- <Sha>5a24b71b87bb01eda1706c25002cc1f07282de93</Sha>
+ <Sha>861112c27d040d04a3c3810a2dfac01d6dde2007</Sha>
</Dependency>
<Dependency Name="runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="14.0.0-alpha.1.22455.3">
<Uri>https://github.com/dotnet/llvm-project</Uri>
@@ -206,45 +238,45 @@
<Uri>https://github.com/dotnet/llvm-project</Uri>
<Sha>30887307035be29a93a01709ac9a33f7b82177e1</Sha>
</Dependency>
- <Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="8.0.0-alpha.1.22461.4">
+ <Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="8.0.0-alpha.1.22475.4">
<Uri>https://github.com/dotnet/runtime</Uri>
- <Sha>855c475fd9c0b3a303e3de15785b63456108f7e3</Sha>
+ <Sha>b0920912512aa7e205363b046a1911e6a97df31f</Sha>
</Dependency>
- <Dependency Name="runtime.native.System.IO.Ports" Version="8.0.0-alpha.1.22461.4">
+ <Dependency Name="runtime.native.System.IO.Ports" Version="8.0.0-alpha.1.22475.4">
<Uri>https://github.com/dotnet/runtime</Uri>
- <Sha>855c475fd9c0b3a303e3de15785b63456108f7e3</Sha>
+ <Sha>b0920912512aa7e205363b046a1911e6a97df31f</Sha>
</Dependency>
- <Dependency Name="Microsoft.NETCore.ILAsm" Version="8.0.0-alpha.1.22461.4">
+ <Dependency Name="Microsoft.NETCore.ILAsm" Version="8.0.0-alpha.1.22475.4">
<Uri>https://github.com/dotnet/runtime</Uri>
- <Sha>855c475fd9c0b3a303e3de15785b63456108f7e3</Sha>
+ <Sha>b0920912512aa7e205363b046a1911e6a97df31f</Sha>
</Dependency>
- <Dependency Name="Microsoft.NET.Sdk.IL" Version="8.0.0-alpha.1.22461.4">
+ <Dependency Name="Microsoft.NET.Sdk.IL" Version="8.0.0-alpha.1.22475.4">
<Uri>https://github.com/dotnet/runtime</Uri>
- <Sha>855c475fd9c0b3a303e3de15785b63456108f7e3</Sha>
+ <Sha>b0920912512aa7e205363b046a1911e6a97df31f</Sha>
</Dependency>
- <Dependency Name="System.Text.Json" Version="8.0.0-alpha.1.22461.4">
+ <Dependency Name="System.Text.Json" Version="8.0.0-alpha.1.22475.4">
<Uri>https://github.com/dotnet/runtime</Uri>
- <Sha>855c475fd9c0b3a303e3de15785b63456108f7e3</Sha>
+ <Sha>b0920912512aa7e205363b046a1911e6a97df31f</Sha>
</Dependency>
- <Dependency Name="Microsoft.NET.ILLink.Tasks" Version="7.0.100-1.22451.5">
+ <Dependency Name="Microsoft.NET.ILLink.Tasks" Version="7.0.100-1.22469.1">
<Uri>https://github.com/dotnet/linker</Uri>
- <Sha>f0b2510bfd53a35df0aeae48996d2905c1067022</Sha>
+ <Sha>ddc7da6775ddeb2538bc327011867f65deb4c6f0</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Common" Version="1.0.0-prerelease.22456.1">
+ <Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Common" Version="1.0.0-prerelease.22473.1">
<Uri>https://github.com/dotnet/xharness</Uri>
- <Sha>55e8420fb913c035522bbb30e28d4fd7181ecd69</Sha>
+ <Sha>a8e8fc0ffeb9b8c56ab799597597ce35d5be6111</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Xunit" Version="1.0.0-prerelease.22456.1">
+ <Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Xunit" Version="1.0.0-prerelease.22473.1">
<Uri>https://github.com/dotnet/xharness</Uri>
- <Sha>55e8420fb913c035522bbb30e28d4fd7181ecd69</Sha>
+ <Sha>a8e8fc0ffeb9b8c56ab799597597ce35d5be6111</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.XHarness.CLI" Version="1.0.0-prerelease.22456.1">
+ <Dependency Name="Microsoft.DotNet.XHarness.CLI" Version="1.0.0-prerelease.22473.1">
<Uri>https://github.com/dotnet/xharness</Uri>
- <Sha>55e8420fb913c035522bbb30e28d4fd7181ecd69</Sha>
+ <Sha>a8e8fc0ffeb9b8c56ab799597597ce35d5be6111</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.PackageTesting" Version="8.0.0-beta.22455.1">
+ <Dependency Name="Microsoft.DotNet.PackageTesting" Version="8.0.0-beta.22469.1">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>fca51250390d403827cf50c0df9dbc632514b739</Sha>
+ <Sha>3c58477e970334e718adcd6461638ca844395db2</Sha>
</Dependency>
<Dependency Name="optimization.windows_nt-x64.MIBC.Runtime" Version="1.0.0-prerelease.22415.6">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
@@ -262,17 +294,17 @@
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
<Sha>45633fd5ebcbf81ffa26fb2348bdefbd8014cca3</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.HotReload.Utils.Generator.BuildTool" Version="1.1.0-alpha.0.22462.2">
+ <Dependency Name="Microsoft.DotNet.HotReload.Utils.Generator.BuildTool" Version="1.1.0-alpha.0.22470.1">
<Uri>https://github.com/dotnet/hotreload-utils</Uri>
- <Sha>9adb819d35d6e2788b6772d579d6ca1e9ef68765</Sha>
+ <Sha>14a4f4c6e6478b84cac9037935f823b40ddad01d</Sha>
</Dependency>
- <Dependency Name="System.Runtime.Numerics.TestData" Version="7.0.0-beta.22456.1">
+ <Dependency Name="System.Runtime.Numerics.TestData" Version="7.0.0-beta.22476.1">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
- <Sha>3453104731a7fd5af1b7613bb9dc9dfa6263b312</Sha>
+ <Sha>b496d9ec07e2dec4fe85b63ea80a8b10b608ca59</Sha>
</Dependency>
- <Dependency Name="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.0-preview1.22452.2">
+ <Dependency Name="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.0-preview1.22471.2">
<Uri>https://github.com/dotnet/roslyn-analyzers</Uri>
- <Sha>a26d1a203d0116aa769bce0fd3a917cc70d88a66</Sha>
+ <Sha>bce5d7e440efbfc33bf28bd9e4357a9446d5f7e2</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.ApiCompat.Task" Version="8.0.100-alpha.1.22462.3">
<Uri>https://github.com/dotnet/sdk</Uri>
diff --git a/eng/Versions.props b/eng/Versions.props
index d1508e062d4..5b1579d2d39 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -8,7 +8,8 @@
<PatchVersion>0</PatchVersion>
<SdkBandVersion>8.0.100</SdkBandVersion>
<PackageVersionNet6>6.0.10</PackageVersionNet6>
- <PackageVersionNet7>7.0.0-rc.2.22458.4</PackageVersionNet7>
+ <!-- problematic until NetCoreAppCurrent is net8.0 <PackageVersionNet7>7.0.0</PackageVersionNet7> -->
+ <PackageVersionForTemplates7>7.0.0-rtm.22476.8</PackageVersionForTemplates7>
<PreReleaseVersionLabel>alpha</PreReleaseVersionLabel>
<PreReleaseVersionIteration>1</PreReleaseVersionIteration>
<!-- Set assembly version to align with major and minor version,
@@ -38,16 +39,16 @@
The exact version is a moving target until we ship.
It should never go ahead of the Roslyn version included in the SDK version in dotnet/arcade's global.json to avoid causing breaks in product construction.
-->
- <MicrosoftCodeAnalysisVersion_4_4>4.4.0-1.22369.1</MicrosoftCodeAnalysisVersion_4_4>
+ <MicrosoftCodeAnalysisVersion_4_4>4.4.0-2.22423.18</MicrosoftCodeAnalysisVersion_4_4>
</PropertyGroup>
<PropertyGroup>
<!-- Code analysis dependencies -->
<MicrosoftCodeAnalysisAnalyzersVersion>3.3.3</MicrosoftCodeAnalysisAnalyzersVersion>
- <MicrosoftCodeAnalysisCSharpCodeStyleVersion>4.4.0-1.final</MicrosoftCodeAnalysisCSharpCodeStyleVersion>
- <MicrosoftCodeAnalysisCSharpWorkspacesVersion>4.4.0-1.final</MicrosoftCodeAnalysisCSharpWorkspacesVersion>
- <MicrosoftCodeAnalysisCSharpVersion>4.4.0-1.final</MicrosoftCodeAnalysisCSharpVersion>
- <MicrosoftCodeAnalysisNetAnalyzersVersion>7.0.0-preview1.22452.2</MicrosoftCodeAnalysisNetAnalyzersVersion>
- <MicrosoftCodeAnalysisVersion>4.4.0-1.final</MicrosoftCodeAnalysisVersion>
+ <MicrosoftCodeAnalysisCSharpCodeStyleVersion>4.4.0-2.22423.18</MicrosoftCodeAnalysisCSharpCodeStyleVersion>
+ <MicrosoftCodeAnalysisCSharpWorkspacesVersion>4.4.0-2.22423.18</MicrosoftCodeAnalysisCSharpWorkspacesVersion>
+ <MicrosoftCodeAnalysisCSharpVersion>4.4.0-2.22423.18</MicrosoftCodeAnalysisCSharpVersion>
+ <MicrosoftCodeAnalysisNetAnalyzersVersion>7.0.0-preview1.22471.2</MicrosoftCodeAnalysisNetAnalyzersVersion>
+ <MicrosoftCodeAnalysisVersion>4.4.0-2.22423.18</MicrosoftCodeAnalysisVersion>
<!--
TODO: Remove pinned version once arcade supplies a compiler that enables the repo to compile.
-->
@@ -56,37 +57,37 @@
<!-- SDK dependencies -->
<MicrosoftDotNetApiCompatTaskVersion>8.0.100-alpha.1.22462.3</MicrosoftDotNetApiCompatTaskVersion>
<!-- Arcade dependencies -->
- <MicrosoftDotNetApiCompatVersion>8.0.0-beta.22455.1</MicrosoftDotNetApiCompatVersion>
- <MicrosoftDotNetBuildTasksFeedVersion>8.0.0-beta.22455.1</MicrosoftDotNetBuildTasksFeedVersion>
- <MicrosoftDotNetCodeAnalysisVersion>8.0.0-beta.22455.1</MicrosoftDotNetCodeAnalysisVersion>
- <MicrosoftDotNetGenAPIVersion>8.0.0-beta.22455.1</MicrosoftDotNetGenAPIVersion>
- <MicrosoftDotNetGenFacadesVersion>8.0.0-beta.22455.1</MicrosoftDotNetGenFacadesVersion>
- <MicrosoftDotNetXUnitExtensionsVersion>8.0.0-beta.22455.1</MicrosoftDotNetXUnitExtensionsVersion>
- <MicrosoftDotNetXUnitConsoleRunnerVersion>2.5.1-beta.22455.1</MicrosoftDotNetXUnitConsoleRunnerVersion>
- <MicrosoftDotNetBuildTasksArchivesVersion>8.0.0-beta.22455.1</MicrosoftDotNetBuildTasksArchivesVersion>
- <MicrosoftDotNetBuildTasksInstallersVersion>8.0.0-beta.22455.1</MicrosoftDotNetBuildTasksInstallersVersion>
- <MicrosoftDotNetBuildTasksPackagingVersion>8.0.0-beta.22455.1</MicrosoftDotNetBuildTasksPackagingVersion>
- <MicrosoftDotNetBuildTasksTargetFrameworkVersion>8.0.0-beta.22455.1</MicrosoftDotNetBuildTasksTargetFrameworkVersion>
- <MicrosoftDotNetBuildTasksTemplatingVersion>8.0.0-beta.22455.1</MicrosoftDotNetBuildTasksTemplatingVersion>
- <MicrosoftDotNetBuildTasksWorkloadsPackageVersion>8.0.0-beta.22455.1</MicrosoftDotNetBuildTasksWorkloadsPackageVersion>
- <MicrosoftDotNetRemoteExecutorVersion>8.0.0-beta.22455.1</MicrosoftDotNetRemoteExecutorVersion>
- <MicrosoftDotNetVersionToolsTasksVersion>8.0.0-beta.22455.1</MicrosoftDotNetVersionToolsTasksVersion>
- <MicrosoftDotNetPackageTestingVersion>8.0.0-beta.22455.1</MicrosoftDotNetPackageTestingVersion>
+ <MicrosoftDotNetApiCompatVersion>8.0.0-beta.22469.1</MicrosoftDotNetApiCompatVersion>
+ <MicrosoftDotNetBuildTasksFeedVersion>8.0.0-beta.22469.1</MicrosoftDotNetBuildTasksFeedVersion>
+ <MicrosoftDotNetCodeAnalysisVersion>8.0.0-beta.22469.1</MicrosoftDotNetCodeAnalysisVersion>
+ <MicrosoftDotNetGenAPIVersion>8.0.0-beta.22469.1</MicrosoftDotNetGenAPIVersion>
+ <MicrosoftDotNetGenFacadesVersion>8.0.0-beta.22469.1</MicrosoftDotNetGenFacadesVersion>
+ <MicrosoftDotNetXUnitExtensionsVersion>8.0.0-beta.22469.1</MicrosoftDotNetXUnitExtensionsVersion>
+ <MicrosoftDotNetXUnitConsoleRunnerVersion>2.5.1-beta.22469.1</MicrosoftDotNetXUnitConsoleRunnerVersion>
+ <MicrosoftDotNetBuildTasksArchivesVersion>8.0.0-beta.22469.1</MicrosoftDotNetBuildTasksArchivesVersion>
+ <MicrosoftDotNetBuildTasksInstallersVersion>8.0.0-beta.22469.1</MicrosoftDotNetBuildTasksInstallersVersion>
+ <MicrosoftDotNetBuildTasksPackagingVersion>8.0.0-beta.22469.1</MicrosoftDotNetBuildTasksPackagingVersion>
+ <MicrosoftDotNetBuildTasksTargetFrameworkVersion>8.0.0-beta.22469.1</MicrosoftDotNetBuildTasksTargetFrameworkVersion>
+ <MicrosoftDotNetBuildTasksTemplatingVersion>8.0.0-beta.22469.1</MicrosoftDotNetBuildTasksTemplatingVersion>
+ <MicrosoftDotNetBuildTasksWorkloadsPackageVersion>8.0.0-beta.22469.1</MicrosoftDotNetBuildTasksWorkloadsPackageVersion>
+ <MicrosoftDotNetRemoteExecutorVersion>8.0.0-beta.22469.1</MicrosoftDotNetRemoteExecutorVersion>
+ <MicrosoftDotNetVersionToolsTasksVersion>8.0.0-beta.22469.1</MicrosoftDotNetVersionToolsTasksVersion>
+ <MicrosoftDotNetPackageTestingVersion>8.0.0-beta.22469.1</MicrosoftDotNetPackageTestingVersion>
<!-- NuGet dependencies -->
<NuGetBuildTasksPackVersion>6.0.0-preview.1.102</NuGetBuildTasksPackVersion>
<!-- Installer dependencies -->
- <MicrosoftNETCoreAppRuntimewinx64Version>8.0.0-alpha.1.22461.4</MicrosoftNETCoreAppRuntimewinx64Version>
+ <MicrosoftNETCoreAppRuntimewinx64Version>8.0.0-alpha.1.22475.4</MicrosoftNETCoreAppRuntimewinx64Version>
<MicrosoftExtensionsDependencyModelVersion>6.0.0</MicrosoftExtensionsDependencyModelVersion>
<!-- CoreClr dependencies -->
- <MicrosoftNETCoreILAsmVersion>8.0.0-alpha.1.22461.4</MicrosoftNETCoreILAsmVersion>
- <runtimelinuxarm64MicrosoftNETCoreRuntimeObjWriterVersion>1.0.0-alpha.1.22458.3</runtimelinuxarm64MicrosoftNETCoreRuntimeObjWriterVersion>
- <runtimelinuxx64MicrosoftNETCoreRuntimeObjWriterVersion>1.0.0-alpha.1.22458.3</runtimelinuxx64MicrosoftNETCoreRuntimeObjWriterVersion>
- <runtimelinuxmuslarm64MicrosoftNETCoreRuntimeObjWriterVersion>1.0.0-alpha.1.22458.3</runtimelinuxmuslarm64MicrosoftNETCoreRuntimeObjWriterVersion>
- <runtimelinuxmuslx64MicrosoftNETCoreRuntimeObjWriterVersion>1.0.0-alpha.1.22458.3</runtimelinuxmuslx64MicrosoftNETCoreRuntimeObjWriterVersion>
- <runtimewinarm64MicrosoftNETCoreRuntimeObjWriterVersion>1.0.0-alpha.1.22458.3</runtimewinarm64MicrosoftNETCoreRuntimeObjWriterVersion>
- <runtimewinx64MicrosoftNETCoreRuntimeObjWriterVersion>1.0.0-alpha.1.22458.3</runtimewinx64MicrosoftNETCoreRuntimeObjWriterVersion>
- <runtimeosx110arm64MicrosoftNETCoreRuntimeObjWriterVersion>1.0.0-alpha.1.22458.3</runtimeosx110arm64MicrosoftNETCoreRuntimeObjWriterVersion>
- <runtimeosx1012x64MicrosoftNETCoreRuntimeObjWriterVersion>1.0.0-alpha.1.22458.3</runtimeosx1012x64MicrosoftNETCoreRuntimeObjWriterVersion>
+ <MicrosoftNETCoreILAsmVersion>8.0.0-alpha.1.22475.4</MicrosoftNETCoreILAsmVersion>
+ <runtimelinuxarm64MicrosoftNETCoreRuntimeObjWriterVersion>1.0.0-alpha.1.22478.1</runtimelinuxarm64MicrosoftNETCoreRuntimeObjWriterVersion>
+ <runtimelinuxx64MicrosoftNETCoreRuntimeObjWriterVersion>1.0.0-alpha.1.22478.1</runtimelinuxx64MicrosoftNETCoreRuntimeObjWriterVersion>
+ <runtimelinuxmuslarm64MicrosoftNETCoreRuntimeObjWriterVersion>1.0.0-alpha.1.22478.1</runtimelinuxmuslarm64MicrosoftNETCoreRuntimeObjWriterVersion>
+ <runtimelinuxmuslx64MicrosoftNETCoreRuntimeObjWriterVersion>1.0.0-alpha.1.22478.1</runtimelinuxmuslx64MicrosoftNETCoreRuntimeObjWriterVersion>
+ <runtimewinarm64MicrosoftNETCoreRuntimeObjWriterVersion>1.0.0-alpha.1.22478.1</runtimewinarm64MicrosoftNETCoreRuntimeObjWriterVersion>
+ <runtimewinx64MicrosoftNETCoreRuntimeObjWriterVersion>1.0.0-alpha.1.22478.1</runtimewinx64MicrosoftNETCoreRuntimeObjWriterVersion>
+ <runtimeosx110arm64MicrosoftNETCoreRuntimeObjWriterVersion>1.0.0-alpha.1.22478.1</runtimeosx110arm64MicrosoftNETCoreRuntimeObjWriterVersion>
+ <runtimeosx1012x64MicrosoftNETCoreRuntimeObjWriterVersion>1.0.0-alpha.1.22478.1</runtimeosx1012x64MicrosoftNETCoreRuntimeObjWriterVersion>
<!-- Libraries dependencies -->
<MicrosoftBclAsyncInterfacesVersion>6.0.0</MicrosoftBclAsyncInterfacesVersion>
<MicrosoftBclHashCodeVersion>1.1.1</MicrosoftBclHashCodeVersion>
@@ -113,25 +114,25 @@
<SystemSecurityCryptographyOpenSslVersion>5.0.0</SystemSecurityCryptographyOpenSslVersion>
<SystemSecurityPrincipalWindowsVersion>5.0.0</SystemSecurityPrincipalWindowsVersion>
<SystemServiceModelPrimitivesVersion>4.9.0</SystemServiceModelPrimitivesVersion>
- <SystemTextJsonVersion>8.0.0-alpha.1.22461.4</SystemTextJsonVersion>
+ <SystemTextJsonVersion>8.0.0-alpha.1.22475.4</SystemTextJsonVersion>
<SystemRuntimeCompilerServicesUnsafeVersion>6.0.0</SystemRuntimeCompilerServicesUnsafeVersion>
<SystemThreadingTasksExtensionsVersion>4.5.4</SystemThreadingTasksExtensionsVersion>
<SystemValueTupleVersion>4.5.0</SystemValueTupleVersion>
- <runtimenativeSystemIOPortsVersion>8.0.0-alpha.1.22461.4</runtimenativeSystemIOPortsVersion>
+ <runtimenativeSystemIOPortsVersion>8.0.0-alpha.1.22475.4</runtimenativeSystemIOPortsVersion>
<!-- Runtime-Assets dependencies -->
- <SystemRuntimeNumericsTestDataVersion>7.0.0-beta.22456.1</SystemRuntimeNumericsTestDataVersion>
- <SystemComponentModelTypeConverterTestDataVersion>7.0.0-beta.22456.1</SystemComponentModelTypeConverterTestDataVersion>
- <SystemDrawingCommonTestDataVersion>7.0.0-beta.22456.1</SystemDrawingCommonTestDataVersion>
- <SystemFormatsTarTestDataVersion>7.0.0-beta.22456.1</SystemFormatsTarTestDataVersion>
- <SystemIOCompressionTestDataVersion>7.0.0-beta.22456.1</SystemIOCompressionTestDataVersion>
- <SystemIOPackagingTestDataVersion>7.0.0-beta.22456.1</SystemIOPackagingTestDataVersion>
- <SystemNetTestDataVersion>7.0.0-beta.22456.1</SystemNetTestDataVersion>
- <SystemPrivateRuntimeUnicodeDataVersion>7.0.0-beta.22456.1</SystemPrivateRuntimeUnicodeDataVersion>
- <SystemRuntimeTimeZoneDataVersion>7.0.0-beta.22456.1</SystemRuntimeTimeZoneDataVersion>
- <SystemSecurityCryptographyX509CertificatesTestDataVersion>7.0.0-beta.22456.1</SystemSecurityCryptographyX509CertificatesTestDataVersion>
- <SystemTextRegularExpressionsTestDataVersion>7.0.0-beta.22456.1</SystemTextRegularExpressionsTestDataVersion>
- <SystemWindowsExtensionsTestDataVersion>7.0.0-beta.22456.1</SystemWindowsExtensionsTestDataVersion>
- <MicrosoftDotNetCilStripSourcesVersion>7.0.0-beta.22456.1</MicrosoftDotNetCilStripSourcesVersion>
+ <SystemRuntimeNumericsTestDataVersion>7.0.0-beta.22476.1</SystemRuntimeNumericsTestDataVersion>
+ <SystemComponentModelTypeConverterTestDataVersion>7.0.0-beta.22476.1</SystemComponentModelTypeConverterTestDataVersion>
+ <SystemDrawingCommonTestDataVersion>7.0.0-beta.22476.1</SystemDrawingCommonTestDataVersion>
+ <SystemFormatsTarTestDataVersion>7.0.0-beta.22476.1</SystemFormatsTarTestDataVersion>
+ <SystemIOCompressionTestDataVersion>7.0.0-beta.22476.1</SystemIOCompressionTestDataVersion>
+ <SystemIOPackagingTestDataVersion>7.0.0-beta.22476.1</SystemIOPackagingTestDataVersion>
+ <SystemNetTestDataVersion>7.0.0-beta.22476.1</SystemNetTestDataVersion>
+ <SystemPrivateRuntimeUnicodeDataVersion>7.0.0-beta.22476.1</SystemPrivateRuntimeUnicodeDataVersion>
+ <SystemRuntimeTimeZoneDataVersion>7.0.0-beta.22476.1</SystemRuntimeTimeZoneDataVersion>
+ <SystemSecurityCryptographyX509CertificatesTestDataVersion>7.0.0-beta.22476.1</SystemSecurityCryptographyX509CertificatesTestDataVersion>
+ <SystemTextRegularExpressionsTestDataVersion>7.0.0-beta.22476.1</SystemTextRegularExpressionsTestDataVersion>
+ <SystemWindowsExtensionsTestDataVersion>7.0.0-beta.22476.1</SystemWindowsExtensionsTestDataVersion>
+ <MicrosoftDotNetCilStripSourcesVersion>7.0.0-beta.22476.1</MicrosoftDotNetCilStripSourcesVersion>
<!-- dotnet-optimization dependencies -->
<optimizationwindows_ntx64MIBCRuntimeVersion>1.0.0-prerelease.22415.6</optimizationwindows_ntx64MIBCRuntimeVersion>
<optimizationwindows_ntx86MIBCRuntimeVersion>1.0.0-prerelease.22415.6</optimizationwindows_ntx86MIBCRuntimeVersion>
@@ -154,10 +155,10 @@
<!-- Testing -->
<MicrosoftNETCoreCoreDisToolsVersion>1.1.0</MicrosoftNETCoreCoreDisToolsVersion>
<MicrosoftNETTestSdkVersion>17.4.0-preview-20220707-01</MicrosoftNETTestSdkVersion>
- <MicrosoftDotNetXHarnessTestRunnersCommonVersion>1.0.0-prerelease.22456.1</MicrosoftDotNetXHarnessTestRunnersCommonVersion>
- <MicrosoftDotNetXHarnessTestRunnersXunitVersion>1.0.0-prerelease.22456.1</MicrosoftDotNetXHarnessTestRunnersXunitVersion>
- <MicrosoftDotNetXHarnessCLIVersion>1.0.0-prerelease.22456.1</MicrosoftDotNetXHarnessCLIVersion>
- <MicrosoftDotNetHotReloadUtilsGeneratorBuildToolVersion>1.1.0-alpha.0.22462.2</MicrosoftDotNetHotReloadUtilsGeneratorBuildToolVersion>
+ <MicrosoftDotNetXHarnessTestRunnersCommonVersion>1.0.0-prerelease.22473.1</MicrosoftDotNetXHarnessTestRunnersCommonVersion>
+ <MicrosoftDotNetXHarnessTestRunnersXunitVersion>1.0.0-prerelease.22473.1</MicrosoftDotNetXHarnessTestRunnersXunitVersion>
+ <MicrosoftDotNetXHarnessCLIVersion>1.0.0-prerelease.22473.1</MicrosoftDotNetXHarnessCLIVersion>
+ <MicrosoftDotNetHotReloadUtilsGeneratorBuildToolVersion>1.1.0-alpha.0.22470.1</MicrosoftDotNetHotReloadUtilsGeneratorBuildToolVersion>
<XUnitVersion>2.4.2</XUnitVersion>
<XUnitAnalyzersVersion>1.0.0</XUnitAnalyzersVersion>
<XUnitRunnerVisualStudioVersion>2.4.5</XUnitRunnerVisualStudioVersion>
@@ -179,30 +180,39 @@
<SdkVersionForWorkloadTesting>8.0.100-alpha.1.22463.23</SdkVersionForWorkloadTesting>
<CompilerPlatformTestingVersion>1.1.2-beta1.22403.2</CompilerPlatformTestingVersion>
<!-- Docs -->
- <MicrosoftPrivateIntellisenseVersion>7.0.0-preview-20220822.1</MicrosoftPrivateIntellisenseVersion>
+ <MicrosoftPrivateIntellisenseVersion>7.0.0-preview-20220920.1</MicrosoftPrivateIntellisenseVersion>
<!-- ILLink -->
- <MicrosoftNETILLinkTasksVersion>7.0.100-1.22451.5</MicrosoftNETILLinkTasksVersion>
+ <MicrosoftNETILLinkTasksVersion>7.0.100-1.22469.1</MicrosoftNETILLinkTasksVersion>
<MicrosoftNETILLinkAnalyzerPackageVersion>$(MicrosoftNETILLinkTasksVersion)</MicrosoftNETILLinkAnalyzerPackageVersion>
<!-- ICU -->
- <MicrosoftNETCoreRuntimeICUTransportVersion>8.0.0-alpha.1.22462.1</MicrosoftNETCoreRuntimeICUTransportVersion>
+ <MicrosoftNETCoreRuntimeICUTransportVersion>8.0.0-alpha.1.22469.1</MicrosoftNETCoreRuntimeICUTransportVersion>
<!-- MsQuic -->
<MicrosoftNativeQuicMsQuicVersion>2.1.1</MicrosoftNativeQuicMsQuicVersion>
<SystemNetMsQuicTransportVersion>7.0.0-alpha.1.22406.1</SystemNetMsQuicTransportVersion>
<!-- Mono LLVM -->
- <runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>14.0.0-alpha.1.22462.3</runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
- <runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>14.0.0-alpha.1.22462.3</runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
- <runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>14.0.0-alpha.1.22462.3</runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
- <runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>14.0.0-alpha.1.22462.3</runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
+ <runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>14.0.0-alpha.1.22469.3</runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
+ <runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>14.0.0-alpha.1.22469.3</runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
+ <runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>14.0.0-alpha.1.22469.3</runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
+ <runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>14.0.0-alpha.1.22469.3</runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
<runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>14.0.0-alpha.1.22455.3</runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
<runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>14.0.0-alpha.1.22455.3</runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
<runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>11.1.0-alpha.1.22451.2</runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
<runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>11.1.0-alpha.1.22451.2</runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
<!-- emscripten / Node -->
- <MicrosoftNETWorkloadEmscriptennet7Manifest80100Version>8.0.0-alpha.1.22462.1</MicrosoftNETWorkloadEmscriptennet7Manifest80100Version>
+ <MicrosoftNETWorkloadEmscriptennet7Manifest80100Version>8.0.0-alpha.1.22476.1</MicrosoftNETWorkloadEmscriptennet7Manifest80100Version>
<MicrosoftNETRuntimeEmscriptenVersion>$(MicrosoftNETWorkloadEmscriptennet7Manifest80100Version)</MicrosoftNETRuntimeEmscriptenVersion>
<!-- workloads -->
<SwixPackageVersion>1.1.87-gba258badda</SwixPackageVersion>
<WixPackageVersion>1.0.0-v3.14.0.5722</WixPackageVersion>
<MonoWorkloadManifestVersion>6.0.0-preview.5.21275.7</MonoWorkloadManifestVersion>
+ <!-- JIT Tools -->
+ <runtimelinuxarm64MicrosoftNETCoreRuntimeJITToolsVersion>1.0.0-alpha.1.22478.1</runtimelinuxarm64MicrosoftNETCoreRuntimeJITToolsVersion>
+ <runtimelinuxx64MicrosoftNETCoreRuntimeJITToolsVersion>1.0.0-alpha.1.22478.1</runtimelinuxx64MicrosoftNETCoreRuntimeJITToolsVersion>
+ <runtimelinuxmuslarm64MicrosoftNETCoreRuntimeJITToolsVersion>1.0.0-alpha.1.22478.1</runtimelinuxmuslarm64MicrosoftNETCoreRuntimeJITToolsVersion>
+ <runtimelinuxmuslx64MicrosoftNETCoreRuntimeJITToolsVersion>1.0.0-alpha.1.22478.1</runtimelinuxmuslx64MicrosoftNETCoreRuntimeJITToolsVersion>
+ <runtimewinarm64MicrosoftNETCoreRuntimeJITToolsVersion>1.0.0-alpha.1.22478.1</runtimewinarm64MicrosoftNETCoreRuntimeJITToolsVersion>
+ <runtimewinx64MicrosoftNETCoreRuntimeJITToolsVersion>1.0.0-alpha.1.22478.1</runtimewinx64MicrosoftNETCoreRuntimeJITToolsVersion>
+ <runtimeosx110arm64MicrosoftNETCoreRuntimeJITToolsVersion>1.0.0-alpha.1.22478.1</runtimeosx110arm64MicrosoftNETCoreRuntimeJITToolsVersion>
+ <runtimeosx1012x64MicrosoftNETCoreRuntimeJITToolsVersion>1.0.0-alpha.1.22478.1</runtimeosx1012x64MicrosoftNETCoreRuntimeJITToolsVersion>
</PropertyGroup>
</Project>
diff --git a/eng/build.sh b/eng/build.sh
index f9ef572f3a0..97fee9151c3 100755
--- a/eng/build.sh
+++ b/eng/build.sh
@@ -33,6 +33,7 @@ usage()
echo " --os Target operating system: windows, Linux, FreeBSD, OSX, MacCatalyst, tvOS,"
echo " tvOSSimulator, iOS, iOSSimulator, Android, Browser, NetBSD, illumos or Solaris."
echo " [Default: Your machine's OS.]"
+ echo " --outputrid <rid> Optional argument that overrides the target rid name."
echo " --projects <value> Project or solution file(s) to build."
echo " --runtimeConfiguration (-rc) Runtime build configuration: Debug, Release or Checked."
echo " Checked is exclusive to the CLR runtime. It is the same as Debug, except code is"
@@ -403,6 +404,12 @@ while [[ $# > 0 ]]; do
shift 1
;;
+ *crossbuild=true*)
+ crossBuild=1
+ extraargs="$extraargs $1"
+ shift 1
+ ;;
+
-clang*)
compiler="${opt/#-/}" # -clang-9 => clang-9 or clang-9 => (unchanged)
arguments="$arguments /p:Compiler=$compiler /p:CppCompilerAndLinker=$compiler"
@@ -424,6 +431,15 @@ while [[ $# > 0 ]]; do
shift 1
;;
+ -outputrid)
+ if [ -z ${2+x} ]; then
+ echo "No value for outputrid is supplied. See help (--help) for supported values." 1>&2
+ exit 1
+ fi
+ arguments="$arguments /p:OutputRid=$(echo "$2" | tr "[:upper:]" "[:lower:]")"
+ shift 2
+ ;;
+
-portablebuild)
if [ -z ${2+x} ]; then
echo "No value for portablebuild is supplied. See help (--help) for supported values." 1>&2
diff --git a/eng/common/generate-locproject.ps1 b/eng/common/generate-locproject.ps1
index bab18543d6c..dbf2ab4ee7d 100644
--- a/eng/common/generate-locproject.ps1
+++ b/eng/common/generate-locproject.ps1
@@ -91,6 +91,7 @@ $locJson = @{
)
},
@{
+ LanguageSet = $LanguageSet
CloneLanguageSet = "WiX_CloneLanguages"
LssFiles = @( "wxl_loc.lss" )
LocItems = @(
@@ -110,7 +111,6 @@ $locJson = @{
SourceFile = $sourceFile
CopyOption = "LangIDOnPath"
OutputPath = $outputPath
- Languages = "cs-CZ;de-DE;es-ES;fr-FR;it-IT;ja-JP;ko-KR;pl-PL;pt-BR;ru-RU;tr-TR;zh-CN;zh-TW"
}
}
}
diff --git a/eng/common/init-tools-native.ps1 b/eng/common/init-tools-native.ps1
index 8d48ec5680f..ac42f04a9d8 100644
--- a/eng/common/init-tools-native.ps1
+++ b/eng/common/init-tools-native.ps1
@@ -98,11 +98,12 @@ try {
Write-Error "Arcade tools directory '$ArcadeToolsDirectory' was not found; artifacts were not properly installed."
exit 1
}
- $ToolDirectory = (Get-ChildItem -Path "$ArcadeToolsDirectory" -Filter "$ToolName-$ToolVersion*" | Sort-Object -Descending)[0]
- if ([string]::IsNullOrWhiteSpace($ToolDirectory)) {
+ $ToolDirectories = (Get-ChildItem -Path "$ArcadeToolsDirectory" -Filter "$ToolName-$ToolVersion*" | Sort-Object -Descending)
+ if ($ToolDirectories -eq $null) {
Write-Error "Unable to find directory for $ToolName $ToolVersion; please make sure the tool is installed on this image."
exit 1
}
+ $ToolDirectory = $ToolDirectories[0]
$BinPathFile = "$($ToolDirectory.FullName)\binpath.txt"
if (-not (Test-Path -Path "$BinPathFile")) {
Write-Error "Unable to find binpath.txt in '$($ToolDirectory.FullName)' ($ToolName $ToolVersion); artifact is either installed incorrectly or is not a bootstrappable tool."
diff --git a/eng/common/sdl/NuGet.config b/eng/common/sdl/NuGet.config
index 0c5451c1141..3849bdb3cf5 100644
--- a/eng/common/sdl/NuGet.config
+++ b/eng/common/sdl/NuGet.config
@@ -7,6 +7,11 @@
<clear />
<add key="guardian" value="https://securitytools.pkgs.visualstudio.com/_packaging/Guardian/nuget/v3/index.json" />
</packageSources>
+ <packageSourceMapping>
+ <packageSource key="guardian">
+ <package pattern="microsoft.guardian.cli" />
+ </packageSource>
+ </packageSourceMapping>
<disabledPackageSources>
<clear />
</disabledPackageSources>
diff --git a/eng/common/sdl/sdl.ps1 b/eng/common/sdl/sdl.ps1
index ac196e164a4..648c5068d7d 100644
--- a/eng/common/sdl/sdl.ps1
+++ b/eng/common/sdl/sdl.ps1
@@ -1,6 +1,7 @@
function Install-Gdn {
param(
+ [Parameter(Mandatory=$true)]
[string]$Path,
# If omitted, install the latest version of Guardian, otherwise install that specific version.
diff --git a/eng/common/templates/job/execute-sdl.yml b/eng/common/templates/job/execute-sdl.yml
index 9ff6a10a682..781a41c9404 100644
--- a/eng/common/templates/job/execute-sdl.yml
+++ b/eng/common/templates/job/execute-sdl.yml
@@ -59,7 +59,9 @@ jobs:
- checkout: self
clean: true
- - template: /eng/common/templates/post-build/setup-maestro-vars.yml
+ # If the template caller didn't provide an AzDO parameter, set them all up as Maestro vars.
+ - ${{ if not(and(parameters.AzDOProjectName, parameters.AzDOPipelineId, parameters.AzDOBuildId)) }}:
+ - template: /eng/common/templates/post-build/setup-maestro-vars.yml
- ${{ if ne(parameters.downloadArtifacts, 'false')}}:
- ${{ if ne(parameters.artifactNames, '') }}:
diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml
index e3ba9398016..459f3c4fcbb 100644
--- a/eng/common/templates/job/job.yml
+++ b/eng/common/templates/job/job.yml
@@ -140,6 +140,7 @@ jobs:
languages: ${{ coalesce(parameters.richCodeNavigationLanguage, 'csharp') }}
environment: ${{ coalesce(parameters.richCodeNavigationEnvironment, 'production') }}
richNavLogOutputDirectory: $(Build.SourcesDirectory)/artifacts/bin
+ uploadRichNavArtifacts: ${{ coalesce(parameters.richCodeNavigationUploadArtifacts, false) }}
continueOnError: true
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), ne(parameters.disableComponentGovernance, 'true')) }}:
@@ -183,24 +184,6 @@ jobs:
displayName: Publish logs
continueOnError: true
condition: always()
- - ${{ if or(eq(parameters.artifacts.publish.manifests, 'true'), ne(parameters.artifacts.publish.manifests, '')) }}:
- - ${{ if and(ne(parameters.enablePublishUsingPipelines, 'true'), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- - task: CopyFiles@2
- displayName: Gather Asset Manifests
- inputs:
- SourceFolder: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/AssetManifest'
- TargetFolder: '$(Build.ArtifactStagingDirectory)/AssetManifests'
- continueOnError: ${{ parameters.continueOnError }}
- condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true'))
-
- - task: PublishBuildArtifacts@1
- displayName: Push Asset Manifests
- inputs:
- PathtoPublish: '$(Build.ArtifactStagingDirectory)/AssetManifests'
- PublishLocation: Container
- ArtifactName: AssetManifests
- continueOnError: ${{ parameters.continueOnError }}
- condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true'))
- ${{ if ne(parameters.enablePublishBuildArtifacts, 'false') }}:
- task: PublishBuildArtifacts@1
@@ -234,24 +217,6 @@ jobs:
mergeTestResults: ${{ parameters.mergeTestResults }}
continueOnError: true
condition: always()
-
- - ${{ if and(eq(parameters.enablePublishBuildAssets, true), ne(parameters.enablePublishUsingPipelines, 'true'), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- - task: CopyFiles@2
- displayName: Gather Asset Manifests
- inputs:
- SourceFolder: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/AssetManifest'
- TargetFolder: '$(Build.StagingDirectory)/AssetManifests'
- continueOnError: ${{ parameters.continueOnError }}
- condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true'))
-
- - task: PublishBuildArtifacts@1
- displayName: Push Asset Manifests
- inputs:
- PathtoPublish: '$(Build.StagingDirectory)/AssetManifests'
- PublishLocation: Container
- ArtifactName: AssetManifests
- continueOnError: ${{ parameters.continueOnError }}
- condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true'))
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.enableSbom, 'true')) }}:
- template: /eng/common/templates/steps/generate-sbom.yml
diff --git a/eng/common/templates/steps/execute-sdl.yml b/eng/common/templates/steps/execute-sdl.yml
index 86cf578c431..9dd5709f66d 100644
--- a/eng/common/templates/steps/execute-sdl.yml
+++ b/eng/common/templates/steps/execute-sdl.yml
@@ -17,14 +17,16 @@ steps:
- ${{ if ne(parameters.overrideGuardianVersion, '') }}:
- pwsh: |
- . $(Build.SourcesDirectory)\eng\common\sdl\sdl.ps1
+ Set-Location -Path $(Build.SourcesDirectory)\eng\common\sdl
+ . .\sdl.ps1
$guardianCliLocation = Install-Gdn -Path $(Build.SourcesDirectory)\.artifacts -Version ${{ parameters.overrideGuardianVersion }}
Write-Host "##vso[task.setvariable variable=GuardianCliLocation]$guardianCliLocation"
displayName: Install Guardian (Overridden)
- ${{ if eq(parameters.overrideGuardianVersion, '') }}:
- pwsh: |
- . $(Build.SourcesDirectory)\eng\common\sdl\sdl.ps1
+ Set-Location -Path $(Build.SourcesDirectory)\eng\common\sdl
+ . .\sdl.ps1
$guardianCliLocation = Install-Gdn -Path $(Build.SourcesDirectory)\.artifacts
Write-Host "##vso[task.setvariable variable=GuardianCliLocation]$guardianCliLocation"
displayName: Install Guardian
diff --git a/eng/common/templates/steps/source-build.yml b/eng/common/templates/steps/source-build.yml
index 12a8ff94d8e..4624885e3bf 100644
--- a/eng/common/templates/steps/source-build.yml
+++ b/eng/common/templates/steps/source-build.yml
@@ -63,6 +63,11 @@ steps:
targetRidArgs='/p:TargetRid=${{ parameters.platform.targetRID }}'
fi
+ runtimeOsArgs=
+ if [ '${{ parameters.platform.runtimeOS }}' != '' ]; then
+ runtimeOsArgs='/p:RuntimeOS=${{ parameters.platform.runtimeOS }}'
+ fi
+
publishArgs=
if [ '${{ parameters.platform.skipPublishValidation }}' != 'true' ]; then
publishArgs='--publish'
@@ -75,6 +80,7 @@ steps:
$internalRuntimeDownloadArgs \
$internalRestoreArgs \
$targetRidArgs \
+ $runtimeOsArgs \
/p:SourceBuildNonPortable=${{ parameters.platform.nonPortable }} \
/p:ArcadeBuildFromSource=true
displayName: Build
diff --git a/eng/liveBuilds.targets b/eng/liveBuilds.targets
index 982413a4eba..3006fd92e75 100644
--- a/eng/liveBuilds.targets
+++ b/eng/liveBuilds.targets
@@ -223,6 +223,8 @@
ResolveLibrariesRuntimeFilesFromLocalBuild" />
<PropertyGroup>
- <BundledRuntimeIdentifierGraphFile>$(RuntimeIdGraphDefinitionFile)</BundledRuntimeIdentifierGraphFile>
+ <!-- Keep in sync with outputs defined in Microsoft.NETCore.Platforms.csproj. -->
+ <BundledRuntimeIdentifierGraphFile>$([MSBuild]::NormalizePath('$(ArtifactsBinDir)', 'Microsoft.NETCore.Platforms', 'runtime.json'))</BundledRuntimeIdentifierGraphFile>
+ <BundledRuntimeIdentifierGraphFile Condition="!Exists('$(BundledRuntimeIdentifierGraphFile)')">$([MSBuild]::NormalizePath('$(LibrariesProjectRoot)', 'Microsoft.NETCore.Platforms', 'src', 'runtime.json'))</BundledRuntimeIdentifierGraphFile>
</PropertyGroup>
</Project>
diff --git a/eng/native/build-commons.sh b/eng/native/build-commons.sh
index dd0dea81cd6..ae0761c84a1 100755
--- a/eng/native/build-commons.sh
+++ b/eng/native/build-commons.sh
@@ -212,6 +212,7 @@ usage()
echo "-gccx.y: optional argument to build using gcc version x.y."
echo "-ninja: target ninja instead of GNU make"
echo "-numproc: set the number of build processes."
+ echo "-outputrid: optional argument that overrides the target rid name."
echo "-portablebuild: pass -portablebuild=false to force a non-portable build."
echo "-skipconfigure: skip build configuration."
echo "-keepnativesymbols: keep native/unmanaged debug symbols."
@@ -232,6 +233,7 @@ __TargetArch=$arch
__TargetOS=$os
__HostOS=$os
__BuildOS=$os
+__OutputRid=''
# Get the number of processors available to the scheduler
platform="$(uname)"
@@ -392,6 +394,16 @@ while :; do
__TargetArch=wasm
;;
+ outputrid|-outputrid)
+ if [[ -n "$2" ]]; then
+ __OutputRid="$2"
+ shift
+ else
+ echo "ERROR: 'outputrid' requires a non-empty option argument"
+ exit 1
+ fi
+ ;;
+
ppc64le|-ppc64le)
__TargetArch=ppc64le
;;
@@ -474,3 +486,7 @@ fi
# init the target distro name
initTargetDistroRid
+
+if [ -z "$__OutputRid" ]; then
+ __OutputRid="$(echo $__DistroRid | tr '[:upper:]' '[:lower:]')"
+fi
diff --git a/eng/native/configurecompiler.cmake b/eng/native/configurecompiler.cmake
index da893f7da61..93d0f9c5ad5 100644
--- a/eng/native/configurecompiler.cmake
+++ b/eng/native/configurecompiler.cmake
@@ -509,7 +509,7 @@ if (CLR_CMAKE_HOST_UNIX)
set(CMAKE_OSX_DEPLOYMENT_TARGET "11.0")
add_compile_options(-arch arm64)
elseif(CLR_CMAKE_HOST_ARCH_AMD64)
- set(CMAKE_OSX_DEPLOYMENT_TARGET "10.14")
+ set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15")
add_compile_options(-arch x86_64)
else()
clr_unknown_arch()
diff --git a/eng/native/configureplatform.cmake b/eng/native/configureplatform.cmake
index c7a38c3eee8..50621170406 100644
--- a/eng/native/configureplatform.cmake
+++ b/eng/native/configureplatform.cmake
@@ -443,13 +443,7 @@ else()
endif(CLR_CMAKE_TARGET_UNIX)
# check if host & target os/arch combination are valid
-if (CLR_CMAKE_TARGET_OS STREQUAL CLR_CMAKE_HOST_OS)
- if(NOT(CLR_CMAKE_TARGET_ARCH STREQUAL CLR_CMAKE_HOST_ARCH))
- if(NOT((CLR_CMAKE_HOST_ARCH_AMD64 AND CLR_CMAKE_TARGET_ARCH_ARM64) OR (CLR_CMAKE_HOST_ARCH_I386 AND CLR_CMAKE_TARGET_ARCH_ARM) OR (CLR_CMAKE_HOST_ARCH_AMD64 AND CLR_CMAKE_TARGET_ARCH_ARM) OR (CLR_CMAKE_HOST_ARCH_AMD64 AND CLR_CMAKE_TARGET_ARCH_I386)))
- message(FATAL_ERROR "Invalid platform and target arch combination TARGET_ARCH=${CLR_CMAKE_TARGET_ARCH} HOST_ARCH=${CLR_CMAKE_HOST_ARCH}")
- endif()
- endif()
-else()
+if (NOT (CLR_CMAKE_TARGET_OS STREQUAL CLR_CMAKE_HOST_OS))
if(NOT (CLR_CMAKE_HOST_OS STREQUAL windows))
message(FATAL_ERROR "Invalid host and target os/arch combination. Host OS: ${CLR_CMAKE_HOST_OS}")
endif()
diff --git a/eng/native/tryrun.cmake b/eng/native/tryrun.cmake
index 5c5344bd801..6355b0988f7 100644
--- a/eng/native/tryrun.cmake
+++ b/eng/native/tryrun.cmake
@@ -64,7 +64,7 @@ if(DARWIN)
set_cache_value(SSCANF_CANNOT_HANDLE_MISSING_EXPONENT_EXITCODE 1)
set_cache_value(SSCANF_SUPPORT_ll_EXITCODE 0)
set_cache_value(UNGETC_NOT_RETURN_EOF_EXITCODE 1)
- set_cache_value(HAVE_SHM_OPEN_THAT_WORKS_WELL_ENOUGH_WITH_MMAP_EXITCODE 0)
+ set_cache_value(HAVE_SHM_OPEN_THAT_WORKS_WELL_ENOUGH_WITH_MMAP_EXITCODE 1)
else()
message(FATAL_ERROR "Arch is ${TARGET_ARCH_NAME}. Only arm64 or x64 is supported for OSX cross build!")
endif()
diff --git a/eng/packaging.targets b/eng/packaging.targets
index 9114dee357d..1b67b834b71 100644
--- a/eng/packaging.targets
+++ b/eng/packaging.targets
@@ -19,9 +19,8 @@
'$(IsRIDSpecificProject)' == 'true') and
'$(PreReleaseVersionLabel)' != 'servicing' and
'$(GitHubRepositoryName)' != 'runtimelab'">true</GeneratePackageOnBuild>
- <GeneratePackageOnBuild Condition="'$(GeneratePackageOnBuild)' != 'true'">false</GeneratePackageOnBuild>
<!-- When in source-build we need to generate all packages when building for all configurations even in servicing. -->
- <GeneratePackageOnBuild Condition="!$(GeneratePackageOnBuild) and
+ <GeneratePackageOnBuild Condition="'$(GeneratePackageOnBuild)' != 'true' and
'$(BuildAllConfigurations)' == 'true' and
'$(DotNetBuildFromSource)' == 'true'">true</GeneratePackageOnBuild>
<!-- Search for the documentation file in the intellisense package and otherwise pick up the generated one. -->
diff --git a/eng/pipelines/common/evaluate-default-paths.yml b/eng/pipelines/common/evaluate-default-paths.yml
index 5ce7b7a1f34..72a85c66f02 100644
--- a/eng/pipelines/common/evaluate-default-paths.yml
+++ b/eng/pipelines/common/evaluate-default-paths.yml
@@ -12,6 +12,7 @@ parameters:
src/libraries/sendtohelix-wasm.targets
src/mono/nuget/Microsoft.NET.Runtime.WebAssembly.Sdk/*
src/mono/nuget/Microsoft.NET.Runtime.wasm.Sample.Mono/*
+ src/mono/sample/wasm/*
src/mono/wasi/*
src/mono/wasm/*
src/tasks/WasmAppBuilder/*
@@ -25,6 +26,17 @@ parameters:
eng/pipelines/common/templates/runtime/wasm*
eng/pipelines/coreclr/*wasm*
]
+ # src/workloads is only used in runtime-official builds
+ # where evaluate-paths is not used
+ _always_exclude: [
+ eng/pipelines/common/evaluate-default-paths.yml
+ eng/pipelines/coreclr/*
+ eng/pipelines/installer/*
+ eng/pipelines/libraries/*
+ eng/pipelines/mono/*
+ eng/pipelines/runtime*
+ src/workloads/*
+ ]
jobs:
- template: /eng/pipelines/common/evaluate-paths-job.yml
@@ -48,11 +60,8 @@ jobs:
- src/libraries/*
- src/native/libs/*
- src/tests/*
- - eng/pipelines/installer/*
- - eng/pipelines/mono/*
- - eng/pipelines/libraries/*
- - eng/pipelines/common/evaluate-default-paths.yml
- ${{ parameters._const_paths._wasm_pipelines }}
+ - ${{ parameters._const_paths._always_exclude }}
- subset: mono_excluding_wasm
include:
@@ -63,6 +72,7 @@ jobs:
exclude:
- ${{ parameters._const_paths._wasm_specific_only }}
- ${{ parameters._const_paths._wasm_pipelines }}
+ - ${{ parameters._const_paths._always_exclude }}
- eng/Version.Details.xml
- '*.md'
@@ -75,10 +85,6 @@ jobs:
- src/libraries/*
- src/native/libs/*
- src/tests/*
- - eng/pipelines/installer/*
- - eng/pipelines/coreclr/*
- - eng/pipelines/libraries/*
- - eng/pipelines/common/evaluate-default-paths.yml
- subset: libraries
exclude:
@@ -93,11 +99,8 @@ jobs:
- src/coreclr/*
- src/tests/*
- src/native/eventpipe/*
- - eng/pipelines/coreclr/*
- - eng/pipelines/mono/*
- - eng/pipelines/installer/*
- - eng/pipelines/common/evaluate-default-paths.yml
- ${{ parameters._const_paths._wasm_pipelines }}
+ - ${{ parameters._const_paths._always_exclude }}
- subset: runtimetests
include:
@@ -107,10 +110,7 @@ jobs:
exclude:
- src/tests/*
- ${{ parameters._const_paths._wasm_pipelines }}
-
- # having this ensures that change in evaluate-default-paths.yml
- # doesn't trigger jobs
- - eng/pipelines/common/evaluate-default-paths.yml
+ - ${{ parameters._const_paths._always_exclude }}
- subset: installer
include:
@@ -127,11 +127,8 @@ jobs:
- src/libraries/*
- src/tests/*
- src/native/eventpipe/*
- - eng/pipelines/coreclr/*
- - eng/pipelines/mono/*
- - eng/pipelines/libraries/*
- - eng/pipelines/common/evaluate-default-paths.yml
- ${{ parameters._const_paths._wasm_pipelines }}
+ - ${{ parameters._const_paths._always_exclude }}
# We have limited Apple Silicon testing capacity
# We want PR testing on a narrower set of changes
@@ -196,10 +193,7 @@ jobs:
- src/mono/wasm/Wasm.Build.Tests/*
- src/mono/wasm/debugger/*
- ${{ parameters._const_paths._wasm_pipelines }}
-
- # having this ensures that change in evaluate-default-paths.yml
- # doesn't trigger jobs
- - eng/pipelines/common/evaluate-default-paths.yml
+ - ${{ parameters._const_paths._always_exclude }}
- subset: wasm_wbt_or_dbg
include:
@@ -238,16 +232,14 @@ jobs:
exclude:
- ${{ parameters._const_paths._wasm_specific_only }}
- ${{ parameters._const_paths._wasm_pipelines }}
-
- # having this ensures that change in evaluate-default-paths.yml won't
- # trigger non-onlywasm jobs
- - eng/pipelines/common/evaluate-default-paths.yml
+ - ${{ parameters._const_paths._always_exclude }}
# anything other than mono, or wasm specific paths
- subset: non_mono_and_wasm
exclude:
- ${{ parameters._const_paths._wasm_specific_only }}
- ${{ parameters._const_paths._wasm_pipelines }}
+ - ${{ parameters._const_paths._always_exclude }}
- eng/testing/tests.mobile.targets
- src/mono/*
@@ -259,9 +251,5 @@ jobs:
- src/tasks/WasmBuildTasks/*
- src/tasks/WorkloadBuildTasks/*
- # having this ensures that change in evaluate-default-paths.yml
- # doesn't trigger jobs
- - eng/pipelines/common/evaluate-default-paths.yml
-
- ${{ if ne(parameters.extraSubsets, '') }}:
- ${{ parameters.extraSubsets }}
diff --git a/eng/pipelines/common/global-build-job.yml b/eng/pipelines/common/global-build-job.yml
index e1a8e45ba97..f071c7f33af 100644
--- a/eng/pipelines/common/global-build-job.yml
+++ b/eng/pipelines/common/global-build-job.yml
@@ -75,18 +75,19 @@ jobs:
- name: _osParameter
value: -os ${{ parameters.osGroup }}
- - ${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubGroup, '_musl')) }}:
- - name: _osParameter
- value: /p:RuntimeOS=linux-musl /p:OutputRid=linux-musl-${{ parameters.archType }}
-
- ${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubGroup, '_bionic')) }}:
- name: _osParameter
- value: /p:RuntimeOS=linux-bionic /p:OutputRid=linux-bionic-${{ parameters.archType }}
+ value: /p:RuntimeOS=linux-bionic
# Do not rename as it clashes with MSBuild property in libraries/build-native.proj
- name: _crossBuildPropertyArg
value: /p:CrossBuild=${{ parameters.crossBuild }}
+ - ${{ if ne(parameters.jobParameters.crossrootfsDir, '') }}:
+ # This is only required for cross builds.
+ - name: ROOTFS_DIR
+ value: ${{ parameters.jobParameters.crossrootfsDir }}
+
- name: _cxx11Parameter
${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.archType, 'arm64')) }}:
value: /p:MonoLLVMUseCxx11Abi=true
@@ -141,6 +142,9 @@ jobs:
platform:
buildScript: $(_sclEnableCommand) $(Build.SourcesDirectory)$(dir)build$(scriptExt)
nonPortable: true
+ # Use a custom RID that isn't in the RID graph here to validate we don't break the usage of custom rids that aren't in the graph.
+ targetRID: banana.24-x64
+ runtimeOS: linux
- ${{ if in(parameters.osGroup, 'OSX', 'iOS', 'tvOS', 'MacCatalyst') }}:
- script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh ${{ parameters.osGroup }} ${{ parameters.archType }} azDO
diff --git a/eng/pipelines/common/platform-matrix.yml b/eng/pipelines/common/platform-matrix.yml
index 3dc09537df6..1dca99ef9d5 100644
--- a/eng/pipelines/common/platform-matrix.yml
+++ b/eng/pipelines/common/platform-matrix.yml
@@ -139,7 +139,7 @@ jobs:
platform: Linux_musl_arm
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
container:
- image: ubuntu-16.04-cross-arm-alpine-20210923140502-78f7860
+ image: ubuntu-18.04-cross-arm-alpine-20220915134743-78f7860
registry: mcr
jobParameters:
runtimeFlavor: ${{ parameters.runtimeFlavor }}
@@ -165,7 +165,7 @@ jobs:
platform: Linux_musl_arm64
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
container:
- image: ubuntu-16.04-cross-arm64-alpine-20210923140502-78f7860
+ image: ubuntu-22.04-cross-arm64-alpine-20220915142421-44c622d
registry: mcr
jobParameters:
runtimeFlavor: ${{ parameters.runtimeFlavor }}
diff --git a/eng/pipelines/common/templates/runtimes/build-test-job.yml b/eng/pipelines/common/templates/runtimes/build-test-job.yml
index 764446c77e8..1e8e33277b8 100644
--- a/eng/pipelines/common/templates/runtimes/build-test-job.yml
+++ b/eng/pipelines/common/templates/runtimes/build-test-job.yml
@@ -39,9 +39,9 @@ jobs:
pool: ${{ parameters.pool }}
dependOnEvaluatePaths: ${{ parameters.dependOnEvaluatePaths }}
- ${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.compilerName, 'gcc'), not(and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubgroup, '_musl'), eq(parameters.archType, 'x64'))), not(eq(parameters.osGroup, 'OSX'))) }}:
+ ${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.compilerName, 'gcc'), not(and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubgroup, '_musl'))), not(eq(parameters.osGroup, 'OSX'))) }}:
compilerArg: '-clang9'
- ${{ if not(and(ne(parameters.osGroup, 'windows'), ne(parameters.compilerName, 'gcc'), not(and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubgroup, '_musl'), eq(parameters.archType, 'x64'))), not(eq(parameters.osGroup, 'OSX')))) }}:
+ ${{ if not(and(ne(parameters.osGroup, 'windows'), ne(parameters.compilerName, 'gcc'), not(and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubgroup, '_musl'))), not(eq(parameters.osGroup, 'OSX')))) }}:
compilerArg: ''
# Test jobs should continue on error for internal builds
@@ -79,8 +79,8 @@ jobs:
- ${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.compilerName, 'gcc')) }}:
- name: compilerArg
value: '-clang9'
- # Building for x64 MUSL happens on Alpine Linux and we need to use the stable version available there
- - ${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubgroup, '_musl'), eq(parameters.archType, 'x64')) }}:
+ # We need to use the stable version available on Alpine Linux
+ - ${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubgroup, '_musl')) }}:
- name: compilerArg
value: ''
# AppleClang has different version scheme, so we let compiler introspection pick up the available clang from PATH
diff --git a/eng/pipelines/coreclr/nativeaot-post-build-steps.yml b/eng/pipelines/coreclr/nativeaot-post-build-steps.yml
index a44c7223039..a920993b093 100644
--- a/eng/pipelines/coreclr/nativeaot-post-build-steps.yml
+++ b/eng/pipelines/coreclr/nativeaot-post-build-steps.yml
@@ -29,3 +29,9 @@ steps:
- ${{ if ne(parameters.osGroup, 'windows') }}:
- script: $(Build.SourcesDirectory)/src/tests/run.sh --runnativeaottests $(buildConfigUpper) ${{ parameters.archType }}
displayName: Run tests in single file mode
+
+ # Publishing tooling doesn't support different configs between runtime and libs, so only run tests in Release config
+ # PublishAot on OSX doesn't work yet. Need an SDK with https://github.com/dotnet/installer/pull/14443.
+ - ${{ if and(eq(parameters.buildConfig, 'release'), ne(parameters.osGroup, 'OSX')) }}:
+ - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -ci -arch ${{ parameters.archType }} $(_osParameter) -s libs.tests -c $(_BuildConfig) /p:TestAssemblies=false /p:RunNativeAotTestApps=true $(_officialBuildParameter) $(_crossBuildPropertyArg) /bl:$(Build.SourcesDirectory)/artifacts/log/$(buildConfigUpper)/NativeAotTests.binlog ${{ parameters.extraTestArgs }}
+ displayName: Run NativeAot Library Tests
diff --git a/eng/pipelines/coreclr/perf.yml b/eng/pipelines/coreclr/perf.yml
index f1dfcce46c2..910c6a39df9 100644
--- a/eng/pipelines/coreclr/perf.yml
+++ b/eng/pipelines/coreclr/perf.yml
@@ -20,18 +20,26 @@ trigger:
variables:
- template: /eng/pipelines/common/variables.yml
-schedules:
-- cron: "30 2 * * *"
- displayName: Every night at 2:30AM
- branches:
- include:
- - main
- always: true
+#
+# For the 'schedule' case, only wasm/jsc perf jobs are run.
+# And the rest are build jobs - wasm, mono, coreclr, and libraries.
+#
+# Since, we are not running *any* perf jobs, none of these builds are needed,
+# thus the whole scheduled run can be disabled.
+#
+#schedules:
+#- cron: "30 2 * * *"
+ #displayName: Every night at 2:30AM
+ #branches:
+ #include:
+ #- main
+ #always: true
jobs:
- template: /eng/pipelines/coreclr/perf-wasm-jobs.yml
parameters:
+ collectHelixLogsScript: ${{ variables._wasmCollectHelixLogsScript }}
${{ and(ne(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'Schedule')) }}:
runProfile: 'non-v8'
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'Schedule')) }}:
diff --git a/eng/pipelines/coreclr/perf_slow.yml b/eng/pipelines/coreclr/perf_slow.yml
index 90ddd87d920..3c4c8bb2e42 100644
--- a/eng/pipelines/coreclr/perf_slow.yml
+++ b/eng/pipelines/coreclr/perf_slow.yml
@@ -170,25 +170,7 @@ jobs:
projectFile: microbenchmarks.proj
runKind: micro_mono
runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
- logicalmachine: 'perftiger'
- timeoutInMinutes: 500
-
-# run coreclr Linux arm64 microbenchmarks perf job
- - template: /eng/pipelines/common/platform-matrix.yml
- parameters:
- jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
- buildConfig: release
- runtimeFlavor: coreclr
- platforms:
- - Linux_arm64
- container: ubuntu-18.04-cross-arm64-20211022152824-b2c2436
- jobParameters:
- testGroup: perf
- liveLibrariesBuildConfig: Release
- projectFile: microbenchmarks.proj
- runKind: micro
- runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
- logicalmachine: 'perfa64'
+ logicalmachine: 'perfampere'
timeoutInMinutes: 500
# run coreclr Linux arm64 ampere microbenchmarks perf job
diff --git a/eng/pipelines/coreclr/templates/build-jit-job.yml b/eng/pipelines/coreclr/templates/build-jit-job.yml
index bdd1a29ac8b..9f3beb3f0f4 100644
--- a/eng/pipelines/coreclr/templates/build-jit-job.yml
+++ b/eng/pipelines/coreclr/templates/build-jit-job.yml
@@ -58,8 +58,8 @@ jobs:
- ${{ if ne(parameters.osGroup, 'windows') }}:
- name: compilerArg
value: '-clang9'
- # Building for x64 MUSL happens on Alpine Linux and we need to use the stable version available there
- - ${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubgroup, '_musl'), eq(parameters.archType, 'x64')) }}:
+ # We need to use the stable version available on Alpine Linux
+ - ${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubgroup, '_musl')) }}:
- name: compilerArg
value: ''
# AppleClang has different version scheme, so we let compiler introspection pick up the available clang from PATH
diff --git a/eng/pipelines/coreclr/templates/build-job.yml b/eng/pipelines/coreclr/templates/build-job.yml
index 930580eae47..98ae1b60bba 100644
--- a/eng/pipelines/coreclr/templates/build-job.yml
+++ b/eng/pipelines/coreclr/templates/build-job.yml
@@ -93,8 +93,8 @@ jobs:
- ${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.compilerName, 'gcc')) }}:
- name: compilerArg
value: '-clang9'
- # Building for x64 MUSL happens on Alpine Linux and we need to use the stable version available there
- - ${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubgroup, '_musl'), eq(parameters.archType, 'x64')) }}:
+ # We need to use the stable version available on Alpine Linux
+ - ${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubgroup, '_musl')) }}:
- name: compilerArg
value: ''
# AppleClang has different version scheme, so we let compiler introspection pick up the available clang from PATH
diff --git a/eng/pipelines/coreclr/templates/build-perf-maui-apps-net6.yml b/eng/pipelines/coreclr/templates/build-perf-maui-apps-net6.yml
index 5ee04c52c57..9496e50e6a8 100644
--- a/eng/pipelines/coreclr/templates/build-perf-maui-apps-net6.yml
+++ b/eng/pipelines/coreclr/templates/build-perf-maui-apps-net6.yml
@@ -32,8 +32,7 @@ steps:
curl -o NuGet.config 'https://raw.githubusercontent.com/dotnet/maui/b3747563c1fe5b6321ca3bc852ea6a998f91ae9a/NuGet.config'
curl -o dotnet-install.sh 'https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh'
chmod -R a+rx .
- # TODO: Change ga back to daily once daily version workloads are fixed
- ./dotnet-install.sh --channel 6.0.4xx --quality ga --install-dir .
+ ./dotnet-install.sh --channel 6.0 --quality daily --install-dir .
./dotnet --info
./dotnet workload install maui --from-rollback-file https://aka.ms/dotnet/maui/net6.0.json --configfile NuGet.config
displayName: Install MAUI workload
diff --git a/eng/pipelines/coreclr/templates/helix-queues-setup.yml b/eng/pipelines/coreclr/templates/helix-queues-setup.yml
index 796a36abbda..6948e5bb4e9 100644
--- a/eng/pipelines/coreclr/templates/helix-queues-setup.yml
+++ b/eng/pipelines/coreclr/templates/helix-queues-setup.yml
@@ -78,7 +78,7 @@ jobs:
- ${{ if eq(variables['System.TeamProject'], 'public') }}:
- (Alpine.314.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.14-helix-amd64-20210910135833-1848e19
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
- - (Alpine.314.Amd64)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.14-helix-amd64-20210910135833-1848e19
+ - (Alpine.314.Amd64)ubuntu.1804.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.14-helix-amd64-20210910135833-1848e19
# Linux musl arm32
- ${{ if eq(parameters.platform, 'Linux_musl_arm') }}:
@@ -110,7 +110,7 @@ jobs:
- (Debian.10.Amd64)Ubuntu.1804.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-10-helix-amd64-20220810215022-f344011
- (Debian.11.Amd64)Ubuntu.1804.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-helix-amd64-20220810215032-f344011
- Ubuntu.1804.Amd64
- - (Centos.8.Amd64)Ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-8-helix-20201229003624-c1bf759
+ - (Centos.8.Amd64)Ubuntu.1804.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-8-helix-20201229003624-c1bf759
- (Fedora.34.Amd64)Ubuntu.1804.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-34-helix-20220809205730-e7e8d1c
- RedHat.7.Amd64
diff --git a/eng/pipelines/coreclr/templates/run-performance-job.yml b/eng/pipelines/coreclr/templates/run-performance-job.yml
index 1635d864984..d8a1fa595c6 100644
--- a/eng/pipelines/coreclr/templates/run-performance-job.yml
+++ b/eng/pipelines/coreclr/templates/run-performance-job.yml
@@ -90,6 +90,7 @@ jobs:
sudo apt-get update &&
sudo apt -y install curl dirmngr apt-transport-https lsb-release ca-certificates &&
$(HelixPreCommandsWasmOnLinux) &&
+ export DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER=1 &&
export PERFLAB_UPLOAD_TOKEN="$(HelixPerfUploadTokenValue)"
|| export PERF_PREREQS_INSTALL_FAILED=1;
test "x$PERF_PREREQS_INSTALL_FAILED" = "x1" && echo "** Error: Failed to install prerequites **"
diff --git a/eng/pipelines/coreclr/templates/run-scenarios-job.yml b/eng/pipelines/coreclr/templates/run-scenarios-job.yml
index 8e9f29666ef..d1ab982a1df 100644
--- a/eng/pipelines/coreclr/templates/run-scenarios-job.yml
+++ b/eng/pipelines/coreclr/templates/run-scenarios-job.yml
@@ -107,6 +107,7 @@ jobs:
- AdditionalHelixPreCommands: $(HelixPreCommandOSX)
- AdditionalHelixPostCommands: $(HelixPostCommandOSX)
+ - ExtraSetupArguments: ''
- name: ExtraSetupArguments
${{ if ne(parameters.runtimeType, 'wasm') }}:
value: --install-dir $(PayloadDirectory)/dotnet
diff --git a/eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml b/eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml
index 4aef8dfc6d0..682f439f764 100644
--- a/eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml
+++ b/eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml
@@ -84,6 +84,8 @@ jobs:
platforms:
- windows_x64
- windows_arm64
+ - OSX_x64
+ - OSX_arm64
- Linux_x64
- Linux_arm64
- Linux_musl_x64
diff --git a/eng/pipelines/global-build.yml b/eng/pipelines/global-build.yml
index ea7c567fa2b..2afd2f43bf0 100644
--- a/eng/pipelines/global-build.yml
+++ b/eng/pipelines/global-build.yml
@@ -51,7 +51,7 @@ jobs:
testGroup: innerloop
nameSuffix: Runtime_Debug
buildArgs: -c release -runtimeConfiguration debug
- timeoutInMinutes: 90
+ timeoutInMinutes: 120
condition:
or(
eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true),
@@ -71,7 +71,7 @@ jobs:
testGroup: innerloop
nameSuffix: MSBuild_CMake
buildArgs: -c Release -msbuild
- timeoutInMinutes: 90
+ timeoutInMinutes: 120
condition:
or(
eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true),
@@ -91,7 +91,7 @@ jobs:
testGroup: innerloop
nameSuffix: Runtime_Release
buildArgs: -c debug -runtimeConfiguration release
- timeoutInMinutes: 90
+ timeoutInMinutes: 120
condition:
or(
eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true),
@@ -112,7 +112,7 @@ jobs:
testGroup: innerloop
nameSuffix: RuntimeFlavor_Mono
buildArgs: /p:RuntimeFlavor=Mono
- timeoutInMinutes: 90
+ timeoutInMinutes: 120
condition:
or(
eq(dependencies.evaluate_paths.outputs['SetPathVars_non_wasm.containsChange'], true),
@@ -132,7 +132,7 @@ jobs:
testGroup: innerloop
nameSuffix: Mono_Libraries
buildArgs: -subset mono+libs /p:RuntimeFlavor=Mono
- timeoutInMinutes: 90
+ timeoutInMinutes: 120
condition:
or(
eq(dependencies.evaluate_paths.outputs['SetPathVars_non_wasm.containsChange'], true),
@@ -151,7 +151,7 @@ jobs:
jobParameters:
nameSuffix: Libraries_AllConfigurations
buildArgs: -subset libs -allconfigurations
- timeoutInMinutes: 90
+ timeoutInMinutes: 120
condition:
or(
eq(dependencies.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true),
@@ -168,7 +168,7 @@ jobs:
- SourceBuild_Linux_x64
jobParameters:
nameSuffix: SourceBuild
- timeoutInMinutes: 90
+ timeoutInMinutes: 120
condition:
or(
eq(dependencies.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true),
diff --git a/eng/pipelines/installer/jobs/build-job.yml b/eng/pipelines/installer/jobs/build-job.yml
index b56e707a696..d89099ca0f2 100644
--- a/eng/pipelines/installer/jobs/build-job.yml
+++ b/eng/pipelines/installer/jobs/build-job.yml
@@ -200,34 +200,24 @@ jobs:
value: ${{ eq(parameters.osSubgroup, '') }}
- ${{ if and(eq(parameters.osSubgroup, '_musl'), eq(parameters.osGroup, 'Linux')) }}:
- # Set output RID manually: musl isn't properly detected. Make sure to also convert linux to
- # lowercase for RID format. (Detection normally converts, but we're preventing it.)
- - name: OutputRidArg
- value: /p:OutputRid=linux-musl-${{ parameters.archType }}
- - name: RuntimeOSArg
- value: /p:RuntimeOS=linux-musl
- name: _PortableBuild
value: true
+ - ${{ if eq(parameters.crossBuild, true) }}:
+ - name: ArchArg
+ value: -arch ${{ parameters.archType }}
+
- name: BaseJobBuildCommand
value: >-
$(Build.SourcesDirectory)/build.sh -subset host+packs -ci
$(BuildAction)
+ $(ArchArg)
/p:CrossBuild=${{ parameters.crossBuild }}
/p:PortableBuild=$(_PortableBuild)
/p:SkipTests=$(SkipTests)
$(pgoInstrumentArg)
$(LiveOverridePathArgs)
$(CommonMSBuildArgs)
- $(OutputRidArg)
- $(RuntimeOSArg)
-
- - name: PublishArguments
- value: >-
- /p:PortableBuild=$(_PortableBuild)
- $(CommonMSBuildArgs)
- $(OutputRidArg)
- /bl:msbuild.publish.binlog
- name: installersSubsetArg
value: --subset packs.installers
diff --git a/eng/pipelines/libraries/base-job.yml b/eng/pipelines/libraries/base-job.yml
index 3e5119b3e8a..95d96c02745 100644
--- a/eng/pipelines/libraries/base-job.yml
+++ b/eng/pipelines/libraries/base-job.yml
@@ -53,7 +53,6 @@ jobs:
- _msbuildCommonParameters: ''
# rename this variable, due to collision with build-native.proj
- - _runtimeOSArg: ''
- _osArg: ''
- _finalFrameworkArg: ''
- _testModeArg: ''
@@ -71,12 +70,6 @@ jobs:
- ${{ if eq(parameters.crossBuild, true) }}:
- _crossBuildPropertyArg: /p:CrossBuild=true
- - ${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubGroup, '_musl')) }}:
- - _runtimeOSArg: /p:RuntimeOS=linux-musl
-
- - ${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubGroup, ''), eq(parameters.archType, 'arm')) }}:
- - _runtimeOSArg: /p:RuntimeOS=ubuntu.16.04
-
# force a value for OS when cross-building
- ${{ if in(parameters.osGroup, 'Browser', 'iOS', 'tvOS', 'Android', 'FreeBSD') }}:
- _osArg: -os ${{ parameters.osGroup }}
@@ -111,15 +104,10 @@ jobs:
- ${{ if ne(parameters.testDisplayName, '') }}:
- _testRunNamePrefixSuffix: ${{ parameters.testDisplayName }}
- # Windows variables
- - ${{ if eq(parameters.osGroup, 'windows') }}:
- - _runtimeOSArg: /p:RuntimeOS=win10
-
- # Non-Windows variables
- ${{ if ne(parameters.osGroup, 'windows') }}:
- _buildScript: ./$(_buildScriptFileName)$(scriptExt)
- - _buildArguments: $(_runtimeConfigurationArg) -configuration ${{ parameters.buildConfig }} -ci -arch ${{ parameters.archType }} $(_finalFrameworkArg) $(_testModeArg) $(_testScopeArg) $(_osArg) $(_runtimeOSArg) $(_msbuildCommonParameters) $(_runtimeArtifactsPathArg) $(_crossBuildPropertyArg)
+ - _buildArguments: $(_runtimeConfigurationArg) -configuration ${{ parameters.buildConfig }} -ci -arch ${{ parameters.archType }} $(_finalFrameworkArg) $(_testModeArg) $(_testScopeArg) $(_osArg) $(_msbuildCommonParameters) $(_runtimeArtifactsPathArg) $(_crossBuildPropertyArg)
- ${{ parameters.variables }}
# we need to override this value to support build-coreclr-and-libraries-job.yml
diff --git a/eng/pipelines/libraries/helix-queues-setup.yml b/eng/pipelines/libraries/helix-queues-setup.yml
index 86c3b7cf491..f78b77b8d0d 100644
--- a/eng/pipelines/libraries/helix-queues-setup.yml
+++ b/eng/pipelines/libraries/helix-queues-setup.yml
@@ -50,7 +50,7 @@ jobs:
# Linux musl x64
- ${{ if eq(parameters.platform, 'Linux_musl_x64') }}:
- ${{ if or(ne(parameters.jobParameters.isExtraPlatforms, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}:
- - (Alpine.314.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.14-helix-amd64-20220803180115-99b3286
+ - (Alpine.314.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.14-helix-amd64-20220912172439-e7e8d1c
- ${{ if or(eq(parameters.jobParameters.isExtraPlatforms, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}:
- (Alpine.313.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.13-helix-amd64-20210910135845-8a6f4f3
@@ -74,10 +74,10 @@ jobs:
- (Fedora.34.Amd64.Open)ubuntu.1804.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-34-helix-20220908220224-98605e8
- Ubuntu.2204.Amd64.Open
- (Debian.11.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-helix-amd64-20220908132354-59ee6b3
- - (Mariner.1.0.Amd64.Open)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-1.0-helix-20210528192219-92bf620
- - (openSUSE.15.2.Amd64.Open)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:opensuse-15.2-helix-amd64-20220912173041-1d2766c
+ - (Mariner.1.0.Amd64.Open)ubuntu.1804.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-1.0-helix-20210528192219-92bf620
+ - (openSUSE.15.2.Amd64.Open)ubuntu.1804.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:opensuse-15.2-helix-amd64-20220912173041-1d2766c
- ${{ if or(ne(parameters.jobParameters.isExtraPlatforms, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}:
- - (Centos.7.Amd64.Open)Ubuntu.1604.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-mlnet-helix-20220601183719-dde38af
+ - (Centos.7.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-mlnet-helix-20220601183719-dde38af
- RedHat.7.Amd64.Open
- (Debian.10.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-10-helix-amd64-20220908132009-59ee6b3
- Ubuntu.1804.Amd64.Open
diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml
index aad556c6b33..09b192f74b1 100644
--- a/eng/pipelines/runtime.yml
+++ b/eng/pipelines/runtime.yml
@@ -273,6 +273,7 @@ jobs:
platforms:
- windows_arm64
- Linux_arm64
+ - OSX_arm64
jobParameters:
testGroup: innerloop
isSingleFile: true
@@ -629,7 +630,7 @@ jobs:
#
# Build Mono debug
-# Only when libraries or mono changed
+# Only when mono changed
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
@@ -649,7 +650,6 @@ jobs:
jobParameters:
condition: >-
or(
- eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true),
eq(variables['isRollingBuild'], true))
@@ -795,7 +795,9 @@ jobs:
condition:
or(
eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true),
+ eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true),
+ eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true),
eq(variables['isRollingBuild'], true))
@@ -816,7 +818,9 @@ jobs:
condition:
or(
eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true),
+ eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true),
+ eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true),
eq(variables['isRollingBuild'], true))
diff --git a/eng/testing/linker/SupportFiles/Directory.Build.props b/eng/testing/linker/SupportFiles/Directory.Build.props
index da3533e49c9..1e08117fd31 100644
--- a/eng/testing/linker/SupportFiles/Directory.Build.props
+++ b/eng/testing/linker/SupportFiles/Directory.Build.props
@@ -2,7 +2,6 @@
<PropertyGroup>
<SkipConfigureTrimming>true</SkipConfigureTrimming>
<PublishTrimmed>true</PublishTrimmed>
- <SkipImportRepoLinkerTargets>true</SkipImportRepoLinkerTargets>
<TrimMode>full</TrimMode>
<TrimmerRemoveSymbols>false</TrimmerRemoveSymbols>
<SelfContained>true</SelfContained>
diff --git a/eng/testing/linker/SupportFiles/Directory.Build.targets b/eng/testing/linker/SupportFiles/Directory.Build.targets
index 491c45e4a43..e735d71fa0f 100644
--- a/eng/testing/linker/SupportFiles/Directory.Build.targets
+++ b/eng/testing/linker/SupportFiles/Directory.Build.targets
@@ -12,6 +12,10 @@
DependsOnTargets="BundleTestWasmApp"
Condition="'$(TargetArchitecture)' == 'wasm' And '$(TargetOS)' == 'browser'" />
+ <PropertyGroup Condition="'$(PublishAot)' == 'true'">
+ <ILCompilerTargetsPath>$(CoreCLRBuildIntegrationDir)Microsoft.DotNet.ILCompiler.SingleEntry.targets</ILCompilerTargetsPath>
+ </PropertyGroup>
+
<!-- Overriding these targets as these projects won't need to binplace -->
<Target Name="PublishTestAsSelfContained" />
diff --git a/eng/testing/linker/project.csproj.template b/eng/testing/linker/project.csproj.template
index 80180798fd3..9b1c14e36b8 100644
--- a/eng/testing/linker/project.csproj.template
+++ b/eng/testing/linker/project.csproj.template
@@ -6,6 +6,7 @@
<NETCoreAppMaximumVersion>{NetCoreAppMaximumVersion}</NETCoreAppMaximumVersion>
<UseMonoRuntime>{UseMonoRuntime}</UseMonoRuntime>
<RuntimeIdentifier>{RuntimeIdentifier}</RuntimeIdentifier>
+ <PublishAot>{PublishAot}</PublishAot>
<!-- wasm specific -->
<MonoAOTCompilerDir>{MonoAOTCompilerDir}</MonoAOTCompilerDir>
@@ -25,6 +26,15 @@
<RepositoryEngineeringDir>{RepositoryEngineeringDir}</RepositoryEngineeringDir>
<_ExtraTrimmerArgs>{ExtraTrimmerArgs} $(_ExtraTrimmerArgs)</_ExtraTrimmerArgs>
+ {AdditionalProperties}
+
+ <!-- Needed for PublishAot -->
+ <IlcToolsPath>{IlcToolsPath}</IlcToolsPath>
+ <IlcBuildTasksPath>{IlcBuildTasksPath}</IlcBuildTasksPath>
+ <IlcSdkPath>{IlcSdkPath}</IlcSdkPath>
+ <IlcFrameworkPath>{IlcFrameworkPath}</IlcFrameworkPath>
+ <IlcFrameworkNativePath>{IlcFrameworkNativePath}</IlcFrameworkNativePath>
+ <CoreCLRBuildIntegrationDir>{CoreCLRBuildIntegrationDir}</CoreCLRBuildIntegrationDir>
</PropertyGroup>
<ItemGroup>
diff --git a/eng/testing/linker/trimmingTests.targets b/eng/testing/linker/trimmingTests.targets
index ac688f61b6b..9f821e99c2a 100644
--- a/eng/testing/linker/trimmingTests.targets
+++ b/eng/testing/linker/trimmingTests.targets
@@ -72,10 +72,14 @@
<ItemGroup>
<_switchesAsItems Include="%(TestConsoleApps.DisabledFeatureSwitches)" Value="false" />
<_switchesAsItems Include="%(TestConsoleApps.EnabledFeatureSwitches)" Value="true" />
+
+ <_propertiesAsItems Include="%(TestConsoleApps.DisabledProperties)" Value="false" />
+ <_propertiesAsItems Include="%(TestConsoleApps.EnabledProperties)" Value="true" />
</ItemGroup>
<PropertyGroup>
<_runtimeHostConfigurationOptionsString>@(_switchesAsItems->'&lt;RuntimeHostConfigurationOption Include=&quot;%(Identity)&quot; Value=&quot;%(Value)&quot; Trim=&quot;true&quot; /&gt;', '%0a ')</_runtimeHostConfigurationOptionsString>
+ <_additionalPropertiesString>@(_propertiesAsItems->'&lt;%(Identity)&gt;%(Value)&lt;/%(Identity)&gt;', '%0a ')</_additionalPropertiesString>
</PropertyGroup>
<MakeDir Directories="$(_projectDir)" />
@@ -85,8 +89,16 @@
.Replace('{NetCoreAppMaximumVersion}', '$(NetCoreAppMaximumVersion)')
.Replace('{UseMonoRuntime}','$(UseMonoRuntime)')
.Replace('{RuntimeIdentifier}','%(TestConsoleApps.TestRuntimeIdentifier)')
+ .Replace('{PublishAot}','$(IsNativeAotTestProject)')
.Replace('{MicrosoftNETILLinkTasksVersion}', '$(MicrosoftNETILLinkTasksVersion)')
.Replace('{ExtraTrimmerArgs}', '%(TestConsoleApps.ExtraTrimmerArgs)')
+ .Replace('{AdditionalProperties}', '$(_additionalPropertiesString)')
+ .Replace('{IlcToolsPath}', '$(CoreCLRILCompilerDir)')
+ .Replace('{IlcBuildTasksPath}', '$(CoreCLRILCompilerDir)netstandard/ILCompiler.Build.Tasks.dll')
+ .Replace('{IlcSdkPath}', '$(CoreCLRAotSdkDir)')
+ .Replace('{IlcFrameworkPath}', '$(MicrosoftNetCoreAppRuntimePackRidLibTfmDir)')
+ .Replace('{IlcFrameworkNativePath}', '$(MicrosoftNetCoreAppRuntimePackNativeDir)')
+ .Replace('{CoreCLRBuildIntegrationDir}', '$(CoreCLRBuildIntegrationDir)')
.Replace('{RuntimeHostConfigurationOptions}', '$(_runtimeHostConfigurationOptionsString)')
.Replace('{AdditionalProjectReferences}', '$(_additionalProjectReferencesString)')
.Replace('{RepositoryEngineeringDir}', '$(RepositoryEngineeringDir)')
diff --git a/eng/testing/performance/microbenchmarks.proj b/eng/testing/performance/microbenchmarks.proj
index edbff9e10fc..e5e05fd5bfd 100644
--- a/eng/testing/performance/microbenchmarks.proj
+++ b/eng/testing/performance/microbenchmarks.proj
@@ -34,7 +34,8 @@
<Python>python3</Python>
<CoreRun>$(BaseDirectory)/Core_Root/corerun</CoreRun>
<BaselineCoreRun>$(BaseDirectory)/Baseline_Core_Root/corerun</BaselineCoreRun>
- <HelixPreCommands>$(HelixPreCommands);chmod +x $(PerformanceDirectory)/tools/machine-setup.sh;. $(PerformanceDirectory)/tools/machine-setup.sh</HelixPreCommands>
+ <!-- Set DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER=1 as a workaround for https://github.com/dotnet/runtime/issues/74328 -->
+ <HelixPreCommands>$(HelixPreCommands);chmod +x $(PerformanceDirectory)/tools/machine-setup.sh;. $(PerformanceDirectory)/tools/machine-setup.sh;export DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER=1</HelixPreCommands>
<ArtifactsDirectory>$HELIX_WORKITEM_ROOT/artifacts/BenchmarkDotNet.Artifacts</ArtifactsDirectory>
<BaselineArtifactsDirectory>$HELIX_WORKITEM_ROOT/artifacts/BenchmarkDotNet.Artifacts_Baseline</BaselineArtifactsDirectory>
<ResultsComparer>$(PerformanceDirectory)/src/tools/ResultsComparer/ResultsComparer.csproj</ResultsComparer>
diff --git a/eng/testing/tests.singlefile.targets b/eng/testing/tests.singlefile.targets
index d307e837e62..ebe2867d782 100644
--- a/eng/testing/tests.singlefile.targets
+++ b/eng/testing/tests.singlefile.targets
@@ -21,7 +21,8 @@
<PropertyGroup Condition="'$(TestNativeAot)' == 'true'">
<IlcToolsPath>$(CoreCLRILCompilerDir)</IlcToolsPath>
<IlcToolsPath Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)'">$(CoreCLRCrossILCompilerDir)</IlcToolsPath>
- <CppCompilerAndLinker Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)' and '$(HostOS)' != 'windows'">clang-9</CppCompilerAndLinker>
+ <CppCompilerAndLinker Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)' and '$(HostOS)' == 'linux' and '$(RuntimeIdentifier)' == 'linux-musl-arm64'">clang-15</CppCompilerAndLinker>
+ <CppCompilerAndLinker Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)' and '$(HostOS)' == 'linux' and '$(RuntimeIdentifier)' != 'linux-musl-arm64'">clang-9</CppCompilerAndLinker>
<SysRoot Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)' and '$(HostOS)' != 'windows'">$(ROOTFS_DIR)</SysRoot>
<IlcBuildTasksPath>$(CoreCLRILCompilerDir)netstandard/ILCompiler.Build.Tasks.dll</IlcBuildTasksPath>
<IlcSdkPath>$(CoreCLRAotSdkDir)</IlcSdkPath>
diff --git a/eng/testing/tests.wasm.targets b/eng/testing/tests.wasm.targets
index 117fe92207f..64ae08dd2f0 100644
--- a/eng/testing/tests.wasm.targets
+++ b/eng/testing/tests.wasm.targets
@@ -60,12 +60,16 @@
<SetScriptCommands Condition="'$(JSEngine)' != ''" Include="export JS_ENGINE=--engine=$(JSEngine)" />
<SetScriptCommands Condition="'$(JSEngineArgs)' != ''" Include="export JS_ENGINE_ARGS=$(JSEngineArgs)" />
<SetScriptCommands Condition="'$(_WasmMainJSFileName)' != ''" Include="export MAIN_JS=--js-file=$(_WasmMainJSFileName)" />
+ <!-- Workaround for https://github.com/dotnet/runtime/issues/74328 -->
+ <SetScriptCommands Condition="'$(BuildAOTTestsOnHelix)' == 'true'" Include="export DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER=1" />
</ItemGroup>
<ItemGroup Condition="'$(OS)' == 'Windows_NT'">
<SetScriptCommands Condition="'$(Scenario)' != '' and '$(ContinuousIntegrationBuild)' != 'true'" Include="set &quot;SCENARIO=$(Scenario)&quot;" />
<SetScriptCommands Condition="'$(JSEngine)' != ''" Include="set &quot;JS_ENGINE=--engine^=$(JSEngine)&quot;" />
<SetScriptCommands Condition="'$(JSEngineArgs)' != ''" Include="set &quot;JS_ENGINE_ARGS=$(JSEngineArgs)&quot;" />
<SetScriptCommands Condition="'$(_WasmMainJSFileName)' != ''" Include="set &quot;MAIN_JS=--js-file^=$(_WasmMainJSFileName)&quot;" />
+ <!-- Workaround for https://github.com/dotnet/runtime/issues/74328 -->
+ <SetScriptCommands Condition="'$(BuildAOTTestsOnHelix)' == 'true'" Include="set DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER=1" />
</ItemGroup>
<PropertyGroup>
diff --git a/global.json b/global.json
index c5754087323..83e1ef37592 100644
--- a/global.json
+++ b/global.json
@@ -8,11 +8,11 @@
"dotnet": "7.0.100-preview.7.22377.5"
},
"msbuild-sdks": {
- "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.22455.1",
- "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.22455.1",
- "Microsoft.DotNet.SharedFramework.Sdk": "8.0.0-beta.22455.1",
+ "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.22469.1",
+ "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.22469.1",
+ "Microsoft.DotNet.SharedFramework.Sdk": "8.0.0-beta.22469.1",
"Microsoft.Build.NoTargets": "3.5.0",
"Microsoft.Build.Traversal": "3.1.6",
- "Microsoft.NET.Sdk.IL": "8.0.0-alpha.1.22461.4"
+ "Microsoft.NET.Sdk.IL": "8.0.0-alpha.1.22475.4"
}
}
diff --git a/src/coreclr/.nuget/Directory.Build.props b/src/coreclr/.nuget/Directory.Build.props
index 0346d99435a..dc79f51339f 100644
--- a/src/coreclr/.nuget/Directory.Build.props
+++ b/src/coreclr/.nuget/Directory.Build.props
@@ -17,6 +17,11 @@
<!-- coreclr doesn't currently use the index so don't force it to be in sync -->
<SkipIndexCheck>true</SkipIndexCheck>
</PropertyGroup>
+
+ <!-- CoreCLR nuget packages shouldn't be published during servicing. -->
+ <PropertyGroup Condition="'$(PreReleaseVersionLabel)' == 'servicing'">
+ <IsShipping>false</IsShipping>
+ </PropertyGroup>
<ItemGroup>
<PackageIndex Condition="'$(MSBuildProjectExtension)' == '.pkgproj'" Include="$(PackageIndexFile)" />
diff --git a/src/coreclr/System.Private.CoreLib/MatchingRefApiCompatBaseline.txt b/src/coreclr/System.Private.CoreLib/MatchingRefApiCompatBaseline.txt
index 0a2be8fdccd..99b72c1b439 100644
--- a/src/coreclr/System.Private.CoreLib/MatchingRefApiCompatBaseline.txt
+++ b/src/coreclr/System.Private.CoreLib/MatchingRefApiCompatBaseline.txt
@@ -1,35 +1,5 @@
Compat issues with assembly System.Private.CoreLib:
TypesMustExist : Type 'Internal.Console' does not exist in the reference but it does exist in the implementation.
-TypesMustExist : Type 'Internal.Runtime.InteropServices.ComActivationContextInternal' does not exist in the reference but it does exist in the implementation.
-TypesMustExist : Type 'Internal.Runtime.InteropServices.ComActivator' does not exist in the reference but it does exist in the implementation.
-TypesMustExist : Type 'Internal.Runtime.InteropServices.ComponentActivator' does not exist in the reference but it does exist in the implementation.
-TypesMustExist : Type 'Internal.Runtime.InteropServices.InMemoryAssemblyLoader' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.add_FirstChanceException(System.EventHandler<System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs>)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.add_ProcessExit(System.EventHandler)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.add_UnhandledException(System.UnhandledExceptionEventHandler)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.remove_FirstChanceException(System.EventHandler<System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs>)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.remove_ProcessExit(System.EventHandler)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.remove_UnhandledException(System.UnhandledExceptionEventHandler)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.Environment.FailFast(System.String, System.Exception, System.String)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'protected void System.WeakReference..ctor()' does not exist in the reference but it does exist in the implementation.
-CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.TypeDependencyAttribute' exists on 'System.Collections.Generic.Comparer<T>' in the implementation but not the reference.
-CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.TypeDependencyAttribute' exists on 'System.Collections.Generic.EqualityComparer<T>' in the implementation but not the reference.
-MembersMustExist : Member 'protected void System.Diagnostics.Tracing.EventCounter.Flush()' does not exist in the reference but it does exist in the implementation.
-CannotMakeTypeAbstract : Type 'System.Diagnostics.Tracing.EventListener' is abstract in the reference but is not abstract in the implementation.
-CannotMakeMoreVisible : Visibility of member 'System.Diagnostics.Tracing.EventListener..ctor()' is 'protected' in the reference but 'public' in the implementation.
-CannotMakeMoreVisible : Visibility of member 'System.Diagnostics.Tracing.EventListener.EventSourceIndex(System.Diagnostics.Tracing.EventSource)' is 'protected' in the reference but 'public' in the implementation.
-TypesMustExist : Type 'System.Diagnostics.Tracing.TraceLoggingEventTypes' does not exist in the reference but it does exist in the implementation.
-CannotMakeMemberAbstract : Member 'public System.Boolean System.IO.FileSystemInfo.Exists' is abstract in the reference but is not abstract in the implementation.
-CannotMakeMemberAbstract : Member 'public System.String System.IO.FileSystemInfo.Name' is abstract in the reference but is not abstract in the implementation.
-CannotMakeMemberAbstract : Member 'public System.Boolean System.IO.FileSystemInfo.Exists.get()' is abstract in the reference but is not abstract in the implementation.
-CannotMakeMemberAbstract : Member 'public System.String System.IO.FileSystemInfo.Name.get()' is abstract in the reference but is not abstract in the implementation.
-MembersMustExist : Member 'protected System.ModuleHandle System.Reflection.Module.GetModuleHandleImpl()' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'protected System.ModuleHandle System.Reflection.Emit.ModuleBuilder.GetModuleHandleImpl()' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'protected System.String System.String System.Resources.ResourceManager.BaseNameField' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'protected System.Resources.IResourceReader System.Resources.IResourceReader System.Resources.ResourceSet.Reader' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Runtime.CompilerServices.ICastable' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute..ctor()' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public System.Boolean System.Runtime.Serialization.SerializationInfo.DeserializationInProgress.get()' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.Runtime.Serialization.SerializationInfo.ThrowIfDeserializationInProgress()' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.Runtime.Serialization.SerializationInfo.ThrowIfDeserializationInProgress(System.String, System.Int32)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.Runtime.Serialization.SerializationInfo.UpdateValue(System.String, System.Object, System.Type)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'protected System.Resources.IResourceReader System.Resources.IResourceReader System.Resources.ResourceSet.Reader' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'protected System.String System.String System.Resources.ResourceManager.BaseNameField' does not exist in the reference but it does exist in the implementation. \ No newline at end of file
diff --git a/src/coreclr/System.Private.CoreLib/System.Private.CoreLib.csproj b/src/coreclr/System.Private.CoreLib/System.Private.CoreLib.csproj
index 2418c8833be..76870f0bf94 100644
--- a/src/coreclr/System.Private.CoreLib/System.Private.CoreLib.csproj
+++ b/src/coreclr/System.Private.CoreLib/System.Private.CoreLib.csproj
@@ -162,7 +162,7 @@
<Compile Include="$(BclSourcesRoot)\System\Reflection\Emit\ConstructorBuilder.cs" />
<Compile Include="$(BclSourcesRoot)\System\Reflection\Emit\CustomAttributeBuilder.cs" />
<Compile Include="$(BclSourcesRoot)\System\Reflection\Emit\DynamicILGenerator.cs" />
- <Compile Include="$(BclSourcesRoot)\System\Reflection\Emit\DynamicMethod.cs" />
+ <Compile Include="$(BclSourcesRoot)\System\Reflection\Emit\DynamicMethod.CoreCLR.cs" />
<Compile Include="$(BclSourcesRoot)\System\Reflection\Emit\EnumBuilder.cs" />
<Compile Include="$(BclSourcesRoot)\System\Reflection\Emit\EventBuilder.cs" />
<Compile Include="$(BclSourcesRoot)\System\Reflection\Emit\FieldBuilder.cs" />
@@ -209,7 +209,6 @@
<Compile Include="$(BclSourcesRoot)\System\Runtime\CompilerServices\ICastableHelpers.cs" />
<Compile Include="$(BclSourcesRoot)\System\Runtime\CompilerServices\RuntimeFeature.CoreCLR.cs" />
<Compile Include="$(BclSourcesRoot)\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs" />
- <Compile Include="$(BclSourcesRoot)\System\Runtime\CompilerServices\TypeDependencyAttribute.cs" />
<Compile Include="$(BclSourcesRoot)\System\Runtime\ControlledExecution.CoreCLR.cs" />
<Compile Include="$(BclSourcesRoot)\System\Runtime\DependentHandle.cs" />
<Compile Include="$(BclSourcesRoot)\System\Runtime\GCSettings.CoreCLR.cs" />
diff --git a/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivationContextInternal.cs b/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivationContextInternal.cs
index c16a56efc4f..fd88d8edad3 100644
--- a/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivationContextInternal.cs
+++ b/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivationContextInternal.cs
@@ -8,8 +8,7 @@ using System.Runtime.InteropServices;
namespace Internal.Runtime.InteropServices
{
[StructLayout(LayoutKind.Sequential)]
- [CLSCompliant(false)]
- public unsafe struct ComActivationContextInternal
+ internal unsafe struct ComActivationContextInternal
{
public Guid ClassId;
public Guid InterfaceId;
diff --git a/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivator.PlatformNotSupported.cs b/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivator.PlatformNotSupported.cs
index 4492eac6d3a..e634ebd6d47 100644
--- a/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivator.PlatformNotSupported.cs
+++ b/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivator.PlatformNotSupported.cs
@@ -8,7 +8,7 @@ using System.Runtime.InteropServices;
namespace Internal.Runtime.InteropServices
{
- public static class ComActivator
+ internal static class ComActivator
{
/// <summary>
/// Internal entry point for unmanaged COM activation API from native code
diff --git a/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivator.cs b/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivator.cs
index f33a45061ea..476ff22862e 100644
--- a/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivator.cs
+++ b/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivator.cs
@@ -78,7 +78,7 @@ namespace Internal.Runtime.InteropServices
}
[SupportedOSPlatform("windows")]
- public static class ComActivator
+ internal static class ComActivator
{
// Collection of all ALCs used for COM activation. In the event we want to support
// unloadable COM server ALCs, this will need to be changed.
diff --git a/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComponentActivator.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComponentActivator.CoreCLR.cs
index 3e89bca82e0..961c426b470 100644
--- a/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComponentActivator.CoreCLR.cs
+++ b/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComponentActivator.CoreCLR.cs
@@ -6,7 +6,7 @@ using System.Runtime.InteropServices;
namespace Internal.Runtime.InteropServices
{
- public static partial class ComponentActivator
+ internal static partial class ComponentActivator
{
// This hook for when GetFunctionPointer is called when the feature is disabled allows us to
// provide error messages for known hosting scenarios such as C++/CLI.
diff --git a/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/InMemoryAssemblyLoader.PlatformNotSupported.cs b/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/InMemoryAssemblyLoader.PlatformNotSupported.cs
index 1a0881cd414..042f256f79f 100644
--- a/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/InMemoryAssemblyLoader.PlatformNotSupported.cs
+++ b/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/InMemoryAssemblyLoader.PlatformNotSupported.cs
@@ -10,7 +10,7 @@ namespace Internal.Runtime.InteropServices
/// <summary>
/// This class enables the .NET IJW host to load an in-memory module as a .NET assembly
/// </summary>
- public static class InMemoryAssemblyLoader
+ internal static class InMemoryAssemblyLoader
{
/// <summary>
/// Loads into an isolated AssemblyLoadContext an assembly that has already been loaded into memory by the OS loader as a native module.
diff --git a/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/InMemoryAssemblyLoader.cs b/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/InMemoryAssemblyLoader.cs
index 34b6d24d8df..c7c2e98a837 100644
--- a/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/InMemoryAssemblyLoader.cs
+++ b/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/InMemoryAssemblyLoader.cs
@@ -13,7 +13,7 @@ namespace Internal.Runtime.InteropServices
/// This class enables the .NET IJW host to load an in-memory module as a .NET assembly
/// </summary>
[SupportedOSPlatform("windows")]
- public static class InMemoryAssemblyLoader
+ internal static class InMemoryAssemblyLoader
{
private static bool IsSupported { get; } = InitializeIsSupported();
private static bool InitializeIsSupported() => AppContext.TryGetSwitch("System.Runtime.InteropServices.EnableCppCLIHostActivation", out bool isSupported) ? isSupported : true;
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Collections/Generic/ArraySortHelper.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Collections/Generic/ArraySortHelper.CoreCLR.cs
index 7fb9c931d04..9903731a5e0 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Collections/Generic/ArraySortHelper.CoreCLR.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Collections/Generic/ArraySortHelper.CoreCLR.cs
@@ -12,7 +12,6 @@ namespace System.Collections.Generic
int BinarySearch(TKey[] keys, int index, int length, TKey value, IComparer<TKey>? comparer);
}
- [TypeDependency("System.Collections.Generic.GenericArraySortHelper`1")]
internal sealed partial class ArraySortHelper<T>
: IArraySortHelper<T>
{
@@ -46,7 +45,6 @@ namespace System.Collections.Generic
void Sort(Span<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer);
}
- [TypeDependency("System.Collections.Generic.GenericArraySortHelper`2")]
internal sealed partial class ArraySortHelper<TKey, TValue>
: IArraySortHelper<TKey, TValue>
{
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Collections/Generic/Comparer.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Collections/Generic/Comparer.CoreCLR.cs
index a2790cbd121..f6d531485b2 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Collections/Generic/Comparer.CoreCLR.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Collections/Generic/Comparer.CoreCLR.cs
@@ -5,7 +5,6 @@ using System.Runtime.CompilerServices;
namespace System.Collections.Generic
{
- [TypeDependency("System.Collections.Generic.ObjectComparer`1")]
public abstract partial class Comparer<T> : IComparer, IComparer<T>
{
// To minimize generic instantiation overhead of creating the comparer per type, we keep the generic portion of the code as small
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.CoreCLR.cs
index 03b7ab1011c..2377566a053 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.CoreCLR.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.CoreCLR.cs
@@ -6,7 +6,6 @@ using System.Diagnostics;
namespace System.Collections.Generic
{
- [TypeDependency("System.Collections.Generic.ObjectEqualityComparer`1")]
public abstract partial class EqualityComparer<T> : IEqualityComparer, IEqualityComparer<T>
{
// To minimize generic instantiation overhead of creating the comparer per type, we keep the generic portion of the code as small
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Enum.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Enum.CoreCLR.cs
index fb1dd0a0349..18d9a6db206 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Enum.CoreCLR.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Enum.CoreCLR.cs
@@ -72,11 +72,15 @@ namespace System
return underlyingType;
}
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
private static EnumInfo GetEnumInfo(RuntimeType enumType, bool getNames = true)
{
- EnumInfo? entry = enumType.GenericCache as EnumInfo;
+ return enumType.GenericCache is EnumInfo info && (!getNames || info.Names is not null) ?
+ info :
+ InitializeEnumInfo(enumType, getNames);
- if (entry == null || (getNames && entry.Names == null))
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static EnumInfo InitializeEnumInfo(RuntimeType enumType, bool getNames)
{
ulong[]? values = null;
string[]? names = null;
@@ -88,11 +92,10 @@ namespace System
getNames ? Interop.BOOL.TRUE : Interop.BOOL.FALSE);
bool hasFlagsAttribute = enumType.IsDefined(typeof(FlagsAttribute), inherit: false);
- entry = new EnumInfo(hasFlagsAttribute, values!, names!);
+ var entry = new EnumInfo(hasFlagsAttribute, values!, names!);
enumType.GenericCache = entry;
+ return entry;
}
-
- return entry;
}
}
}
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Environment.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Environment.CoreCLR.cs
index 1ab95bc582a..cd7a1a3560d 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Environment.CoreCLR.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Environment.CoreCLR.cs
@@ -59,7 +59,7 @@ namespace System
[DoesNotReturn]
[MethodImpl(MethodImplOptions.InternalCall)]
- public static extern void FailFast(string? message, Exception? exception, string? errorMessage);
+ internal static extern void FailFast(string? message, Exception? exception, string? errorMessage);
private static string[]? s_commandLineArgs;
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicILGenerator.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicILGenerator.cs
index ace5eb7d1d0..bc972ea7782 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicILGenerator.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicILGenerator.cs
@@ -23,7 +23,7 @@ namespace System.Reflection.Emit
internal void GetCallableMethod(RuntimeModule module, DynamicMethod dm)
{
- dm.m_methodHandle = ModuleHandle.GetDynamicMethod(dm,
+ dm._methodHandle = ModuleHandle.GetDynamicMethod(dm,
module,
m_methodBuilder.Name,
(byte[])m_scope[m_methodSigToken]!,
@@ -590,7 +590,7 @@ namespace System.Reflection.Emit
m_scope = ilGenerator.m_scope;
m_method = (DynamicMethod)ilGenerator.m_methodBuilder;
- m_method.m_resolver = this;
+ m_method._resolver = this;
}
internal DynamicResolver(DynamicILInfo dynamicILInfo)
@@ -602,7 +602,7 @@ namespace System.Reflection.Emit
m_scope = dynamicILInfo.DynamicScope;
m_method = dynamicILInfo.DynamicMethod;
- m_method.m_resolver = this;
+ m_method._resolver = this;
}
//
@@ -628,7 +628,7 @@ namespace System.Reflection.Emit
if (method == null)
return;
- if (method.m_methodHandle == null)
+ if (method._methodHandle == null)
return;
DestroyScout scout;
@@ -645,7 +645,7 @@ namespace System.Reflection.Emit
// We can never ever have two active destroy scouts for the same method. We need to initialize the scout
// outside the try/reregister block to avoid possibility of reregistration for finalization with active scout.
- scout.m_methodHandle = method.m_methodHandle.Value;
+ scout.m_methodHandle = method._methodHandle.Value;
}
private sealed class DestroyScout
@@ -687,12 +687,12 @@ namespace System.Reflection.Emit
SecurityControlFlags flags = SecurityControlFlags.Default;
- if (m_method.m_restrictedSkipVisibility)
+ if (m_method._restrictedSkipVisibility)
flags |= SecurityControlFlags.RestrictedSkipVisibilityChecks;
- else if (m_method.m_skipVisibility)
+ else if (m_method._skipVisibility)
flags |= SecurityControlFlags.SkipVisibilityChecks;
- typeOwner = m_method.m_typeOwner;
+ typeOwner = m_method._typeOwner;
securityControlFlags = (int)flags;
@@ -884,7 +884,7 @@ namespace System.Reflection.Emit
#region Internal Methods
internal void GetCallableMethod(RuntimeModule module, DynamicMethod dm)
{
- dm.m_methodHandle = ModuleHandle.GetDynamicMethod(dm,
+ dm._methodHandle = ModuleHandle.GetDynamicMethod(dm,
module, m_method.Name, (byte[])m_scope[m_methodSignature]!, new DynamicResolver(this));
}
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.CoreCLR.cs
new file mode 100644
index 00000000000..194108b440d
--- /dev/null
+++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.CoreCLR.cs
@@ -0,0 +1,305 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Runtime.InteropServices;
+using System.Runtime.CompilerServices;
+using System.Runtime.Loader;
+using System.Text;
+using System.Threading;
+using static System.Runtime.CompilerServices.RuntimeHelpers;
+
+namespace System.Reflection.Emit
+{
+ public sealed partial class DynamicMethod : MethodInfo
+ {
+ private RuntimeType[] _parameterTypes;
+ internal IRuntimeMethodInfo? _methodHandle;
+ private RuntimeType _returnType;
+ private DynamicILGenerator? _ilGenerator;
+ private DynamicILInfo? _dynamicILInfo;
+ private bool _initLocals;
+ private Module _module;
+ internal bool _skipVisibility;
+ internal RuntimeType? _typeOwner;
+ private MethodInvoker? _invoker;
+ private Signature? _signature;
+
+ // We want the creator of the DynamicMethod to control who has access to the
+ // DynamicMethod (just like we do for delegates). However, a user can get to
+ // the corresponding RTDynamicMethod using Exception.TargetSite, StackFrame.GetMethod, etc.
+ // If we allowed use of RTDynamicMethod, the creator of the DynamicMethod would
+ // not be able to bound access to the DynamicMethod. Hence, we need to ensure that
+ // we do not allow direct use of RTDynamicMethod.
+ private RTDynamicMethod _dynMethod;
+
+ // needed to keep the object alive during jitting
+ // assigned by the DynamicResolver ctor
+ internal DynamicResolver? _resolver;
+
+ internal bool _restrictedSkipVisibility;
+
+ //
+ // Delegate and method creation
+ //
+
+ public sealed override Delegate CreateDelegate(Type delegateType)
+ {
+ if (_restrictedSkipVisibility)
+ {
+ // Compile the method since accessibility checks are done as part of compilation.
+ GetMethodDescriptor();
+ IRuntimeMethodInfo? methodHandle = _methodHandle;
+ System.Runtime.CompilerServices.RuntimeHelpers.CompileMethod(methodHandle != null ? methodHandle.Value : RuntimeMethodHandleInternal.EmptyHandle);
+ GC.KeepAlive(methodHandle);
+ }
+
+ MulticastDelegate d = (MulticastDelegate)Delegate.CreateDelegateNoSecurityCheck(delegateType, null, GetMethodDescriptor());
+ // stash this MethodInfo by brute force.
+ d.StoreDynamicMethod(GetMethodInfo());
+ return d;
+ }
+
+ public sealed override Delegate CreateDelegate(Type delegateType, object? target)
+ {
+ if (_restrictedSkipVisibility)
+ {
+ // Compile the method since accessibility checks are done as part of compilation
+ GetMethodDescriptor();
+ IRuntimeMethodInfo? methodHandle = _methodHandle;
+ System.Runtime.CompilerServices.RuntimeHelpers.CompileMethod(methodHandle != null ? methodHandle.Value : RuntimeMethodHandleInternal.EmptyHandle);
+ GC.KeepAlive(methodHandle);
+ }
+
+ MulticastDelegate d = (MulticastDelegate)Delegate.CreateDelegateNoSecurityCheck(delegateType, target, GetMethodDescriptor());
+ // stash this MethodInfo by brute force.
+ d.StoreDynamicMethod(GetMethodInfo());
+ return d;
+ }
+
+ // This is guaranteed to return a valid handle
+ internal RuntimeMethodHandle GetMethodDescriptor()
+ {
+ if (_methodHandle == null)
+ {
+ lock (this)
+ {
+ if (_methodHandle == null)
+ {
+ if (_dynamicILInfo != null)
+ _dynamicILInfo.GetCallableMethod((RuntimeModule)_module, this);
+ else
+ {
+ if (_ilGenerator == null || _ilGenerator.ILOffset == 0)
+ throw new InvalidOperationException(SR.Format(SR.InvalidOperation_BadEmptyMethodBody, Name));
+
+ _ilGenerator.GetCallableMethod((RuntimeModule)_module, this);
+ }
+ }
+ }
+ }
+ return new RuntimeMethodHandle(_methodHandle!);
+ }
+
+ private MethodInvoker Invoker
+ {
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ get
+ {
+ return _invoker ??= new MethodInvoker(this, Signature);
+ }
+ }
+
+ internal Signature Signature
+ {
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ get
+ {
+ [MethodImpl(MethodImplOptions.NoInlining)] // move lazy sig generation out of the hot path
+ Signature LazyCreateSignature()
+ {
+ Debug.Assert(_methodHandle != null);
+ Debug.Assert(_parameterTypes != null);
+
+ Signature newSig = new Signature(_methodHandle, _parameterTypes, _returnType, CallingConvention);
+ Volatile.Write(ref _signature, newSig);
+ return newSig;
+ }
+
+ return _signature ?? LazyCreateSignature();
+ }
+ }
+
+ public override object? Invoke(object? obj, BindingFlags invokeAttr, Binder? binder, object?[]? parameters, CultureInfo? culture)
+ {
+ if ((CallingConvention & CallingConventions.VarArgs) == CallingConventions.VarArgs)
+ throw new NotSupportedException(SR.NotSupported_CallToVarArg);
+
+ //
+ // We do not demand any permission here because the caller already has access
+ // to the current DynamicMethod object, and it could just as easily emit another
+ // Transparent DynamicMethod to call the current DynamicMethod.
+ //
+
+ _ = GetMethodDescriptor();
+ // ignore obj since it's a static method
+
+ // verify arguments
+ int argCount = (parameters != null) ? parameters.Length : 0;
+ if (Signature.Arguments.Length != argCount)
+ throw new TargetParameterCountException(SR.Arg_ParmCnt);
+
+ object? retValue;
+
+ unsafe
+ {
+ if (argCount == 0)
+ {
+ retValue = Invoker.InlinedInvoke(obj, args: default, invokeAttr);
+ }
+ else if (argCount > MaxStackAllocArgCount)
+ {
+ Debug.Assert(parameters != null);
+ retValue = InvokeWithManyArguments(this, argCount, obj, invokeAttr, binder, parameters, culture);
+ }
+ else
+ {
+ Debug.Assert(parameters != null);
+ StackAllocedArguments argStorage = default;
+ Span<object?> copyOfParameters = new(ref argStorage._arg0, argCount);
+ Span<ParameterCopyBackAction> shouldCopyBackParameters = new(ref argStorage._copyBack0, argCount);
+
+ StackAllocatedByRefs byrefStorage = default;
+ IntPtr* pByRefStorage = (IntPtr*)&byrefStorage;
+
+ CheckArguments(
+ copyOfParameters,
+ pByRefStorage,
+ shouldCopyBackParameters,
+ parameters,
+ Signature.Arguments,
+ binder,
+ culture,
+ invokeAttr);
+
+ retValue = Invoker.InlinedInvoke(obj, pByRefStorage, invokeAttr);
+
+ // Copy modified values out. This should be done only with ByRef or Type.Missing parameters.
+ for (int i = 0; i < argCount; i++)
+ {
+ ParameterCopyBackAction action = shouldCopyBackParameters[i];
+ if (action != ParameterCopyBackAction.None)
+ {
+ if (action == ParameterCopyBackAction.Copy)
+ {
+ parameters[i] = copyOfParameters[i];
+ }
+ else
+ {
+ Debug.Assert(action == ParameterCopyBackAction.CopyNullable);
+ Debug.Assert(copyOfParameters[i] != null);
+ Debug.Assert(((RuntimeType)copyOfParameters[i]!.GetType()).IsNullableOfT);
+ parameters[i] = RuntimeMethodHandle.ReboxFromNullable(copyOfParameters[i]);
+ }
+ }
+ }
+ }
+ }
+
+ GC.KeepAlive(this);
+ return retValue;
+ }
+
+ // Slower path that does a heap alloc for copyOfParameters and registers byrefs to those objects.
+ // This is a separate method to support better performance for the faster paths.
+ private static unsafe object? InvokeWithManyArguments(
+ DynamicMethod mi,
+ int argCount,
+ object? obj,
+ BindingFlags invokeAttr,
+ Binder? binder,
+ object?[] parameters,
+ CultureInfo? culture)
+ {
+ object[] objHolder = new object[argCount];
+ Span<object?> copyOfParameters = new(objHolder, 0, argCount);
+
+ // We don't check a max stack size since we are invoking a method which
+ // naturally requires a stack size that is dependent on the arg count\size.
+ IntPtr* pByRefStorage = stackalloc IntPtr[argCount];
+ NativeMemory.Clear(pByRefStorage, (uint)(argCount * sizeof(IntPtr)));
+
+ ParameterCopyBackAction* copyBackActions = stackalloc ParameterCopyBackAction[argCount];
+ Span<ParameterCopyBackAction> shouldCopyBackParameters = new(copyBackActions, argCount);
+
+ GCFrameRegistration reg = new(pByRefStorage, (uint)argCount, areByRefs: true);
+
+ object? retValue;
+ try
+ {
+ RegisterForGCReporting(&reg);
+ mi.CheckArguments(
+ copyOfParameters,
+ pByRefStorage,
+ shouldCopyBackParameters,
+ parameters,
+ mi.Signature.Arguments,
+ binder,
+ culture,
+ invokeAttr);
+
+ retValue = mi.Invoker.InlinedInvoke(obj, pByRefStorage, invokeAttr);
+ }
+ finally
+ {
+ UnregisterForGCReporting(&reg);
+ }
+
+ // Copy modified values out. This should be done only with ByRef or Type.Missing parameters.
+ for (int i = 0; i < argCount; i++)
+ {
+ ParameterCopyBackAction action = shouldCopyBackParameters[i];
+ if (action != ParameterCopyBackAction.None)
+ {
+ if (action == ParameterCopyBackAction.Copy)
+ {
+ parameters[i] = copyOfParameters[i];
+ }
+ else
+ {
+ Debug.Assert(action == ParameterCopyBackAction.CopyNullable);
+ Debug.Assert(copyOfParameters[i] != null);
+ Debug.Assert(((RuntimeType)copyOfParameters[i]!.GetType()).IsNullableOfT);
+ parameters[i] = RuntimeMethodHandle.ReboxFromNullable(copyOfParameters[i]);
+ }
+ }
+ }
+
+ return retValue;
+ }
+
+ public DynamicILInfo GetDynamicILInfo()
+ {
+ if (_dynamicILInfo == null)
+ {
+ byte[] methodSignature = SignatureHelper.GetMethodSigHelper(
+ null, CallingConvention, ReturnType, null, null, _parameterTypes, null, null).GetSignature(true);
+ _dynamicILInfo = new DynamicILInfo(this, methodSignature);
+ }
+ return _dynamicILInfo;
+ }
+
+ public ILGenerator GetILGenerator(int streamSize)
+ {
+ if (_ilGenerator == null)
+ {
+ byte[] methodSignature = SignatureHelper.GetMethodSigHelper(
+ null, CallingConvention, ReturnType, null, null, _parameterTypes, null, null).GetSignature(true);
+ _ilGenerator = new DynamicILGenerator(this, methodSignature, streamSize);
+ }
+ return _ilGenerator;
+ }
+ }
+}
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilder.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilder.cs
index 40025b064f2..5737bfc484b 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilder.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilder.cs
@@ -297,9 +297,9 @@ namespace System.Reflection.Emit
internal RuntimeModule InternalModule => _internalModule;
- protected override ModuleHandle GetModuleHandleImpl() => new ModuleHandle(InternalModule);
+ private protected override ModuleHandle GetModuleHandleImpl() => new ModuleHandle(InternalModule);
- private static RuntimeModule GetRuntimeModuleFromModule(Module? m)
+ internal static RuntimeModule GetRuntimeModuleFromModule(Module? m)
{
ModuleBuilder? mb = m as ModuleBuilder;
if (mb != null)
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeCustomAttributeData.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeCustomAttributeData.cs
index b70ccefea9e..bdaf23af2c9 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeCustomAttributeData.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeCustomAttributeData.cs
@@ -278,9 +278,16 @@ namespace System.Reflection
}
ParameterInfo[] parameters = m_ctor.GetParametersNoCopy();
- m_ctorParams = new CustomAttributeCtorParameter[parameters.Length];
- for (int i = 0; i < parameters.Length; i++)
- m_ctorParams[i] = new CustomAttributeCtorParameter(InitCustomAttributeType((RuntimeType)parameters[i].ParameterType));
+ if (parameters.Length != 0)
+ {
+ m_ctorParams = new CustomAttributeCtorParameter[parameters.Length];
+ for (int i = 0; i < parameters.Length; i++)
+ m_ctorParams[i] = new CustomAttributeCtorParameter(InitCustomAttributeType((RuntimeType)parameters[i].ParameterType));
+ }
+ else
+ {
+ m_ctorParams = Array.Empty<CustomAttributeCtorParameter>();
+ }
FieldInfo[] fields = m_ctor.DeclaringType!.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
PropertyInfo[] properties = m_ctor.DeclaringType.GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
@@ -341,7 +348,7 @@ namespace System.Reflection
m_typedCtorArgs = Array.AsReadOnly(new CustomAttributeTypedArgument[] {
new CustomAttributeTypedArgument(fieldOffset.Value)
});
- m_namedArgs = Array.AsReadOnly(Array.Empty<CustomAttributeNamedArgument>());
+ m_namedArgs = Array.Empty<CustomAttributeNamedArgument>();
}
private void Init(MarshalAsAttribute marshalAs)
{
@@ -391,8 +398,7 @@ namespace System.Reflection
typedArgs[0] = new CustomAttributeTypedArgument(typeof(Type), forwardedTo.Destination);
m_typedCtorArgs = Array.AsReadOnly(typedArgs);
- CustomAttributeNamedArgument[] namedArgs = Array.Empty<CustomAttributeNamedArgument>();
- m_namedArgs = Array.AsReadOnly(namedArgs);
+ m_namedArgs = Array.Empty<CustomAttributeNamedArgument>();
}
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2075:UnrecognizedReflectionPattern",
@@ -409,8 +415,8 @@ namespace System.Reflection
#endif
m_ctor = type.GetConstructors(BindingFlags.Public | BindingFlags.Instance)[0];
- m_typedCtorArgs = Array.AsReadOnly(Array.Empty<CustomAttributeTypedArgument>());
- m_namedArgs = Array.AsReadOnly(Array.Empty<CustomAttributeNamedArgument>());
+ m_typedCtorArgs = Array.Empty<CustomAttributeTypedArgument>();
+ m_namedArgs = Array.Empty<CustomAttributeNamedArgument>();
}
#endregion
@@ -423,16 +429,23 @@ namespace System.Reflection
{
if (m_typedCtorArgs is null)
{
- CustomAttributeTypedArgument[] typedCtorArgs = new CustomAttributeTypedArgument[m_ctorParams.Length];
-
- for (int i = 0; i < typedCtorArgs.Length; i++)
+ if (m_ctorParams.Length != 0)
{
- CustomAttributeEncodedArgument encodedArg = m_ctorParams[i].CustomAttributeEncodedArgument;
+ CustomAttributeTypedArgument[] typedCtorArgs = new CustomAttributeTypedArgument[m_ctorParams.Length];
- typedCtorArgs[i] = new CustomAttributeTypedArgument(m_scope, encodedArg);
- }
+ for (int i = 0; i < typedCtorArgs.Length; i++)
+ {
+ CustomAttributeEncodedArgument encodedArg = m_ctorParams[i].CustomAttributeEncodedArgument;
+
+ typedCtorArgs[i] = new CustomAttributeTypedArgument(m_scope, encodedArg);
+ }
- m_typedCtorArgs = Array.AsReadOnly(typedCtorArgs);
+ m_typedCtorArgs = Array.AsReadOnly(typedCtorArgs);
+ }
+ else
+ {
+ m_typedCtorArgs = Array.Empty<CustomAttributeTypedArgument>();
+ }
}
return m_typedCtorArgs;
@@ -445,26 +458,33 @@ namespace System.Reflection
{
if (m_namedArgs is null)
{
- if (m_namedParams is null)
- return null!;
-
int cNamedArgs = 0;
- for (int i = 0; i < m_namedParams.Length; i++)
+ if (m_namedParams is not null)
{
- if (m_namedParams[i].EncodedArgument.CustomAttributeType.EncodedType != CustomAttributeEncoding.Undefined)
- cNamedArgs++;
+ for (int i = 0; i < m_namedParams.Length; i++)
+ {
+ if (m_namedParams[i].EncodedArgument.CustomAttributeType.EncodedType != CustomAttributeEncoding.Undefined)
+ cNamedArgs++;
+ }
}
- CustomAttributeNamedArgument[] namedArgs = new CustomAttributeNamedArgument[cNamedArgs];
+ if (cNamedArgs != 0)
+ {
+ CustomAttributeNamedArgument[] namedArgs = new CustomAttributeNamedArgument[cNamedArgs];
- for (int i = 0, j = 0; i < m_namedParams.Length; i++)
+ for (int i = 0, j = 0; i < m_namedParams!.Length; i++)
+ {
+ if (m_namedParams[i].EncodedArgument.CustomAttributeType.EncodedType != CustomAttributeEncoding.Undefined)
+ namedArgs[j++] = new CustomAttributeNamedArgument(
+ m_members[i], new CustomAttributeTypedArgument(m_scope, m_namedParams[i].EncodedArgument));
+ }
+
+ m_namedArgs = Array.AsReadOnly(namedArgs);
+ }
+ else
{
- if (m_namedParams[i].EncodedArgument.CustomAttributeType.EncodedType != CustomAttributeEncoding.Undefined)
- namedArgs[j++] = new CustomAttributeNamedArgument(
- m_members[i], new CustomAttributeTypedArgument(m_scope, m_namedParams[i].EncodedArgument));
+ m_namedArgs = Array.Empty<CustomAttributeNamedArgument>();
}
-
- m_namedArgs = Array.AsReadOnly(namedArgs);
}
return m_namedArgs;
@@ -766,9 +786,6 @@ namespace System.Reflection
internal static unsafe class CustomAttribute
{
- private static readonly RuntimeType Type_RuntimeType = (RuntimeType)typeof(RuntimeType);
- private static readonly RuntimeType Type_Type = (RuntimeType)typeof(Type);
-
#region Internal Static Members
internal static bool IsDefined(RuntimeType type, RuntimeType? caType, bool inherit)
{
@@ -1221,9 +1238,9 @@ namespace System.Reflection
if (type is null && value is not null)
{
type = (RuntimeType)value.GetType();
- if (type == Type_RuntimeType)
+ if (type == typeof(RuntimeType))
{
- type = Type_Type;
+ type = (RuntimeType)typeof(Type);
}
}
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeModule.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeModule.cs
index 8512a968b6c..f1d6c677728 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeModule.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeModule.cs
@@ -531,7 +531,7 @@ namespace System.Reflection
return m_runtimeAssembly;
}
- protected override ModuleHandle GetModuleHandleImpl()
+ private protected override ModuleHandle GetModuleHandleImpl()
{
return new ModuleHandle(this);
}
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeParameterInfo.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeParameterInfo.cs
index 434a821715c..078343e3cb6 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeParameterInfo.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeParameterInfo.cs
@@ -106,11 +106,6 @@ namespace System.Reflection
}
#endregion
- #region Private Statics
- private static readonly Type s_DecimalConstantAttributeType = typeof(DecimalConstantAttribute);
- private static readonly Type s_CustomConstantAttributeType = typeof(CustomConstantAttribute);
- #endregion
-
#region Private Data Members
private int m_tkParamDef;
private MetadataImport m_scope;
@@ -359,7 +354,7 @@ namespace System.Reflection
{
defaultValue = GetRawDecimalConstant(attr);
}
- else if (attrType!.IsSubclassOf(s_CustomConstantAttributeType))
+ else if (attrType!.IsSubclassOf(typeof(CustomConstantAttribute)))
{
defaultValue = GetRawConstant(attr);
}
@@ -367,14 +362,14 @@ namespace System.Reflection
}
else
{
- object[] CustomAttrs = GetCustomAttributes(s_CustomConstantAttributeType, false);
+ object[] CustomAttrs = GetCustomAttributes(typeof(CustomConstantAttribute), false);
if (CustomAttrs.Length != 0)
{
defaultValue = ((CustomConstantAttribute)CustomAttrs[0]).Value;
}
else
{
- CustomAttrs = GetCustomAttributes(s_DecimalConstantAttributeType, false);
+ CustomAttrs = GetCustomAttributes(typeof(DecimalConstantAttribute), false);
if (CustomAttrs.Length != 0)
{
defaultValue = ((DecimalConstantAttribute)CustomAttrs[0]).Value;
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Runtime/CompilerServices/CastHelpers.cs b/src/coreclr/System.Private.CoreLib/src/System/Runtime/CompilerServices/CastHelpers.cs
index a49ffaf9378..818f9ea7671 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Runtime/CompilerServices/CastHelpers.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Runtime/CompilerServices/CastHelpers.cs
@@ -477,12 +477,7 @@ namespace System.Runtime.CompilerServices
private static object? ChkCastClassSpecial(void* toTypeHnd, object obj)
{
MethodTable* mt = RuntimeHelpers.GetMethodTable(obj);
-
- // Normally, this case is expected to be handled by JIT inline.
- // However, with PGO data JIT might decide to check a different type instead
- // so this one has to be always checked here
- if (toTypeHnd == mt)
- goto done;
+ Debug.Assert(mt != toTypeHnd, "The check for the trivial cases should be inlined by the JIT");
for (; ; )
{
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Runtime/CompilerServices/TypeDependencyAttribute.cs b/src/coreclr/System.Private.CoreLib/src/System/Runtime/CompilerServices/TypeDependencyAttribute.cs
deleted file mode 100644
index 50d292e10df..00000000000
--- a/src/coreclr/System.Private.CoreLib/src/System/Runtime/CompilerServices/TypeDependencyAttribute.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-namespace System.Runtime.CompilerServices
-{
- // We might want to make this inherited someday. But I suspect it shouldn't
- // be necessary.
- [AttributeUsage(AttributeTargets.Struct | AttributeTargets.Class | AttributeTargets.Interface, AllowMultiple = true, Inherited = false)]
- internal sealed class TypeDependencyAttribute : Attribute
- {
- private readonly string typeName;
-
- public TypeDependencyAttribute(string typeName)
- {
- ArgumentNullException.ThrowIfNull(typeName);
-
- this.typeName = typeName;
- }
- }
-}
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Runtime/InteropServices/IException.cs b/src/coreclr/System.Private.CoreLib/src/System/Runtime/InteropServices/IException.cs
deleted file mode 100644
index 3f2d78d1f58..00000000000
--- a/src/coreclr/System.Private.CoreLib/src/System/Runtime/InteropServices/IException.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-/*=============================================================================
-**
-** Interface: _Exception
-**
-**
-** Purpose: COM backwards compatibility with v1 Exception
-** object layout.
-**
-**
-=============================================================================*/
-
-namespace System.Runtime.InteropServices {
- using System;
- using System.Reflection;
- using System.Runtime.Serialization;
-
- [Guid("b36b5c63-42ef-38bc-a07e-0b34c98f164a")]
- [InterfaceType(ComInterfaceType.InterfaceIsDual)]
- [CLSCompliant(false)]
- internal interface _Exception
- {
- //
- // This method is intentionally included in CoreCLR to make Exception.get_InnerException "newslot virtual final".
- // Some phone apps include MEF from desktop Silverlight. MEF's ComposablePartException depends on implicit interface
- // implementations of get_InnerException to be provided by the base class. It works only if Exception.get_InnerException
- // is virtual.
- //
- Exception? InnerException {
- get;
- }
- }
-}
diff --git a/src/coreclr/System.Private.CoreLib/src/System/WeakReference.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/WeakReference.CoreCLR.cs
index 3624f28aace..0deef24348d 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/WeakReference.CoreCLR.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/WeakReference.CoreCLR.cs
@@ -14,13 +14,6 @@ namespace System
// This field is not a regular GC handle. It can have a special values that are used to prevent a race condition between setting the target and finalization.
internal IntPtr m_handle;
- // Migrating InheritanceDemands requires this default ctor, so we can mark it SafeCritical
- protected WeakReference()
- {
- Debug.Fail("WeakReference's protected default ctor should never be used!");
- throw new NotImplementedException();
- }
-
// Determines whether or not this instance of WeakReference still refers to an object
// that has not been collected.
//
diff --git a/src/coreclr/debug/debug-pal/unix/diagnosticsipc.cpp b/src/coreclr/debug/debug-pal/unix/diagnosticsipc.cpp
deleted file mode 100644
index 556f81c2e96..00000000000
--- a/src/coreclr/debug/debug-pal/unix/diagnosticsipc.cpp
+++ /dev/null
@@ -1,423 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-#include <pal.h>
-#include <pal_assert.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <sys/stat.h>
-#include "diagnosticsipc.h"
-#include "processdescriptor.h"
-
-#if __GNUC__
- #include <poll.h>
-#else
- #include <sys/poll.h>
-#endif // __GNUC__
-
-IpcStream::DiagnosticsIpc::DiagnosticsIpc(const int serverSocket, sockaddr_un *const pServerAddress, ConnectionMode mode) :
- mode(mode),
- _serverSocket(serverSocket),
- _pServerAddress(new sockaddr_un),
- _isClosed(false),
- _isListening(false)
-{
- _ASSERTE(_pServerAddress != nullptr);
- _ASSERTE(pServerAddress != nullptr);
-
- if (_pServerAddress == nullptr || pServerAddress == nullptr)
- return;
- memcpy(_pServerAddress, pServerAddress, sizeof(sockaddr_un));
-}
-
-IpcStream::DiagnosticsIpc::~DiagnosticsIpc()
-{
- Close();
- delete _pServerAddress;
-}
-
-IpcStream::DiagnosticsIpc *IpcStream::DiagnosticsIpc::Create(const char *const pIpcName, ConnectionMode mode, ErrorCallback callback)
-{
- sockaddr_un serverAddress{};
- serverAddress.sun_family = AF_UNIX;
-
- if (pIpcName != nullptr)
- {
- int chars = snprintf(serverAddress.sun_path, sizeof(serverAddress.sun_path), "%s", pIpcName);
- _ASSERTE(chars > 0 && (unsigned int)chars < sizeof(serverAddress.sun_path));
- }
- else
- {
- // generate the default socket name in TMP Path
- const ProcessDescriptor pd = ProcessDescriptor::FromCurrentProcess();
- PAL_GetTransportName(
- sizeof(serverAddress.sun_path),
- serverAddress.sun_path,
- "dotnet-diagnostic",
- pd.m_Pid,
- pd.m_ApplicationGroupId,
- "socket");
- }
-
- if (mode == ConnectionMode::CONNECT)
- return new IpcStream::DiagnosticsIpc(-1, &serverAddress, ConnectionMode::CONNECT);
-
-#if defined(__APPLE__) || defined(__FreeBSD__)
- mode_t prev_mask = umask(~(S_IRUSR | S_IWUSR)); // This will set the default permission bit to 600
-#endif // __APPLE__
-
- const int serverSocket = ::socket(AF_UNIX, SOCK_STREAM, 0);
- if (serverSocket == -1)
- {
- if (callback != nullptr)
- callback(strerror(errno), errno);
-#if defined(__APPLE__) || defined(__FreeBSD__)
- umask(prev_mask);
-#endif // __APPLE__
- _ASSERTE(!"Failed to create diagnostics IPC socket.");
- return nullptr;
- }
-
-#if !(defined(__APPLE__) || defined(__FreeBSD__))
- if (fchmod(serverSocket, S_IRUSR | S_IWUSR) == -1)
- {
- if (callback != nullptr)
- callback(strerror(errno), errno);
- _ASSERTE(!"Failed to set permissions on diagnostics IPC socket.");
- return nullptr;
- }
-#endif // __APPLE__
-
- const int fSuccessBind = ::bind(serverSocket, (sockaddr *)&serverAddress, sizeof(serverAddress));
- if (fSuccessBind == -1)
- {
- if (callback != nullptr)
- callback(strerror(errno), errno);
- _ASSERTE(fSuccessBind != -1);
-
- const int fSuccessClose = ::close(serverSocket);
- _ASSERTE(fSuccessClose != -1);
-
-#if defined(__APPLE__) || defined(__FreeBSD__)
- umask(prev_mask);
-#endif // __APPLE__
-
- return nullptr;
- }
-
-#if defined(__APPLE__) || defined(__FreeBSD__)
- umask(prev_mask);
-#endif // __APPLE__
-
- return new IpcStream::DiagnosticsIpc(serverSocket, &serverAddress, mode);
-}
-
-bool IpcStream::DiagnosticsIpc::Listen(ErrorCallback callback)
-{
- _ASSERTE(mode == ConnectionMode::LISTEN);
- if (mode != ConnectionMode::LISTEN)
- {
- if (callback != nullptr)
- callback("Cannot call Listen on a client connection", -1);
- return false;
- }
-
- if (_isListening)
- return true;
-
- const int fSuccessfulListen = ::listen(_serverSocket, /* backlog */ 255);
- if (fSuccessfulListen == -1)
- {
- if (callback != nullptr)
- callback(strerror(errno), errno);
- _ASSERTE(fSuccessfulListen != -1);
-
- const int fSuccessUnlink = ::unlink(_pServerAddress->sun_path);
- _ASSERTE(fSuccessUnlink != -1);
-
- const int fSuccessClose = ::close(_serverSocket);
- _ASSERTE(fSuccessClose != -1);
- return false;
- }
- else
- {
- _isListening = true;
- return true;
- }
-}
-
-IpcStream *IpcStream::DiagnosticsIpc::Accept(ErrorCallback callback)
-{
- _ASSERTE(mode == ConnectionMode::LISTEN);
- _ASSERTE(_isListening);
-
- sockaddr_un from;
- socklen_t fromlen = sizeof(from);
- const int clientSocket = ::accept(_serverSocket, (sockaddr *)&from, &fromlen);
- if (clientSocket == -1)
- {
- if (callback != nullptr)
- callback(strerror(errno), errno);
- return nullptr;
- }
-
- return new IpcStream(clientSocket, mode);
-}
-
-IpcStream *IpcStream::DiagnosticsIpc::Connect(ErrorCallback callback)
-{
- _ASSERTE(mode == ConnectionMode::CONNECT);
-
- sockaddr_un clientAddress{};
- clientAddress.sun_family = AF_UNIX;
- const int clientSocket = ::socket(AF_UNIX, SOCK_STREAM, 0);
- if (clientSocket == -1)
- {
- if (callback != nullptr)
- callback(strerror(errno), errno);
- return nullptr;
- }
-
- // We don't expect this to block since this is a Unix Domain Socket. `connect` may block until the
- // TCP handshake is complete for TCP/IP sockets, but UDS don't use TCP. `connect` will return even if
- // the server hasn't called `accept`.
- if (::connect(clientSocket, (struct sockaddr *)_pServerAddress, sizeof(*_pServerAddress)) < 0)
- {
- if (callback != nullptr)
- callback(strerror(errno), errno);
-
- const bool fCloseSuccess = ::close(clientSocket) == 0;
- if (!fCloseSuccess && callback != nullptr)
- callback(strerror(errno), errno);
- return nullptr;
- }
-
- return new IpcStream(clientSocket, ConnectionMode::CONNECT);
-}
-
-int32_t IpcStream::DiagnosticsIpc::Poll(IpcPollHandle *rgIpcPollHandles, uint32_t nHandles, int32_t timeoutMs, ErrorCallback callback)
-{
- // prepare the pollfd structs
- pollfd *pollfds = new pollfd[nHandles];
- for (uint32_t i = 0; i < nHandles; i++)
- {
- rgIpcPollHandles[i].revents = 0; // ignore any values in revents
- int fd = -1;
- if (rgIpcPollHandles[i].pIpc != nullptr)
- {
- // SERVER
- _ASSERTE(rgIpcPollHandles[i].pIpc->mode == ConnectionMode::LISTEN);
- fd = rgIpcPollHandles[i].pIpc->_serverSocket;
- }
- else
- {
- // CLIENT
- _ASSERTE(rgIpcPollHandles[i].pStream != nullptr);
- fd = rgIpcPollHandles[i].pStream->_clientSocket;
- }
-
- pollfds[i].fd = fd;
- pollfds[i].events = POLLIN;
- }
-
- int retval = poll(pollfds, nHandles, timeoutMs);
-
- // Check results
- if (retval < 0)
- {
- // If poll() returns with an error, including one due to an interrupted call, the fds
- // array will be unmodified and the global variable errno will be set to indicate the error.
- // - POLL(2)
- if (callback != nullptr)
- callback(strerror(errno), errno);
- delete[] pollfds;
- return -1;
- }
- else if (retval == 0)
- {
- // we timed out
- delete[] pollfds;
- return 0;
- }
-
- for (uint32_t i = 0; i < nHandles; i++)
- {
- if (pollfds[i].revents != 0)
- {
- if (callback != nullptr)
- callback("IpcStream::DiagnosticsIpc::Poll - poll revents", (uint32_t)pollfds[i].revents);
- // error check FIRST
- if (pollfds[i].revents & POLLHUP)
- {
- // check for hangup first because a closed socket
- // will technically meet the requirements for POLLIN
- // i.e., a call to recv/read won't block
- rgIpcPollHandles[i].revents = (uint8_t)PollEvents::HANGUP;
- }
- else if ((pollfds[i].revents & (POLLERR|POLLNVAL)))
- {
- if (callback != nullptr)
- callback("Poll error", (uint32_t)pollfds[i].revents);
- rgIpcPollHandles[i].revents = (uint8_t)PollEvents::ERR;
- }
- else if (pollfds[i].revents & (POLLIN|POLLPRI))
- {
- rgIpcPollHandles[i].revents = (uint8_t)PollEvents::SIGNALED;
- }
- else
- {
- rgIpcPollHandles[i].revents = (uint8_t)PollEvents::UNKNOWN;
- if (callback != nullptr)
- callback("unknown poll response", (uint32_t)pollfds[i].revents);
- }
- }
- }
-
- delete[] pollfds;
- return 1;
-}
-
-void IpcStream::DiagnosticsIpc::Close(bool isShutdown, ErrorCallback callback)
-{
- if (_isClosed)
- return;
- _isClosed = true;
-
- if (_serverSocket != -1)
- {
- // only close the socket if not shutting down, let the OS handle it in that case
- if (!isShutdown && ::close(_serverSocket) == -1)
- {
- if (callback != nullptr)
- callback(strerror(errno), errno);
- _ASSERTE(!"Failed to close unix domain socket.");
- }
-
- // N.B. - it is safe to unlink the unix domain socket file while the server
- // is still alive:
- // "The usual UNIX close-behind semantics apply; the socket can be unlinked
- // at any time and will be finally removed from the file system when the last
- // reference to it is closed." - unix(7) man page
- Unlink(callback);
- }
-}
-
-// This helps remove the socket from the filesystem when the runtime exits.
-// See: http://man7.org/linux/man-pages/man7/unix.7.html#NOTES
-void IpcStream::DiagnosticsIpc::Unlink(ErrorCallback callback)
-{
- const int fSuccessUnlink = ::unlink(_pServerAddress->sun_path);
- if (fSuccessUnlink == -1)
- {
- if (callback != nullptr)
- callback(strerror(errno), errno);
- _ASSERTE(!"Failed to unlink server address.");
- }
-}
-
-IpcStream::~IpcStream()
-{
- Close();
-}
-
-void IpcStream::Close(ErrorCallback)
-{
- if (_clientSocket != -1)
- {
- Flush();
-
- const int fSuccessClose = ::close(_clientSocket);
- _ASSERTE(fSuccessClose != -1);
- _clientSocket = -1;
- }
-}
-
-bool IpcStream::Read(void *lpBuffer, const uint32_t nBytesToRead, uint32_t &nBytesRead, const int32_t timeoutMs)
-{
- _ASSERTE(lpBuffer != nullptr);
-
- if (timeoutMs != InfiniteTimeout)
- {
- pollfd pfd;
- pfd.fd = _clientSocket;
- pfd.events = POLLIN;
- int retval = poll(&pfd, 1, timeoutMs);
- if (retval <= 0 || !(pfd.revents & POLLIN))
- {
- // timeout or error
- return false;
- }
- // else fallthrough
- }
-
- uint8_t *lpBufferCursor = (uint8_t*)lpBuffer;
- ssize_t currentBytesRead = 0;
- ssize_t totalBytesRead = 0;
- bool fSuccess = true;
- while (fSuccess && nBytesToRead - totalBytesRead > 0)
- {
- currentBytesRead = ::recv(_clientSocket, lpBufferCursor, nBytesToRead - totalBytesRead, 0);
- fSuccess = currentBytesRead != 0;
- if (!fSuccess)
- break;
- totalBytesRead += currentBytesRead;
- lpBufferCursor += currentBytesRead;
- }
-
- if (!fSuccess)
- {
- // TODO: Add error handling.
- }
-
- nBytesRead = static_cast<uint32_t>(totalBytesRead);
- return fSuccess;
-}
-
-bool IpcStream::Write(const void *lpBuffer, const uint32_t nBytesToWrite, uint32_t &nBytesWritten, const int32_t timeoutMs)
-{
- _ASSERTE(lpBuffer != nullptr);
-
- if (timeoutMs != InfiniteTimeout)
- {
- pollfd pfd;
- pfd.fd = _clientSocket;
- pfd.events = POLLOUT;
- int retval = poll(&pfd, 1, timeoutMs);
- if (retval <= 0 || !(pfd.revents & POLLOUT))
- {
- // timeout or error
- return false;
- }
- // else fallthrough
- }
-
- uint8_t *lpBufferCursor = (uint8_t*)lpBuffer;
- ssize_t currentBytesWritten = 0;
- ssize_t totalBytesWritten = 0;
- bool fSuccess = true;
- while (fSuccess && nBytesToWrite - totalBytesWritten > 0)
- {
- currentBytesWritten = ::send(_clientSocket, lpBufferCursor, nBytesToWrite - totalBytesWritten, 0);
- fSuccess = currentBytesWritten != -1;
- if (!fSuccess)
- break;
- lpBufferCursor += currentBytesWritten;
- totalBytesWritten += currentBytesWritten;
- }
-
- if (!fSuccess)
- {
- // TODO: Add error handling.
- }
-
- nBytesWritten = static_cast<uint32_t>(totalBytesWritten);
- return fSuccess;
-}
-
-bool IpcStream::Flush() const
-{
- // fsync - http://man7.org/linux/man-pages/man2/fsync.2.html ???
- return true;
-}
diff --git a/src/coreclr/debug/debug-pal/win/diagnosticsipc.cpp b/src/coreclr/debug/debug-pal/win/diagnosticsipc.cpp
deleted file mode 100644
index fe7828daf78..00000000000
--- a/src/coreclr/debug/debug-pal/win/diagnosticsipc.cpp
+++ /dev/null
@@ -1,548 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include "diagnosticsipc.h"
-
-#define _ASSERTE assert
-
-IpcStream::DiagnosticsIpc::DiagnosticsIpc(const char(&namedPipeName)[MaxNamedPipeNameLength], ConnectionMode mode) :
- mode(mode),
- _isListening(false)
-{
- memcpy(_pNamedPipeName, namedPipeName, sizeof(_pNamedPipeName));
- memset(&_oOverlap, 0, sizeof(OVERLAPPED));
-}
-
-IpcStream::DiagnosticsIpc::~DiagnosticsIpc()
-{
- Close();
-}
-
-IpcStream::DiagnosticsIpc *IpcStream::DiagnosticsIpc::Create(const char *const pIpcName, ConnectionMode mode, ErrorCallback callback)
-{
- char namedPipeName[MaxNamedPipeNameLength]{};
- int nCharactersWritten = -1;
-
- if (pIpcName != nullptr)
- {
- nCharactersWritten = sprintf_s(
- namedPipeName,
- sizeof(namedPipeName),
- "\\\\.\\pipe\\%s",
- pIpcName);
- }
- else
- {
- nCharactersWritten = sprintf_s(
- namedPipeName,
- sizeof(namedPipeName),
- "\\\\.\\pipe\\dotnet-diagnostic-%d",
- ::GetCurrentProcessId());
- }
-
- if (nCharactersWritten == -1)
- {
- if (callback != nullptr)
- callback("Failed to generate the named pipe name", nCharactersWritten);
- _ASSERTE(nCharactersWritten != -1);
- return nullptr;
- }
-
- return new IpcStream::DiagnosticsIpc(namedPipeName, mode);
-}
-
-bool IpcStream::DiagnosticsIpc::Listen(ErrorCallback callback)
-{
- _ASSERTE(mode == ConnectionMode::LISTEN);
- if (mode != ConnectionMode::LISTEN)
- {
- if (callback != nullptr)
- callback("Cannot call Listen on a client connection", -1);
- return false;
- }
-
- if (_isListening)
- return true;
-
- const uint32_t nInBufferSize = 16 * 1024;
- const uint32_t nOutBufferSize = 16 * 1024;
- _hPipe = ::CreateNamedPipeA(
- _pNamedPipeName, // pipe name
- PIPE_ACCESS_DUPLEX | // read/write access
- FILE_FLAG_OVERLAPPED, // async listening
- PIPE_TYPE_BYTE | PIPE_WAIT | PIPE_REJECT_REMOTE_CLIENTS, // message type pipe, message-read and blocking mode
- PIPE_UNLIMITED_INSTANCES, // max. instances
- nOutBufferSize, // output buffer size
- nInBufferSize, // input buffer size
- 0, // default client time-out
- NULL); // default security attribute
-
- if (_hPipe == INVALID_HANDLE_VALUE)
- {
- if (callback != nullptr)
- callback("Failed to create an instance of a named pipe.", ::GetLastError());
- return false;
- }
-
- HANDLE hOverlapEvent = CreateEvent(NULL, true, false, NULL);
- if (hOverlapEvent == NULL)
- {
- if (callback != nullptr)
- callback("Failed to create overlap event", ::GetLastError());
- ::CloseHandle(_hPipe);
- _hPipe = INVALID_HANDLE_VALUE;
- return false;
- }
- _oOverlap.hEvent = hOverlapEvent;
-
- BOOL fSuccess = ::ConnectNamedPipe(_hPipe, &_oOverlap) != 0;
- if (!fSuccess)
- {
- const DWORD errorCode = ::GetLastError();
- switch (errorCode)
- {
- case ERROR_IO_PENDING:
- // There was a pending connection that can be waited on (will happen in poll)
- case ERROR_PIPE_CONNECTED:
- // Occurs when a client connects before the function is called.
- // In this case, there is a connection between client and
- // server, even though the function returned zero.
- break;
-
- default:
- if (callback != nullptr)
- callback("A client process failed to connect.", errorCode);
- ::CloseHandle(_hPipe);
- _hPipe = INVALID_HANDLE_VALUE;
- ::CloseHandle(_oOverlap.hEvent);
- _oOverlap.hEvent = INVALID_HANDLE_VALUE;
- memset(&_oOverlap, 0, sizeof(OVERLAPPED)); // clear the overlapped objects state
- return false;
- }
- }
-
- _isListening = true;
- return true;
-}
-
-IpcStream *IpcStream::DiagnosticsIpc::Accept(ErrorCallback callback)
-{
- _ASSERTE(_isListening);
- _ASSERTE(mode == ConnectionMode::LISTEN);
-
- DWORD dwDummy = 0;
- IpcStream *pStream = nullptr;
- bool fSuccess = GetOverlappedResult(
- _hPipe, // handle
- &_oOverlap, // overlapped
- &dwDummy, // throw-away dword
- true); // wait till event signals
-
- if (!fSuccess)
- {
- if (callback != nullptr)
- callback("Failed to GetOverlappedResults for NamedPipe server", ::GetLastError());
- // close the pipe (cleaned up and reset below)
- ::CloseHandle(_hPipe);
- }
- else
- {
- // create new IpcStream using handle (passes ownership to pStream)
- pStream = new IpcStream(_hPipe, ConnectionMode::LISTEN);
- }
-
- // reset the server
- _hPipe = INVALID_HANDLE_VALUE;
- _isListening = false;
- ::CloseHandle(_oOverlap.hEvent);
- memset(&_oOverlap, 0, sizeof(OVERLAPPED)); // clear the overlapped objects state
- fSuccess = Listen(callback);
- if (!fSuccess)
- {
- delete pStream;
- pStream = nullptr;
- }
-
- return pStream;
-}
-
-IpcStream *IpcStream::DiagnosticsIpc::Connect(ErrorCallback callback)
-{
- _ASSERTE(mode == ConnectionMode::CONNECT);
- if (mode != ConnectionMode::CONNECT)
- {
- if (callback != nullptr)
- callback("Cannot call connect on a server connection", 0);
- return nullptr;
- }
-
- HANDLE hPipe = ::CreateFileA(
- _pNamedPipeName, // pipe name
- PIPE_ACCESS_DUPLEX, // read/write access
- 0, // no sharing
- NULL, // default security attributes
- OPEN_EXISTING, // opens existing pipe
- FILE_FLAG_OVERLAPPED, // Overlapped
- NULL); // no template file
-
- if (hPipe == INVALID_HANDLE_VALUE)
- {
- if (callback != nullptr)
- callback("Failed to connect to named pipe.", ::GetLastError());
- return nullptr;
- }
-
- return new IpcStream(hPipe, mode);
-}
-
-void IpcStream::DiagnosticsIpc::Close(bool isShutdown, ErrorCallback callback)
-{
- // don't attempt cleanup on shutdown and let the OS handle it
- if (isShutdown)
- {
- if (callback != nullptr)
- callback("Closing without cleaning underlying handles", 100);
- return;
- }
-
- if (_hPipe != INVALID_HANDLE_VALUE)
- {
- if (mode == DiagnosticsIpc::ConnectionMode::LISTEN)
- {
- const BOOL fSuccessDisconnectNamedPipe = ::DisconnectNamedPipe(_hPipe);
- _ASSERTE(fSuccessDisconnectNamedPipe != 0);
- if (fSuccessDisconnectNamedPipe != 0 && callback != nullptr)
- callback("Failed to disconnect NamedPipe", ::GetLastError());
- }
-
- const BOOL fSuccessCloseHandle = ::CloseHandle(_hPipe);
- _ASSERTE(fSuccessCloseHandle != 0);
- if (fSuccessCloseHandle != 0 && callback != nullptr)
- callback("Failed to close pipe handle", ::GetLastError());
- }
-
- if (_oOverlap.hEvent != INVALID_HANDLE_VALUE)
- {
- const BOOL fSuccessCloseEvent = ::CloseHandle(_oOverlap.hEvent);
- _ASSERTE(fSuccessCloseEvent != 0);
- if (fSuccessCloseEvent != 0 && callback != nullptr)
- callback("Failed to close overlap event handle", ::GetLastError());
- }
-}
-
-IpcStream::IpcStream(HANDLE hPipe, DiagnosticsIpc::ConnectionMode mode) :
- _hPipe(hPipe),
- _mode(mode)
-{
- memset(&_oOverlap, 0, sizeof(OVERLAPPED));
- _oOverlap.hEvent = CreateEvent(NULL, true, false, NULL);
-}
-
-IpcStream::~IpcStream()
-{
- Close();
-}
-
-void IpcStream::Close(ErrorCallback callback)
-{
- if (_hPipe != INVALID_HANDLE_VALUE)
- {
- Flush();
-
- if (_mode == DiagnosticsIpc::ConnectionMode::LISTEN)
- {
- const BOOL fSuccessDisconnectNamedPipe = ::DisconnectNamedPipe(_hPipe);
- _ASSERTE(fSuccessDisconnectNamedPipe != 0);
- if (fSuccessDisconnectNamedPipe != 0 && callback != nullptr)
- callback("Failed to disconnect NamedPipe", ::GetLastError());
- }
-
- const BOOL fSuccessCloseHandle = ::CloseHandle(_hPipe);
- _ASSERTE(fSuccessCloseHandle != 0);
- if (fSuccessCloseHandle != 0 && callback != nullptr)
- callback("Failed to close pipe handle", ::GetLastError());
- }
-
- if (_oOverlap.hEvent != INVALID_HANDLE_VALUE)
- {
- const BOOL fSuccessCloseEvent = ::CloseHandle(_oOverlap.hEvent);
- _ASSERTE(fSuccessCloseEvent != 0);
- if (fSuccessCloseEvent != 0 && callback != nullptr)
- callback("Failed to close overlapped event handle", ::GetLastError());
- }
-}
-
-int32_t IpcStream::DiagnosticsIpc::Poll(IpcPollHandle *rgIpcPollHandles, uint32_t nHandles, int32_t timeoutMs, ErrorCallback callback)
-{
- // load up an array of handles
- HANDLE *pHandles = new HANDLE[nHandles];
- for (uint32_t i = 0; i < nHandles; i++)
- {
- rgIpcPollHandles[i].revents = 0; // ignore any inputs on revents
- if (rgIpcPollHandles[i].pIpc != nullptr)
- {
- // SERVER
- _ASSERTE(rgIpcPollHandles[i].pIpc->mode == DiagnosticsIpc::ConnectionMode::LISTEN);
- pHandles[i] = rgIpcPollHandles[i].pIpc->_oOverlap.hEvent;
- }
- else
- {
- // CLIENT
- bool fSuccess = false;
- DWORD dwDummy = 0;
- if (!rgIpcPollHandles[i].pStream->_isTestReading)
- {
- // check for data by doing an asynchronous 0 byte read.
- // This will signal if the pipe closes (hangup) or the server
- // sends new data
- fSuccess = ::ReadFile(
- rgIpcPollHandles[i].pStream->_hPipe, // handle
- nullptr, // null buffer
- 0, // read 0 bytes
- &dwDummy, // dummy variable
- &rgIpcPollHandles[i].pStream->_oOverlap); // overlap object to use
- rgIpcPollHandles[i].pStream->_isTestReading = true;
- if (!fSuccess)
- {
- DWORD error = ::GetLastError();
- switch (error)
- {
- case ERROR_IO_PENDING:
- pHandles[i] = rgIpcPollHandles[i].pStream->_oOverlap.hEvent;
- break;
- case ERROR_PIPE_NOT_CONNECTED:
- // hangup
- rgIpcPollHandles[i].revents = (uint8_t)PollEvents::HANGUP;
- delete[] pHandles;
- return -1;
- default:
- if (callback != nullptr)
- callback("0 byte async read on client connection failed", error);
- delete[] pHandles;
- return -1;
- }
- }
- else
- {
- // there's already data to be read
- pHandles[i] = rgIpcPollHandles[i].pStream->_oOverlap.hEvent;
- }
- }
- else
- {
- pHandles[i] = rgIpcPollHandles[i].pStream->_oOverlap.hEvent;
- }
- }
- }
-
- // call wait for multiple obj
- DWORD dwWait = WaitForMultipleObjects(
- nHandles, // count
- pHandles, // handles
- false, // Don't wait-all
- timeoutMs);
-
- if (dwWait == WAIT_TIMEOUT)
- {
- // we timed out
- delete[] pHandles;
- return 0;
- }
-
- if (dwWait == WAIT_FAILED)
- {
- // we errored
- if (callback != nullptr)
- callback("WaitForMultipleObjects failed", ::GetLastError());
- delete[] pHandles;
- return -1;
- }
-
- // determine which of the streams signaled
- DWORD index = dwWait - WAIT_OBJECT_0;
- // error check the index
- if (index < 0 || index > (nHandles - 1))
- {
- // check if we abandoned something
- DWORD abandonedIndex = dwWait - WAIT_ABANDONED_0;
- if (abandonedIndex > 0 || abandonedIndex < (nHandles - 1))
- {
- rgIpcPollHandles[abandonedIndex].revents = (uint8_t)IpcStream::DiagnosticsIpc::PollEvents::HANGUP;
- delete[] pHandles;
- return -1;
- }
- else
- {
- if (callback != nullptr)
- callback("WaitForMultipleObjects failed", ::GetLastError());
- delete[] pHandles;
- return -1;
- }
- }
-
- // Set revents depending on what signaled the stream
- if (rgIpcPollHandles[index].pIpc == nullptr)
- {
- // CLIENT
- // check if the connection got hung up
- DWORD dwDummy = 0;
- bool fSuccess = GetOverlappedResult(rgIpcPollHandles[index].pStream->_hPipe,
- &rgIpcPollHandles[index].pStream->_oOverlap,
- &dwDummy,
- true);
- rgIpcPollHandles[index].pStream->_isTestReading = false;
- if (!fSuccess)
- {
- DWORD error = ::GetLastError();
- if (error == ERROR_PIPE_NOT_CONNECTED || error == ERROR_BROKEN_PIPE)
- rgIpcPollHandles[index].revents = (uint8_t)IpcStream::DiagnosticsIpc::PollEvents::HANGUP;
- else
- {
- if (callback != nullptr)
- callback("Client connection error", error);
- rgIpcPollHandles[index].revents = (uint8_t)IpcStream::DiagnosticsIpc::PollEvents::ERR;
- delete[] pHandles;
- return -1;
- }
- }
- else
- {
- rgIpcPollHandles[index].revents = (uint8_t)IpcStream::DiagnosticsIpc::PollEvents::SIGNALED;
- }
- }
- else
- {
- // SERVER
- rgIpcPollHandles[index].revents = (uint8_t)IpcStream::DiagnosticsIpc::PollEvents::SIGNALED;
- }
-
- delete[] pHandles;
- return 1;
-}
-
-bool IpcStream::Read(void *lpBuffer, const uint32_t nBytesToRead, uint32_t &nBytesRead, const int32_t timeoutMs)
-{
- _ASSERTE(lpBuffer != nullptr);
-
- DWORD nNumberOfBytesRead = 0;
- LPOVERLAPPED overlap = &_oOverlap;
- bool fSuccess = ::ReadFile(
- _hPipe, // handle to pipe
- lpBuffer, // buffer to receive data
- nBytesToRead, // size of buffer
- &nNumberOfBytesRead, // number of bytes read
- overlap) != 0; // overlapped I/O
-
- if (!fSuccess)
- {
- DWORD dwError = GetLastError();
-
- // if we're waiting infinitely, only make one syscall
- if (timeoutMs == InfiniteTimeout && dwError == ERROR_IO_PENDING)
- {
- fSuccess = GetOverlappedResult(_hPipe, // pipe
- overlap, // overlapped
- &nNumberOfBytesRead, // out actual number of bytes read
- true) != 0; // block until async IO completes
- }
- else if (dwError == ERROR_IO_PENDING)
- {
- // Wait on overlapped IO event (triggers when async IO is complete regardless of success)
- // or timeout
- DWORD dwWait = WaitForSingleObject(_oOverlap.hEvent, (DWORD)timeoutMs);
- if (dwWait == WAIT_OBJECT_0)
- {
- // async IO compelted, get the result
- fSuccess = GetOverlappedResult(_hPipe, // pipe
- overlap, // overlapped
- &nNumberOfBytesRead, // out actual number of bytes read
- true) != 0; // block until async IO completes
- }
- else
- {
- // We either timed out or something else went wrong.
- // For any error, attempt to cancel IO and ensure the cancel happened
- if (CancelIoEx(_hPipe, overlap) != 0)
- {
- // check if the async write beat the cancellation
- fSuccess = GetOverlappedResult(_hPipe, overlap, &nNumberOfBytesRead, true) != 0;
- // Failure here isn't recoverable, so return as such
- }
- }
- }
- // error is unrecoverable, so return as such
- }
-
- nBytesRead = static_cast<uint32_t>(nNumberOfBytesRead);
- return fSuccess;
-}
-
-bool IpcStream::Write(const void *lpBuffer, const uint32_t nBytesToWrite, uint32_t &nBytesWritten, const int32_t timeoutMs)
-{
- _ASSERTE(lpBuffer != nullptr);
-
- DWORD nNumberOfBytesWritten = 0;
- LPOVERLAPPED overlap = &_oOverlap;
- bool fSuccess = ::WriteFile(
- _hPipe, // handle to pipe
- lpBuffer, // buffer to write from
- nBytesToWrite, // number of bytes to write
- &nNumberOfBytesWritten, // number of bytes written
- overlap) != 0; // overlapped I/O
-
- if (!fSuccess)
- {
- DWORD dwError = GetLastError();
-
- // if we're waiting infinitely, only make one syscall
- if (timeoutMs == InfiniteTimeout && dwError == ERROR_IO_PENDING)
- {
- fSuccess = GetOverlappedResult(_hPipe, // pipe
- overlap, // overlapped
- &nNumberOfBytesWritten, // out actual number of bytes written
- true) != 0; // block until async IO completes
- }
- else if (dwError == ERROR_IO_PENDING)
- {
- // Wait on overlapped IO event (triggers when async IO is complete regardless of success)
- // or timeout
- DWORD dwWait = WaitForSingleObject(_oOverlap.hEvent, (DWORD)timeoutMs);
- if (dwWait == WAIT_OBJECT_0)
- {
- // async IO compelted, get the result
- fSuccess = GetOverlappedResult(_hPipe, // pipe
- overlap, // overlapped
- &nNumberOfBytesWritten, // out actual number of bytes written
- true) != 0; // block until async IO completes
- }
- else
- {
- // We either timed out or something else went wrong.
- // For any error, attempt to cancel IO and ensure the cancel happened
- if (CancelIoEx(_hPipe, overlap) != 0)
- {
- // check if the async write beat the cancellation
- fSuccess = GetOverlappedResult(_hPipe, overlap, &nNumberOfBytesWritten, true) != 0;
- // Failure here isn't recoverable, so return as such
- }
- }
- }
- // error is unrecoverable, so return as such
- }
-
- nBytesWritten = static_cast<uint32_t>(nNumberOfBytesWritten);
- return fSuccess;
-}
-
-bool IpcStream::Flush() const
-{
- const bool fSuccess = ::FlushFileBuffers(_hPipe) != 0;
- if (!fSuccess)
- {
- // TODO: Add error handling.
- }
- return fSuccess;
-}
diff --git a/src/coreclr/debug/ee/rcthread.cpp b/src/coreclr/debug/ee/rcthread.cpp
index 23a61151de4..e7aa9f2b067 100644
--- a/src/coreclr/debug/ee/rcthread.cpp
+++ b/src/coreclr/debug/ee/rcthread.cpp
@@ -1311,6 +1311,11 @@ LExit:
DebuggerRCThread* t = (DebuggerRCThread*)g_pRCThread;
+ if (FAILED(SetThreadName(t->m_thread, W(".NET Debugger"))))
+ {
+ LOG((LF_CORDB, LL_INFO10000, "DebuggerRCThread name set failed\n"));
+ }
+
t->ThreadProc(); // this thread is local, go and become the helper
return 0;
@@ -1366,7 +1371,6 @@ HRESULT DebuggerRCThread::Start(void)
{
LOG((LF_CORDB, LL_EVERYTHING, "DebuggerRCThread failed, err=%d\n", GetLastError()));
hr = HRESULT_FROM_GetLastError();
-
}
else
{
diff --git a/src/coreclr/debug/inc/diagnosticsipc.h b/src/coreclr/debug/inc/diagnosticsipc.h
deleted file mode 100644
index 49f1dd74991..00000000000
--- a/src/coreclr/debug/inc/diagnosticsipc.h
+++ /dev/null
@@ -1,149 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-#ifndef __DIAGNOSTICS_IPC_H__
-#define __DIAGNOSTICS_IPC_H__
-
-#include <stdint.h>
-
-#ifdef TARGET_UNIX
- struct sockaddr_un;
-#else
- #include <Windows.h>
-#endif /* TARGET_UNIX */
-
-typedef void (*ErrorCallback)(const char *szMessage, uint32_t code);
-
-class IpcStream final
-{
- friend class IpcStreamFactory;
-public:
- static constexpr int32_t InfiniteTimeout = -1;
- ~IpcStream();
- bool Read(void *lpBuffer, const uint32_t nBytesToRead, uint32_t &nBytesRead, const int32_t timeoutMs = IpcStream::InfiniteTimeout);
- bool Write(const void *lpBuffer, const uint32_t nBytesToWrite, uint32_t &nBytesWritten, const int32_t timeoutMs = IpcStream::InfiniteTimeout);
- bool Flush() const;
- void Close(ErrorCallback callback = nullptr);
-
- class DiagnosticsIpc final
- {
- friend class IpcStreamFactory;
- public:
- enum ConnectionMode
- {
- CONNECT,
- LISTEN
- };
-
- enum class PollEvents : uint8_t
- {
- NONE = 0x00, // no events
- SIGNALED = 0x01, // ready for use
- HANGUP = 0x02, // connection remotely closed
- ERR = 0x04, // error
- UNKNOWN = 0x80 // unknown state
- };
-
- // The bookkeeping struct used for polling on server and client structs
- struct IpcPollHandle
- {
- // Only one of these will be non-null, treat as a union
- DiagnosticsIpc *pIpc;
- IpcStream *pStream;
-
- // contains some set of PollEvents
- // will be set by Poll
- // Any values here are ignored by Poll
- uint8_t revents;
-
- // a cookie assignable by upstream users for additional bookkeeping
- void *pUserData;
- };
-
- // Poll
- // Parameters:
- // - IpcPollHandle * rgpIpcPollHandles: Array of IpcPollHandles to poll
- // - uint32_t nHandles: The number of handles to poll
- // - int32_t timeoutMs: The timeout in milliseconds for the poll (-1 == infinite)
- // Returns:
- // int32_t: -1 on error, 0 on timeout, >0 on successful poll
- // Remarks:
- // Check the events returned in revents for each IpcPollHandle to find the signaled handle.
- // Signaled DiagnosticsIpcs can call Accept() without blocking.
- // Signaled IpcStreams can call Read(...) without blocking.
- // The caller is responsible for cleaning up "hung up" connections.
- static int32_t Poll(IpcPollHandle *rgIpcPollHandles, uint32_t nHandles, int32_t timeoutMs, ErrorCallback callback = nullptr);
-
- ConnectionMode mode;
-
- ~DiagnosticsIpc();
-
- // Creates an IPC object
- static DiagnosticsIpc *Create(const char *const pIpcName, ConnectionMode mode, ErrorCallback callback = nullptr);
-
- // puts the DiagnosticsIpc into Listening Mode
- // Re-entrant safe
- bool Listen(ErrorCallback callback = nullptr);
-
- // produces a connected stream from a server-mode DiagnosticsIpc. Blocks until a connection is available.
- IpcStream *Accept(ErrorCallback callback = nullptr);
-
- // Connect to a server and returns a connected stream
- IpcStream *Connect(ErrorCallback callback = nullptr);
-
- // Closes an open IPC.
- // Only attempts minimal cleanup if isShutdown==true, i.e., unlinks Unix Domain Socket on Linux, no-op on Windows
- void Close(bool isShutdown = false, ErrorCallback callback = nullptr);
-
- private:
-
-#ifdef TARGET_UNIX
- const int _serverSocket;
- sockaddr_un *const _pServerAddress;
- bool _isClosed;
-
- DiagnosticsIpc(const int serverSocket, sockaddr_un *const pServerAddress, ConnectionMode mode = ConnectionMode::LISTEN);
-
- // Used to unlink the socket so it can be removed from the filesystem
- // when the last reference to it is closed.
- void Unlink(ErrorCallback callback = nullptr);
-#else
- static const uint32_t MaxNamedPipeNameLength = 256;
- char _pNamedPipeName[MaxNamedPipeNameLength]; // https://docs.microsoft.com/en-us/windows/desktop/api/winbase/nf-winbase-createnamedpipea
- HANDLE _hPipe = INVALID_HANDLE_VALUE;
- OVERLAPPED _oOverlap = {};
-
- DiagnosticsIpc(const char(&namedPipeName)[MaxNamedPipeNameLength], ConnectionMode mode = ConnectionMode::LISTEN);
-#endif /* TARGET_UNIX */
-
- bool _isListening;
-
- DiagnosticsIpc() = delete;
- DiagnosticsIpc(const DiagnosticsIpc &src) = delete;
- DiagnosticsIpc(DiagnosticsIpc &&src) = delete;
- DiagnosticsIpc &operator=(const DiagnosticsIpc &rhs) = delete;
- DiagnosticsIpc &&operator=(DiagnosticsIpc &&rhs) = delete;
- };
-
-private:
-#ifdef TARGET_UNIX
- int _clientSocket = -1;
- IpcStream(int clientSocket, DiagnosticsIpc::ConnectionMode mode = DiagnosticsIpc::ConnectionMode::LISTEN)
- : _clientSocket(clientSocket), _mode(mode) {}
-#else
- HANDLE _hPipe = INVALID_HANDLE_VALUE;
- OVERLAPPED _oOverlap = {};
- BOOL _isTestReading = false; // used to check whether we are already doing a 0-byte read to test for data
- IpcStream(HANDLE hPipe, DiagnosticsIpc::ConnectionMode mode = DiagnosticsIpc::ConnectionMode::LISTEN);
-#endif /* TARGET_UNIX */
-
- DiagnosticsIpc::ConnectionMode _mode;
-
- IpcStream() = delete;
- IpcStream(const IpcStream &src) = delete;
- IpcStream(IpcStream &&src) = delete;
- IpcStream &operator=(const IpcStream &rhs) = delete;
- IpcStream &&operator=(IpcStream &&rhs) = delete;
-};
-
-#endif // __DIAGNOSTICS_IPC_H__
diff --git a/src/coreclr/debug/shared/dbgtransportsession.cpp b/src/coreclr/debug/shared/dbgtransportsession.cpp
index 259e45f42fa..b1b4cee2340 100644
--- a/src/coreclr/debug/shared/dbgtransportsession.cpp
+++ b/src/coreclr/debug/shared/dbgtransportsession.cpp
@@ -1227,6 +1227,8 @@ void DbgTransportSession::InitSessionState()
// instance method version defined below for convenience in the implementation.
DWORD WINAPI DbgTransportSession::TransportWorkerStatic(LPVOID pvContext)
{
+ SetThreadName(GetCurrentThread(), W(".NET DebugPipe"));
+
((DbgTransportSession*)pvContext)->TransportWorker();
// Nobody looks at this result, the choice of 0 is arbitrary.
diff --git a/src/coreclr/gc/env/gcenv.os.h b/src/coreclr/gc/env/gcenv.os.h
index 7fc655ebc5a..c38892b0cad 100644
--- a/src/coreclr/gc/env/gcenv.os.h
+++ b/src/coreclr/gc/env/gcenv.os.h
@@ -461,7 +461,7 @@ public:
// Get a time stamp with a low precision
// Return:
// Time stamp in milliseconds
- static uint32_t GetLowPrecisionTimeStamp();
+ static uint64_t GetLowPrecisionTimeStamp();
// Gets the total number of processors on the machine, not taking
// into account current process affinity.
diff --git a/src/coreclr/gc/env/volatile.h b/src/coreclr/gc/env/volatile.h
index 01e90c3a6d8..bef01f680e5 100644
--- a/src/coreclr/gc/env/volatile.h
+++ b/src/coreclr/gc/env/volatile.h
@@ -302,11 +302,9 @@ private:
public:
//
- // Default constructor. Results in an uninitialized value!
+ // Default constructor.
//
- inline Volatile()
- {
- }
+ inline Volatile() = default;
//
// Allow initialization of Volatile<T> from a T
diff --git a/src/coreclr/gc/gc.cpp b/src/coreclr/gc/gc.cpp
index 959b3b013d4..adccf6dd483 100644
--- a/src/coreclr/gc/gc.cpp
+++ b/src/coreclr/gc/gc.cpp
@@ -595,7 +595,7 @@ static unsigned int gc_count_during_log;
// In ms. This is how often we print out stats.
static const unsigned int log_interval = 5000;
// Time (in ms) when we start a new log interval.
-static unsigned int log_start_tick;
+static uint64_t log_start_tick;
static unsigned int gc_lock_contended;
static int64_t log_start_hires;
// Cycles accumulated in SuspendEE during log_interval.
@@ -629,7 +629,7 @@ process_sync_log_stats()
{
#ifdef SYNCHRONIZATION_STATS
- unsigned int log_elapsed = GCToOSInterface::GetLowPrecisionTimeStamp() - log_start_tick;
+ uint64_t log_elapsed = GCToOSInterface::GetLowPrecisionTimeStamp() - log_start_tick;
if (log_elapsed > log_interval)
{
@@ -766,7 +766,7 @@ class t_join
// remember join id and last thread to arrive so restart can use these
int thd;
// we want to print statistics every 10 seconds - this is to remember the start of the 10 sec interval
- uint32_t start_tick;
+ uint64_t start_tick;
// counters for joins, in 1000's of clock cycles
uint64_t elapsed_total[gc_join_max], wake_total[gc_join_max], seq_loss_total[gc_join_max], par_loss_total[gc_join_max], in_join_total[gc_join_max];
#endif //JOIN_STATS
@@ -2485,7 +2485,7 @@ uint64_t gc_heap::total_alloc_bytes_uoh = 0;
int gc_heap::gc_policy = 0;
-size_t gc_heap::allocation_running_time;
+uint64_t gc_heap::allocation_running_time;
size_t gc_heap::allocation_running_amount;
@@ -3172,7 +3172,8 @@ gc_heap::dt_high_frag_p (gc_tuning_point tp,
#ifndef MULTIPLE_HEAPS
if (gen_number == max_generation)
{
- float frag_ratio = (float)(dd_fragmentation (dynamic_data_of (max_generation))) / (float)generation_size (max_generation);
+ size_t maxgen_size = generation_size (max_generation);
+ float frag_ratio = (maxgen_size ? ((float)dd_fragmentation (dynamic_data_of (max_generation)) / (float)maxgen_size) : 0.0f);
if (frag_ratio > 0.65)
{
dprintf (GTC_LOG, ("g2 FR: %d%%", (int)(frag_ratio*100)));
@@ -3184,7 +3185,8 @@ gc_heap::dt_high_frag_p (gc_tuning_point tp,
ret = (fr > dd_fragmentation_limit(dd));
if (ret)
{
- fragmentation_burden = (float)fr / generation_size (gen_number);
+ size_t gen_size = generation_size (gen_number);
+ fragmentation_burden = (gen_size ? ((float)fr / (float)gen_size) : 0.0f);
ret = (fragmentation_burden > dd_v_fragmentation_burden_limit (dd));
}
dprintf (GTC_LOG, ("h%d: gen%d, frag is %Id, alloc effi: %d%%, unusable frag is %Id, ratio is %d",
@@ -6757,7 +6759,7 @@ void gc_heap::gc_thread_function ()
uint32_t wait_result = gc_heap::ee_suspend_event.Wait(gradual_decommit_in_progress_p ? DECOMMIT_TIME_STEP_MILLISECONDS : INFINITE, FALSE);
if (wait_result == WAIT_TIMEOUT)
{
- gradual_decommit_in_progress_p = decommit_step ();
+ gradual_decommit_in_progress_p = decommit_step (DECOMMIT_TIME_STEP_MILLISECONDS);
continue;
}
@@ -6850,7 +6852,7 @@ void gc_heap::gc_thread_function ()
// check if we should do some decommitting
if (gradual_decommit_in_progress_p)
{
- gradual_decommit_in_progress_p = decommit_step ();
+ gradual_decommit_in_progress_p = decommit_step (DECOMMIT_TIME_STEP_MILLISECONDS);
}
}
else
@@ -6933,7 +6935,7 @@ bool gc_heap::virtual_commit (void* address, size_t size, int bucket, int h_numb
if (!exceeded_p)
{
#if defined(_DEBUG) && defined(MULTIPLE_HEAPS)
- if (bucket < total_oh_count)
+ if ((h_number != -1) && (bucket < total_oh_count))
{
g_heaps[h_number]->committed_by_oh_per_heap[bucket] += size;
}
@@ -6967,7 +6969,7 @@ bool gc_heap::virtual_commit (void* address, size_t size, int bucket, int h_numb
check_commit_cs.Enter();
committed_by_oh[bucket] -= size;
#if defined(_DEBUG) && defined(MULTIPLE_HEAPS)
- if (bucket < total_oh_count)
+ if ((h_number != -1) && (bucket < total_oh_count))
{
assert (g_heaps[h_number]->committed_by_oh_per_heap[bucket] >= size);
g_heaps[h_number]->committed_by_oh_per_heap[bucket] -= size;
@@ -7003,7 +7005,7 @@ bool gc_heap::virtual_decommit (void* address, size_t size, int bucket, int h_nu
assert (committed_by_oh[bucket] >= size);
committed_by_oh[bucket] -= size;
#if defined(_DEBUG) && defined(MULTIPLE_HEAPS)
- if (bucket < total_oh_count)
+ if ((h_number != -1) && (bucket < total_oh_count))
{
assert (g_heaps[h_number]->committed_by_oh_per_heap[bucket] >= size);
g_heaps[h_number]->committed_by_oh_per_heap[bucket] -= size;
@@ -7598,7 +7600,7 @@ bool gc_heap::new_allocation_allowed (int gen_number)
if ((allocation_running_amount - dd_new_allocation (dd0)) >
dd_min_size (dd0))
{
- uint32_t ctime = GCToOSInterface::GetLowPrecisionTimeStamp();
+ uint64_t ctime = GCToOSInterface::GetLowPrecisionTimeStamp();
if ((ctime - allocation_running_time) > 1000)
{
dprintf (2, (">1s since last gen0 gc"));
@@ -12598,7 +12600,7 @@ void gc_heap::distribute_free_regions()
global_regions_to_decommit[kind].transfer_regions (&hp->free_regions[kind]);
}
}
- while (decommit_step())
+ while (decommit_step(DECOMMIT_TIME_STEP_MILLISECONDS))
{
}
#ifdef MULTIPLE_HEAPS
@@ -12642,6 +12644,7 @@ void gc_heap::distribute_free_regions()
size_t num_decommit_regions_by_time = 0;
size_t size_decommit_regions_by_time = 0;
size_t heap_budget_in_region_units[MAX_SUPPORTED_CPUS][kind_count];
+ size_t min_heap_budget_in_region_units[MAX_SUPPORTED_CPUS];
size_t region_size[kind_count] = { global_region_allocator.get_region_alignment(), global_region_allocator.get_large_region_alignment() };
region_free_list surplus_regions[kind_count];
for (int kind = basic_free_region; kind < kind_count; kind++)
@@ -12659,6 +12662,7 @@ void gc_heap::distribute_free_regions()
gc_heap* hp = pGenGCHeap;
// just to reduce the number of #ifdefs in the code below
const int i = 0;
+ const int n_heaps = 1;
#endif //MULTIPLE_HEAPS
for (int kind = basic_free_region; kind < kind_count; kind++)
@@ -12669,7 +12673,8 @@ void gc_heap::distribute_free_regions()
for (heap_segment* region = region_list.get_first_free_region(); region != nullptr; region = next_region)
{
next_region = heap_segment_next (region);
- if (heap_segment_age_in_free (region) >= AGE_IN_FREE_TO_DECOMMIT)
+ int age_in_free_to_decommit = min (max (AGE_IN_FREE_TO_DECOMMIT, n_heaps), MAX_AGE_IN_FREE);
+ if (heap_segment_age_in_free (region) >= age_in_free_to_decommit)
{
num_decommit_regions_by_time++;
size_decommit_regions_by_time += get_region_committed_size (region);
@@ -12686,13 +12691,43 @@ void gc_heap::distribute_free_regions()
global_free_huge_regions.transfer_regions (&hp->free_regions[huge_free_region]);
heap_budget_in_region_units[i][basic_free_region] = 0;
+ min_heap_budget_in_region_units[i] = 0;
heap_budget_in_region_units[i][large_free_region] = 0;
- for (int gen = soh_gen0; gen < total_generation_count; gen++)
+ }
+
+ for (int gen = soh_gen0; gen < total_generation_count; gen++)
+ {
+ if ((gen <= soh_gen2) &&
+ total_budget_in_region_units[basic_free_region] >= (total_num_free_regions[basic_free_region] +
+ surplus_regions[basic_free_region].get_num_free_regions()))
+ {
+ // don't accumulate budget from higher soh generations if we cannot cover lower ones
+ dprintf (REGIONS_LOG, ("out of free regions - skipping gen %d budget = %Id >= avail %Id",
+ gen,
+ total_budget_in_region_units[basic_free_region],
+ total_num_free_regions[basic_free_region] + surplus_regions[basic_free_region].get_num_free_regions()));
+ continue;
+ }
+#ifdef MULTIPLE_HEAPS
+ for (int i = 0; i < n_heaps; i++)
+ {
+ gc_heap* hp = g_heaps[i];
+#else //MULTIPLE_HEAPS
{
+ gc_heap* hp = pGenGCHeap;
+ // just to reduce the number of #ifdefs in the code below
+ const int i = 0;
+ const int n_heaps = 1;
+#endif //MULTIPLE_HEAPS
ptrdiff_t budget_gen = max (hp->estimate_gen_growth (gen), 0);
int kind = gen >= loh_generation;
size_t budget_gen_in_region_units = (budget_gen + (region_size[kind] - 1)) / region_size[kind];
dprintf (REGIONS_LOG, ("h%2d gen %d has an estimated growth of %Id bytes (%Id regions)", i, gen, budget_gen, budget_gen_in_region_units));
+ if (gen <= soh_gen2)
+ {
+ // preserve the budget for the previous generation - we should not go below that
+ min_heap_budget_in_region_units[i] = heap_budget_in_region_units[i][kind];
+ }
heap_budget_in_region_units[i][kind] += budget_gen_in_region_units;
total_budget_in_region_units[kind] += budget_gen_in_region_units;
}
@@ -12742,15 +12777,54 @@ void gc_heap::distribute_free_regions()
{
dprintf (REGIONS_LOG, ("distributing the %Id %s regions deficit", -balance, kind_name[kind]));
+#ifdef MULTIPLE_HEAPS
// we may have a deficit or - if background GC is going on - a surplus.
// adjust the budget per heap accordingly
- ptrdiff_t adjustment_per_heap = (balance + (n_heaps - 1)) / n_heaps;
-
-#ifdef MULTIPLE_HEAPS
- for (int i = 0; i < n_heaps; i++)
+ if (balance != 0)
{
- ptrdiff_t new_budget = (ptrdiff_t)heap_budget_in_region_units[i][kind] + adjustment_per_heap;
- heap_budget_in_region_units[i][kind] = max (0, new_budget);
+ ptrdiff_t curr_balance = 0;
+ ptrdiff_t rem_balance = 0;
+ for (int i = 0; i < n_heaps; i++)
+ {
+ curr_balance += balance;
+ ptrdiff_t adjustment_per_heap = curr_balance / n_heaps;
+ curr_balance -= adjustment_per_heap * n_heaps;
+ ptrdiff_t new_budget = (ptrdiff_t)heap_budget_in_region_units[i][kind] + adjustment_per_heap;
+ ptrdiff_t min_budget = (kind == basic_free_region) ? (ptrdiff_t)min_heap_budget_in_region_units[i] : 0;
+ dprintf (REGIONS_LOG, ("adjusting the budget for heap %d from %Id %s regions by %Id to %Id",
+ i,
+ heap_budget_in_region_units[i][kind],
+ kind_name[kind],
+ adjustment_per_heap,
+ max (min_budget, new_budget)));
+ heap_budget_in_region_units[i][kind] = max (min_budget, new_budget);
+ rem_balance += new_budget - heap_budget_in_region_units[i][kind];
+ }
+ assert (rem_balance <= 0);
+ dprintf (REGIONS_LOG, ("remaining balance: %Id %s regions", rem_balance, kind_name[kind]));
+
+ // if we have a left over deficit, distribute that to the heaps that still have more than the minimum
+ while (rem_balance < 0)
+ {
+ for (int i = 0; i < n_heaps; i++)
+ {
+ size_t min_budget = (kind == basic_free_region) ? min_heap_budget_in_region_units[i] : 0;
+ if (heap_budget_in_region_units[i][kind] > min_budget)
+ {
+ dprintf (REGIONS_LOG, ("adjusting the budget for heap %d from %Id %s regions by %Id to %Id",
+ i,
+ heap_budget_in_region_units[i][kind],
+ kind_name[kind],
+ -1,
+ heap_budget_in_region_units[i][kind] - 1));
+
+ heap_budget_in_region_units[i][kind] -= 1;
+ rem_balance += 1;
+ if (rem_balance == 0)
+ break;
+ }
+ }
+ }
}
#endif //MULTIPLE_HEAPS
}
@@ -12802,11 +12876,12 @@ void gc_heap::distribute_free_regions()
if (hp->free_regions[kind].get_num_free_regions() > heap_budget_in_region_units[i][kind])
{
- dprintf (REGIONS_LOG, ("removing %Id %s regions from heap %d with %Id regions",
+ dprintf (REGIONS_LOG, ("removing %Id %s regions from heap %d with %Id regions, budget is %Id",
hp->free_regions[kind].get_num_free_regions() - heap_budget_in_region_units[i][kind],
kind_name[kind],
i,
- hp->free_regions[kind].get_num_free_regions()));
+ hp->free_regions[kind].get_num_free_regions(),
+ heap_budget_in_region_units[i][kind]));
remove_surplus_regions (&hp->free_regions[kind], &surplus_regions[kind], heap_budget_in_region_units[i][kind]);
}
@@ -12821,14 +12896,16 @@ void gc_heap::distribute_free_regions()
const int i = 0;
#endif //MULTIPLE_HEAPS
+ // second pass: fill all the regions having less than budget
if (hp->free_regions[kind].get_num_free_regions() < heap_budget_in_region_units[i][kind])
{
int64_t num_added_regions = add_regions (&hp->free_regions[kind], &surplus_regions[kind], heap_budget_in_region_units[i][kind]);
- dprintf (REGIONS_LOG, ("added %Id %s regions to heap %d - now has %Id",
+ dprintf (REGIONS_LOG, ("added %Id %s regions to heap %d - now has %Id, budget is %Id",
num_added_regions,
kind_name[kind],
i,
- hp->free_regions[kind].get_num_free_regions()));
+ hp->free_regions[kind].get_num_free_regions(),
+ heap_budget_in_region_units[i][kind]));
}
hp->free_regions[kind].sort_by_committed_and_age();
}
@@ -12850,8 +12927,29 @@ void gc_heap::distribute_free_regions()
}
}
#else //MULTIPLE_HEAPS
- while (decommit_step())
+ // we want to limit the amount of decommit we do per time to indirectly
+ // limit the amount of time spent in recommit and page faults
+ // we use the elapsed time since the last GC to arrive at the desired
+ // decommit size
+ // we limit the elapsed time to 10 seconds to avoid spending too much time decommitting
+ // if less than DECOMMIT_TIME_STEP_MILLISECONDS elapsed, we don't decommit -
+ // we don't want to decommit fractions of regions here
+ dynamic_data* dd0 = dynamic_data_of (0);
+ size_t ephemeral_elapsed = (size_t)((dd_time_clock (dd0) - gc_last_ephemeral_decommit_time) / 1000);
+ if (ephemeral_elapsed >= DECOMMIT_TIME_STEP_MILLISECONDS)
+ {
+ gc_last_ephemeral_decommit_time = dd_time_clock (dd0);
+ size_t decommit_step_milliseconds = min (ephemeral_elapsed, (10*1000));
+
+ decommit_step (decommit_step_milliseconds);
+ }
+ // transfer any remaining regions on the decommit list back to the free list
+ for (int kind = basic_free_region; kind < count_free_region_kinds; kind++)
{
+ if (global_regions_to_decommit[kind].get_num_free_regions() != 0)
+ {
+ free_regions[kind].transfer_regions (&global_regions_to_decommit[kind]);
+ }
}
#endif //MULTIPLE_HEAPS
#endif //USE_REGIONS
@@ -13484,10 +13582,20 @@ HRESULT gc_heap::initialize_gc (size_t soh_segment_size,
if (!reserve_initial_memory (soh_segment_size, loh_segment_size, poh_segment_size, number_of_heaps,
use_large_pages_p, separated_poh_p, heap_no_to_numa_node))
return E_OUTOFMEMORY;
- if (separated_poh_p)
+ if (use_large_pages_p)
{
- heap_hard_limit_oh[poh] = min_segment_size_hard_limit * number_of_heaps;
- heap_hard_limit += heap_hard_limit_oh[poh];
+ if (heap_hard_limit_oh[soh])
+ {
+ heap_hard_limit_oh[soh] = soh_segment_size * number_of_heaps;
+ heap_hard_limit_oh[loh] = loh_segment_size * number_of_heaps;
+ heap_hard_limit_oh[poh] = poh_segment_size * number_of_heaps;
+ heap_hard_limit = heap_hard_limit_oh[soh] + heap_hard_limit_oh[loh] + heap_hard_limit_oh[poh];
+ }
+ else
+ {
+ assert (heap_hard_limit);
+ heap_hard_limit = (soh_segment_size + loh_segment_size + poh_segment_size) * number_of_heaps;
+ }
}
#endif //USE_REGIONS
@@ -13667,12 +13775,6 @@ gc_heap::init_semi_shared()
memset (full_gc_counts, 0, sizeof (full_gc_counts));
- last_ephemeral_gc_info = {};
- last_full_blocking_gc_info = {};
-#ifdef BACKGROUND_GC
- memset (&last_bgc_info, 0, sizeof (last_bgc_info));
-#endif //BACKGROUND_GC
-
should_expand_in_full_gc = FALSE;
#ifdef FEATURE_LOH_COMPACTION
@@ -21365,7 +21467,14 @@ void gc_heap::gc1()
dynamic_data* dd = hp->dynamic_data_of (gen);
dd_desired_allocation (dd) = desired_per_heap;
dd_gc_new_allocation (dd) = desired_per_heap;
+#ifdef USE_REGIONS
+ // we may have had some incoming objects during this GC -
+ // adjust the consumed budget for these
dd_new_allocation (dd) = desired_per_heap - already_consumed_per_heap;
+#else //USE_REGIONS
+ // for segments, we want to keep the .NET 6.0 behavior where we did not adjust
+ dd_new_allocation (dd) = desired_per_heap;
+#endif //USE_REGIONS
if (gen == 0)
{
@@ -22745,7 +22854,7 @@ void gc_heap::garbage_collect (int n)
gc1();
}
#ifndef MULTIPLE_HEAPS
- allocation_running_time = (size_t)GCToOSInterface::GetLowPrecisionTimeStamp();
+ allocation_running_time = GCToOSInterface::GetLowPrecisionTimeStamp();
allocation_running_amount = dd_new_allocation (dynamic_data_of (0));
fgn_last_alloc = dd_new_allocation (dynamic_data_of (0));
#endif //MULTIPLE_HEAPS
@@ -24243,7 +24352,7 @@ gc_heap::mark_steal()
#ifdef SNOOP_STATS
dprintf (SNOOP_LOG, ("(GC%d)heap%d: start snooping %d", settings.gc_index, heap_number, (heap_number+1)%n_heaps));
- uint32_t begin_tick = GCToOSInterface::GetLowPrecisionTimeStamp();
+ uint64_t begin_tick = GCToOSInterface::GetLowPrecisionTimeStamp();
#endif //SNOOP_STATS
int idle_loop_count = 0;
@@ -24346,7 +24455,7 @@ gc_heap::mark_steal()
dprintf (SNOOP_LOG, ("heap%d: marking %Ix from %d [%d] tl:%dms",
heap_number, (size_t)o, (heap_number+1)%n_heaps, level,
(GCToOSInterface::GetLowPrecisionTimeStamp()-begin_tick)));
- uint32_t start_tick = GCToOSInterface::GetLowPrecisionTimeStamp();
+ uint64_t start_tick = GCToOSInterface::GetLowPrecisionTimeStamp();
#endif //SNOOP_STATS
mark_object_simple1 (o, start, heap_number);
@@ -28765,7 +28874,7 @@ uint8_t* gc_heap::find_next_marked (uint8_t* x, uint8_t* end,
#ifdef FEATURE_EVENT_TRACE
void gc_heap::init_bucket_info()
{
- *bucket_info = {};
+ memset (bucket_info, 0, sizeof (bucket_info));
}
void gc_heap::add_plug_in_condemned_info (generation* gen, size_t plug_size)
@@ -30488,7 +30597,10 @@ void gc_heap::plan_phase (int condemned_gen_number)
heap_segment* region = generation_start_segment (hp->generation_of (i));
while (region)
{
- committed += heap_segment_committed (region) - get_region_start (region);
+ if (!heap_segment_read_only_p (region))
+ {
+ committed += heap_segment_committed (region) - get_region_start (region);
+ }
region = heap_segment_next (region);
}
@@ -40401,9 +40513,14 @@ void gc_heap::compute_new_dynamic_data (int gen_number)
}
dd_gc_new_allocation (dd) = dd_desired_allocation (dd);
+#ifdef USE_REGIONS
// we may have had some incoming objects during this GC -
// adjust the consumed budget for these
dd_new_allocation (dd) = dd_gc_new_allocation (dd) - in;
+#else //USE_REGIONS
+ // for segments, we want to keep the .NET 6.0 behavior where we did not adjust
+ dd_new_allocation (dd) = dd_gc_new_allocation (dd);
+#endif //USE_REGIONS
}
gen_data->pinned_surv = dd_pinned_survived_size (dd);
@@ -40554,9 +40671,12 @@ void gc_heap::decommit_ephemeral_segment_pages()
{
gradual_decommit_in_progress_p = TRUE;
- dprintf (1, ("h%2d gen %d reduce_commit by %IdkB",
+ dprintf (1, ("h%2d gen %d region %Ix allocated %IdkB committed %IdkB reduce_commit by %IdkB",
heap_number,
gen_number,
+ get_region_start (tail_region),
+ (heap_segment_allocated (tail_region) - get_region_start (tail_region))/1024,
+ (heap_segment_committed (tail_region) - get_region_start (tail_region))/1024,
(heap_segment_committed (tail_region) - decommit_target)/1024));
}
dprintf(3, ("h%2d gen %d allocated: %IdkB committed: %IdkB target: %IdkB",
@@ -40566,7 +40686,7 @@ void gc_heap::decommit_ephemeral_segment_pages()
(heap_segment_committed (tail_region) - heap_segment_mem (tail_region))/1024,
(decommit_target - heap_segment_mem (tail_region))/1024));
}
-#else //MULTIPLE_HEAPS && USE_REGIONS
+#elif !defined(USE_REGIONS)
dynamic_data* dd0 = dynamic_data_of (0);
@@ -40633,12 +40753,12 @@ void gc_heap::decommit_ephemeral_segment_pages()
}
// return true if we actually decommitted anything
-bool gc_heap::decommit_step ()
+bool gc_heap::decommit_step (uint64_t step_milliseconds)
{
size_t decommit_size = 0;
#ifdef USE_REGIONS
- const size_t max_decommit_step_size = DECOMMIT_SIZE_PER_MILLISECOND * DECOMMIT_TIME_STEP_MILLISECONDS;
+ const size_t max_decommit_step_size = DECOMMIT_SIZE_PER_MILLISECOND * step_milliseconds;
for (int kind = basic_free_region; kind < count_free_region_kinds; kind++)
{
dprintf (REGIONS_LOG, ("decommit_step %d, regions_to_decommit = %Id",
@@ -43917,7 +44037,10 @@ void gc_heap::verify_regions (int gen_number, bool can_verify_gen_num, bool can_
{
if (p_total_committed)
{
- *p_total_committed += (heap_segment_committed (seg_in_gen) - get_region_start (seg_in_gen));
+ if (!heap_segment_read_only_p (seg_in_gen))
+ {
+ *p_total_committed += (heap_segment_committed (seg_in_gen) - get_region_start (seg_in_gen));
+ }
}
if (can_verify_gen_num)
{
@@ -44796,10 +44919,6 @@ HRESULT GCHeap::Initialize()
#endif //HOST_64BIT
GCConfig::SetGCLargePages(gc_heap::use_large_pages_p);
- GCConfig::SetGCHeapHardLimit(static_cast<int64_t>(gc_heap::heap_hard_limit));
- GCConfig::SetGCHeapHardLimitSOH(static_cast<int64_t>(gc_heap::heap_hard_limit_oh[soh]));
- GCConfig::SetGCHeapHardLimitLOH(static_cast<int64_t>(gc_heap::heap_hard_limit_oh[loh]));
- GCConfig::SetGCHeapHardLimitPOH(static_cast<int64_t>(gc_heap::heap_hard_limit_oh[poh]));
uint32_t nhp = 1;
uint32_t nhp_from_config = 0;
@@ -44954,6 +45073,11 @@ HRESULT GCHeap::Initialize()
hr = gc_heap::initialize_gc (seg_size, large_seg_size, pin_seg_size);
#endif //MULTIPLE_HEAPS
+ GCConfig::SetGCHeapHardLimit(static_cast<int64_t>(gc_heap::heap_hard_limit));
+ GCConfig::SetGCHeapHardLimitSOH(static_cast<int64_t>(gc_heap::heap_hard_limit_oh[soh]));
+ GCConfig::SetGCHeapHardLimitLOH(static_cast<int64_t>(gc_heap::heap_hard_limit_oh[loh]));
+ GCConfig::SetGCHeapHardLimitPOH(static_cast<int64_t>(gc_heap::heap_hard_limit_oh[poh]));
+
if (hr != S_OK)
return hr;
@@ -45057,7 +45181,7 @@ HRESULT GCHeap::Initialize()
gc_heap* hp = gc_heap::g_heaps[0];
dynamic_data* gen0_dd = hp->dynamic_data_of (0);
- gc_heap::min_gen0_balance_delta = (dd_min_size (gen0_dd) >> 3);
+ gc_heap::min_gen0_balance_delta = (dd_min_size (gen0_dd) >> 6);
bool can_use_cpu_groups = GCToOSInterface::CanEnableGCCPUGroups();
GCConfig::SetGCCpuGroup(can_use_cpu_groups);
diff --git a/src/coreclr/gc/gcpriv.h b/src/coreclr/gc/gcpriv.h
index 8cea1afa292..df4ce12ec52 100644
--- a/src/coreclr/gc/gcpriv.h
+++ b/src/coreclr/gc/gcpriv.h
@@ -648,8 +648,6 @@ struct etw_bucket_info
uint32_t count;
size_t size;
- etw_bucket_info() = default;
-
void set (uint16_t _index, uint32_t _count, size_t _size)
{
index = _index;
@@ -2065,7 +2063,7 @@ protected:
PER_HEAP
size_t decommit_heap_segment_pages_worker (heap_segment* seg, uint8_t *new_committed);
PER_HEAP_ISOLATED
- bool decommit_step ();
+ bool decommit_step (uint64_t step_milliseconds);
PER_HEAP
void decommit_heap_segment (heap_segment* seg);
PER_HEAP_ISOLATED
@@ -3919,7 +3917,7 @@ public:
#else //MULTIPLE_HEAPS
PER_HEAP
- size_t allocation_running_time;
+ uint64_t allocation_running_time;
PER_HEAP
size_t allocation_running_amount;
diff --git a/src/coreclr/gc/sample/gcenv.h b/src/coreclr/gc/sample/gcenv.h
index 8fc5f44c384..a1db0d498de 100644
--- a/src/coreclr/gc/sample/gcenv.h
+++ b/src/coreclr/gc/sample/gcenv.h
@@ -122,7 +122,7 @@ public:
return (alloc_context *)&m_alloc_context;
}
- void SetGCSpecial(bool fGCSpecial)
+ void SetGCSpecial()
{
}
};
diff --git a/src/coreclr/gc/unix/config.gc.h.in b/src/coreclr/gc/unix/config.gc.h.in
index d9947eb91fe..25bcc98a293 100644
--- a/src/coreclr/gc/unix/config.gc.h.in
+++ b/src/coreclr/gc/unix/config.gc.h.in
@@ -17,6 +17,7 @@
#cmakedefine01 HAVE_SYSCTLBYNAME
#cmakedefine01 HAVE_PTHREAD_CONDATTR_SETCLOCK
#cmakedefine01 HAVE_CLOCK_GETTIME_NSEC_NP
+#cmakedefine01 HAVE_CLOCK_MONOTONIC
#cmakedefine01 HAVE_SCHED_GETAFFINITY
#cmakedefine01 HAVE_SCHED_SETAFFINITY
#cmakedefine01 HAVE_PTHREAD_SETAFFINITY_NP
diff --git a/src/coreclr/gc/unix/configure.cmake b/src/coreclr/gc/unix/configure.cmake
index c6a75a0a9cd..06dc8d305c6 100644
--- a/src/coreclr/gc/unix/configure.cmake
+++ b/src/coreclr/gc/unix/configure.cmake
@@ -79,6 +79,20 @@ check_symbol_exists(
time.h
HAVE_CLOCK_GETTIME_NSEC_NP)
+check_cxx_source_runs("
+#include <stdlib.h>
+#include <time.h>
+#include <sys/time.h>
+
+int main()
+{
+ int ret;
+ struct timespec ts;
+ ret = clock_gettime(CLOCK_MONOTONIC, &ts);
+
+ exit(ret);
+}" HAVE_CLOCK_MONOTONIC)
+
check_symbol_exists(
posix_madvise
sys/mman.h
diff --git a/src/coreclr/gc/unix/gcenv.unix.cpp b/src/coreclr/gc/unix/gcenv.unix.cpp
index a250b528d80..8037fa084b6 100644
--- a/src/coreclr/gc/unix/gcenv.unix.cpp
+++ b/src/coreclr/gc/unix/gcenv.unix.cpp
@@ -968,10 +968,11 @@ static size_t GetLogicalProcessorCacheSizeFromOS()
int64_t cacheSizeFromSysctl = 0;
size_t sz = sizeof(cacheSizeFromSysctl);
const bool success = false
- // macOS-arm64: Since macOS 12.0, Apple added ".perflevelX." to determinate cache sizes for efficiency
+ // macOS: Since macOS 12.0, Apple added ".perflevelX." to determinate cache sizes for efficiency
// and performance cores separately. "perflevel0" stands for "performance"
+ || sysctlbyname("hw.perflevel0.l3cachesize", &cacheSizeFromSysctl, &sz, nullptr, 0) == 0
|| sysctlbyname("hw.perflevel0.l2cachesize", &cacheSizeFromSysctl, &sz, nullptr, 0) == 0
- // macOS-arm64: these report cache sizes for efficiency cores only:
+ // macOS: these report cache sizes for efficiency cores only:
|| sysctlbyname("hw.l3cachesize", &cacheSizeFromSysctl, &sz, nullptr, 0) == 0
|| sysctlbyname("hw.l2cachesize", &cacheSizeFromSysctl, &sz, nullptr, 0) == 0
|| sysctlbyname("hw.l1dcachesize", &cacheSizeFromSysctl, &sz, nullptr, 0) == 0;
@@ -1410,17 +1411,22 @@ void GCToOSInterface::GetMemoryStatus(uint64_t restricted_limit, uint32_t* memor
// The counter value
int64_t GCToOSInterface::QueryPerformanceCounter()
{
- // TODO: This is not a particularly efficient implementation - we certainly could
- // do much more specific platform-dependent versions if we find that this method
- // runs hot. However, most likely it does not.
- struct timeval tv;
- if (gettimeofday(&tv, NULL) == -1)
+#if HAVE_CLOCK_GETTIME_NSEC_NP
+ return (int64_t)clock_gettime_nsec_np(CLOCK_UPTIME_RAW);
+#elif HAVE_CLOCK_MONOTONIC
+ struct timespec ts;
+ int result = clock_gettime(CLOCK_MONOTONIC, &ts);
+
+ if (result != 0)
{
- assert(!"gettimeofday() failed");
- // TODO (segilles) unconditional asserts
- return 0;
+ assert(!"clock_gettime(CLOCK_MONOTONIC) failed");
+ __UNREACHABLE();
}
- return (int64_t) tv.tv_sec * (int64_t) tccSecondsToMicroSeconds + (int64_t) tv.tv_usec;
+
+ return ((int64_t)(ts.tv_sec) * (int64_t)(tccSecondsToNanoSeconds)) + (int64_t)(ts.tv_nsec);
+#else
+#error " clock_gettime(CLOCK_MONOTONIC) or clock_gettime_nsec_np() must be supported."
+#endif
}
// Get a frequency of the high precision performance counter
@@ -1429,16 +1435,38 @@ int64_t GCToOSInterface::QueryPerformanceCounter()
int64_t GCToOSInterface::QueryPerformanceFrequency()
{
// The counter frequency of gettimeofday is in microseconds.
- return tccSecondsToMicroSeconds;
+ return tccSecondsToNanoSeconds;
}
// Get a time stamp with a low precision
// Return:
// Time stamp in milliseconds
-uint32_t GCToOSInterface::GetLowPrecisionTimeStamp()
+uint64_t GCToOSInterface::GetLowPrecisionTimeStamp()
{
- // TODO(segilles) this is pretty naive, we can do better
uint64_t retval = 0;
+
+#if HAVE_CLOCK_GETTIME_NSEC_NP
+ retval = clock_gettime_nsec_np(CLOCK_UPTIME_RAW) / tccMilliSecondsToNanoSeconds;
+#elif HAVE_CLOCK_MONOTONIC
+ struct timespec ts;
+
+#if HAVE_CLOCK_MONOTONIC_COARSE
+ clockid_t clockType = CLOCK_MONOTONIC_COARSE; // good enough resolution, fastest speed
+#else
+ clockid_t clockType = CLOCK_MONOTONIC;
+#endif
+
+ if (clock_gettime(clockType, &ts) != 0)
+ {
+#if HAVE_CLOCK_MONOTONIC_COARSE
+ assert(!"clock_gettime(HAVE_CLOCK_MONOTONIC_COARSE) failed\n");
+#else
+ assert(!"clock_gettime(CLOCK_MONOTONIC) failed\n");
+#endif
+ }
+
+ retval = (ts.tv_sec * tccSecondsToMilliSeconds) + (ts.tv_nsec / tccMilliSecondsToNanoSeconds);
+#else
struct timeval tv;
if (gettimeofday(&tv, NULL) == 0)
{
@@ -1448,6 +1476,7 @@ uint32_t GCToOSInterface::GetLowPrecisionTimeStamp()
{
assert(!"gettimeofday() failed\n");
}
+#endif
return retval;
}
diff --git a/src/coreclr/gc/vxsort/machine_traits.avx2.cpp b/src/coreclr/gc/vxsort/machine_traits.avx2.cpp
index e4e86d4b239..61db8d84846 100644
--- a/src/coreclr/gc/vxsort/machine_traits.avx2.cpp
+++ b/src/coreclr/gc/vxsort/machine_traits.avx2.cpp
@@ -6,7 +6,7 @@
namespace vxsort {
-alignas(128) const int8_t perm_table_64[128] = {
+alignas(32) const uint8_t perm_table_64[T64_SIZE] = {
0, 1, 2, 3, 4, 5, 6, 7, // 0b0000 (0)
2, 3, 4, 5, 6, 7, 0, 1, // 0b0001 (1)
0, 1, 4, 5, 6, 7, 2, 3, // 0b0010 (2)
@@ -25,7 +25,7 @@ alignas(128) const int8_t perm_table_64[128] = {
0, 1, 2, 3, 4, 5, 6, 7, // 0b1111 (15)
};
-alignas(2048) const int8_t perm_table_32[2048] = {
+alignas(32) const uint8_t perm_table_32[T32_SIZE] = {
0, 1, 2, 3, 4, 5, 6, 7, // 0b00000000 (0)
1, 2, 3, 4, 5, 6, 7, 0, // 0b00000001 (1)
0, 2, 3, 4, 5, 6, 7, 1, // 0b00000010 (2)
diff --git a/src/coreclr/gc/vxsort/machine_traits.avx2.h b/src/coreclr/gc/vxsort/machine_traits.avx2.h
index 3720e78668e..ccadc2a9a27 100644
--- a/src/coreclr/gc/vxsort/machine_traits.avx2.h
+++ b/src/coreclr/gc/vxsort/machine_traits.avx2.h
@@ -24,8 +24,20 @@
#define d2s _mm256_castpd_ps
namespace vxsort {
-extern const int8_t perm_table_64[128];
-extern const int8_t perm_table_32[2048];
+
+// We might read the last 8 bytes into a 128-bit vector for the purpose of permutation
+// Most compilers actually fuse the pair of instructions: _mm256_cvtepi8_epiNN + _mm_loadu_si128
+// into a single instruction that will not read more that 4/8 bytes..
+// vpmovsxb[dq] ymm0, dword [...], eliminating the 128-bit load completely and effectively
+// reading exactly 4/8 (depending if the instruction is vpmovsxbd or vpmovsxbq)
+// without generating an out of bounds read at all.
+// But, life is harsh, and we can't trust the compiler to do the right thing if it is not
+// contractual
+const int T64_SIZE = 128 + 8;
+const int T32_SIZE = 2048 + 8;
+
+extern const uint8_t perm_table_64[T64_SIZE];
+extern const uint8_t perm_table_32[T32_SIZE];
static void not_supported()
{
diff --git a/src/coreclr/gc/vxsort/smallsort/avx2_load_mask_tables.cpp b/src/coreclr/gc/vxsort/smallsort/avx2_load_mask_tables.cpp
index 8f2f24f7d5c..33db9f1cb03 100644
--- a/src/coreclr/gc/vxsort/smallsort/avx2_load_mask_tables.cpp
+++ b/src/coreclr/gc/vxsort/smallsort/avx2_load_mask_tables.cpp
@@ -13,13 +13,6 @@ namespace vxsort {
0xFF, 0x00, 0x00, 0x00, // 0b0001 (1)
0xFF, 0xFF, 0x00, 0x00, // 0b0011 (3)
0xFF, 0xFF, 0xFF, 0x00, // 0b0111 (7)
- #if defined(__has_feature)
- #if __has_feature(address_sanitizer)
- 0xCC, 0xCC, 0xCC, 0xCC, // Garbage to make ASAN happy
- 0xCC, 0xCC, 0xCC, 0xCC, // Garbage to make ASAN happy
- 0xCC, 0xCC, 0xCC, 0xCC, // Garbage to make ASAN happy
- #endif
- #endif
};
extern "C" alignas(128) const uint8_t mask_table_8[M8_SIZE] = {
@@ -31,11 +24,6 @@ namespace vxsort {
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, // 0b00011111 ( 31)
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, // 0b00111111 ( 63)
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, // 0b01111111 (127)
- #if defined(__has_feature)
- #if __has_feature(address_sanitizer)
- 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, // Garbage to make ASAN happy
- #endif
- #endif
};
}
}
diff --git a/src/coreclr/gc/vxsort/smallsort/bitonic_sort.AVX2.int32_t.generated.h b/src/coreclr/gc/vxsort/smallsort/bitonic_sort.AVX2.int32_t.generated.h
index 47e45c2dcfb..c3f141c1046 100644
--- a/src/coreclr/gc/vxsort/smallsort/bitonic_sort.AVX2.int32_t.generated.h
+++ b/src/coreclr/gc/vxsort/smallsort/bitonic_sort.AVX2.int32_t.generated.h
@@ -34,8 +34,8 @@
namespace vxsort {
namespace smallsort {
-extern "C" const uint8_t mask_table_4[16];
-extern "C" const uint8_t mask_table_8[64];
+extern "C" const uint8_t mask_table_4[M4_SIZE];
+extern "C" const uint8_t mask_table_8[M8_SIZE];
template<> struct bitonic<int32_t, AVX2> {
static const int N = 8;
diff --git a/src/coreclr/gc/vxsort/smallsort/bitonic_sort.AVX2.int64_t.generated.h b/src/coreclr/gc/vxsort/smallsort/bitonic_sort.AVX2.int64_t.generated.h
index e49d92b7cf6..a012161c99d 100644
--- a/src/coreclr/gc/vxsort/smallsort/bitonic_sort.AVX2.int64_t.generated.h
+++ b/src/coreclr/gc/vxsort/smallsort/bitonic_sort.AVX2.int64_t.generated.h
@@ -34,8 +34,8 @@
namespace vxsort {
namespace smallsort {
-extern "C" const uint8_t mask_table_4[16];
-extern "C" const uint8_t mask_table_8[64];
+extern "C" const uint8_t mask_table_4[M4_SIZE];
+extern "C" const uint8_t mask_table_8[M8_SIZE];
template<> struct bitonic<int64_t, AVX2> {
static const int N = 4;
diff --git a/src/coreclr/gc/vxsort/smallsort/bitonic_sort.h b/src/coreclr/gc/vxsort/smallsort/bitonic_sort.h
index ba5635d4d94..702e2bcd994 100644
--- a/src/coreclr/gc/vxsort/smallsort/bitonic_sort.h
+++ b/src/coreclr/gc/vxsort/smallsort/bitonic_sort.h
@@ -18,16 +18,8 @@ using namespace std;
// In contract, release/optimizing compilers, turn that very specific instruction pair to
// a more reasonable: vpmovsxbq ymm0, dword [rax*4 + mask_table_4], eliminating the 128-bit
// load completely and effectively reading 4/8 (depending if the instruction is vpmovsxb[q,d]
-#if !defined(__has_feature)
-#define __has_feature(a) (0)
-#endif
-#if !__has_feature(address_sanitizer)
-const int M4_SIZE = 16;
-const int M8_SIZE = 64;
-#else
const int M4_SIZE = 16 + 12;
const int M8_SIZE = 64 + 8;
-#endif
extern "C" const uint8_t mask_table_4[M4_SIZE];
extern "C" const uint8_t mask_table_8[M8_SIZE];
diff --git a/src/coreclr/gc/windows/gcenv.windows.cpp b/src/coreclr/gc/windows/gcenv.windows.cpp
index 57203a3ad19..45c242078a6 100644
--- a/src/coreclr/gc/windows/gcenv.windows.cpp
+++ b/src/coreclr/gc/windows/gcenv.windows.cpp
@@ -1093,9 +1093,9 @@ int64_t GCToOSInterface::QueryPerformanceFrequency()
// Get a time stamp with a low precision
// Return:
// Time stamp in milliseconds
-uint32_t GCToOSInterface::GetLowPrecisionTimeStamp()
+uint64_t GCToOSInterface::GetLowPrecisionTimeStamp()
{
- return ::GetTickCount();
+ return ::GetTickCount64();
}
// Gets the total number of processors on the machine, not taking
diff --git a/src/coreclr/hosts/corerun/corerun.hpp b/src/coreclr/hosts/corerun/corerun.hpp
index c2f9ae40f07..f0e51a668fe 100644
--- a/src/coreclr/hosts/corerun/corerun.hpp
+++ b/src/coreclr/hosts/corerun/corerun.hpp
@@ -454,6 +454,8 @@ namespace pal
// Attempt to read
ssize_t bytes_read = ::read(fd, status, sizeof(status) - 1);
+ ::close(fd);
+
if (bytes_read > 0)
{
// We have data. At this point we can likely make a strong decision.
diff --git a/src/coreclr/ilasm/asmman.cpp b/src/coreclr/ilasm/asmman.cpp
index 1a7118ee2ce..a370656e2eb 100644
--- a/src/coreclr/ilasm/asmman.cpp
+++ b/src/coreclr/ilasm/asmman.cpp
@@ -181,7 +181,7 @@ void AsmMan::AddFile(_In_ __nullterminated char* szName, DWORD dwAttr, BinStr
tmp->tkTok = TokenFromRid(m_FileLst.COUNT(),mdtFile);
}
pAsm->m_tkCurrentCVOwner = 0;
- if(tmp) pAsm->m_pCustomDescrList = &(tmp->m_CustomDescrList);
+ pAsm->m_pCustomDescrList = &(tmp->m_CustomDescrList);
}
//==============================================================================================================
diff --git a/src/coreclr/inc/clr_std/vector b/src/coreclr/inc/clr_std/vector
index c10ecf6ba5a..c2d1caba890 100644
--- a/src/coreclr/inc/clr_std/vector
+++ b/src/coreclr/inc/clr_std/vector
@@ -215,6 +215,33 @@ namespace std
}
}
+ vector(const vector<T>&) = delete;
+ vector<T>& operator=(const vector<T>&) = delete;
+
+ vector(vector<T>&& v) noexcept
+ : m_size(v.m_size)
+ , m_capacity(v.m_capacity)
+ , m_pelements(v.m_pelements)
+ , m_isBufferOwner(v.m_isBufferOwner)
+ {
+ v.m_isBufferOwner = false;
+ }
+
+ vector<T>& operator=(vector<T>&& v) noexcept
+ {
+ if (m_isBufferOwner)
+ {
+ erase(m_pelements, 0, m_size);
+ delete [] (BYTE*)m_pelements;
+ }
+
+ m_size = v.m_size;
+ m_capacity = v.m_capacity;
+ m_pelements = v.m_pelements;
+ m_isBufferOwner = v.m_isBufferOwner;
+ v.m_isBufferOwner = false;
+ return *this;
+ }
size_t size() const
{
diff --git a/src/coreclr/inc/clrconfigvalues.h b/src/coreclr/inc/clrconfigvalues.h
index a600138a65d..55d4d7b015c 100644
--- a/src/coreclr/inc/clrconfigvalues.h
+++ b/src/coreclr/inc/clrconfigvalues.h
@@ -15,7 +15,7 @@
// --------------------
// |
// V
-// You can set an environment variable COMPlus_LogEnable=1 to enable it.
+// You can set an environment variable DOTNET_LogEnable=1 to enable it.
//
// See below for more details
//
@@ -43,7 +43,7 @@
// CONFIG_DWORD_INFO(symbol, name, defaultValue, description)
// --------------------------------------------------------------------------
// Use this macro to define a basic DWORD value. CLRConfig will look in environment variables (adding
-// COMPlus_ to the name) for this value. To customize
+// DOTNET_ to the name) for this value. To customize
// where CLRConfig looks, use the extended version of the macro below. IMPORTANT: please follow the
// code:#NamingConventions for the symbol and the name!
//
@@ -402,7 +402,6 @@ RETAIL_CONFIG_DWORD_INFO(INTERNAL_InterpreterFallback, W("InterpreterFallback"),
///
CONFIG_DWORD_INFO(INTERNAL_LoaderHeapCallTracing, W("LoaderHeapCallTracing"), 0, "Loader heap troubleshooting")
RETAIL_CONFIG_DWORD_INFO(INTERNAL_CodeHeapReserveForJumpStubs, W("CodeHeapReserveForJumpStubs"), 1, "Percentage of code heap to reserve for jump stubs")
-RETAIL_CONFIG_DWORD_INFO(INTERNAL_NGenReserveForJumpStubs, W("NGenReserveForJumpStubs"), 0, "Percentage of ngen image size to reserve for jump stubs")
RETAIL_CONFIG_DWORD_INFO(INTERNAL_BreakOnOutOfMemoryWithinRange, W("BreakOnOutOfMemoryWithinRange"), 0, "Break before out of memory within range exception is thrown")
///
@@ -687,12 +686,12 @@ RETAIL_CONFIG_DWORD_INFO(INTERNAL_EnableRCWCleanupOnSTAShutdown, W("EnableRCWCle
//
RETAIL_CONFIG_DWORD_INFO(INTERNAL_EnableEventPipe, W("EnableEventPipe"), 0, "Enable/disable event pipe. Non-zero values enable tracing.")
RETAIL_CONFIG_DWORD_INFO(INTERNAL_EventPipeNetTraceFormat, W("EventPipeNetTraceFormat"), 1, "Enable/disable using the newer nettrace file format.")
-RETAIL_CONFIG_STRING_INFO(INTERNAL_EventPipeOutputPath, W("EventPipeOutputPath"), "The full path excluding file name for the trace file that will be written when COMPlus_EnableEventPipe=1")
+RETAIL_CONFIG_STRING_INFO(INTERNAL_EventPipeOutputPath, W("EventPipeOutputPath"), "The full path excluding file name for the trace file that will be written when DOTNET_EnableEventPipe=1")
RETAIL_CONFIG_STRING_INFO(INTERNAL_EventPipeConfig, W("EventPipeConfig"), "Configuration for EventPipe.")
RETAIL_CONFIG_DWORD_INFO(INTERNAL_EventPipeRundown, W("EventPipeRundown"), 1, "Enable/disable eventpipe rundown.")
RETAIL_CONFIG_DWORD_INFO(INTERNAL_EventPipeCircularMB, W("EventPipeCircularMB"), 1024, "The EventPipe circular buffer size in megabytes.")
RETAIL_CONFIG_DWORD_INFO(INTERNAL_EventPipeProcNumbers, W("EventPipeProcNumbers"), 0, "Enable/disable capturing processor numbers in EventPipe event headers")
-RETAIL_CONFIG_DWORD_INFO(INTERNAL_EventPipeOutputStreaming, W("EventPipeOutputStreaming"), 0, "Enable/disable streaming for trace file set in COMPlus_EventPipeOutputPath. Non-zero values enable streaming.")
+RETAIL_CONFIG_DWORD_INFO(INTERNAL_EventPipeOutputStreaming, W("EventPipeOutputStreaming"), 0, "Enable/disable streaming for trace file set in DOTNET_EventPipeOutputPath. Non-zero values enable streaming.")
#ifdef FEATURE_AUTO_TRACE
RETAIL_CONFIG_DWORD_INFO_EX(INTERNAL_AutoTrace_N_Tracers, W("AutoTrace_N_Tracers"), 0, "", CLRConfig::LookupOptions::ParseIntegerAsBase10)
@@ -721,7 +720,7 @@ RETAIL_CONFIG_STRING_INFO(EXTERNAL_DOTNET_DiagnosticPorts, W("DiagnosticPorts"),
// LTTng
//
RETAIL_CONFIG_STRING_INFO(INTERNAL_LTTngConfig, W("LTTngConfig"), "Configuration for LTTng.")
-RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_LTTng, W("LTTng"), 1, "If COMPlus_LTTng is set to 0, this will prevent the LTTng library from being loaded at runtime")
+RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_LTTng, W("LTTng"), 1, "If DOTNET_LTTng is set to 0, this will prevent the LTTng library from being loaded at runtime")
//
// Executable code
@@ -752,6 +751,14 @@ RETAIL_CONFIG_DWORD_INFO(EXTERNAL_EnableHWIntrinsic, W("EnableHWIntrinsic"), 1
RETAIL_CONFIG_DWORD_INFO(EXTERNAL_EnableAES, W("EnableAES"), 1, "Allows AES+ hardware intrinsics to be disabled")
RETAIL_CONFIG_DWORD_INFO(EXTERNAL_EnableAVX, W("EnableAVX"), 1, "Allows AVX+ hardware intrinsics to be disabled")
RETAIL_CONFIG_DWORD_INFO(EXTERNAL_EnableAVX2, W("EnableAVX2"), 1, "Allows AVX2+ hardware intrinsics to be disabled")
+RETAIL_CONFIG_DWORD_INFO(EXTERNAL_EnableAVX512BW, W("EnableAVX512BW"), 1, "Allows AVX512BW+ hardware intrinsics to be disabled")
+RETAIL_CONFIG_DWORD_INFO(EXTERNAL_EnableAVX512BW_VL, W("EnableAVX512BW_VL"), 1, "Allows AVX512BW_VL+ hardware intrinsics to be disabled")
+RETAIL_CONFIG_DWORD_INFO(EXTERNAL_EnableAVX512CD, W("EnableAVX512CD"), 1, "Allows AVX512CD+ hardware intrinsics to be disabled")
+RETAIL_CONFIG_DWORD_INFO(EXTERNAL_EnableAVX512CD_VL, W("EnableAVX512CD_VL"), 1, "Allows AVX512CD_VL+ hardware intrinsics to be disabled")
+RETAIL_CONFIG_DWORD_INFO(EXTERNAL_EnableAVX512DQ, W("EnableAVX512DQ"), 1, "Allows AVX512DQ+ hardware intrinsics to be disabled")
+RETAIL_CONFIG_DWORD_INFO(EXTERNAL_EnableAVX512DQ_VL, W("EnableAVX512DQ_VL"), 1, "Allows AVX512DQ_VL+ hardware intrinsics to be disabled")
+RETAIL_CONFIG_DWORD_INFO(EXTERNAL_EnableAVX512F, W("EnableAVX512F"), 1, "Allows AVX512F+ hardware intrinsics to be disabled")
+RETAIL_CONFIG_DWORD_INFO(EXTERNAL_EnableAVX512F_VL, W("EnableAVX512F_VL"), 1, "Allows AVX512F_VL+ hardware intrinsics to be disabled")
RETAIL_CONFIG_DWORD_INFO(EXTERNAL_EnableAVXVNNI, W("EnableAVXVNNI"), 1, "Allows AVX VNNI+ hardware intrinsics to be disabled")
RETAIL_CONFIG_DWORD_INFO(EXTERNAL_EnableBMI1, W("EnableBMI1"), 1, "Allows BMI1+ hardware intrinsics to be disabled")
RETAIL_CONFIG_DWORD_INFO(EXTERNAL_EnableBMI2, W("EnableBMI2"), 1, "Allows BMI2+ hardware intrinsics to be disabled")
@@ -797,7 +804,6 @@ CONFIG_DWORD_INFO(INTERNAL_ActivatePatchSkip, W("ActivatePatchSkip"), 0, "Allows
CONFIG_DWORD_INFO(INTERNAL_AlwaysUseMetadataInterfaceMapLayout, W("AlwaysUseMetadataInterfaceMapLayout"), 0, "Used for debugging generic interface map layout.")
CONFIG_DWORD_INFO(INTERNAL_AssertOnUnneededThis, W("AssertOnUnneededThis"), 0, "While the ConfigDWORD is unnecessary, the contained ASSERT should be kept. This may result in some work tracking down violating MethodDescCallSites.")
CONFIG_DWORD_INFO(INTERNAL_AssertStacktrace, W("AssertStacktrace"), 1, "")
-CONFIG_DWORD_INFO(INTERNAL_clearNativeImageStress, W("clearNativeImageStress"), 0, "")
CONFIG_DWORD_INFO(INTERNAL_CPUFamily, W("CPUFamily"), 0xFFFFFFFF, "")
CONFIG_DWORD_INFO(INTERNAL_CPUFeatures, W("CPUFeatures"), 0xFFFFFFFF, "")
RETAIL_CONFIG_DWORD_INFO(EXTERNAL_DisableConfigCache, W("DisableConfigCache"), 0, "Used to disable the \"probabilistic\" config cache, which walks through the appropriate config registry keys on init and probabilistically keeps track of which exist.")
diff --git a/src/coreclr/inc/clrhost.h b/src/coreclr/inc/clrhost.h
index 08721c3b5e0..50f8b762c68 100644
--- a/src/coreclr/inc/clrhost.h
+++ b/src/coreclr/inc/clrhost.h
@@ -92,6 +92,14 @@ typedef Holder<CRITSEC_COOKIE, ClrEnterCriticalSection, ClrLeaveCriticalSection,
FORCEINLINE void VoidClrDeleteCriticalSection(CRITSEC_COOKIE cs) { if (cs != NULL) ClrDeleteCriticalSection(cs); }
typedef Wrapper<CRITSEC_COOKIE, DoNothing<CRITSEC_COOKIE>, VoidClrDeleteCriticalSection, NULL> CRITSEC_AllocationHolder;
+#ifndef DACCESS_COMPILE
+// Suspend/resume APIs that fail-fast on errors
+#ifdef TARGET_WINDOWS
+DWORD ClrSuspendThread(HANDLE hThread);
+#endif // TARGET_WINDOWS
+DWORD ClrResumeThread(HANDLE hThread);
+#endif // !DACCESS_COMPILE
+
DWORD GetClrModulePathName(SString& buffer);
extern thread_local int t_CantAllocCount;
diff --git a/src/coreclr/inc/corhlpr.cpp b/src/coreclr/inc/corhlpr.cpp
index 9808feed316..f4dc78d4f37 100644
--- a/src/coreclr/inc/corhlpr.cpp
+++ b/src/coreclr/inc/corhlpr.cpp
@@ -140,7 +140,9 @@ unsigned __stdcall IlmethodEmit(unsigned size, COR_ILMETHOD_FAT* header,
fatHeader->SetSize(sizeof(COR_ILMETHOD_FAT) / 4);
}
#ifndef SOS_INCLUDE
+#ifdef _DEBUG
assert(&origBuff[size] == outBuff);
+#endif
#endif // !SOS_INCLUDE
return(size);
}
diff --git a/src/coreclr/inc/corinfoinstructionset.h b/src/coreclr/inc/corinfoinstructionset.h
index 62c7466b689..18bde83aace 100644
--- a/src/coreclr/inc/corinfoinstructionset.h
+++ b/src/coreclr/inc/corinfoinstructionset.h
@@ -60,25 +60,41 @@ enum CORINFO_InstructionSet
InstructionSet_AVXVNNI=19,
InstructionSet_MOVBE=20,
InstructionSet_X86Serialize=21,
- InstructionSet_X86Base_X64=22,
- InstructionSet_SSE_X64=23,
- InstructionSet_SSE2_X64=24,
- InstructionSet_SSE3_X64=25,
- InstructionSet_SSSE3_X64=26,
- InstructionSet_SSE41_X64=27,
- InstructionSet_SSE42_X64=28,
- InstructionSet_AVX_X64=29,
- InstructionSet_AVX2_X64=30,
- InstructionSet_AES_X64=31,
- InstructionSet_BMI1_X64=32,
- InstructionSet_BMI2_X64=33,
- InstructionSet_FMA_X64=34,
- InstructionSet_LZCNT_X64=35,
- InstructionSet_PCLMULQDQ_X64=36,
- InstructionSet_POPCNT_X64=37,
- InstructionSet_AVXVNNI_X64=38,
- InstructionSet_MOVBE_X64=39,
- InstructionSet_X86Serialize_X64=40,
+ InstructionSet_AVX512F=22,
+ InstructionSet_AVX512F_VL=23,
+ InstructionSet_AVX512BW=24,
+ InstructionSet_AVX512BW_VL=25,
+ InstructionSet_AVX512CD=26,
+ InstructionSet_AVX512CD_VL=27,
+ InstructionSet_AVX512DQ=28,
+ InstructionSet_AVX512DQ_VL=29,
+ InstructionSet_X86Base_X64=30,
+ InstructionSet_SSE_X64=31,
+ InstructionSet_SSE2_X64=32,
+ InstructionSet_SSE3_X64=33,
+ InstructionSet_SSSE3_X64=34,
+ InstructionSet_SSE41_X64=35,
+ InstructionSet_SSE42_X64=36,
+ InstructionSet_AVX_X64=37,
+ InstructionSet_AVX2_X64=38,
+ InstructionSet_AES_X64=39,
+ InstructionSet_BMI1_X64=40,
+ InstructionSet_BMI2_X64=41,
+ InstructionSet_FMA_X64=42,
+ InstructionSet_LZCNT_X64=43,
+ InstructionSet_PCLMULQDQ_X64=44,
+ InstructionSet_POPCNT_X64=45,
+ InstructionSet_AVXVNNI_X64=46,
+ InstructionSet_MOVBE_X64=47,
+ InstructionSet_X86Serialize_X64=48,
+ InstructionSet_AVX512F_X64=49,
+ InstructionSet_AVX512F_VL_X64=50,
+ InstructionSet_AVX512BW_X64=51,
+ InstructionSet_AVX512BW_VL_X64=52,
+ InstructionSet_AVX512CD_X64=53,
+ InstructionSet_AVX512CD_VL_X64=54,
+ InstructionSet_AVX512DQ_X64=55,
+ InstructionSet_AVX512DQ_VL_X64=56,
#endif // TARGET_AMD64
#ifdef TARGET_X86
InstructionSet_X86Base=1,
@@ -102,25 +118,41 @@ enum CORINFO_InstructionSet
InstructionSet_AVXVNNI=19,
InstructionSet_MOVBE=20,
InstructionSet_X86Serialize=21,
- InstructionSet_X86Base_X64=22,
- InstructionSet_SSE_X64=23,
- InstructionSet_SSE2_X64=24,
- InstructionSet_SSE3_X64=25,
- InstructionSet_SSSE3_X64=26,
- InstructionSet_SSE41_X64=27,
- InstructionSet_SSE42_X64=28,
- InstructionSet_AVX_X64=29,
- InstructionSet_AVX2_X64=30,
- InstructionSet_AES_X64=31,
- InstructionSet_BMI1_X64=32,
- InstructionSet_BMI2_X64=33,
- InstructionSet_FMA_X64=34,
- InstructionSet_LZCNT_X64=35,
- InstructionSet_PCLMULQDQ_X64=36,
- InstructionSet_POPCNT_X64=37,
- InstructionSet_AVXVNNI_X64=38,
- InstructionSet_MOVBE_X64=39,
- InstructionSet_X86Serialize_X64=40,
+ InstructionSet_AVX512F=22,
+ InstructionSet_AVX512F_VL=23,
+ InstructionSet_AVX512BW=24,
+ InstructionSet_AVX512BW_VL=25,
+ InstructionSet_AVX512CD=26,
+ InstructionSet_AVX512CD_VL=27,
+ InstructionSet_AVX512DQ=28,
+ InstructionSet_AVX512DQ_VL=29,
+ InstructionSet_X86Base_X64=30,
+ InstructionSet_SSE_X64=31,
+ InstructionSet_SSE2_X64=32,
+ InstructionSet_SSE3_X64=33,
+ InstructionSet_SSSE3_X64=34,
+ InstructionSet_SSE41_X64=35,
+ InstructionSet_SSE42_X64=36,
+ InstructionSet_AVX_X64=37,
+ InstructionSet_AVX2_X64=38,
+ InstructionSet_AES_X64=39,
+ InstructionSet_BMI1_X64=40,
+ InstructionSet_BMI2_X64=41,
+ InstructionSet_FMA_X64=42,
+ InstructionSet_LZCNT_X64=43,
+ InstructionSet_PCLMULQDQ_X64=44,
+ InstructionSet_POPCNT_X64=45,
+ InstructionSet_AVXVNNI_X64=46,
+ InstructionSet_MOVBE_X64=47,
+ InstructionSet_X86Serialize_X64=48,
+ InstructionSet_AVX512F_X64=49,
+ InstructionSet_AVX512F_VL_X64=50,
+ InstructionSet_AVX512BW_X64=51,
+ InstructionSet_AVX512BW_VL_X64=52,
+ InstructionSet_AVX512CD_X64=53,
+ InstructionSet_AVX512CD_VL_X64=54,
+ InstructionSet_AVX512DQ_X64=55,
+ InstructionSet_AVX512DQ_VL_X64=56,
#endif // TARGET_X86
};
@@ -272,6 +304,22 @@ public:
AddInstructionSet(InstructionSet_MOVBE_X64);
if (HasInstructionSet(InstructionSet_X86Serialize))
AddInstructionSet(InstructionSet_X86Serialize_X64);
+ if (HasInstructionSet(InstructionSet_AVX512F))
+ AddInstructionSet(InstructionSet_AVX512F_X64);
+ if (HasInstructionSet(InstructionSet_AVX512F_VL))
+ AddInstructionSet(InstructionSet_AVX512F_VL_X64);
+ if (HasInstructionSet(InstructionSet_AVX512BW))
+ AddInstructionSet(InstructionSet_AVX512BW_X64);
+ if (HasInstructionSet(InstructionSet_AVX512BW_VL))
+ AddInstructionSet(InstructionSet_AVX512BW_VL_X64);
+ if (HasInstructionSet(InstructionSet_AVX512CD))
+ AddInstructionSet(InstructionSet_AVX512CD_X64);
+ if (HasInstructionSet(InstructionSet_AVX512CD_VL))
+ AddInstructionSet(InstructionSet_AVX512CD_VL_X64);
+ if (HasInstructionSet(InstructionSet_AVX512DQ))
+ AddInstructionSet(InstructionSet_AVX512DQ_X64);
+ if (HasInstructionSet(InstructionSet_AVX512DQ_VL))
+ AddInstructionSet(InstructionSet_AVX512DQ_VL_X64);
#endif // TARGET_AMD64
#ifdef TARGET_X86
#endif // TARGET_X86
@@ -420,6 +468,38 @@ inline CORINFO_InstructionSetFlags EnsureInstructionSetFlagsAreValid(CORINFO_Ins
resultflags.RemoveInstructionSet(InstructionSet_X86Serialize);
if (resultflags.HasInstructionSet(InstructionSet_X86Serialize_X64) && !resultflags.HasInstructionSet(InstructionSet_X86Serialize))
resultflags.RemoveInstructionSet(InstructionSet_X86Serialize_X64);
+ if (resultflags.HasInstructionSet(InstructionSet_AVX512F) && !resultflags.HasInstructionSet(InstructionSet_AVX512F_X64))
+ resultflags.RemoveInstructionSet(InstructionSet_AVX512F);
+ if (resultflags.HasInstructionSet(InstructionSet_AVX512F_X64) && !resultflags.HasInstructionSet(InstructionSet_AVX512F))
+ resultflags.RemoveInstructionSet(InstructionSet_AVX512F_X64);
+ if (resultflags.HasInstructionSet(InstructionSet_AVX512F_VL) && !resultflags.HasInstructionSet(InstructionSet_AVX512F_VL_X64))
+ resultflags.RemoveInstructionSet(InstructionSet_AVX512F_VL);
+ if (resultflags.HasInstructionSet(InstructionSet_AVX512F_VL_X64) && !resultflags.HasInstructionSet(InstructionSet_AVX512F_VL))
+ resultflags.RemoveInstructionSet(InstructionSet_AVX512F_VL_X64);
+ if (resultflags.HasInstructionSet(InstructionSet_AVX512BW) && !resultflags.HasInstructionSet(InstructionSet_AVX512BW_X64))
+ resultflags.RemoveInstructionSet(InstructionSet_AVX512BW);
+ if (resultflags.HasInstructionSet(InstructionSet_AVX512BW_X64) && !resultflags.HasInstructionSet(InstructionSet_AVX512BW))
+ resultflags.RemoveInstructionSet(InstructionSet_AVX512BW_X64);
+ if (resultflags.HasInstructionSet(InstructionSet_AVX512BW_VL) && !resultflags.HasInstructionSet(InstructionSet_AVX512BW_VL_X64))
+ resultflags.RemoveInstructionSet(InstructionSet_AVX512BW_VL);
+ if (resultflags.HasInstructionSet(InstructionSet_AVX512BW_VL_X64) && !resultflags.HasInstructionSet(InstructionSet_AVX512BW_VL))
+ resultflags.RemoveInstructionSet(InstructionSet_AVX512BW_VL_X64);
+ if (resultflags.HasInstructionSet(InstructionSet_AVX512CD) && !resultflags.HasInstructionSet(InstructionSet_AVX512CD_X64))
+ resultflags.RemoveInstructionSet(InstructionSet_AVX512CD);
+ if (resultflags.HasInstructionSet(InstructionSet_AVX512CD_X64) && !resultflags.HasInstructionSet(InstructionSet_AVX512CD))
+ resultflags.RemoveInstructionSet(InstructionSet_AVX512CD_X64);
+ if (resultflags.HasInstructionSet(InstructionSet_AVX512CD_VL) && !resultflags.HasInstructionSet(InstructionSet_AVX512CD_VL_X64))
+ resultflags.RemoveInstructionSet(InstructionSet_AVX512CD_VL);
+ if (resultflags.HasInstructionSet(InstructionSet_AVX512CD_VL_X64) && !resultflags.HasInstructionSet(InstructionSet_AVX512CD_VL))
+ resultflags.RemoveInstructionSet(InstructionSet_AVX512CD_VL_X64);
+ if (resultflags.HasInstructionSet(InstructionSet_AVX512DQ) && !resultflags.HasInstructionSet(InstructionSet_AVX512DQ_X64))
+ resultflags.RemoveInstructionSet(InstructionSet_AVX512DQ);
+ if (resultflags.HasInstructionSet(InstructionSet_AVX512DQ_X64) && !resultflags.HasInstructionSet(InstructionSet_AVX512DQ))
+ resultflags.RemoveInstructionSet(InstructionSet_AVX512DQ_X64);
+ if (resultflags.HasInstructionSet(InstructionSet_AVX512DQ_VL) && !resultflags.HasInstructionSet(InstructionSet_AVX512DQ_VL_X64))
+ resultflags.RemoveInstructionSet(InstructionSet_AVX512DQ_VL);
+ if (resultflags.HasInstructionSet(InstructionSet_AVX512DQ_VL_X64) && !resultflags.HasInstructionSet(InstructionSet_AVX512DQ_VL))
+ resultflags.RemoveInstructionSet(InstructionSet_AVX512DQ_VL_X64);
if (resultflags.HasInstructionSet(InstructionSet_SSE) && !resultflags.HasInstructionSet(InstructionSet_X86Base))
resultflags.RemoveInstructionSet(InstructionSet_SSE);
if (resultflags.HasInstructionSet(InstructionSet_SSE2) && !resultflags.HasInstructionSet(InstructionSet_SSE))
@@ -460,6 +540,22 @@ inline CORINFO_InstructionSetFlags EnsureInstructionSetFlagsAreValid(CORINFO_Ins
resultflags.RemoveInstructionSet(InstructionSet_MOVBE);
if (resultflags.HasInstructionSet(InstructionSet_X86Serialize) && !resultflags.HasInstructionSet(InstructionSet_X86Base))
resultflags.RemoveInstructionSet(InstructionSet_X86Serialize);
+ if (resultflags.HasInstructionSet(InstructionSet_AVX512F) && !resultflags.HasInstructionSet(InstructionSet_AVX2))
+ resultflags.RemoveInstructionSet(InstructionSet_AVX512F);
+ if (resultflags.HasInstructionSet(InstructionSet_AVX512F_VL) && !resultflags.HasInstructionSet(InstructionSet_AVX512F))
+ resultflags.RemoveInstructionSet(InstructionSet_AVX512F_VL);
+ if (resultflags.HasInstructionSet(InstructionSet_AVX512CD) && !resultflags.HasInstructionSet(InstructionSet_AVX512F))
+ resultflags.RemoveInstructionSet(InstructionSet_AVX512CD);
+ if (resultflags.HasInstructionSet(InstructionSet_AVX512CD_VL) && !resultflags.HasInstructionSet(InstructionSet_AVX512F_VL))
+ resultflags.RemoveInstructionSet(InstructionSet_AVX512CD_VL);
+ if (resultflags.HasInstructionSet(InstructionSet_AVX512BW) && !resultflags.HasInstructionSet(InstructionSet_AVX512F))
+ resultflags.RemoveInstructionSet(InstructionSet_AVX512BW);
+ if (resultflags.HasInstructionSet(InstructionSet_AVX512BW_VL) && !resultflags.HasInstructionSet(InstructionSet_AVX512F_VL))
+ resultflags.RemoveInstructionSet(InstructionSet_AVX512BW_VL);
+ if (resultflags.HasInstructionSet(InstructionSet_AVX512DQ) && !resultflags.HasInstructionSet(InstructionSet_AVX512F))
+ resultflags.RemoveInstructionSet(InstructionSet_AVX512DQ);
+ if (resultflags.HasInstructionSet(InstructionSet_AVX512DQ_VL) && !resultflags.HasInstructionSet(InstructionSet_AVX512F_VL))
+ resultflags.RemoveInstructionSet(InstructionSet_AVX512DQ_VL);
#endif // TARGET_AMD64
#ifdef TARGET_X86
if (resultflags.HasInstructionSet(InstructionSet_SSE) && !resultflags.HasInstructionSet(InstructionSet_X86Base))
@@ -502,6 +598,22 @@ inline CORINFO_InstructionSetFlags EnsureInstructionSetFlagsAreValid(CORINFO_Ins
resultflags.RemoveInstructionSet(InstructionSet_MOVBE);
if (resultflags.HasInstructionSet(InstructionSet_X86Serialize) && !resultflags.HasInstructionSet(InstructionSet_X86Base))
resultflags.RemoveInstructionSet(InstructionSet_X86Serialize);
+ if (resultflags.HasInstructionSet(InstructionSet_AVX512F) && !resultflags.HasInstructionSet(InstructionSet_AVX2))
+ resultflags.RemoveInstructionSet(InstructionSet_AVX512F);
+ if (resultflags.HasInstructionSet(InstructionSet_AVX512F_VL) && !resultflags.HasInstructionSet(InstructionSet_AVX512F))
+ resultflags.RemoveInstructionSet(InstructionSet_AVX512F_VL);
+ if (resultflags.HasInstructionSet(InstructionSet_AVX512CD) && !resultflags.HasInstructionSet(InstructionSet_AVX512F))
+ resultflags.RemoveInstructionSet(InstructionSet_AVX512CD);
+ if (resultflags.HasInstructionSet(InstructionSet_AVX512CD_VL) && !resultflags.HasInstructionSet(InstructionSet_AVX512F_VL))
+ resultflags.RemoveInstructionSet(InstructionSet_AVX512CD_VL);
+ if (resultflags.HasInstructionSet(InstructionSet_AVX512BW) && !resultflags.HasInstructionSet(InstructionSet_AVX512F))
+ resultflags.RemoveInstructionSet(InstructionSet_AVX512BW);
+ if (resultflags.HasInstructionSet(InstructionSet_AVX512BW_VL) && !resultflags.HasInstructionSet(InstructionSet_AVX512F_VL))
+ resultflags.RemoveInstructionSet(InstructionSet_AVX512BW_VL);
+ if (resultflags.HasInstructionSet(InstructionSet_AVX512DQ) && !resultflags.HasInstructionSet(InstructionSet_AVX512F))
+ resultflags.RemoveInstructionSet(InstructionSet_AVX512DQ);
+ if (resultflags.HasInstructionSet(InstructionSet_AVX512DQ_VL) && !resultflags.HasInstructionSet(InstructionSet_AVX512F_VL))
+ resultflags.RemoveInstructionSet(InstructionSet_AVX512DQ_VL);
#endif // TARGET_X86
} while (!oldflags.Equals(resultflags));
@@ -642,6 +754,38 @@ inline const char *InstructionSetToString(CORINFO_InstructionSet instructionSet)
return "X86Serialize";
case InstructionSet_X86Serialize_X64 :
return "X86Serialize_X64";
+ case InstructionSet_AVX512F :
+ return "AVX512F";
+ case InstructionSet_AVX512F_X64 :
+ return "AVX512F_X64";
+ case InstructionSet_AVX512F_VL :
+ return "AVX512F_VL";
+ case InstructionSet_AVX512F_VL_X64 :
+ return "AVX512F_VL_X64";
+ case InstructionSet_AVX512BW :
+ return "AVX512BW";
+ case InstructionSet_AVX512BW_X64 :
+ return "AVX512BW_X64";
+ case InstructionSet_AVX512BW_VL :
+ return "AVX512BW_VL";
+ case InstructionSet_AVX512BW_VL_X64 :
+ return "AVX512BW_VL_X64";
+ case InstructionSet_AVX512CD :
+ return "AVX512CD";
+ case InstructionSet_AVX512CD_X64 :
+ return "AVX512CD_X64";
+ case InstructionSet_AVX512CD_VL :
+ return "AVX512CD_VL";
+ case InstructionSet_AVX512CD_VL_X64 :
+ return "AVX512CD_VL_X64";
+ case InstructionSet_AVX512DQ :
+ return "AVX512DQ";
+ case InstructionSet_AVX512DQ_X64 :
+ return "AVX512DQ_X64";
+ case InstructionSet_AVX512DQ_VL :
+ return "AVX512DQ_VL";
+ case InstructionSet_AVX512DQ_VL_X64 :
+ return "AVX512DQ_VL_X64";
#endif // TARGET_AMD64
#ifdef TARGET_X86
case InstructionSet_X86Base :
@@ -686,6 +830,22 @@ inline const char *InstructionSetToString(CORINFO_InstructionSet instructionSet)
return "MOVBE";
case InstructionSet_X86Serialize :
return "X86Serialize";
+ case InstructionSet_AVX512F :
+ return "AVX512F";
+ case InstructionSet_AVX512F_VL :
+ return "AVX512F_VL";
+ case InstructionSet_AVX512BW :
+ return "AVX512BW";
+ case InstructionSet_AVX512BW_VL :
+ return "AVX512BW_VL";
+ case InstructionSet_AVX512CD :
+ return "AVX512CD";
+ case InstructionSet_AVX512CD_VL :
+ return "AVX512CD_VL";
+ case InstructionSet_AVX512DQ :
+ return "AVX512DQ";
+ case InstructionSet_AVX512DQ_VL :
+ return "AVX512DQ_VL";
#endif // TARGET_X86
default:
@@ -737,6 +897,14 @@ inline CORINFO_InstructionSet InstructionSetFromR2RInstructionSet(ReadyToRunInst
case READYTORUN_INSTRUCTION_AvxVnni: return InstructionSet_AVXVNNI;
case READYTORUN_INSTRUCTION_Movbe: return InstructionSet_MOVBE;
case READYTORUN_INSTRUCTION_X86Serialize: return InstructionSet_X86Serialize;
+ case READYTORUN_INSTRUCTION_Avx512F: return InstructionSet_AVX512F;
+ case READYTORUN_INSTRUCTION_Avx512F_VL: return InstructionSet_AVX512F_VL;
+ case READYTORUN_INSTRUCTION_Avx512BW: return InstructionSet_AVX512BW;
+ case READYTORUN_INSTRUCTION_Avx512BW_VL: return InstructionSet_AVX512BW_VL;
+ case READYTORUN_INSTRUCTION_Avx512CD: return InstructionSet_AVX512CD;
+ case READYTORUN_INSTRUCTION_Avx512CD_VL: return InstructionSet_AVX512CD_VL;
+ case READYTORUN_INSTRUCTION_Avx512DQ: return InstructionSet_AVX512DQ;
+ case READYTORUN_INSTRUCTION_Avx512DQ_VL: return InstructionSet_AVX512DQ_VL;
#endif // TARGET_AMD64
#ifdef TARGET_X86
case READYTORUN_INSTRUCTION_X86Base: return InstructionSet_X86Base;
@@ -758,6 +926,14 @@ inline CORINFO_InstructionSet InstructionSetFromR2RInstructionSet(ReadyToRunInst
case READYTORUN_INSTRUCTION_AvxVnni: return InstructionSet_AVXVNNI;
case READYTORUN_INSTRUCTION_Movbe: return InstructionSet_MOVBE;
case READYTORUN_INSTRUCTION_X86Serialize: return InstructionSet_X86Serialize;
+ case READYTORUN_INSTRUCTION_Avx512F: return InstructionSet_AVX512F;
+ case READYTORUN_INSTRUCTION_Avx512F_VL: return InstructionSet_AVX512F_VL;
+ case READYTORUN_INSTRUCTION_Avx512BW: return InstructionSet_AVX512BW;
+ case READYTORUN_INSTRUCTION_Avx512BW_VL: return InstructionSet_AVX512BW_VL;
+ case READYTORUN_INSTRUCTION_Avx512CD: return InstructionSet_AVX512CD;
+ case READYTORUN_INSTRUCTION_Avx512CD_VL: return InstructionSet_AVX512CD_VL;
+ case READYTORUN_INSTRUCTION_Avx512DQ: return InstructionSet_AVX512DQ;
+ case READYTORUN_INSTRUCTION_Avx512DQ_VL: return InstructionSet_AVX512DQ_VL;
#endif // TARGET_X86
default:
diff --git a/src/coreclr/inc/getproductversionnumber.h b/src/coreclr/inc/getproductversionnumber.h
deleted file mode 100644
index 068ed784930..00000000000
--- a/src/coreclr/inc/getproductversionnumber.h
+++ /dev/null
@@ -1,76 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-// GetProductVersionNumber.h
-//
-// Helper function to retrieve the file version number of a file.
-//
-// ======================================================================================
-
-
-
-#ifndef __GetProductVersionNumber_h__
-#define __GetProductVersionNumber_h__
-
-#include "contract.h"
-#include "sstring.h"
-#include "holder.h"
-#include "ex.h"
-
-//---------------------------------------------------------------------------------------
-//
-// Given the full path to an image, return the product version number.
-//
-// Arguments:
-// szFullPath - full path to the image
-// pdwVersionMS - out parameter; return the most significant 4 bytes of the version number according to
-// the VS_FIXEDFILEINFO convention
-// pdwVersionLS - out parameter; return the least significant 4 bytes of the version number according to
-// the VS_FIXEDFILEINFO convention
-//
-// Notes:
-// Throws on error
-
-void inline GetProductVersionNumber(SString &szFullPath, DWORD * pdwVersionMS, DWORD * pdwVersionLS)
-{
- WRAPPER_NO_CONTRACT;
-#ifndef TARGET_UNIX
-
- DWORD dwDummy = 0;
- DWORD dwFileInfoSize = 0;
-
- // Get the size of all of the file version information.
- dwFileInfoSize = GetFileVersionInfoSize(szFullPath, &dwDummy);
- if (dwFileInfoSize == 0)
- {
- ThrowLastError();
- }
-
- // Create the buffer to store the file information.
- NewHolder<BYTE> pbFileInfo(new BYTE[dwFileInfoSize]);
-
- // Actually retrieve the file version information.
- if (!GetFileVersionInfo(szFullPath, NULL, dwFileInfoSize, pbFileInfo))
- {
- ThrowLastError();
- }
-
- // Now retrieve only the relevant version information, which will be returned in a VS_FIXEDFILEINFO.
- UINT uVersionInfoSize = 0;
- VS_FIXEDFILEINFO * pVersionInfo = NULL;
-
- if (!VerQueryValue(pbFileInfo, W("\\"), reinterpret_cast<LPVOID *>(&pVersionInfo), &uVersionInfoSize))
- {
- ThrowLastError();
- }
- _ASSERTE(uVersionInfoSize == sizeof(VS_FIXEDFILEINFO));
-
- *pdwVersionMS = pVersionInfo->dwProductVersionMS;
- *pdwVersionLS = pVersionInfo->dwProductVersionLS;
-#else
- *pdwVersionMS = 0;
- *pdwVersionLS = 0;
-#endif // TARGET_UNIX
-}
-
-#endif // __GetProductVersionNumber_h__
diff --git a/src/coreclr/inc/jiteeversionguid.h b/src/coreclr/inc/jiteeversionguid.h
index 68d305e4f5d..311217aee25 100644
--- a/src/coreclr/inc/jiteeversionguid.h
+++ b/src/coreclr/inc/jiteeversionguid.h
@@ -43,11 +43,11 @@ typedef const GUID *LPCGUID;
#define GUID_DEFINED
#endif // !GUID_DEFINED
-constexpr GUID JITEEVersionIdentifier = { /* 0cd8b9d4-04f4-45a7-b16b-7f24b7c0a454 */
- 0x0cd8b9d4,
- 0x04f4,
- 0x45a7,
- {0xb1, 0x6b, 0x7f, 0x24, 0xb7, 0xc0, 0xa4, 0x54}
+constexpr GUID JITEEVersionIdentifier = { /* eb8352bd-0a13-4b5b-badb-58f9ecc40c44 */
+ 0xeb8352bd,
+ 0x0a13,
+ 0x4b5b,
+ {0xba, 0xdb, 0x58, 0xf9, 0xec, 0xc4, 0x0c, 0x44}
};
//////////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/coreclr/inc/MSCOREE.IDL b/src/coreclr/inc/mscoree.idl
index 1a5124ffbb2..1a5124ffbb2 100644
--- a/src/coreclr/inc/MSCOREE.IDL
+++ b/src/coreclr/inc/mscoree.idl
diff --git a/src/coreclr/inc/ostype.h b/src/coreclr/inc/ostype.h
index 78494c71c2b..58a8f726d5a 100644
--- a/src/coreclr/inc/ostype.h
+++ b/src/coreclr/inc/ostype.h
@@ -14,12 +14,9 @@
//*****************************************************************************
// Enum to track which version of the OS we are running
-// Note that NT5 (Win2k) is the minimum supported platform. Any code using
+// Note that Win7 is the minimum supported platform. Any code using
// utilcode (which includes the CLR's execution engine) will fail to start
-// on a pre-Win2k platform. This is enforced by InitRunningOnVersionStatus.
-//
-// Note: The value is used for data mining from links clicked by user in shim dialog - see code:FWLinkTemplateFromTextID
-// Please do not modify existing values, adding new ones is fine.
+// on a pre-Win7 platform. This is enforced by InitRunningOnVersionStatus.
//*****************************************************************************
typedef enum {
RUNNING_ON_STATUS_UNINITED = 0,
diff --git a/src/coreclr/inc/readytoruninstructionset.h b/src/coreclr/inc/readytoruninstructionset.h
index 658d66b806d..a46f7133c6f 100644
--- a/src/coreclr/inc/readytoruninstructionset.h
+++ b/src/coreclr/inc/readytoruninstructionset.h
@@ -37,6 +37,14 @@ enum ReadyToRunInstructionSet
READYTORUN_INSTRUCTION_Rcpc=26,
READYTORUN_INSTRUCTION_Movbe=27,
READYTORUN_INSTRUCTION_X86Serialize=28,
+ READYTORUN_INSTRUCTION_Avx512F=29,
+ READYTORUN_INSTRUCTION_Avx512F_VL=30,
+ READYTORUN_INSTRUCTION_Avx512BW=31,
+ READYTORUN_INSTRUCTION_Avx512BW_VL=32,
+ READYTORUN_INSTRUCTION_Avx512CD=33,
+ READYTORUN_INSTRUCTION_Avx512CD_VL=34,
+ READYTORUN_INSTRUCTION_Avx512DQ=35,
+ READYTORUN_INSTRUCTION_Avx512DQ_VL=36,
};
diff --git a/src/coreclr/inc/volatile.h b/src/coreclr/inc/volatile.h
index d0b2df95980..177c4932166 100644
--- a/src/coreclr/inc/volatile.h
+++ b/src/coreclr/inc/volatile.h
@@ -342,12 +342,9 @@ private:
public:
//
- // Default constructor. Results in an uninitialized value!
+ // Default constructor.
//
- inline Volatile()
- {
- STATIC_CONTRACT_SUPPORTS_DAC;
- }
+ inline Volatile() = default;
//
// Allow initialization of Volatile<T> from a T
diff --git a/src/coreclr/jit/CMakeLists.txt b/src/coreclr/jit/CMakeLists.txt
index ef9f907bc87..e94996501f3 100644
--- a/src/coreclr/jit/CMakeLists.txt
+++ b/src/coreclr/jit/CMakeLists.txt
@@ -165,7 +165,6 @@ set( JIT_SOURCES
ssarenamestate.cpp
stacklevelsetter.cpp
treelifeupdater.cpp
- typeinfo.cpp
unwind.cpp
utils.cpp
valuenum.cpp
diff --git a/src/coreclr/jit/_typeinfo.h b/src/coreclr/jit/_typeinfo.h
index c8a12c76164..e8558ba68b7 100644
--- a/src/coreclr/jit/_typeinfo.h
+++ b/src/coreclr/jit/_typeinfo.h
@@ -35,24 +35,6 @@ enum ti_types
#define TI_I_IMPL TI_INT
#endif
-#ifdef DEBUG
-#if VERBOSE_VERIFY
-#define TI_DUMP_PADDING " "
-#ifdef _MSC_VER
-namespace
-{
-#endif // _MSC_VER
-const char* g_ti_type_names_map[] = {
-#define DEF_TI(ti, nm) nm,
-#include "titypes.h"
-#undef DEF_TI
-};
-#ifdef _MSC_VER
-}
-#endif // _MSC_VER
-#endif // VERBOSE_VERIFY
-#endif // DEBUG
-
#ifdef _MSC_VER
namespace
{
@@ -66,15 +48,6 @@ const ti_types g_jit_types_map[] = {
}
#endif // _MSC_VER
-#ifdef DEBUG
-#if VERBOSE_VERIFY
-inline const char* tiType2Str(ti_types type)
-{
- return g_ti_type_names_map[type];
-}
-#endif // VERBOSE_VERIFY
-#endif // DEBUG
-
// typeInfo does not care about distinction between signed/unsigned
// This routine converts all unsigned types to signed ones
inline ti_types varType2tiType(var_types type)
@@ -163,8 +136,7 @@ public:
*
* Flags: LLLLLLLLLLLLLLLLffffffffffTTTTTT
*
- * L = local var # or instance field #
- * x = unused
+ * L = unused
* f = flags
* T = type
*
@@ -179,102 +151,14 @@ public:
* TI_BYREF in this component. For example, the type component
* of a "byref TI_INT" is TI_FLAG_BYREF | TI_INT.
*
- * NOTE carefully that Generic Type Variable info is
- * only stored here in part. Values of type "T" (e.g "!0" in ILASM syntax),
- * i.e. some generic variable type, appear only when verifying generic
- * code. They come in two flavours: unboxed and boxed. Unboxed
- * is the norm, e.g. a local, field or argument of type T. Boxed
- * values arise from an IL instruction such as "box !0".
- * The EE provides type handles for each different type
- * variable and the EE's "canCast" operation decides casting
- * for boxed type variable. Thus:
- *
- * (TI_REF, <type-variable-type-handle>) == boxed type variable
- *
- * (TI_REF, <type-variable-type-handle>)
- * + TI_FLAG_GENERIC_TYPE_VAR == unboxed type variable
- *
- * Using TI_REF for these may seem odd but using TI_STRUCT means the
- * code-generation parts of the importer get confused when they
- * can't work out the size, GC-ness etc. of the "struct". So using TI_REF
- * just tricks these backend parts into generating pseudo-trees for
- * the generic code we're verifying. These trees then get thrown away
- * anyway as we do verification of generic code in import-only mode.
- *
*/
#define TI_FLAG_DATA_BITS 6
#define TI_FLAG_DATA_MASK ((1 << TI_FLAG_DATA_BITS) - 1)
-// Flag indicating this item is uninitialized
-// Note that if UNINIT and BYREF are both set,
-// it means byref (uninit x) - i.e. we are pointing to an uninit <something>
-
-#define TI_FLAG_UNINIT_OBJREF 0x00000040
-
// Flag indicating this item is a byref <something>
-
#define TI_FLAG_BYREF 0x00000080
-
-// This item is a byref generated using the readonly. prefix
-// to a ldelema or Address function on an array type. The
-// runtime type check is ignored in these cases, but the
-// resulting byref can only be used in order to perform a
-// constraint call.
-
-#define TI_FLAG_BYREF_READONLY 0x00000100
-
-// This item is the MSIL 'I' type which is pointer-sized
-// (different size depending on platform) but which on ALL platforms
-// is implicitly convertible with a 32-bit int but not with a 64-bit one.
-
-// Note: this flag is currently used only in 64-bit systems to annotate
-// native int types. In 32 bits, since you can transparently coalesce int32
-// and native-int and both are the same size, JIT32 had no need to model
-// native-ints as a separate entity. For 64-bit though, since they have
-// different size, it's important to discern between a long and a native int
-// since conversions between them are not verifiable.
-#define TI_FLAG_NATIVE_INT 0x00000200
-
-// This item contains the 'this' pointer (used for tracking)
-
-#define TI_FLAG_THIS_PTR 0x00001000
-
-// This item is a byref to something which has a permanent home
-// (e.g. a static field, or instance field of an object in GC heap, as
-// opposed to the stack or a local variable). TI_FLAG_BYREF must also be
-// set. This information is useful for tail calls and return byrefs.
-//
-// Instructions that generate a permanent home byref:
-//
-// ldelema
-// ldflda of a ref object or another permanent home byref
-// array element address Get() helper
-// call or calli to a method that returns a byref and is verifiable or SkipVerify
-// dup
-// unbox
-
-#define TI_FLAG_BYREF_PERMANENT_HOME 0x00002000
-
-// This is for use when verifying generic code.
-// This indicates that the type handle is really an unboxed
-// generic type variable (e.g. the result of loading an argument
-// of type T in a class List<T>). Without this flag
-// the same type handle indicates a boxed generic value,
-// e.g. the result of a "box T" instruction.
-#define TI_FLAG_GENERIC_TYPE_VAR 0x00004000
-
-// Number of bits local var # is shifted
-
-#define TI_FLAG_LOCAL_VAR_SHIFT 16
-#define TI_FLAG_LOCAL_VAR_MASK 0xFFFF0000
-
-// Field info uses the same space as the local info
-
-#define TI_FLAG_FIELD_SHIFT TI_FLAG_LOCAL_VAR_SHIFT
-#define TI_FLAG_FIELD_MASK TI_FLAG_LOCAL_VAR_MASK
-
-#define TI_ALL_BYREF_FLAGS (TI_FLAG_BYREF | TI_FLAG_BYREF_READONLY | TI_FLAG_BYREF_PERMANENT_HOME)
+#define TI_ALL_BYREF_FLAGS (TI_FLAG_BYREF)
/*****************************************************************************
* A typeInfo can be one of several types:
@@ -283,12 +167,6 @@ public:
* - An array (m_cls describes the array type)
* - A byref (byref flag set, otherwise the same as the above),
* - A Function Pointer (m_methodPointerInfo)
- * - A byref local variable (byref and byref local flags set), can be
- * uninitialized
- *
- * The reason that there can be 2 types of byrefs (general byrefs, and byref
- * locals) is that byref locals initially point to uninitialized items.
- * Therefore these byrefs must be tracked specially.
*/
class typeInfo
@@ -299,15 +177,15 @@ private:
struct
{
ti_types type : TI_FLAG_DATA_BITS;
- unsigned uninitobj : 1; // used
- unsigned byref : 1; // used
- unsigned byref_readonly : 1; // used
- unsigned nativeInt : 1; // used
- unsigned : 1; // unused
- unsigned : 1; // unused
- unsigned thisPtr : 1; // used
- unsigned thisPermHome : 1; // used
- unsigned generic_type_var : 1; // used
+ unsigned : 1; // unused
+ unsigned byref : 1; // used
+ unsigned : 1; // unused
+ unsigned : 1; // unused
+ unsigned : 1; // unused
+ unsigned : 1; // unused
+ unsigned : 1; // unused
+ unsigned : 1; // unused
+ unsigned : 1; // unused
} m_bits;
DWORD m_flags;
@@ -351,25 +229,12 @@ public:
m_cls = NO_CLASS_HANDLE;
}
- static typeInfo nativeInt()
- {
- typeInfo result = typeInfo(TI_I_IMPL);
-#ifdef TARGET_64BIT
- result.m_flags |= TI_FLAG_NATIVE_INT;
-#endif
- return result;
- }
-
- typeInfo(ti_types tiType, CORINFO_CLASS_HANDLE cls, bool typeVar = false)
+ typeInfo(ti_types tiType, CORINFO_CLASS_HANDLE cls)
{
assert(tiType == TI_STRUCT || tiType == TI_REF);
assert(cls != nullptr && !isInvalidHandle(cls));
m_flags = tiType;
- if (typeVar)
- {
- m_flags |= TI_FLAG_GENERIC_TYPE_VAR;
- }
- m_cls = cls;
+ m_cls = cls;
}
typeInfo(methodPointerInfo* methodPointerInfo)
@@ -381,142 +246,14 @@ public:
m_methodPointerInfo = methodPointerInfo;
}
-#ifdef DEBUG
-#if VERBOSE_VERIFY
- void Dump() const;
-#endif // VERBOSE_VERIFY
-#endif // DEBUG
-
public:
- // Note that we specifically ignore the permanent byref here. The rationale is that
- // the type system doesn't know about this (it's jit only), ie, signatures don't specify if
- // a byref is safe, so they are fully equivalent for the jit, except for the RET instruction,
- // instructions that load safe byrefs and the stack merging logic, which need to know about
- // the bit
- static bool AreEquivalent(const typeInfo& li, const typeInfo& ti)
- {
- DWORD allFlags = TI_FLAG_DATA_MASK | TI_FLAG_BYREF | TI_FLAG_BYREF_READONLY | TI_FLAG_GENERIC_TYPE_VAR |
- TI_FLAG_UNINIT_OBJREF;
-#ifdef TARGET_64BIT
- allFlags |= TI_FLAG_NATIVE_INT;
-#endif // TARGET_64BIT
-
- if ((li.m_flags & allFlags) != (ti.m_flags & allFlags))
- {
- return false;
- }
-
- unsigned type = li.m_flags & TI_FLAG_DATA_MASK;
- assert(TI_ERROR <
- TI_ONLY_ENUM); // TI_ERROR looks like it needs more than enum. This optimises the success case a bit
- if (type > TI_ONLY_ENUM)
- {
- return true;
- }
- if (type == TI_ERROR)
- {
- return false; // TI_ERROR != TI_ERROR
- }
- assert(li.m_cls != NO_CLASS_HANDLE && ti.m_cls != NO_CLASS_HANDLE);
- return li.m_cls == ti.m_cls;
- }
-
-#ifdef DEBUG
- // On 64-bit systems, nodes whose "proper" type is "native int" get labeled TYP_LONG.
- // In the verification type system, we always transform "native int" to "TI_LONG" with the
- // native int flag set.
- // Ideally, we would keep track of which nodes labeled "TYP_LONG" are really "native int", but
- // attempts to do that have proved too difficult. So in situations where we try to compare the
- // verification type system and the node type system, we use this method, which allows the specific
- // mismatch where "verTi" is TI_LONG with the native int flag and "nodeTi" is TI_LONG without the
- // native int flag set.
- static bool AreEquivalentModuloNativeInt(const typeInfo& verTi, const typeInfo& nodeTi)
- {
- if (AreEquivalent(verTi, nodeTi))
- {
- return true;
- }
-#ifdef TARGET_64BIT
- return (nodeTi.IsType(TI_I_IMPL) && tiCompatibleWith(nullptr, verTi, typeInfo::nativeInt(), true)) ||
- (verTi.IsType(TI_I_IMPL) && tiCompatibleWith(nullptr, typeInfo::nativeInt(), nodeTi, true));
-#else // TARGET_64BIT
- return false;
-#endif // !TARGET_64BIT
- }
-#endif // DEBUG
-
- static bool tiMergeToCommonParent(COMP_HANDLE CompHnd, typeInfo* pDest, const typeInfo* pSrc, bool* changed);
- static bool tiCompatibleWith(COMP_HANDLE CompHnd,
- const typeInfo& child,
- const typeInfo& parent,
- bool normalisedForStack);
-
- static bool tiMergeCompatibleWith(COMP_HANDLE CompHnd,
- const typeInfo& child,
- const typeInfo& parent,
- bool normalisedForStack);
-
/////////////////////////////////////////////////////////////////////////
// Operations
/////////////////////////////////////////////////////////////////////////
- void SetIsThisPtr()
- {
- m_flags |= TI_FLAG_THIS_PTR;
- assert(m_bits.thisPtr);
- }
-
- void ClearThisPtr()
- {
- m_flags &= ~(TI_FLAG_THIS_PTR);
- }
-
- void SetIsPermanentHomeByRef()
- {
- assert(IsByRef());
- m_flags |= TI_FLAG_BYREF_PERMANENT_HOME;
- }
-
- void SetIsReadonlyByRef()
- {
- assert(IsByRef());
- m_flags |= TI_FLAG_BYREF_READONLY;
- }
-
- // Set that this item is uninitialized.
- void SetUninitialisedObjRef()
- {
- assert((IsObjRef() && IsThisPtr()));
- // For now, this is used only to track uninit this ptrs in ctors
-
- m_flags |= TI_FLAG_UNINIT_OBJREF;
- assert(m_bits.uninitobj);
- }
-
- // Set that this item is initialised.
- void SetInitialisedObjRef()
- {
- assert((IsObjRef() && IsThisPtr()));
- // For now, this is used only to track uninit this ptrs in ctors
-
- m_flags &= ~TI_FLAG_UNINIT_OBJREF;
- }
-
- typeInfo& DereferenceByRef()
- {
- if (!IsByRef())
- {
- m_flags = TI_ERROR;
- INDEBUG(m_cls = NO_CLASS_HANDLE);
- }
- m_flags &= ~(TI_FLAG_THIS_PTR | TI_ALL_BYREF_FLAGS);
- return *this;
- }
-
typeInfo& MakeByRef()
{
assert(!IsByRef());
- m_flags &= ~(TI_FLAG_THIS_PTR);
m_flags |= TI_FLAG_BYREF;
return *this;
}
@@ -598,14 +335,7 @@ public:
bool IsType(ti_types type) const
{
assert(type != TI_ERROR);
- return (m_flags & (TI_FLAG_DATA_MASK | TI_FLAG_BYREF | TI_FLAG_BYREF_READONLY | TI_FLAG_BYREF_PERMANENT_HOME |
- TI_FLAG_GENERIC_TYPE_VAR)) == DWORD(type);
- }
-
- // Returns whether this is an objref
- bool IsObjRef() const
- {
- return IsType(TI_REF) || IsType(TI_NULL);
+ return (m_flags & (TI_FLAG_DATA_MASK | TI_FLAG_BYREF)) == DWORD(type);
}
// Returns whether this is a by-ref
@@ -614,27 +344,6 @@ public:
return (m_flags & TI_FLAG_BYREF);
}
- // Returns whether this is the this pointer
- bool IsThisPtr() const
- {
- return (m_flags & TI_FLAG_THIS_PTR);
- }
-
- bool IsUnboxedGenericTypeVar() const
- {
- return !IsByRef() && (m_flags & TI_FLAG_GENERIC_TYPE_VAR);
- }
-
- bool IsReadonlyByRef() const
- {
- return IsByRef() && (m_flags & TI_FLAG_BYREF_READONLY);
- }
-
- bool IsPermanentHomeByRef() const
- {
- return IsByRef() && (m_flags & TI_FLAG_BYREF_PERMANENT_HOME);
- }
-
// Returns whether this is a method desc
bool IsMethod() const
{
@@ -652,65 +361,6 @@ public:
return (IsStruct() || IsPrimitiveType());
}
- // Does not return true for primitives. Will return true for value types that behave
- // as primitives
- bool IsValueClassWithClsHnd() const
- {
- if ((GetType() == TI_STRUCT) ||
- (m_cls && GetType() != TI_REF && GetType() != TI_METHOD &&
- GetType() != TI_ERROR)) // necessary because if byref bit is set, we return TI_ERROR)
- {
- return true;
- }
- else
- {
- return false;
- }
- }
-
- // Returns whether this is an integer or real number
- // NOTE: Use NormaliseToPrimitiveType() if you think you may have a
- // System.Int32 etc., because those types are not considered number
- // types by this function.
- bool IsNumberType() const
- {
- ti_types Type = GetType();
-
- // I1, I2, Boolean, character etc. cannot exist plainly -
- // everything is at least an I4
-
- return (Type == TI_INT || Type == TI_LONG || Type == TI_DOUBLE);
- }
-
- // Returns whether this is an integer
- // NOTE: Use NormaliseToPrimitiveType() if you think you may have a
- // System.Int32 etc., because those types are not considered number
- // types by this function.
- bool IsIntegerType() const
- {
- ti_types Type = GetType();
-
- // I1, I2, Boolean, character etc. cannot exist plainly -
- // everything is at least an I4
-
- return (Type == TI_INT || Type == TI_LONG);
- }
-
- // Returns true whether this is an integer or a native int.
- bool IsIntOrNativeIntType() const
- {
-#ifdef TARGET_64BIT
- return (GetType() == TI_INT) || AreEquivalent(*this, nativeInt());
-#else
- return IsType(TI_INT);
-#endif
- }
-
- bool IsNativeIntType() const
- {
- return AreEquivalent(*this, nativeInt());
- }
-
// Returns whether this is a primitive type (not a byref, objref,
// array, null, value class, invalid value)
// May Need to normalise first (m/r/I4 --> I4)
@@ -723,25 +373,6 @@ public:
Type == TI_DOUBLE);
}
- // Returns whether this is the null objref
- bool IsNullObjRef() const
- {
- return (IsType(TI_NULL));
- }
-
- // must be for a local which is an object type (i.e. has a slot >= 0)
- // for primitive locals, use the liveness bitmap instead
- // Note that this works if the error is 'Byref'
- bool IsDead() const
- {
- return (m_flags & (TI_FLAG_DATA_MASK)) == TI_ERROR;
- }
-
- bool IsUninitialisedObjRef() const
- {
- return (m_flags & TI_FLAG_UNINIT_OBJREF);
- }
-
private:
// used to make functions that return typeinfo efficient.
typeInfo(DWORD flags, CORINFO_CLASS_HANDLE cls)
@@ -751,7 +382,6 @@ private:
}
friend typeInfo ByRef(const typeInfo& ti);
- friend typeInfo DereferenceByRef(const typeInfo& ti);
friend typeInfo NormaliseForStack(const typeInfo& ti);
};
@@ -765,12 +395,6 @@ inline typeInfo ByRef(const typeInfo& ti)
{
return typeInfo(ti).MakeByRef();
}
-
-// given ti which is a byref, return the type it points at
-inline typeInfo DereferenceByRef(const typeInfo& ti)
-{
- return typeInfo(ti).DereferenceByRef();
-}
/*****************************************************************************/
#endif // _TYPEINFO_H_
/*****************************************************************************/
diff --git a/src/coreclr/jit/assertionprop.cpp b/src/coreclr/jit/assertionprop.cpp
index b140c8caf8a..5432b3c0bd9 100644
--- a/src/coreclr/jit/assertionprop.cpp
+++ b/src/coreclr/jit/assertionprop.cpp
@@ -1489,22 +1489,6 @@ AssertionIndex Compiler::optCreateAssertion(GenTree* op1,
goto DONE_ASSERTION; // Don't make an assertion
}
- // If the local is a promoted struct and has an exposed field then bail.
- //
- if (lclVar->lvPromoted)
- {
- for (unsigned childLclNum = lclVar->lvFieldLclStart;
- childLclNum < lclVar->lvFieldLclStart + lclVar->lvFieldCnt; ++childLclNum)
- {
- LclVarDsc* const childVar = lvaGetDesc(childLclNum);
-
- if (childVar->IsAddressExposed())
- {
- goto DONE_ASSERTION;
- }
- }
- }
-
if (helperCallArgs)
{
//
@@ -1724,22 +1708,6 @@ AssertionIndex Compiler::optCreateAssertion(GenTree* op1,
goto DONE_ASSERTION; // Don't make an assertion
}
- // If the local is a promoted struct and has an exposed field then bail.
- //
- if (lclVar2->lvPromoted)
- {
- for (unsigned childLclNum = lclVar2->lvFieldLclStart;
- childLclNum < lclVar2->lvFieldLclStart + lclVar2->lvFieldCnt; ++childLclNum)
- {
- LclVarDsc* const childVar = lvaGetDesc(childLclNum);
-
- if (childVar->IsAddressExposed())
- {
- goto DONE_ASSERTION;
- }
- }
- }
-
assertion.op2.kind = O2K_LCLVAR_COPY;
assertion.op2.vn = optConservativeNormalVN(op2);
assertion.op2.lcl.lclNum = lclNum2;
@@ -3211,7 +3179,7 @@ GenTree* Compiler::optVNConstantPropOnTree(BasicBlock* block, GenTree* tree)
{
simd8_t value = vnStore->ConstantValue<simd8_t>(vnCns);
- GenTreeVecCon* vecCon = gtNewVconNode(tree->TypeGet(), CORINFO_TYPE_FLOAT);
+ GenTreeVecCon* vecCon = gtNewVconNode(tree->TypeGet());
vecCon->gtSimd8Val = value;
conValTree = vecCon;
@@ -3222,7 +3190,7 @@ GenTree* Compiler::optVNConstantPropOnTree(BasicBlock* block, GenTree* tree)
{
simd12_t value = vnStore->ConstantValue<simd12_t>(vnCns);
- GenTreeVecCon* vecCon = gtNewVconNode(tree->TypeGet(), CORINFO_TYPE_FLOAT);
+ GenTreeVecCon* vecCon = gtNewVconNode(tree->TypeGet());
vecCon->gtSimd12Val = value;
conValTree = vecCon;
@@ -3233,7 +3201,7 @@ GenTree* Compiler::optVNConstantPropOnTree(BasicBlock* block, GenTree* tree)
{
simd16_t value = vnStore->ConstantValue<simd16_t>(vnCns);
- GenTreeVecCon* vecCon = gtNewVconNode(tree->TypeGet(), CORINFO_TYPE_FLOAT);
+ GenTreeVecCon* vecCon = gtNewVconNode(tree->TypeGet());
vecCon->gtSimd16Val = value;
conValTree = vecCon;
@@ -3244,7 +3212,7 @@ GenTree* Compiler::optVNConstantPropOnTree(BasicBlock* block, GenTree* tree)
{
simd32_t value = vnStore->ConstantValue<simd32_t>(vnCns);
- GenTreeVecCon* vecCon = gtNewVconNode(tree->TypeGet(), CORINFO_TYPE_FLOAT);
+ GenTreeVecCon* vecCon = gtNewVconNode(tree->TypeGet());
vecCon->gtSimd32Val = value;
conValTree = vecCon;
@@ -3420,6 +3388,18 @@ GenTree* Compiler::optConstantAssertionProp(AssertionDsc* curAssertion,
// Here we have to allocate a new 'large' node to replace the old one
newTree = gtNewIconHandleNode(curAssertion->op2.u1.iconVal,
curAssertion->op2.u1.iconFlags & GTF_ICON_HDL_MASK);
+
+ // Make sure we don't retype const gc handles to TYP_I_IMPL
+ // Although, it's possible for e.g. GTF_ICON_STATIC_HDL
+ if (!newTree->IsIntegralConst(0) && newTree->IsIconHandle(GTF_ICON_STR_HDL))
+ {
+ if (tree->TypeIs(TYP_BYREF))
+ {
+ // Conservatively don't allow propagation of ICON TYP_REF into BYREF
+ return nullptr;
+ }
+ newTree->ChangeType(tree->TypeGet());
+ }
}
else
{
diff --git a/src/coreclr/jit/block.h b/src/coreclr/jit/block.h
index 3d0f99ca361..f10de256cfa 100644
--- a/src/coreclr/jit/block.h
+++ b/src/coreclr/jit/block.h
@@ -91,23 +91,11 @@ struct StackEntry
GenTree* val;
typeInfo seTypeInfo;
};
-/*****************************************************************************/
-
-enum ThisInitState
-{
- TIS_Bottom, // We don't know anything about the 'this' pointer.
- TIS_Uninit, // The 'this' pointer for this constructor is known to be uninitialized.
- TIS_Init, // The 'this' pointer for this constructor is known to be initialized.
- TIS_Top, // This results from merging the state of two blocks one with TIS_Unint and the other with TIS_Init.
- // We use this in fault blocks to prevent us from accessing the 'this' pointer, but otherwise
- // allowing the fault block to generate code.
-};
struct EntryState
{
- ThisInitState thisInitialized; // used to track whether the this ptr is initialized.
- unsigned esStackDepth; // size of esStack
- StackEntry* esStack; // ptr to stack
+ unsigned esStackDepth; // size of esStack
+ StackEntry* esStack; // ptr to stack
};
// Enumeration of the kinds of memory whose state changes the compiler tracks
@@ -1210,10 +1198,10 @@ struct BasicBlock : private LIR::Range
bool bbFallsThrough() const;
- // Our slop fraction is 1/128 of the block weight rounded off
+ // Our slop fraction is 1/100 of the block weight.
static weight_t GetSlopFraction(weight_t weightBlk)
{
- return ((weightBlk + 64) / 128);
+ return weightBlk / 100.0;
}
// Given an the edge b1 -> b2, calculate the slop fraction by
@@ -1236,8 +1224,7 @@ struct BasicBlock : private LIR::Range
unsigned bbID;
#endif // DEBUG
- ThisInitState bbThisOnEntry() const;
- unsigned bbStackDepthOnEntry() const;
+ unsigned bbStackDepthOnEntry() const;
void bbSetStack(void* stackBuffer);
StackEntry* bbStackOnEntry() const;
diff --git a/src/coreclr/jit/codegen.h b/src/coreclr/jit/codegen.h
index 3502673faac..641aeaaef55 100644
--- a/src/coreclr/jit/codegen.h
+++ b/src/coreclr/jit/codegen.h
@@ -234,7 +234,6 @@ protected:
void genJumpToThrowHlpBlk(emitJumpKind jumpKind, SpecialCodeKind codeKind, BasicBlock* failBlk = nullptr);
#ifdef TARGET_LOONGARCH64
- void genSetRegToIcon(regNumber reg, ssize_t val, var_types type);
void genJumpToThrowHlpBlk_la(SpecialCodeKind codeKind,
instruction ins,
regNumber reg1,
@@ -1398,7 +1397,6 @@ protected:
#if defined(TARGET_ARM64)
void genCodeForJumpCompare(GenTreeOp* tree);
void genCodeForBfiz(GenTreeOp* tree);
- void genCodeForAddEx(GenTreeOp* tree);
void genCodeForCond(GenTreeOp* tree);
#endif // TARGET_ARM64
diff --git a/src/coreclr/jit/codegenarm64.cpp b/src/coreclr/jit/codegenarm64.cpp
index ad76499eb28..be1e2894044 100644
--- a/src/coreclr/jit/codegenarm64.cpp
+++ b/src/coreclr/jit/codegenarm64.cpp
@@ -2527,7 +2527,9 @@ void CodeGen::genCodeForBinary(GenTreeOp* tree)
{
// In the future, we might consider enabling this for floating-point "unsafe" math.
assert(varTypeIsIntegral(tree));
- assert(!(tree->gtFlags & GTF_SET_FLAGS));
+
+ // These operations cannot set flags
+ assert((tree->gtFlags & GTF_SET_FLAGS) == 0);
GenTree* a = op1;
GenTree* b = op2->gtGetOp1();
@@ -2560,6 +2562,139 @@ void CodeGen::genCodeForBinary(GenTreeOp* tree)
genProduceReg(tree);
return;
}
+ else if (op2->OperIs(GT_LSH, GT_RSH, GT_RSZ) && op2->isContained())
+ {
+ assert(varTypeIsIntegral(tree));
+
+ GenTree* a = op1;
+ GenTree* b = op2->gtGetOp1();
+ GenTree* c = op2->gtGetOp2();
+
+ // The shift amount needs to be contained as well
+ assert(c->isContained() && c->IsCnsIntOrI());
+
+ instruction ins = genGetInsForOper(tree->OperGet(), targetType);
+ insOpts opt = INS_OPTS_NONE;
+
+ if ((tree->gtFlags & GTF_SET_FLAGS) != 0)
+ {
+ // A subset of operations can still set flags
+
+ switch (oper)
+ {
+ case GT_ADD:
+ {
+ ins = INS_adds;
+ break;
+ }
+
+ case GT_SUB:
+ {
+ ins = INS_subs;
+ break;
+ }
+
+ case GT_AND:
+ {
+ ins = INS_ands;
+ break;
+ }
+
+ default:
+ {
+ noway_assert(!"Unexpected BinaryOp with GTF_SET_FLAGS set");
+ }
+ }
+ }
+
+ switch (op2->gtOper)
+ {
+ case GT_LSH:
+ {
+ opt = INS_OPTS_LSL;
+ break;
+ }
+
+ case GT_RSH:
+ {
+ opt = INS_OPTS_ASR;
+ break;
+ }
+
+ case GT_RSZ:
+ {
+ opt = INS_OPTS_LSR;
+ break;
+ }
+
+ default:
+ {
+ unreached();
+ }
+ }
+
+ emit->emitIns_R_R_R_I(ins, emitActualTypeSize(tree), targetReg, a->GetRegNum(), b->GetRegNum(),
+ c->AsIntConCommon()->IconValue(), opt);
+
+ genProduceReg(tree);
+ return;
+ }
+ else if (op2->OperIs(GT_CAST) && op2->isContained())
+ {
+ assert(varTypeIsIntegral(tree));
+
+ GenTree* a = op1;
+ GenTree* b = op2->AsCast()->CastOp();
+
+ instruction ins = genGetInsForOper(tree->OperGet(), targetType);
+ insOpts opt = INS_OPTS_NONE;
+
+ if ((tree->gtFlags & GTF_SET_FLAGS) != 0)
+ {
+ // A subset of operations can still set flags
+
+ switch (oper)
+ {
+ case GT_ADD:
+ {
+ ins = INS_adds;
+ break;
+ }
+
+ case GT_SUB:
+ {
+ ins = INS_subs;
+ break;
+ }
+
+ default:
+ {
+ noway_assert(!"Unexpected BinaryOp with GTF_SET_FLAGS set");
+ }
+ }
+ }
+
+ bool isZeroExtending = op2->AsCast()->IsZeroExtending();
+
+ if (varTypeIsByte(op2->CastToType()))
+ {
+ opt = isZeroExtending ? INS_OPTS_UXTB : INS_OPTS_SXTB;
+ }
+ else if (varTypeIsShort(op2->CastToType()))
+ {
+ opt = isZeroExtending ? INS_OPTS_UXTH : INS_OPTS_SXTH;
+ }
+ else
+ {
+ assert(op2->TypeIs(TYP_LONG) && genActualTypeIsInt(b));
+ opt = isZeroExtending ? INS_OPTS_UXTW : INS_OPTS_SXTW;
+ }
+
+ emit->emitIns_R_R_R(ins, emitActualTypeSize(tree), targetReg, a->GetRegNum(), b->GetRegNum(), opt);
+
+ genProduceReg(tree);
+ return;
+ }
if (tree->OperIs(GT_AND) && op2->isContainedAndNotIntOrIImmed())
{
@@ -10486,54 +10621,6 @@ void CodeGen::genCodeForBfiz(GenTreeOp* tree)
}
//------------------------------------------------------------------------
-// genCodeForAddEx: Generates the code sequence for a GenTree node that
-// represents an addition with sign or zero extended
-//
-// Arguments:
-// tree - the add with extend node.
-//
-void CodeGen::genCodeForAddEx(GenTreeOp* tree)
-{
- assert(tree->OperIs(GT_ADDEX));
- genConsumeOperands(tree);
-
- GenTree* op;
- GenTree* containedOp;
- if (tree->gtGetOp1()->isContained())
- {
- containedOp = tree->gtGetOp1();
- op = tree->gtGetOp2();
- }
- else
- {
- containedOp = tree->gtGetOp2();
- op = tree->gtGetOp1();
- }
- assert(containedOp->isContained() && !op->isContained());
-
- regNumber dstReg = tree->GetRegNum();
- regNumber op1Reg = op->GetRegNum();
- regNumber op2Reg = containedOp->gtGetOp1()->GetRegNum();
-
- if (containedOp->OperIs(GT_CAST))
- {
- GenTreeCast* cast = containedOp->AsCast();
- assert(varTypeIsLong(cast->CastToType()));
- insOpts opts = cast->IsUnsigned() ? INS_OPTS_UXTW : INS_OPTS_SXTW;
- GetEmitter()->emitIns_R_R_R(tree->gtSetFlags() ? INS_adds : INS_add, emitActualTypeSize(tree), dstReg, op1Reg,
- op2Reg, opts);
- }
- else
- {
- assert(containedOp->OperIs(GT_LSH));
- ssize_t cns = containedOp->gtGetOp2()->AsIntCon()->IconValue();
- GetEmitter()->emitIns_R_R_R_I(tree->gtSetFlags() ? INS_adds : INS_add, emitActualTypeSize(tree), dstReg, op1Reg,
- op2Reg, cns, INS_OPTS_LSL);
- }
- genProduceReg(tree);
-}
-
-//------------------------------------------------------------------------
// genCodeForCond: Generates the code sequence for a GenTree node that
// represents a conditional instruction.
//
diff --git a/src/coreclr/jit/codegenarmarch.cpp b/src/coreclr/jit/codegenarmarch.cpp
index f7bb7a91f14..b50af8b2147 100644
--- a/src/coreclr/jit/codegenarmarch.cpp
+++ b/src/coreclr/jit/codegenarmarch.cpp
@@ -315,10 +315,6 @@ void CodeGen::genCodeForTreeNode(GenTree* treeNode)
genCodeForSwap(treeNode->AsOp());
break;
- case GT_ADDEX:
- genCodeForAddEx(treeNode->AsOp());
- break;
-
case GT_BFIZ:
genCodeForBfiz(treeNode->AsOp());
break;
@@ -1205,7 +1201,15 @@ void CodeGen::genPutArgSplit(GenTreePutArgSplit* treeNode)
var_types targetType = source->TypeGet();
assert(source->isContained() && varTypeIsStruct(targetType));
- regNumber baseReg = treeNode->ExtractTempReg();
+ // We need a register to store intermediate values that we are loading
+ // from the source into. We can usually use one of the target registers
+ // that will be overridden anyway. The exception is when the source is
+ // in a register and that register is the unique target register we are
+ // placing. LSRA will always allocate an internal register when there
+ // is just one target register to handle this situation.
+ //
+ int firstRegToPlace;
+ regNumber valueReg = REG_NA;
unsigned srcLclNum = BAD_VAR_NUM;
unsigned srcLclOffset = 0;
regNumber addrReg = REG_NA;
@@ -1221,6 +1225,10 @@ void CodeGen::genPutArgSplit(GenTreePutArgSplit* treeNode)
// This struct must live on the stack frame.
assert(varDsc->lvOnFrame && !varDsc->lvRegister);
+
+ // No possible conflicts, just use the first register as the value register.
+ firstRegToPlace = 0;
+ valueReg = treeNode->GetRegNumByIdx(0);
}
else // we must have a GT_OBJ
{
@@ -1228,10 +1236,47 @@ void CodeGen::genPutArgSplit(GenTreePutArgSplit* treeNode)
addrReg = genConsumeReg(source->AsObj()->Addr());
addrType = source->AsObj()->Addr()->TypeGet();
- // If addrReg equal to baseReg, we use the last target register as alternative baseReg.
- // Because the candidate mask for the internal baseReg does not include any of the target register,
- // we can ensure that baseReg, addrReg, and the last target register are not all same.
- assert(baseReg != addrReg);
+ regNumber allocatedValueReg = REG_NA;
+ if (treeNode->gtNumRegs == 1)
+ {
+ allocatedValueReg = treeNode->ExtractTempReg();
+ }
+
+ // Pick a register to store intermediate values in for the to-stack
+ // copy. It must not conflict with addrReg. We try to prefer an
+ // argument register since those can always use thumb encoding.
+ valueReg = treeNode->GetRegNumByIdx(0);
+ if (valueReg == addrReg)
+ {
+ if (treeNode->gtNumRegs == 1)
+ {
+ valueReg = allocatedValueReg;
+ }
+ else
+ {
+ // Prefer argument register that can always use thumb encoding.
+ valueReg = treeNode->GetRegNumByIdx(1);
+ }
+ }
+
+ // Find first register to place. If we are placing addrReg, then
+ // make sure we place it last to avoid clobbering its value.
+ //
+ // The loop below will start at firstRegToPlace and place
+ // treeNode->gtNumRegs registers in order, with wraparound. For
+ // example, if the registers to place are r0, r1, r2=addrReg, r3
+ // then we will set firstRegToPlace = 3 (r3) and the loop below
+ // will place r3, r0, r1, r2. The last placement will clobber
+ // addrReg.
+ firstRegToPlace = 0;
+ for (unsigned i = 0; i < treeNode->gtNumRegs; i++)
+ {
+ if (treeNode->GetRegNumByIdx(i) == addrReg)
+ {
+ firstRegToPlace = i + 1;
+ break;
+ }
+ }
}
// Put on stack first
@@ -1268,19 +1313,18 @@ void CodeGen::genPutArgSplit(GenTreePutArgSplit* treeNode)
if (srcLclNum != BAD_VAR_NUM)
{
// Load from our local source
- emit->emitIns_R_S(loadIns, attr, baseReg, srcLclNum, srcLclOffset + structOffset);
+ emit->emitIns_R_S(loadIns, attr, valueReg, srcLclNum, srcLclOffset + structOffset);
}
else
{
- // check for case of destroying the addrRegister while we still need it
- assert(baseReg != addrReg);
+ assert(valueReg != addrReg);
// Load from our address expression source
- emit->emitIns_R_R_I(loadIns, attr, baseReg, addrReg, structOffset);
+ emit->emitIns_R_R_I(loadIns, attr, valueReg, addrReg, structOffset);
}
// Emit the instruction to store the register into the outgoing argument area
- emit->emitIns_S_R(ins_Store(type), attr, baseReg, varNumOut, argOffsetOut);
+ emit->emitIns_S_R(ins_Store(type), attr, valueReg, varNumOut, argOffsetOut);
argOffsetOut += moveSize;
assert(argOffsetOut <= argOffsetMax);
@@ -1288,13 +1332,21 @@ void CodeGen::genPutArgSplit(GenTreePutArgSplit* treeNode)
structOffset += moveSize;
}
- // We set up the registers in order, so that we assign the last target register `baseReg` is no longer in use,
- // in case we had to reuse the last target register for it.
- structOffset = 0;
- for (unsigned idx = 0; idx < treeNode->gtNumRegs; idx++)
+ // Place registers starting from firstRegToPlace. It should ensure we
+ // place addrReg last (if we place it at all).
+ structOffset = static_cast<unsigned>(firstRegToPlace) * TARGET_POINTER_SIZE;
+ unsigned curRegIndex = firstRegToPlace;
+
+ for (unsigned regsPlaced = 0; regsPlaced < treeNode->gtNumRegs; regsPlaced++)
{
- regNumber targetReg = treeNode->GetRegNumByIdx(idx);
- var_types type = treeNode->GetRegType(idx);
+ if (curRegIndex == treeNode->gtNumRegs)
+ {
+ curRegIndex = 0;
+ structOffset = 0;
+ }
+
+ regNumber targetReg = treeNode->GetRegNumByIdx(curRegIndex);
+ var_types type = treeNode->GetRegType(curRegIndex);
if (srcLclNum != BAD_VAR_NUM)
{
@@ -1303,17 +1355,13 @@ void CodeGen::genPutArgSplit(GenTreePutArgSplit* treeNode)
}
else
{
- // check for case of destroying the addrRegister while we still need it
- if (targetReg == addrReg && idx != treeNode->gtNumRegs - 1)
- {
- assert(targetReg != baseReg);
- emit->emitIns_Mov(INS_mov, emitActualTypeSize(addrType), baseReg, addrReg, /* canSkip */ false);
- addrReg = baseReg;
- }
+ assert((addrReg != targetReg) || (regsPlaced == treeNode->gtNumRegs - 1));
// Load from our address expression source
emit->emitIns_R_R_I(INS_ldr, emitTypeSize(type), targetReg, addrReg, structOffset);
}
+
+ curRegIndex++;
structOffset += TARGET_POINTER_SIZE;
}
}
diff --git a/src/coreclr/jit/codegencommon.cpp b/src/coreclr/jit/codegencommon.cpp
index c365528cbf4..6e4e7ef0bab 100644
--- a/src/coreclr/jit/codegencommon.cpp
+++ b/src/coreclr/jit/codegencommon.cpp
@@ -1030,14 +1030,7 @@ bool CodeGen::genCreateAddrMode(
if (!addr->OperIs(GT_ADD))
{
-#if TARGET_ARM64
- if (!addr->OperIs(GT_ADDEX))
- {
- return false;
- }
-#else
return false;
-#endif
}
GenTree* rv1 = nullptr;
@@ -1064,23 +1057,6 @@ bool CodeGen::genCreateAddrMode(
op2 = addr->AsOp()->gtOp2;
}
-#if TARGET_ARM64
- if (addr->OperIs(GT_ADDEX))
- {
- if (op2->isContained() && op2->OperIs(GT_CAST))
- {
- *rv1Ptr = op1;
- *rv2Ptr = op2;
- *mulPtr = 1;
- *cnsPtr = 0;
- *revPtr = false; // op2 is never a gc type
- assert(!varTypeIsGC(op2));
- return true;
- }
- return false;
- }
-#endif
-
// Can't use indirect addressing mode as we need to check for overflow.
// Also, can't use 'lea' as it doesn't set the flags.
diff --git a/src/coreclr/jit/codegenlinear.cpp b/src/coreclr/jit/codegenlinear.cpp
index d67c23dc85c..da8cae58d0c 100644
--- a/src/coreclr/jit/codegenlinear.cpp
+++ b/src/coreclr/jit/codegenlinear.cpp
@@ -1653,28 +1653,12 @@ void CodeGen::genConsumeRegs(GenTree* tree)
#ifdef FEATURE_HW_INTRINSICS
else if (tree->OperIs(GT_HWINTRINSIC))
{
- // Only load/store HW intrinsics can be contained (and the address may also be contained).
- HWIntrinsicCategory category = HWIntrinsicInfo::lookupCategory(tree->AsHWIntrinsic()->GetHWIntrinsicId());
- assert((category == HW_Category_MemoryLoad) || (category == HW_Category_MemoryStore));
- size_t numArgs = tree->AsHWIntrinsic()->GetOperandCount();
- genConsumeAddress(tree->AsHWIntrinsic()->Op(1));
- if (category == HW_Category_MemoryStore)
- {
- assert(numArgs == 2);
-
- GenTree* op2 = tree->AsHWIntrinsic()->Op(2);
- assert(op2->isContained());
-
- genConsumeReg(op2);
- }
- else
- {
- assert(numArgs == 1);
- }
+ GenTreeHWIntrinsic* hwintrinsic = tree->AsHWIntrinsic();
+ genConsumeMultiOpOperands(hwintrinsic);
}
#endif // FEATURE_HW_INTRINSICS
#endif // TARGET_XARCH
- else if (tree->OperIs(GT_BITCAST, GT_NEG, GT_CAST, GT_LSH, GT_BSWAP, GT_BSWAP16))
+ else if (tree->OperIs(GT_BITCAST, GT_NEG, GT_CAST, GT_LSH, GT_RSH, GT_RSZ, GT_BSWAP, GT_BSWAP16))
{
genConsumeRegs(tree->gtGetOp1());
}
@@ -2148,64 +2132,23 @@ void CodeGen::genProduceReg(GenTree* tree)
}
else
{
- // In case of multi-reg call node, spill flag on call node
- // indicates that one or more of its allocated regs need to
- // be spilled. Call node needs to be further queried to
- // know which of its result regs needs to be spilled.
- if (tree->IsMultiRegCall())
- {
- GenTreeCall* call = tree->AsCall();
- const ReturnTypeDesc* retTypeDesc = call->GetReturnTypeDesc();
- const unsigned regCount = retTypeDesc->GetReturnRegCount();
-
- for (unsigned i = 0; i < regCount; ++i)
- {
- GenTreeFlags flags = call->GetRegSpillFlagByIdx(i);
- if ((flags & GTF_SPILL) != 0)
- {
- regNumber reg = call->GetRegNumByIdx(i);
- regSet.rsSpillTree(reg, call, i);
- gcInfo.gcMarkRegSetNpt(genRegMask(reg));
- }
- }
- }
-#if FEATURE_ARG_SPLIT
- else if (tree->OperIsPutArgSplit())
- {
- assert(compFeatureArgSplit());
- GenTreePutArgSplit* argSplit = tree->AsPutArgSplit();
- unsigned regCount = argSplit->gtNumRegs;
-
- for (unsigned i = 0; i < regCount; ++i)
- {
- GenTreeFlags flags = argSplit->GetRegSpillFlagByIdx(i);
- if ((flags & GTF_SPILL) != 0)
- {
- regNumber reg = argSplit->GetRegNumByIdx(i);
- regSet.rsSpillTree(reg, argSplit, i);
- gcInfo.gcMarkRegSetNpt(genRegMask(reg));
- }
- }
- }
-#ifdef TARGET_ARM
- else if (compFeatureArgSplit() && tree->OperIsMultiRegOp())
+ if (tree->IsMultiRegNode())
{
- GenTreeMultiRegOp* multiReg = tree->AsMultiRegOp();
- unsigned regCount = multiReg->GetRegCount();
+ // In case of multi-reg node, spill flag on it indicates that one or more of its allocated regs need to
+ // be spilled, and it needs to be further queried to know which of its result regs needs to be spilled.
+ const unsigned regCount = tree->GetMultiRegCount(compiler);
for (unsigned i = 0; i < regCount; ++i)
{
- GenTreeFlags flags = multiReg->GetRegSpillFlagByIdx(i);
+ GenTreeFlags flags = tree->GetRegSpillFlagByIdx(i);
if ((flags & GTF_SPILL) != 0)
{
- regNumber reg = multiReg->GetRegNumByIdx(i);
- regSet.rsSpillTree(reg, multiReg, i);
+ regNumber reg = tree->GetRegByIndex(i);
+ regSet.rsSpillTree(reg, tree, i);
gcInfo.gcMarkRegSetNpt(genRegMask(reg));
}
}
}
-#endif // TARGET_ARM
-#endif // FEATURE_ARG_SPLIT
else
{
regSet.rsSpillTree(tree->GetRegNum(), tree);
diff --git a/src/coreclr/jit/codegenloongarch64.cpp b/src/coreclr/jit/codegenloongarch64.cpp
index 0a67cddb0ee..12ced2641d1 100644
--- a/src/coreclr/jit/codegenloongarch64.cpp
+++ b/src/coreclr/jit/codegenloongarch64.cpp
@@ -1778,21 +1778,25 @@ void CodeGen::genSetRegToConst(regNumber targetReg, var_types targetType, GenTre
{
// relocatable values tend to come down as a CNS_INT of native int type
// so the line between these two opcodes is kind of blurry
- GenTreeIntConCommon* con = tree->AsIntConCommon();
- ssize_t cnsVal = con->IconValue();
+ GenTreeIntCon* con = tree->AsIntCon();
+ ssize_t cnsVal = con->IconValue();
- // if (con->ImmedValNeedsReloc(compiler))
- if (con->ImmedValNeedsReloc(compiler) && compiler->opts.compReloc)
+ emitAttr attr = emitActualTypeSize(targetType);
+ // TODO-CQ: Currently we cannot do this for all handles because of
+ // https://github.com/dotnet/runtime/issues/60712
+ if (con->ImmedValNeedsReloc(compiler))
{
- // instGen_Set_Reg_To_Imm(EA_HANDLE_CNS_RELOC, targetReg, cnsVal);
- assert(compiler->opts.compReloc);
- GetEmitter()->emitIns_R_AI(INS_bl, EA_HANDLE_CNS_RELOC, targetReg, cnsVal);
- regSet.verifyRegUsed(targetReg);
+ attr = EA_SET_FLG(attr, EA_CNS_RELOC_FLG);
}
- else
+
+ if (targetType == TYP_BYREF)
{
- genSetRegToIcon(targetReg, cnsVal, targetType);
+ attr = EA_SET_FLG(attr, EA_BYREF_FLG);
}
+
+ instGen_Set_Reg_To_Imm(attr, targetReg, cnsVal,
+ INS_FLAGS_DONT_CARE DEBUGARG(con->gtTargetHandle) DEBUGARG(con->gtFlags));
+ regSet.verifyRegUsed(targetReg);
}
break;
@@ -2366,7 +2370,7 @@ void CodeGen::genLclHeap(GenTree* tree)
{
regCnt = tree->ExtractTempReg();
}
- genSetRegToIcon(regCnt, amount, ((unsigned int)amount == amount) ? TYP_INT : TYP_LONG);
+ instGen_Set_Reg_To_Imm(((unsigned int)amount == amount) ? EA_4BYTE : EA_8BYTE, regCnt, amount);
}
if (compiler->info.compInitMem)
@@ -5662,23 +5666,6 @@ void CodeGen::genCodeForTreeNode(GenTree* treeNode)
}
}
-//------------------------------------------------------------------------
-// genSetRegToIcon: Generate code that will set the given register to the integer constant.
-//
-void CodeGen::genSetRegToIcon(regNumber reg, ssize_t val, var_types type)
-{
- // Reg cannot be a FP reg
- assert(!genIsValidFloatReg(reg));
-
- // The only TYP_REF constant that can come this path is a managed 'null' since it is not
- // relocatable. Other ref type constants (e.g. string objects) go through a different
- // code path.
- noway_assert((type != TYP_REF) || (val == 0));
-
- GetEmitter()->emitIns_I_la(emitActualTypeSize(type), reg, val);
- regSet.verifyRegUsed(reg);
-}
-
//---------------------------------------------------------------------
// genSetGSSecurityCookie: Set the "GS" security cookie in the prolog.
//
@@ -5703,7 +5690,8 @@ void CodeGen::genSetGSSecurityCookie(regNumber initReg, bool* pInitRegZeroed)
{
noway_assert(compiler->gsGlobalSecurityCookieVal != 0);
// initReg = #GlobalSecurityCookieVal; [frame.GSSecurityCookie] = initReg
- genSetRegToIcon(initReg, compiler->gsGlobalSecurityCookieVal, TYP_I_IMPL);
+ instGen_Set_Reg_To_Imm(EA_PTRSIZE, initReg, compiler->gsGlobalSecurityCookieVal);
+
GetEmitter()->emitIns_S_R(INS_st_d, EA_PTRSIZE, initReg, compiler->lvaGSSecurityCookie, 0);
}
else
@@ -5762,7 +5750,7 @@ void CodeGen::genEmitGSCookieCheck(bool pushReg)
{
// load the GS cookie constant into a reg
//
- genSetRegToIcon(regGSConst, compiler->gsGlobalSecurityCookieVal, TYP_I_IMPL);
+ instGen_Set_Reg_To_Imm(EA_PTRSIZE, regGSConst, compiler->gsGlobalSecurityCookieVal);
}
else
{
@@ -6780,7 +6768,7 @@ void CodeGen::genCodeForIndexAddr(GenTreeIndexAddr* node)
else // we have to load the element size and use a MADD (multiply-add) instruction
{
// REG_R21 = element size
- CodeGen::genSetRegToIcon(REG_R21, (ssize_t)node->gtElemSize, TYP_INT);
+ instGen_Set_Reg_To_Imm(EA_4BYTE, REG_R21, (ssize_t)node->gtElemSize);
// dest = index * REG_R21 + base
instruction ins;
diff --git a/src/coreclr/jit/codegenxarch.cpp b/src/coreclr/jit/codegenxarch.cpp
index b16d2d221a7..6d632942647 100644
--- a/src/coreclr/jit/codegenxarch.cpp
+++ b/src/coreclr/jit/codegenxarch.cpp
@@ -5282,10 +5282,81 @@ void CodeGen::genCodeForStoreInd(GenTreeStoreInd* tree)
}
else
{
- GetEmitter()->emitInsStoreInd(data->OperIs(GT_BSWAP, GT_BSWAP16) && data->isContained()
- ? INS_movbe
- : ins_Store(data->TypeGet()),
- emitTypeSize(tree), tree);
+ instruction ins = INS_invalid;
+ emitAttr attr = emitTypeSize(tree);
+
+ if (data->isContained())
+ {
+ if (data->OperIs(GT_BSWAP, GT_BSWAP16))
+ {
+ ins = INS_movbe;
+ }
+#if defined(FEATURE_HW_INTRINSICS)
+ else if (data->OperIsHWIntrinsic())
+ {
+ GenTreeHWIntrinsic* hwintrinsic = data->AsHWIntrinsic();
+ NamedIntrinsic intrinsicId = hwintrinsic->GetHWIntrinsicId();
+ var_types baseType = hwintrinsic->GetSimdBaseType();
+
+ switch (intrinsicId)
+ {
+ case NI_SSE2_ConvertToInt32:
+ case NI_SSE2_ConvertToUInt32:
+ case NI_SSE2_X64_ConvertToInt64:
+ case NI_SSE2_X64_ConvertToUInt64:
+ case NI_AVX2_ConvertToInt32:
+ case NI_AVX2_ConvertToUInt32:
+ {
+ // These intrinsics are "ins reg/mem, xmm"
+ ins = HWIntrinsicInfo::lookupIns(intrinsicId, baseType);
+ attr = emitActualTypeSize(baseType);
+ break;
+ }
+
+ case NI_SSE2_Extract:
+ case NI_SSE41_Extract:
+ case NI_SSE41_X64_Extract:
+ case NI_AVX_ExtractVector128:
+ case NI_AVX2_ExtractVector128:
+ {
+ // These intrinsics are "ins reg/mem, xmm, imm8"
+ ins = HWIntrinsicInfo::lookupIns(intrinsicId, baseType);
+ attr = emitActualTypeSize(Compiler::getSIMDTypeForSize(hwintrinsic->GetSimdSize()));
+
+ if (intrinsicId == NI_SSE2_Extract)
+ {
+ // The encoding that supports containment is SSE4.1 only
+ ins = INS_pextrw_sse41;
+ }
+
+ // The hardware intrinsics take unsigned bytes between [0, 255].
+ // However, the emitter expects "fits in byte" to always be signed
+ // and therefore we need [128, 255] to be sign extended up to fill
+ // the entire constant value.
+
+ GenTreeIntCon* op2 = hwintrinsic->Op(2)->AsIntCon();
+ ssize_t ival = op2->IconValue();
+
+ assert((ival >= 0) && (ival <= 255));
+ op2->gtIconVal = static_cast<int8_t>(ival);
+ break;
+ }
+
+ default:
+ {
+ unreached();
+ }
+ }
+ }
+#endif // FEATURE_HW_INTRINSICS
+ }
+
+ if (ins == INS_invalid)
+ {
+ ins = ins_Store(data->TypeGet());
+ }
+
+ GetEmitter()->emitInsStoreInd(ins, attr, tree);
}
}
}
diff --git a/src/coreclr/jit/compiler.cpp b/src/coreclr/jit/compiler.cpp
index 573708a6c7b..e92d45518e9 100644
--- a/src/coreclr/jit/compiler.cpp
+++ b/src/coreclr/jit/compiler.cpp
@@ -2252,7 +2252,7 @@ void Compiler::compSetProcessor()
opts.compUseCMOV = jitFlags.IsSet(JitFlags::JIT_FLAG_USE_CMOV);
#ifdef DEBUG
if (opts.compUseCMOV)
- opts.compUseCMOV = !compStressCompile(STRESS_USE_CMOV, 50);
+ opts.compUseCMOV = !compStressCompile(STRESS_USE_CMOV, 50);
#endif // DEBUG
#endif // TARGET_X86
@@ -2423,17 +2423,19 @@ void Compiler::compInitOptions(JitFlags* jitFlags)
opts.compJitAlignLoopBoundary = (unsigned short)JitConfig.JitAlignLoopBoundary();
opts.compJitAlignLoopMinBlockWeight = (unsigned short)JitConfig.JitAlignLoopMinBlockWeight();
- opts.compJitAlignLoopForJcc = JitConfig.JitAlignLoopForJcc() == 1;
- opts.compJitAlignLoopMaxCodeSize = (unsigned short)JitConfig.JitAlignLoopMaxCodeSize();
- opts.compJitHideAlignBehindJmp = JitConfig.JitHideAlignBehindJmp() == 1;
- opts.compJitOptimizeStructHiddenBuffer = JitConfig.JitOptimizeStructHiddenBuffer() == 1;
+ opts.compJitAlignLoopForJcc = JitConfig.JitAlignLoopForJcc() == 1;
+ opts.compJitAlignLoopMaxCodeSize = (unsigned short)JitConfig.JitAlignLoopMaxCodeSize();
+ opts.compJitHideAlignBehindJmp = JitConfig.JitHideAlignBehindJmp() == 1;
+ opts.compJitOptimizeStructHiddenBuffer = JitConfig.JitOptimizeStructHiddenBuffer() == 1;
+ opts.compJitUnrollLoopMaxIterationCount = (unsigned short)JitConfig.JitUnrollLoopMaxIterationCount();
#else
- opts.compJitAlignLoopAdaptive = true;
- opts.compJitAlignLoopBoundary = DEFAULT_ALIGN_LOOP_BOUNDARY;
- opts.compJitAlignLoopMinBlockWeight = DEFAULT_ALIGN_LOOP_MIN_BLOCK_WEIGHT;
- opts.compJitAlignLoopMaxCodeSize = DEFAULT_MAX_LOOPSIZE_FOR_ALIGN;
- opts.compJitHideAlignBehindJmp = true;
- opts.compJitOptimizeStructHiddenBuffer = true;
+ opts.compJitAlignLoopAdaptive = true;
+ opts.compJitAlignLoopBoundary = DEFAULT_ALIGN_LOOP_BOUNDARY;
+ opts.compJitAlignLoopMinBlockWeight = DEFAULT_ALIGN_LOOP_MIN_BLOCK_WEIGHT;
+ opts.compJitAlignLoopMaxCodeSize = DEFAULT_MAX_LOOPSIZE_FOR_ALIGN;
+ opts.compJitHideAlignBehindJmp = true;
+ opts.compJitOptimizeStructHiddenBuffer = true;
+ opts.compJitUnrollLoopMaxIterationCount = DEFAULT_UNROLL_LOOP_MAX_ITERATION_COUNT;
#endif
#ifdef TARGET_XARCH
@@ -3883,15 +3885,6 @@ _SetMinOpts:
}
}
-#if TARGET_ARM
- // A single JitStress=1 Linux ARM32 test fails when we expand virtual calls early
- // JIT\HardwareIntrinsics\General\Vector128_1\Vector128_1_ro
- //
- opts.compExpandCallsEarly = (JitConfig.JitExpandCallsEarly() == 2);
-#else
- opts.compExpandCallsEarly = (JitConfig.JitExpandCallsEarly() != 0);
-#endif
-
fgCanRelocateEHRegions = true;
}
@@ -4701,10 +4694,6 @@ void Compiler::compCompile(void** methodCodePtr, uint32_t* methodCodeSize, JitFl
// amenable to optimization
//
DoPhase(this, PHASE_OPTIMIZE_ADD_COPIES, &Compiler::optAddCopies);
-
- // Optimize boolean conditions
- //
- DoPhase(this, PHASE_OPTIMIZE_BOOLS, &Compiler::optOptimizeBools);
}
// Figure out the order in which operators are to be evaluated
@@ -4847,10 +4836,14 @@ void Compiler::compCompile(void** methodCodePtr, uint32_t* methodCodeSize, JitFl
// Insert GC Polls
DoPhase(this, PHASE_INSERT_GC_POLLS, &Compiler::fgInsertGCPolls);
- // Optimize block order
- //
if (opts.OptimizationEnabled())
{
+ // Optimize boolean conditions
+ //
+ DoPhase(this, PHASE_OPTIMIZE_BOOLS, &Compiler::optOptimizeBools);
+
+ // Optimize block order
+ //
DoPhase(this, PHASE_OPTIMIZE_LAYOUT, &Compiler::optOptimizeLayout);
}
@@ -7804,34 +7797,34 @@ double JitTimer::s_cyclesPerSec = CachedCyclesPerSecond();
#if defined(FEATURE_JIT_METHOD_PERF) || DUMP_FLOWGRAPHS || defined(FEATURE_TRACELOGGING)
const char* PhaseNames[] = {
-#define CompPhaseNameMacro(enum_nm, string_nm, short_nm, hasChildren, parent, measureIR) string_nm,
+#define CompPhaseNameMacro(enum_nm, string_nm, hasChildren, parent, measureIR) string_nm,
#include "compphases.h"
};
const char* PhaseEnums[] = {
-#define CompPhaseNameMacro(enum_nm, string_nm, short_nm, hasChildren, parent, measureIR) #enum_nm,
+#define CompPhaseNameMacro(enum_nm, string_nm, hasChildren, parent, measureIR) #enum_nm,
#include "compphases.h"
};
-const LPCWSTR PhaseShortNames[] = {
-#define CompPhaseNameMacro(enum_nm, string_nm, short_nm, hasChildren, parent, measureIR) W(short_nm),
+const LPCWSTR PhaseEnumsW[] = {
+#define CompPhaseNameMacro(enum_nm, string_nm, hasChildren, parent, measureIR) W(#enum_nm),
#include "compphases.h"
};
#endif // defined(FEATURE_JIT_METHOD_PERF) || DUMP_FLOWGRAPHS
#ifdef FEATURE_JIT_METHOD_PERF
bool PhaseHasChildren[] = {
-#define CompPhaseNameMacro(enum_nm, string_nm, short_nm, hasChildren, parent, measureIR) hasChildren,
+#define CompPhaseNameMacro(enum_nm, string_nm, hasChildren, parent, measureIR) hasChildren,
#include "compphases.h"
};
int PhaseParent[] = {
-#define CompPhaseNameMacro(enum_nm, string_nm, short_nm, hasChildren, parent, measureIR) parent,
+#define CompPhaseNameMacro(enum_nm, string_nm, hasChildren, parent, measureIR) parent,
#include "compphases.h"
};
bool PhaseReportsIRSize[] = {
-#define CompPhaseNameMacro(enum_nm, string_nm, short_nm, hasChildren, parent, measureIR) measureIR,
+#define CompPhaseNameMacro(enum_nm, string_nm, hasChildren, parent, measureIR) measureIR,
#include "compphases.h"
};
@@ -9227,10 +9220,6 @@ void cTreeFlags(Compiler* comp, GenTree* tree)
{
chars += printf("[VAR_USEASG]");
}
- if (tree->gtFlags & GTF_VAR_CAST)
- {
- chars += printf("[VAR_CAST]");
- }
if (tree->gtFlags & GTF_VAR_ITERATOR)
{
chars += printf("[VAR_ITERATOR]");
diff --git a/src/coreclr/jit/compiler.h b/src/coreclr/jit/compiler.h
index 5cef9b012b1..6850cd9d2b1 100644
--- a/src/coreclr/jit/compiler.h
+++ b/src/coreclr/jit/compiler.h
@@ -85,6 +85,7 @@ class SpanningTreeVisitor; // defined in fgprofile.cpp
class CSE_DataFlow; // defined in OptCSE.cpp
class OptBoolsDsc; // defined in optimizer.cpp
struct RelopImplicationInfo; // defined in redundantbranchopts.cpp
+struct JumpThreadInfo; // defined in redundantbranchopts.cpp
#ifdef DEBUG
struct IndentStack;
#endif
@@ -1389,14 +1390,14 @@ LinearScanInterface* getLinearScanAllocator(Compiler* comp);
// partition a compilation.
enum Phases
{
-#define CompPhaseNameMacro(enum_nm, string_nm, short_nm, hasChildren, parent, measureIR) enum_nm,
+#define CompPhaseNameMacro(enum_nm, string_nm, hasChildren, parent, measureIR) enum_nm,
#include "compphases.h"
PHASE_NUMBER_OF
};
extern const char* PhaseNames[];
extern const char* PhaseEnums[];
-extern const LPCWSTR PhaseShortNames[];
+extern const LPCWSTR PhaseEnumsW[];
// Specify which checks should be run after each phase
//
@@ -1830,6 +1831,7 @@ class Compiler
#ifdef FEATURE_HW_INTRINSICS
friend struct HWIntrinsicInfo;
+ friend struct SimdAsHWIntrinsicInfo;
#endif // FEATURE_HW_INTRINSICS
#ifndef TARGET_64BIT
@@ -2248,7 +2250,7 @@ public:
Statement* gtNewStmt(GenTree* expr, const DebugInfo& di);
// For unary opers.
- GenTree* gtNewOperNode(genTreeOps oper, var_types type, GenTree* op1, bool doSimplifications = TRUE);
+ GenTree* gtNewOperNode(genTreeOps oper, var_types type, GenTree* op1);
// For binary opers.
GenTree* gtNewOperNode(genTreeOps oper, var_types type, GenTree* op1, GenTree* op2);
@@ -2293,13 +2295,11 @@ public:
GenTree* gtNewSconNode(int CPX, CORINFO_MODULE_HANDLE scpHandle);
- GenTreeVecCon* gtNewVconNode(var_types type, CorInfoType simdBaseJitType);
+ GenTreeVecCon* gtNewVconNode(var_types type);
GenTree* gtNewAllBitsSetConNode(var_types type);
- GenTree* gtNewAllBitsSetConNode(var_types type, CorInfoType simdBaseJitType);
GenTree* gtNewZeroConNode(var_types type);
- GenTree* gtNewZeroConNode(var_types type, CorInfoType simdBaseJitType);
GenTree* gtNewOneConNode(var_types type);
@@ -3928,13 +3928,6 @@ private:
unsigned impInitBlockLineInfo();
bool impIsThis(GenTree* obj);
- bool impIsLDFTN_TOKEN(const BYTE* delegateCreateStart, const BYTE* newobjCodeAddr);
- bool impIsDUP_LDVIRTFTN_TOKEN(const BYTE* delegateCreateStart, const BYTE* newobjCodeAddr);
- bool impIsAnySTLOC(OPCODE opcode)
- {
- return ((opcode == CEE_STLOC) || (opcode == CEE_STLOC_S) ||
- ((opcode >= CEE_STLOC_0) && (opcode <= CEE_STLOC_3)));
- }
void impPopCallArgs(CORINFO_SIG_INFO* sig, GenTreeCall* call);
@@ -3953,10 +3946,9 @@ private:
struct PendingDsc
{
- PendingDsc* pdNext;
- BasicBlock* pdBB;
- SavedStack pdSavedStack;
- ThisInitState pdThisPtrInit;
+ PendingDsc* pdNext;
+ BasicBlock* pdBB;
+ SavedStack pdSavedStack;
};
PendingDsc* impPendingList; // list of BBs currently waiting to be imported.
@@ -4127,7 +4119,6 @@ private:
void FreeBlockListNode(BlockListNode* node);
- bool impIsValueType(typeInfo* pTypeInfo);
var_types mangleVarArgsType(var_types type);
regNumber getCallArgIntRegister(regNumber floatReg);
@@ -5908,8 +5899,6 @@ private:
// the variable is not enregistered, and is therefore not promoted independently.
void fgLclFldAssign(unsigned lclNum);
- static fgWalkPreFn gtHasLocalsWithAddrOpCB;
-
enum TypeProducerKind
{
TPK_Unknown = 0, // May not be a RuntimeType
@@ -6977,8 +6966,13 @@ public:
PhaseStatus optRedundantBranches();
bool optRedundantRelop(BasicBlock* const block);
bool optRedundantBranch(BasicBlock* const block);
- bool optJumpThread(BasicBlock* const block, BasicBlock* const domBlock, bool domIsSameRelop);
+ bool optJumpThreadDom(BasicBlock* const block, BasicBlock* const domBlock, bool domIsSameRelop);
+ bool optJumpThreadPhi(BasicBlock* const block, GenTree* tree, ValueNum treeNormVN);
+ bool optJumpThreadCheck(BasicBlock* const block, BasicBlock* const domBlock);
+ bool optJumpThreadCore(JumpThreadInfo& jti);
bool optReachable(BasicBlock* const fromBlock, BasicBlock* const toBlock, BasicBlock* const excludedBlock);
+ BitVecTraits* optReachableBitVecTraits;
+ BitVec optReachableBitVec;
void optRelopImpliesRelop(RelopImplicationInfo* rii);
/**************************************************************************
@@ -8318,6 +8312,10 @@ private:
#endif // defined(TARGET_XARCH)
#endif // FEATURE_HW_INTRINSICS
+ CORINFO_CLASS_HANDLE CanonicalSimd8Handle;
+ CORINFO_CLASS_HANDLE CanonicalSimd16Handle;
+ CORINFO_CLASS_HANDLE CanonicalSimd32Handle;
+
SIMDHandlesCache()
{
memset(this, 0, sizeof(*this));
@@ -8410,6 +8408,44 @@ private:
}
#endif // FEATURE_HW_INTRINSICS
+ //------------------------------------------------------------------------
+ // gtGetCanonicalStructHandleForSIMD: Get the "canonical" SIMD type handle.
+ //
+ // Some SIMD-typed trees do not carry struct handles with them (and in
+ // some cases, they cannot, due to being created by the compiler itself).
+ // To enable CSEing of these trees, we use "canonical" handles. These are
+ // captured during importation, and can represent any type normalized to
+ // be TYP_SIMD.
+ //
+ // Arguments:
+ // simdType - The SIMD type
+ //
+ // Return Value:
+ // The "canonical" type handle for "simdType", if one was available.
+ // "NO_CLASS_HANDLE" otherwise.
+ //
+ CORINFO_CLASS_HANDLE gtGetCanonicalStructHandleForSIMD(var_types simdType)
+ {
+ if (m_simdHandleCache == nullptr)
+ {
+ return NO_CLASS_HANDLE;
+ }
+
+ switch (simdType)
+ {
+ case TYP_SIMD8:
+ return m_simdHandleCache->CanonicalSimd8Handle;
+ case TYP_SIMD12:
+ return m_simdHandleCache->SIMDVector3Handle;
+ case TYP_SIMD16:
+ return m_simdHandleCache->CanonicalSimd16Handle;
+ case TYP_SIMD32:
+ return m_simdHandleCache->CanonicalSimd32Handle;
+ default:
+ unreached();
+ }
+ }
+
// Returns true if this is a SIMD type that should be considered an opaque
// vector type (i.e. do not analyze or promote its fields).
// Note that all but the fixed vector types are opaque, even though they may
@@ -9253,8 +9289,6 @@ public:
bool dspGCtbls; // Display the GC tables
#endif
- bool compExpandCallsEarly; // True if we should expand virtual call targets early for this method
-
// Default numbers used to perform loop alignment. All the numbers are chosen
// based on experimenting with various benchmarks.
@@ -9270,6 +9304,9 @@ public:
// likely complicated enough that loop alignment will not impact performance.
#define DEFAULT_MAX_LOOPSIZE_FOR_ALIGN DEFAULT_ALIGN_LOOP_BOUNDARY * 3
+// By default only single iteration loops will be unrolled
+#define DEFAULT_UNROLL_LOOP_MAX_ITERATION_COUNT 1
+
#ifdef DEBUG
// Loop alignment variables
@@ -9298,6 +9335,9 @@ public:
// If set, tracks the hidden return buffer for struct arg.
bool compJitOptimizeStructHiddenBuffer;
+ // Iteration limit to unroll a loop.
+ unsigned short compJitUnrollLoopMaxIterationCount;
+
#ifdef LATE_DISASM
bool doLateDisasm; // Run the late disassembler
#endif // LATE_DISASM
@@ -10240,37 +10280,6 @@ public:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XX XX
- XX typeInfo XX
- XX XX
- XX Checks for type compatibility and merges types XX
- XX XX
- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
- */
-
-public:
- // Returns true if child is equal to or a subtype of parent for merge purposes
- // This support is necessary to support attributes that are not described in
- // for example, signatures. For example, the permanent home byref (byref that
- // points to the gc heap), isn't a property of method signatures, therefore,
- // it is safe to have mismatches here (that tiCompatibleWith will not flag),
- // but when deciding if we need to reimport a block, we need to take these
- // in account
- bool tiMergeCompatibleWith(const typeInfo& pChild, const typeInfo& pParent, bool normalisedForStack) const;
-
- // Returns true if child is equal to or a subtype of parent.
- // normalisedForStack indicates that both types are normalised for the stack
- bool tiCompatibleWith(const typeInfo& pChild, const typeInfo& pParent, bool normalisedForStack) const;
-
- // Merges pDest and pSrc. Returns false if merge is undefined.
- // *pDest is modified to represent the merged type. Sets "*changed" to true
- // if this changes "*pDest".
- bool tiMergeToCommonParent(typeInfo* pDest, const typeInfo* pSrc, bool* changed) const;
-
- /*
- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
- XX XX
XX IL verification stuff XX
XX XX
XX XX
@@ -10279,45 +10288,22 @@ public:
*/
public:
- // The following is used to track liveness of local variables, initialization
- // of valueclass constructors, and type safe use of IL instructions.
-
- // dynamic state info needed for verification
EntryState verCurrentState;
- // this ptr of object type .ctors are considered intited only after
- // the base class ctor is called, or an alternate ctor is called.
- // An uninited this ptr can be used to access fields, but cannot
- // be used to call a member function.
- bool verTrackObjCtorInitState;
-
void verInitBBEntryState(BasicBlock* block, EntryState* currentState);
- // Requires that "tis" is not TIS_Bottom -- it's a definite init/uninit state.
- void verSetThisInit(BasicBlock* block, ThisInitState tis);
void verInitCurrentState();
void verResetCurrentState(BasicBlock* block, EntryState* currentState);
- // Merges the current verification state into the entry state of "block", return false if that merge fails,
- // TRUE if it succeeds. Further sets "*changed" to true if this changes the entry state of "block".
- bool verMergeEntryStates(BasicBlock* block, bool* changed);
-
void verConvertBBToThrowVerificationException(BasicBlock* block DEBUGARG(bool logMsg));
void verHandleVerificationFailure(BasicBlock* block DEBUGARG(bool logMsg));
typeInfo verMakeTypeInfoForLocal(unsigned lclNum);
- typeInfo verMakeTypeInfo(CORINFO_CLASS_HANDLE clsHnd,
- bool bashStructToRef = false); // converts from jit type representation to typeInfo
+ typeInfo verMakeTypeInfo(CORINFO_CLASS_HANDLE clsHnd); // converts from jit type representation to typeInfo
typeInfo verMakeTypeInfo(CorInfoType ciType,
CORINFO_CLASS_HANDLE clsHnd); // converts from jit type representation to typeInfo
- bool verIsSDArray(const typeInfo& ti);
- typeInfo verGetArrayElemType(const typeInfo& ti);
typeInfo verParseArgSigToTypeInfo(CORINFO_SIG_INFO* sig, CORINFO_ARG_LIST_HANDLE args);
bool verIsByRefLike(const typeInfo& ti);
- bool verIsSafeToReturnByRef(const typeInfo& ti);
-
- // generic type variables range over types that satisfy IsBoxable
- bool verIsBoxable(const typeInfo& ti);
void DECLSPEC_NORETURN verRaiseVerifyException(INDEBUG(const char* reason) DEBUGARG(const char* file)
DEBUGARG(unsigned line));
@@ -10325,35 +10311,7 @@ public:
DEBUGARG(unsigned line));
bool verCheckTailCallConstraint(OPCODE opcode,
CORINFO_RESOLVED_TOKEN* pResolvedToken,
- CORINFO_RESOLVED_TOKEN* pConstrainedResolvedToken, // Is this a "constrained." call
- // on a type parameter?
- bool speculative // If true, won't throw if verificatoin fails. Instead it will
- // return false to the caller.
- // If false, it will throw.
- );
- bool verIsBoxedValueType(const typeInfo& ti);
-
- void verVerifyCall(OPCODE opcode,
- CORINFO_RESOLVED_TOKEN* pResolvedToken,
- CORINFO_RESOLVED_TOKEN* pConstrainedResolvedToken,
- bool tailCall,
- bool readonlyCall, // is this a "readonly." call?
- const BYTE* delegateCreateStart,
- const BYTE* codeAddr,
- CORINFO_CALL_INFO* callInfo DEBUGARG(const char* methodName));
-
- bool verCheckDelegateCreation(const BYTE* delegateCreateStart, const BYTE* codeAddr, mdMemberRef& targetMemberRef);
-
- typeInfo verVerifySTIND(const typeInfo& ptr, const typeInfo& value, const typeInfo& instrType);
- typeInfo verVerifyLDIND(const typeInfo& ptr, const typeInfo& instrType);
- void verVerifyField(CORINFO_RESOLVED_TOKEN* pResolvedToken,
- const CORINFO_FIELD_INFO& fieldInfo,
- const typeInfo* tiThis,
- bool mutator,
- bool allowPlainStructAsThis = false);
- void verVerifyCond(const typeInfo& tiOp1, const typeInfo& tiOp2, unsigned opcode);
- void verVerifyThisPtrInitialised();
- bool verIsCallToInitThisPtr(CORINFO_CLASS_HANDLE context, CORINFO_CLASS_HANDLE target);
+ CORINFO_RESOLVED_TOKEN* pConstrainedResolvedToken);
#ifdef DEBUG
diff --git a/src/coreclr/jit/compiler.hpp b/src/coreclr/jit/compiler.hpp
index d50a82ec64b..73f306c4b7f 100644
--- a/src/coreclr/jit/compiler.hpp
+++ b/src/coreclr/jit/compiler.hpp
@@ -830,42 +830,23 @@ inline Statement* Compiler::gtNewStmt(GenTree* expr, const DebugInfo& di)
return stmt;
}
-/*****************************************************************************/
-
-inline GenTree* Compiler::gtNewOperNode(genTreeOps oper, var_types type, GenTree* op1, bool doSimplifications)
+inline GenTree* Compiler::gtNewOperNode(genTreeOps oper, var_types type, GenTree* op1)
{
assert((GenTree::OperKind(oper) & (GTK_UNOP | GTK_BINOP)) != 0);
assert((GenTree::OperKind(oper) & GTK_EXOP) ==
0); // Can't use this to construct any types that extend unary/binary operator.
assert(op1 != nullptr || oper == GT_RETFILT || oper == GT_NOP || (oper == GT_RETURN && type == TYP_VOID));
- if (doSimplifications)
+ if (oper == GT_ADDR)
{
- // We do some simplifications here. If this gets to be too many, try a switch...
- if (oper == GT_IND)
+ if (op1->OperIsIndir())
{
- // IND(ADDR(IND(x)) == IND(x)
- if (op1->OperIs(GT_ADDR))
- {
- GenTree* indir = op1->AsUnOp()->gtGetOp1();
- if (indir->OperIs(GT_IND))
- {
- op1 = indir->AsIndir()->Addr();
- }
- }
- }
- else if (oper == GT_ADDR)
- {
- if (op1->OperIs(GT_IND))
- {
- return op1->AsOp()->gtOp1;
- }
- else
- {
- // Addr source can't be CSE-ed.
- op1->SetDoNotCSE();
- }
+ assert(op1->IsValue());
+ return op1->AsIndir()->Addr();
}
+
+ assert(op1->OperIsLocalRead() || op1->OperIs(GT_FIELD));
+ op1->SetDoNotCSE();
}
GenTree* node = new (this, oper) GenTreeOp(oper, type, op1, nullptr);
@@ -1339,8 +1320,6 @@ inline void GenTree::gtBashToNOP()
gtFlags &= ~(GTF_ALL_EFFECT | GTF_REVERSE_OPS);
}
-/*****************************************************************************/
-
inline GenTree* Compiler::gtUnusedValNode(GenTree* expr)
{
return gtNewOperNode(GT_COMMA, TYP_VOID, expr, gtNewNothingNode());
@@ -3796,30 +3775,6 @@ inline bool Compiler::impIsThis(GenTree* obj)
/*****************************************************************************
*
- * Check to see if the delegate is created using "LDFTN <TOK>" or not.
- */
-
-inline bool Compiler::impIsLDFTN_TOKEN(const BYTE* delegateCreateStart, const BYTE* newobjCodeAddr)
-{
- assert(newobjCodeAddr[0] == CEE_NEWOBJ);
- return (newobjCodeAddr - delegateCreateStart == 6 && // LDFTN <TOK> takes 6 bytes
- delegateCreateStart[0] == CEE_PREFIX1 && delegateCreateStart[1] == (CEE_LDFTN & 0xFF));
-}
-
-/*****************************************************************************
- *
- * Check to see if the delegate is created using "DUP LDVIRTFTN <TOK>" or not.
- */
-
-inline bool Compiler::impIsDUP_LDVIRTFTN_TOKEN(const BYTE* delegateCreateStart, const BYTE* newobjCodeAddr)
-{
- assert(newobjCodeAddr[0] == CEE_NEWOBJ);
- return (newobjCodeAddr - delegateCreateStart == 7 && // DUP LDVIRTFTN <TOK> takes 6 bytes
- delegateCreateStart[0] == CEE_DUP && delegateCreateStart[1] == CEE_PREFIX1 &&
- delegateCreateStart[2] == (CEE_LDVIRTFTN & 0xFF));
-}
-/*****************************************************************************
- *
* Returns true if the compiler instance is created for import only (verification).
*/
diff --git a/src/coreclr/jit/compphases.h b/src/coreclr/jit/compphases.h
index a67f6d52d9f..e7e502ee42f 100644
--- a/src/coreclr/jit/compphases.h
+++ b/src/coreclr/jit/compphases.h
@@ -10,10 +10,9 @@
// corresponding array of string names of those phases. This include file undefines CompPhaseNameMacro
// after the last use.
// The arguments are:
-// CompPhaseNameMacro(enumName, stringName, shortName, hasChildren, parent, measureIR)
+// CompPhaseNameMacro(enumName, stringName, hasChildren, parent, measureIR)
// "enumName" is an Enumeration-style all-caps name.
// "stringName" is a self-explanatory.
-// "shortName" is an abbreviated form for stringName
// "hasChildren" is true if this phase is broken out into subphases.
// (We should never do EndPhase on a phase that has children, only on 'leaf phases.')
// "parent" is -1 for leaf phases, otherwise it is the "enumName" of the parent phase.
@@ -21,100 +20,100 @@
// true.
// clang-format off
-// enumName stringName shortName hasChildren
-// parent
-// measureIR
-CompPhaseNameMacro(PHASE_PRE_IMPORT, "Pre-import", "PRE-IMP", false, -1, false)
-CompPhaseNameMacro(PHASE_IMPORTATION, "Importation", "IMPORT", false, -1, true)
-CompPhaseNameMacro(PHASE_INDXCALL, "Indirect call transform", "INDXCALL", false, -1, true)
-CompPhaseNameMacro(PHASE_PATCHPOINTS, "Expand patchpoints", "PPOINT", false, -1, true)
-CompPhaseNameMacro(PHASE_POST_IMPORT, "Post-import", "POST-IMP", false, -1, false)
-CompPhaseNameMacro(PHASE_IBCPREP, "Profile instrumentation prep", "IBCPREP", false, -1, false)
-CompPhaseNameMacro(PHASE_IBCINSTR, "Profile instrumentation", "IBCINSTR", false, -1, false)
-CompPhaseNameMacro(PHASE_INCPROFILE, "Profile incorporation", "INCPROF", false, -1, false)
-CompPhaseNameMacro(PHASE_MORPH_INIT, "Morph - Init", "MOR-INIT", false, -1, false)
-CompPhaseNameMacro(PHASE_MORPH_INLINE, "Morph - Inlining", "MOR-INL", false, -1, true)
-CompPhaseNameMacro(PHASE_MORPH_ADD_INTERNAL, "Morph - Add internal blocks", "MOR-ADD", false, -1, true)
-CompPhaseNameMacro(PHASE_ALLOCATE_OBJECTS, "Allocate Objects", "ALLOC-OBJ", false, -1, false)
-CompPhaseNameMacro(PHASE_EMPTY_TRY, "Remove empty try", "EMPTYTRY", false, -1, false)
-CompPhaseNameMacro(PHASE_EMPTY_FINALLY, "Remove empty finally", "EMPTYFIN", false, -1, false)
-CompPhaseNameMacro(PHASE_MERGE_FINALLY_CHAINS, "Merge callfinally chains", "MRGCFCHN", false, -1, false)
-CompPhaseNameMacro(PHASE_CLONE_FINALLY, "Clone finally", "CLONEFIN", false, -1, false)
-CompPhaseNameMacro(PHASE_UPDATE_FINALLY_FLAGS, "Update finally target flags", "UPD-FTF", false, -1, false)
-CompPhaseNameMacro(PHASE_COMPUTE_PREDS, "Compute preds", "PREDS", false, -1, false)
-CompPhaseNameMacro(PHASE_EARLY_UPDATE_FLOW_GRAPH, "Update flow graph early pass", "UPD-FG-E", false, -1, false)
-CompPhaseNameMacro(PHASE_STR_ADRLCL, "Morph - Structs/AddrExp", "MOR-STRAL", false, -1, false)
-CompPhaseNameMacro(PHASE_FWD_SUB, "Forward Substitution", "FWD-SUB", false, -1, false)
-CompPhaseNameMacro(PHASE_MORPH_IMPBYREF, "Morph - ByRefs", "MOR-BYREF", false, -1, false)
-CompPhaseNameMacro(PHASE_PROMOTE_STRUCTS, "Morph - Promote Structs", "PROMOTER" , false, -1, false)
-CompPhaseNameMacro(PHASE_MORPH_GLOBAL, "Morph - Global", "MOR-GLOB", false, -1, false)
-CompPhaseNameMacro(PHASE_MORPH_END, "Morph - Finish", "MOR-END", false, -1, true)
-CompPhaseNameMacro(PHASE_GS_COOKIE, "GS Cookie", "GS-COOK", false, -1, false)
-CompPhaseNameMacro(PHASE_COMPUTE_EDGE_WEIGHTS, "Compute edge weights (1, false)","EDG-WGT", false, -1, false)
+// enumName stringName hasChildren
+// parent
+// measureIR
+CompPhaseNameMacro(PHASE_PRE_IMPORT, "Pre-import", false, -1, false)
+CompPhaseNameMacro(PHASE_IMPORTATION, "Importation", false, -1, true)
+CompPhaseNameMacro(PHASE_INDXCALL, "Indirect call transform", false, -1, true)
+CompPhaseNameMacro(PHASE_PATCHPOINTS, "Expand patchpoints", false, -1, true)
+CompPhaseNameMacro(PHASE_POST_IMPORT, "Post-import", false, -1, false)
+CompPhaseNameMacro(PHASE_IBCPREP, "Profile instrumentation prep", false, -1, false)
+CompPhaseNameMacro(PHASE_IBCINSTR, "Profile instrumentation", false, -1, false)
+CompPhaseNameMacro(PHASE_INCPROFILE, "Profile incorporation", false, -1, false)
+CompPhaseNameMacro(PHASE_MORPH_INIT, "Morph - Init", false, -1, false)
+CompPhaseNameMacro(PHASE_MORPH_INLINE, "Morph - Inlining", false, -1, true)
+CompPhaseNameMacro(PHASE_MORPH_ADD_INTERNAL, "Morph - Add internal blocks", false, -1, true)
+CompPhaseNameMacro(PHASE_ALLOCATE_OBJECTS, "Allocate Objects", false, -1, false)
+CompPhaseNameMacro(PHASE_EMPTY_TRY, "Remove empty try", false, -1, false)
+CompPhaseNameMacro(PHASE_EMPTY_FINALLY, "Remove empty finally", false, -1, false)
+CompPhaseNameMacro(PHASE_MERGE_FINALLY_CHAINS, "Merge callfinally chains", false, -1, false)
+CompPhaseNameMacro(PHASE_CLONE_FINALLY, "Clone finally", false, -1, false)
+CompPhaseNameMacro(PHASE_UPDATE_FINALLY_FLAGS, "Update finally target flags", false, -1, false)
+CompPhaseNameMacro(PHASE_COMPUTE_PREDS, "Compute preds", false, -1, false)
+CompPhaseNameMacro(PHASE_EARLY_UPDATE_FLOW_GRAPH, "Update flow graph early pass", false, -1, false)
+CompPhaseNameMacro(PHASE_STR_ADRLCL, "Morph - Structs/AddrExp", false, -1, false)
+CompPhaseNameMacro(PHASE_FWD_SUB, "Forward Substitution", false, -1, false)
+CompPhaseNameMacro(PHASE_MORPH_IMPBYREF, "Morph - ByRefs", false, -1, false)
+CompPhaseNameMacro(PHASE_PROMOTE_STRUCTS, "Morph - Promote Structs", false, -1, false)
+CompPhaseNameMacro(PHASE_MORPH_GLOBAL, "Morph - Global", false, -1, false)
+CompPhaseNameMacro(PHASE_MORPH_END, "Morph - Finish", false, -1, true)
+CompPhaseNameMacro(PHASE_GS_COOKIE, "GS Cookie", false, -1, false)
+CompPhaseNameMacro(PHASE_COMPUTE_EDGE_WEIGHTS, "Compute edge weights (1, false)",false, -1, false)
#if defined(FEATURE_EH_FUNCLETS)
-CompPhaseNameMacro(PHASE_CREATE_FUNCLETS, "Create EH funclets", "EH-FUNC", false, -1, false)
+CompPhaseNameMacro(PHASE_CREATE_FUNCLETS, "Create EH funclets", false, -1, false)
#endif // FEATURE_EH_FUNCLETS
-CompPhaseNameMacro(PHASE_MERGE_THROWS, "Merge throw blocks", "MRGTHROW", false, -1, false)
-CompPhaseNameMacro(PHASE_INVERT_LOOPS, "Invert loops", "LOOP-INV", false, -1, false)
-CompPhaseNameMacro(PHASE_OPTIMIZE_FLOW, "Optimize control flow", "OPT-FLOW", false, -1, false)
-CompPhaseNameMacro(PHASE_OPTIMIZE_LAYOUT, "Optimize layout", "LAYOUT", false, -1, false)
-CompPhaseNameMacro(PHASE_COMPUTE_REACHABILITY, "Compute blocks reachability", "BL_REACH", false, -1, false)
-CompPhaseNameMacro(PHASE_SET_BLOCK_WEIGHTS, "Set block weights", "BL-WEIGHTS", false, -1, false)
-CompPhaseNameMacro(PHASE_ZERO_INITS, "Redundant zero Inits", "ZERO-INIT", false, -1, false)
-CompPhaseNameMacro(PHASE_FIND_LOOPS, "Find loops", "LOOP-FND", false, -1, false)
-CompPhaseNameMacro(PHASE_CLONE_LOOPS, "Clone loops", "LP-CLONE", false, -1, false)
-CompPhaseNameMacro(PHASE_UNROLL_LOOPS, "Unroll loops", "UNROLL", false, -1, false)
-CompPhaseNameMacro(PHASE_CLEAR_LOOP_INFO, "Clear loop info", "LP-CLEAR", false, -1, false)
-CompPhaseNameMacro(PHASE_MORPH_MDARR, "Morph array ops", "MOR-ARRAY", false, -1, false)
-CompPhaseNameMacro(PHASE_HOIST_LOOP_CODE, "Hoist loop code", "LP-HOIST", false, -1, false)
-CompPhaseNameMacro(PHASE_MARK_LOCAL_VARS, "Mark local vars", "MARK-LCL", false, -1, false)
-CompPhaseNameMacro(PHASE_OPTIMIZE_ADD_COPIES, "Opt add copies", "OPT-ADD-CP", false, -1, false)
-CompPhaseNameMacro(PHASE_OPTIMIZE_BOOLS, "Optimize bools", "OPT-BOOL", false, -1, false)
-CompPhaseNameMacro(PHASE_FIND_OPER_ORDER, "Find oper order", "OPER-ORD", false, -1, false)
-CompPhaseNameMacro(PHASE_SET_BLOCK_ORDER, "Set block order", "BLK-ORD", false, -1, true)
-CompPhaseNameMacro(PHASE_BUILD_SSA, "Build SSA representation", "SSA", true, -1, false)
-CompPhaseNameMacro(PHASE_BUILD_SSA_TOPOSORT, "SSA: topological sort", "SSA-SORT", false, PHASE_BUILD_SSA, false)
-CompPhaseNameMacro(PHASE_BUILD_SSA_DOMS, "SSA: Doms1", "SSA-DOMS", false, PHASE_BUILD_SSA, false)
-CompPhaseNameMacro(PHASE_BUILD_SSA_LIVENESS, "SSA: liveness", "SSA-LIVE", false, PHASE_BUILD_SSA, false)
-CompPhaseNameMacro(PHASE_BUILD_SSA_DF, "SSA: DF", "SSA-DF", false, PHASE_BUILD_SSA, false)
-CompPhaseNameMacro(PHASE_BUILD_SSA_INSERT_PHIS, "SSA: insert phis", "SSA-PHI", false, PHASE_BUILD_SSA, false)
-CompPhaseNameMacro(PHASE_BUILD_SSA_RENAME, "SSA: rename", "SSA-REN", false, PHASE_BUILD_SSA, false)
-CompPhaseNameMacro(PHASE_EARLY_PROP, "Early Value Propagation", "ERL-PROP", false, -1, false)
-CompPhaseNameMacro(PHASE_VALUE_NUMBER, "Do value numbering", "VAL-NUM", false, -1, false)
-CompPhaseNameMacro(PHASE_OPTIMIZE_INDEX_CHECKS, "Optimize index checks", "OPT-CHK", false, -1, false)
-CompPhaseNameMacro(PHASE_OPTIMIZE_VALNUM_CSES, "Optimize Valnum CSEs", "OPT-CSE", false, -1, false)
-CompPhaseNameMacro(PHASE_VN_COPY_PROP, "VN based copy prop", "CP-PROP", false, -1, false)
-CompPhaseNameMacro(PHASE_OPTIMIZE_BRANCHES, "Redundant branch opts", "OPT-BR", false, -1, false)
-CompPhaseNameMacro(PHASE_ASSERTION_PROP_MAIN, "Assertion prop", "AST-PROP", false, -1, false)
-CompPhaseNameMacro(PHASE_OPT_UPDATE_FLOW_GRAPH, "Update flow graph opt pass", "UPD-FG-O", false, -1, false)
-CompPhaseNameMacro(PHASE_COMPUTE_EDGE_WEIGHTS2, "Compute edge weights (2, false)","EDG-WGT2", false, -1, false)
-CompPhaseNameMacro(PHASE_INSERT_GC_POLLS, "Insert GC Polls", "GC-POLLS", false, -1, true)
-CompPhaseNameMacro(PHASE_DETERMINE_FIRST_COLD_BLOCK, "Determine first cold block", "COLD-BLK", false, -1, true)
-CompPhaseNameMacro(PHASE_RATIONALIZE, "Rationalize IR", "RAT", false, -1, false)
-CompPhaseNameMacro(PHASE_SIMPLE_LOWERING, "Do 'simple' lowering", "SMP-LWR", false, -1, false)
+CompPhaseNameMacro(PHASE_MERGE_THROWS, "Merge throw blocks", false, -1, false)
+CompPhaseNameMacro(PHASE_INVERT_LOOPS, "Invert loops", false, -1, false)
+CompPhaseNameMacro(PHASE_OPTIMIZE_FLOW, "Optimize control flow", false, -1, false)
+CompPhaseNameMacro(PHASE_OPTIMIZE_LAYOUT, "Optimize layout", false, -1, false)
+CompPhaseNameMacro(PHASE_COMPUTE_REACHABILITY, "Compute blocks reachability", false, -1, false)
+CompPhaseNameMacro(PHASE_SET_BLOCK_WEIGHTS, "Set block weights", false, -1, false)
+CompPhaseNameMacro(PHASE_ZERO_INITS, "Redundant zero Inits", false, -1, false)
+CompPhaseNameMacro(PHASE_FIND_LOOPS, "Find loops", false, -1, false)
+CompPhaseNameMacro(PHASE_CLONE_LOOPS, "Clone loops", false, -1, false)
+CompPhaseNameMacro(PHASE_UNROLL_LOOPS, "Unroll loops", false, -1, false)
+CompPhaseNameMacro(PHASE_CLEAR_LOOP_INFO, "Clear loop info", false, -1, false)
+CompPhaseNameMacro(PHASE_MORPH_MDARR, "Morph array ops", false, -1, false)
+CompPhaseNameMacro(PHASE_HOIST_LOOP_CODE, "Hoist loop code", false, -1, false)
+CompPhaseNameMacro(PHASE_MARK_LOCAL_VARS, "Mark local vars", false, -1, false)
+CompPhaseNameMacro(PHASE_OPTIMIZE_ADD_COPIES, "Opt add copies", false, -1, false)
+CompPhaseNameMacro(PHASE_OPTIMIZE_BOOLS, "Optimize bools", false, -1, false)
+CompPhaseNameMacro(PHASE_FIND_OPER_ORDER, "Find oper order", false, -1, false)
+CompPhaseNameMacro(PHASE_SET_BLOCK_ORDER, "Set block order", false, -1, true)
+CompPhaseNameMacro(PHASE_BUILD_SSA, "Build SSA representation", true, -1, false)
+CompPhaseNameMacro(PHASE_BUILD_SSA_TOPOSORT, "SSA: topological sort", false, PHASE_BUILD_SSA, false)
+CompPhaseNameMacro(PHASE_BUILD_SSA_DOMS, "SSA: Doms1", false, PHASE_BUILD_SSA, false)
+CompPhaseNameMacro(PHASE_BUILD_SSA_LIVENESS, "SSA: liveness", false, PHASE_BUILD_SSA, false)
+CompPhaseNameMacro(PHASE_BUILD_SSA_DF, "SSA: DF", false, PHASE_BUILD_SSA, false)
+CompPhaseNameMacro(PHASE_BUILD_SSA_INSERT_PHIS, "SSA: insert phis", false, PHASE_BUILD_SSA, false)
+CompPhaseNameMacro(PHASE_BUILD_SSA_RENAME, "SSA: rename", false, PHASE_BUILD_SSA, false)
+CompPhaseNameMacro(PHASE_EARLY_PROP, "Early Value Propagation", false, -1, false)
+CompPhaseNameMacro(PHASE_VALUE_NUMBER, "Do value numbering", false, -1, false)
+CompPhaseNameMacro(PHASE_OPTIMIZE_INDEX_CHECKS, "Optimize index checks", false, -1, false)
+CompPhaseNameMacro(PHASE_OPTIMIZE_VALNUM_CSES, "Optimize Valnum CSEs", false, -1, false)
+CompPhaseNameMacro(PHASE_VN_COPY_PROP, "VN based copy prop", false, -1, false)
+CompPhaseNameMacro(PHASE_OPTIMIZE_BRANCHES, "Redundant branch opts", false, -1, false)
+CompPhaseNameMacro(PHASE_ASSERTION_PROP_MAIN, "Assertion prop", false, -1, false)
+CompPhaseNameMacro(PHASE_OPT_UPDATE_FLOW_GRAPH, "Update flow graph opt pass", false, -1, false)
+CompPhaseNameMacro(PHASE_COMPUTE_EDGE_WEIGHTS2, "Compute edge weights (2, false)",false, -1, false)
+CompPhaseNameMacro(PHASE_INSERT_GC_POLLS, "Insert GC Polls", false, -1, true)
+CompPhaseNameMacro(PHASE_DETERMINE_FIRST_COLD_BLOCK, "Determine first cold block", false, -1, true)
+CompPhaseNameMacro(PHASE_RATIONALIZE, "Rationalize IR", false, -1, false)
+CompPhaseNameMacro(PHASE_SIMPLE_LOWERING, "Do 'simple' lowering", false, -1, false)
-CompPhaseNameMacro(PHASE_LCLVARLIVENESS, "Local var liveness", "LIVENESS", true, -1, false)
-CompPhaseNameMacro(PHASE_LCLVARLIVENESS_INIT, "Local var liveness init", "LIV-INIT", false, PHASE_LCLVARLIVENESS, false)
-CompPhaseNameMacro(PHASE_LCLVARLIVENESS_PERBLOCK, "Per block local var liveness", "LIV-BLK", false, PHASE_LCLVARLIVENESS, false)
-CompPhaseNameMacro(PHASE_LCLVARLIVENESS_INTERBLOCK, "Global local var liveness", "LIV-GLBL", false, PHASE_LCLVARLIVENESS, false)
+CompPhaseNameMacro(PHASE_LCLVARLIVENESS, "Local var liveness", true, -1, false)
+CompPhaseNameMacro(PHASE_LCLVARLIVENESS_INIT, "Local var liveness init", false, PHASE_LCLVARLIVENESS, false)
+CompPhaseNameMacro(PHASE_LCLVARLIVENESS_PERBLOCK, "Per block local var liveness", false, PHASE_LCLVARLIVENESS, false)
+CompPhaseNameMacro(PHASE_LCLVARLIVENESS_INTERBLOCK, "Global local var liveness", false, PHASE_LCLVARLIVENESS, false)
-CompPhaseNameMacro(PHASE_LOWERING_DECOMP, "Lowering decomposition", "LWR-DEC", false, -1, false)
-CompPhaseNameMacro(PHASE_LOWERING, "Lowering nodeinfo", "LWR-INFO", false, -1, true)
-CompPhaseNameMacro(PHASE_STACK_LEVEL_SETTER, "Calculate stack level slots", "STK-SET", false, -1, false)
-CompPhaseNameMacro(PHASE_LINEAR_SCAN, "Linear scan register alloc", "LSRA", true, -1, true)
-CompPhaseNameMacro(PHASE_LINEAR_SCAN_BUILD, "LSRA build intervals", "LSRA-BLD", false, PHASE_LINEAR_SCAN, false)
-CompPhaseNameMacro(PHASE_LINEAR_SCAN_ALLOC, "LSRA allocate", "LSRA-ALL", false, PHASE_LINEAR_SCAN, false)
-CompPhaseNameMacro(PHASE_LINEAR_SCAN_RESOLVE, "LSRA resolve", "LSRA-RES", false, PHASE_LINEAR_SCAN, false)
-CompPhaseNameMacro(PHASE_ALIGN_LOOPS, "Place 'align' instructions", "LOOP-ALIGN", false, -1, false)
-CompPhaseNameMacro(PHASE_GENERATE_CODE, "Generate code", "CODEGEN", false, -1, false)
-CompPhaseNameMacro(PHASE_EMIT_CODE, "Emit code", "EMIT", false, -1, false)
-CompPhaseNameMacro(PHASE_EMIT_GCEH, "Emit GC+EH tables", "EMT-GCEH", false, -1, false)
-CompPhaseNameMacro(PHASE_POST_EMIT, "Post-Emit", "POST-EMIT", false, -1, false)
+CompPhaseNameMacro(PHASE_LOWERING_DECOMP, "Lowering decomposition", false, -1, false)
+CompPhaseNameMacro(PHASE_LOWERING, "Lowering nodeinfo", false, -1, true)
+CompPhaseNameMacro(PHASE_STACK_LEVEL_SETTER, "Calculate stack level slots", false, -1, false)
+CompPhaseNameMacro(PHASE_LINEAR_SCAN, "Linear scan register alloc", true, -1, true)
+CompPhaseNameMacro(PHASE_LINEAR_SCAN_BUILD, "LSRA build intervals", false, PHASE_LINEAR_SCAN, false)
+CompPhaseNameMacro(PHASE_LINEAR_SCAN_ALLOC, "LSRA allocate", false, PHASE_LINEAR_SCAN, false)
+CompPhaseNameMacro(PHASE_LINEAR_SCAN_RESOLVE, "LSRA resolve", false, PHASE_LINEAR_SCAN, false)
+CompPhaseNameMacro(PHASE_ALIGN_LOOPS, "Place 'align' instructions", false, -1, false)
+CompPhaseNameMacro(PHASE_GENERATE_CODE, "Generate code", false, -1, false)
+CompPhaseNameMacro(PHASE_EMIT_CODE, "Emit code", false, -1, false)
+CompPhaseNameMacro(PHASE_EMIT_GCEH, "Emit GC+EH tables", false, -1, false)
+CompPhaseNameMacro(PHASE_POST_EMIT, "Post-Emit", false, -1, false)
#if MEASURE_CLRAPI_CALLS
// The following is a "pseudo-phase" - it aggregates timing info
// for calls through ICorJitInfo across all "real" phases.
-CompPhaseNameMacro(PHASE_CLR_API, "CLR API calls", "CLR-API", false, -1, false)
+CompPhaseNameMacro(PHASE_CLR_API, "CLR API calls", false, -1, false)
#endif
// clang-format on
diff --git a/src/coreclr/jit/emitxarch.cpp b/src/coreclr/jit/emitxarch.cpp
index 20a700e6913..1ef3510a752 100644
--- a/src/coreclr/jit/emitxarch.cpp
+++ b/src/coreclr/jit/emitxarch.cpp
@@ -3399,7 +3399,6 @@ void emitter::emitInsStoreInd(instruction ins, emitAttr attr, GenTreeStoreInd* m
if (data->OperIs(GT_BSWAP, GT_BSWAP16) && data->isContained())
{
assert(ins == INS_movbe);
-
data = data->gtGetOp1();
}
@@ -3409,6 +3408,27 @@ void emitter::emitInsStoreInd(instruction ins, emitAttr attr, GenTreeStoreInd* m
{
emitIns_C_I(ins, attr, addr->AsClsVar()->gtClsVarHnd, 0, (int)data->AsIntConCommon()->IconValue());
}
+#if defined(FEATURE_HW_INTRINSICS)
+ else if (data->OperIsHWIntrinsic() && data->isContained())
+ {
+ GenTreeHWIntrinsic* hwintrinsic = data->AsHWIntrinsic();
+ NamedIntrinsic intrinsicId = hwintrinsic->GetHWIntrinsicId();
+ size_t numArgs = hwintrinsic->GetOperandCount();
+ GenTree* op1 = hwintrinsic->Op(1);
+
+ if (numArgs == 1)
+ {
+ emitIns_C_R(ins, attr, addr->AsClsVar()->gtClsVarHnd, op1->GetRegNum(), 0);
+ }
+ else
+ {
+ assert(numArgs == 2);
+
+ int icon = static_cast<int>(hwintrinsic->Op(2)->AsIntConCommon()->IconValue());
+ emitIns_C_R_I(ins, attr, addr->AsClsVar()->gtClsVarHnd, 0, op1->GetRegNum(), icon);
+ }
+ }
+#endif // FEATURE_HW_INTRINSICS
else
{
assert(!data->isContained());
@@ -3421,10 +3441,32 @@ void emitter::emitInsStoreInd(instruction ins, emitAttr attr, GenTreeStoreInd* m
{
GenTreeLclVarCommon* varNode = addr->AsLclVarCommon();
unsigned offset = varNode->GetLclOffs();
+
if (data->isContainedIntOrIImmed())
{
emitIns_S_I(ins, attr, varNode->GetLclNum(), offset, (int)data->AsIntConCommon()->IconValue());
}
+#if defined(FEATURE_HW_INTRINSICS)
+ else if (data->OperIsHWIntrinsic() && data->isContained())
+ {
+ GenTreeHWIntrinsic* hwintrinsic = data->AsHWIntrinsic();
+ NamedIntrinsic intrinsicId = hwintrinsic->GetHWIntrinsicId();
+ size_t numArgs = hwintrinsic->GetOperandCount();
+ GenTree* op1 = hwintrinsic->Op(1);
+
+ if (numArgs == 1)
+ {
+ emitIns_S_R(ins, attr, op1->GetRegNum(), varNode->GetLclNum(), offset);
+ }
+ else
+ {
+ assert(numArgs == 2);
+
+ int icon = static_cast<int>(hwintrinsic->Op(2)->AsIntConCommon()->IconValue());
+ emitIns_S_R_I(ins, attr, varNode->GetLclNum(), offset, op1->GetRegNum(), icon);
+ }
+ }
+#endif // FEATURE_HW_INTRINSICS
else
{
assert(!data->isContained());
@@ -3449,6 +3491,37 @@ void emitter::emitInsStoreInd(instruction ins, emitAttr attr, GenTreeStoreInd* m
sz = emitInsSizeAM(id, insCodeMI(ins), icon);
id->idCodeSize(sz);
}
+#if defined(FEATURE_HW_INTRINSICS)
+ else if (data->OperIsHWIntrinsic() && data->isContained())
+ {
+ GenTreeHWIntrinsic* hwintrinsic = data->AsHWIntrinsic();
+ NamedIntrinsic intrinsicId = hwintrinsic->GetHWIntrinsicId();
+ size_t numArgs = hwintrinsic->GetOperandCount();
+ GenTree* op1 = hwintrinsic->Op(1);
+
+ if (numArgs == 1)
+ {
+ id = emitNewInstrAmd(attr, offset);
+ id->idIns(ins);
+ emitHandleMemOp(mem, id, IF_AWR_RRD, ins);
+ id->idReg1(op1->GetRegNum());
+ sz = emitInsSizeAM(id, insCodeMR(ins));
+ id->idCodeSize(sz);
+ }
+ else
+ {
+ assert(numArgs == 2);
+ int icon = static_cast<int>(hwintrinsic->Op(2)->AsIntConCommon()->IconValue());
+
+ id = emitNewInstrAmdCns(attr, offset, icon);
+ id->idIns(ins);
+ id->idReg1(op1->GetRegNum());
+ emitHandleMemOp(mem, id, IF_AWR_RRD_CNS, ins);
+ sz = emitInsSizeAM(id, insCodeMR(ins), icon);
+ id->idCodeSize(sz);
+ }
+ }
+#endif // FEATURE_HW_INTRINSICS
else
{
assert(!data->isContained());
@@ -6135,6 +6208,44 @@ void emitter::emitIns_AR_R(instruction ins, emitAttr attr, regNumber reg, regNum
}
//------------------------------------------------------------------------
+// emitIns_C_R_I: emits the code for an instruction that takes a static member,
+// a register operand, and an immediate.
+//
+// Arguments:
+// ins - The instruction being emitted
+// attr - The emit attribute
+// fldHnd - The CORINFO_FIELD_HANDLE used for the memory address
+// offs - The offset for the stack operand
+// reg - The register operand
+// ival - The immediate value
+//
+void emitter::emitIns_C_R_I(
+ instruction ins, emitAttr attr, CORINFO_FIELD_HANDLE fldHnd, int offs, regNumber reg, int ival)
+{
+ assert(IsSSEOrAVXInstruction(ins));
+ assert(reg != REG_NA);
+
+ // Static always need relocs
+ if (!jitStaticFldIsGlobAddr(fldHnd))
+ {
+ attr = EA_SET_FLG(attr, EA_DSP_RELOC_FLG);
+ }
+
+ instrDesc* id = emitNewInstrCnsDsp(attr, ival, offs);
+
+ id->idIns(ins);
+ id->idInsFmt(IF_MWR_RRD_CNS);
+ id->idReg1(reg);
+ id->idAddr()->iiaFieldHnd = fldHnd;
+
+ UNATIVE_OFFSET sz = emitInsSizeCV(id, insCodeMR(ins), ival);
+ id->idCodeSize(sz);
+
+ dispIns(id);
+ emitCurIGsize += sz;
+}
+
+//------------------------------------------------------------------------
// emitIns_S_R_I: emits the code for an instruction that takes a stack operand,
// a register operand, and an immediate.
//
@@ -6148,9 +6259,9 @@ void emitter::emitIns_AR_R(instruction ins, emitAttr attr, regNumber reg, regNum
//
void emitter::emitIns_S_R_I(instruction ins, emitAttr attr, int varNum, int offs, regNumber reg, int ival)
{
- // This is only used for INS_vextracti128 and INS_vextractf128, and for these 'ival' must be 0 or 1.
- assert(ins == INS_vextracti128 || ins == INS_vextractf128);
- assert((ival == 0) || (ival == 1));
+ assert(IsSSEOrAVXInstruction(ins));
+ assert(reg != REG_NA);
+
instrDesc* id = emitNewInstrAmdCns(attr, 0, ival);
id->idIns(ins);
@@ -6168,10 +6279,20 @@ void emitter::emitIns_S_R_I(instruction ins, emitAttr attr, int varNum, int offs
emitCurIGsize += sz;
}
+//------------------------------------------------------------------------
+// emitIns_A_R_I: emits the code for an instruction that takes an address,
+// a register operand, and an immediate.
+//
+// Arguments:
+// ins - The instruction being emitted
+// attr - The emit attribute
+// indir - The GenTreeIndir used for the memory address
+// reg - The register operand
+// ival - The immediate value
+//
void emitter::emitIns_A_R_I(instruction ins, emitAttr attr, GenTreeIndir* indir, regNumber reg, int imm)
{
- assert((ins == INS_vextracti128) || (ins == INS_vextractf128));
- assert(attr == EA_32BYTE);
+ assert(IsSSEOrAVXInstruction(ins));
assert(reg != REG_NA);
instrDesc* id = emitNewInstrAmdCns(attr, indir->Offset(), imm);
@@ -9236,9 +9357,12 @@ void emitter::emitDispIns(
case IF_AWR_RRD_CNS:
{
- assert(ins == INS_vextracti128 || ins == INS_vextractf128);
- // vextracti/f128 extracts 128-bit data, so we fix sstr as "xmm ptr"
- sstr = codeGen->genSizeStr(EA_ATTR(16));
+ if ((ins == INS_vextracti128) || (ins == INS_vextractf128))
+ {
+ // vextracti/f128 extracts 128-bit data, so we fix sstr as "xmm ptr"
+ sstr = codeGen->genSizeStr(EA_ATTR(16));
+ }
+
printf(sstr);
emitDispAddrMode(id);
printf(", %s", emitRegName(id->idReg1(), attr));
@@ -9427,8 +9551,7 @@ void emitter::emitDispIns(
break;
case IF_SWR_RRD_CNS:
- assert(ins == INS_vextracti128 || ins == INS_vextractf128);
- assert(UseVEXEncoding());
+ assert(IsSSEOrAVXInstruction(ins));
emitGetInsAmdCns(id, &cnsVal);
printf("%s", sstr);
@@ -9790,9 +9913,12 @@ void emitter::emitDispIns(
case IF_MWR_RRD_CNS:
{
- assert(ins == INS_vextracti128 || ins == INS_vextractf128);
- // vextracti/f128 extracts 128-bit data, so we fix sstr as "xmm ptr"
- sstr = codeGen->genSizeStr(EA_ATTR(16));
+ if ((ins == INS_vextracti128) || (ins == INS_vextractf128))
+ {
+ // vextracti/f128 extracts 128-bit data, so we fix sstr as "xmm ptr"
+ sstr = codeGen->genSizeStr(EA_ATTR(16));
+ }
+
printf(sstr);
offs = emitGetInsDsp(id);
emitDispClsVar(id->idAddr()->iiaFieldHnd, offs, ID_INFO_DSP_RELOC);
@@ -14197,8 +14323,7 @@ size_t emitter::emitOutputInstr(insGroup* ig, instrDesc* id, BYTE** dp)
break;
case IF_AWR_RRD_CNS:
- assert(ins == INS_vextracti128 || ins == INS_vextractf128);
- assert(UseVEXEncoding());
+ assert(IsSSEOrAVXInstruction(ins));
emitGetInsAmdCns(id, &cnsVal);
code = insCodeMR(ins);
dst = emitOutputAM(dst, id, code, &cnsVal);
@@ -14336,8 +14461,7 @@ size_t emitter::emitOutputInstr(insGroup* ig, instrDesc* id, BYTE** dp)
break;
case IF_SWR_RRD_CNS:
- assert(ins == INS_vextracti128 || ins == INS_vextractf128);
- assert(UseVEXEncoding());
+ assert(IsSSEOrAVXInstruction(ins));
emitGetInsAmdCns(id, &cnsVal);
code = insCodeMR(ins);
dst = emitOutputSV(dst, id, insCodeMR(ins), &cnsVal);
diff --git a/src/coreclr/jit/emitxarch.h b/src/coreclr/jit/emitxarch.h
index 6334e5a0ddf..7f8b1bd85bb 100644
--- a/src/coreclr/jit/emitxarch.h
+++ b/src/coreclr/jit/emitxarch.h
@@ -375,8 +375,9 @@ void emitIns_R_R_A_I(
instruction ins, emitAttr attr, regNumber reg1, regNumber reg2, GenTreeIndir* indir, int ival, insFormat fmt);
void emitIns_R_R_AR_I(
instruction ins, emitAttr attr, regNumber reg1, regNumber reg2, regNumber base, int offs, int ival);
-void emitIns_S_R_I(instruction ins, emitAttr attr, int varNum, int offs, regNumber reg, int ival);
+void emitIns_C_R_I(instruction ins, emitAttr attr, CORINFO_FIELD_HANDLE fldHnd, int offs, regNumber reg, int ival);
+void emitIns_S_R_I(instruction ins, emitAttr attr, int varNum, int offs, regNumber reg, int ival);
void emitIns_A_R_I(instruction ins, emitAttr attr, GenTreeIndir* indir, regNumber reg, int imm);
void emitIns_R_R_C_I(
diff --git a/src/coreclr/jit/fgdiagnostic.cpp b/src/coreclr/jit/fgdiagnostic.cpp
index c5d1aff9aa6..d379c0124b3 100644
--- a/src/coreclr/jit/fgdiagnostic.cpp
+++ b/src/coreclr/jit/fgdiagnostic.cpp
@@ -480,7 +480,7 @@ FILE* Compiler::fgOpenFlowGraphFile(bool* wbDontClose, Phases phase, PhasePositi
return nullptr;
}
- LPCWSTR phaseName = PhaseShortNames[phase];
+ LPCWSTR phaseName = PhaseEnumsW[phase] + strlen("PHASE_");
if (pos == PhasePosition::PrePhase)
{
diff --git a/src/coreclr/jit/fginline.cpp b/src/coreclr/jit/fginline.cpp
index 88e70cbb57d..9131c7eb6f3 100644
--- a/src/coreclr/jit/fginline.cpp
+++ b/src/coreclr/jit/fginline.cpp
@@ -340,11 +340,6 @@ private:
asg->gtOp2 = AssignStructInlineeToVar(inlinee, retClsHnd);
}
}
- else if (dst->IsMultiRegLclVar())
- {
- // This is no longer a multi-reg assignment -- clear the flag.
- dst->AsLclVar()->ClearMultiReg();
- }
}
//------------------------------------------------------------------------
diff --git a/src/coreclr/jit/fgopt.cpp b/src/coreclr/jit/fgopt.cpp
index bbd294684de..ab50d166a7a 100644
--- a/src/coreclr/jit/fgopt.cpp
+++ b/src/coreclr/jit/fgopt.cpp
@@ -4988,10 +4988,10 @@ bool Compiler::fgReorderBlocks(bool useProfile)
double notTakenCount =
((double)edgeToBlock->edgeWeightMin() + (double)edgeToBlock->edgeWeightMax()) / 2.0;
double totalCount = takenCount + notTakenCount;
- double takenRatio = takenCount / totalCount;
- // If the takenRatio is greater or equal to 51% then we will reverse the branch
- if (takenRatio < 0.51)
+ // If the takenRatio (takenCount / totalCount) is greater or equal to 51% then we will reverse
+ // the branch
+ if (takenCount < (0.51 * totalCount))
{
reorderBlock = false;
}
diff --git a/src/coreclr/jit/flowgraph.cpp b/src/coreclr/jit/flowgraph.cpp
index 2613df36930..92c62845c8d 100644
--- a/src/coreclr/jit/flowgraph.cpp
+++ b/src/coreclr/jit/flowgraph.cpp
@@ -3200,6 +3200,12 @@ BasicBlock* Compiler::fgGetDomSpeculatively(const BasicBlock* block)
}
lastReachablePred = predBlock;
}
+ else if (predBlock == block->bbIDom)
+ {
+ // IDom is unreachable, so assume this block is too.
+ //
+ return nullptr;
+ }
}
return lastReachablePred == nullptr ? block->bbIDom : lastReachablePred;
diff --git a/src/coreclr/jit/forwardsub.cpp b/src/coreclr/jit/forwardsub.cpp
index 7ae30b23826..7e30100e573 100644
--- a/src/coreclr/jit/forwardsub.cpp
+++ b/src/coreclr/jit/forwardsub.cpp
@@ -434,15 +434,13 @@ bool Compiler::fgForwardSubStatement(Statement* stmt)
GenTree* const rhsNode = rootNode->gtGetOp2();
GenTree* fwdSubNode = rhsNode;
- // Can't substitute a qmark (unless the use is RHS of an assign... could check for this)
// Can't substitute GT_CATCH_ARG.
// Can't substitute GT_LCLHEAP.
//
// Don't substitute a no return call (trips up morph in some cases).
- //
- if (fwdSubNode->OperIs(GT_QMARK, GT_CATCH_ARG, GT_LCLHEAP))
+ if (fwdSubNode->OperIs(GT_CATCH_ARG, GT_LCLHEAP))
{
- JITDUMP(" tree to sub is qmark, catch arg, or lcl heap\n");
+ JITDUMP(" tree to sub is catch arg, or lcl heap\n");
return false;
}
@@ -469,14 +467,6 @@ bool Compiler::fgForwardSubStatement(Statement* stmt)
return false;
}
- // If lhs is mulit-reg, rhs must be too.
- //
- if (lhsNode->IsMultiRegNode() && !fwdSubNode->IsMultiRegNode())
- {
- JITDUMP(" would change multi-reg (assignment)\n");
- return false;
- }
-
// Don't fwd sub overly large trees.
// Size limit here is ad-hoc. Need to tune.
//
@@ -519,6 +509,40 @@ bool Compiler::fgForwardSubStatement(Statement* stmt)
JITDUMP(" [%06u] is only use of [%06u] (V%02u) ", dspTreeID(fsv.GetNode()), dspTreeID(lhsNode), lclNum);
+ // Qmarks must replace top-level uses. Also, restrict to GT_ASG.
+ // And also to where neither local is normalize on store, otherwise
+ // something downstream may add a cast over the qmark.
+ //
+ GenTree* const nextRootNode = nextStmt->GetRootNode();
+ if (fwdSubNode->OperIs(GT_QMARK))
+ {
+ if ((fsv.GetParentNode() != nextRootNode) || !nextRootNode->OperIs(GT_ASG))
+ {
+ JITDUMP(" can't fwd sub qmark as use is not top level ASG\n");
+ return false;
+ }
+
+ if (varDsc->lvNormalizeOnStore())
+ {
+ JITDUMP(" can't fwd sub qmark as V%02u is normalize on store\n", lclNum);
+ return false;
+ }
+
+ GenTree* const nextRootNodeLHS = nextRootNode->gtGetOp1();
+
+ if (nextRootNodeLHS->OperIs(GT_LCL_VAR))
+ {
+ const unsigned lhsLclNum = nextRootNodeLHS->AsLclVarCommon()->GetLclNum();
+ LclVarDsc* const lhsVarDsc = lvaGetDesc(lhsLclNum);
+
+ if (lhsVarDsc->lvNormalizeOnStore())
+ {
+ JITDUMP(" can't fwd sub qmark as V%02u is normalize on store\n", lhsLclNum);
+ return false;
+ }
+ }
+ }
+
// If next statement already has a large tree, hold off
// on making it even larger.
//
@@ -535,8 +559,6 @@ bool Compiler::fgForwardSubStatement(Statement* stmt)
// Next statement seems suitable.
// See if we can forward sub without changing semantics.
//
- GenTree* const nextRootNode = nextStmt->GetRootNode();
-
// Bail if types disagree.
// Might be able to tolerate these by retyping.
//
@@ -663,16 +685,16 @@ bool Compiler::fgForwardSubStatement(Statement* stmt)
// There are implicit assumptions downstream on where/how multi-reg ops
// can appear.
//
- // Eg if fwdSubNode is a multi-reg call, parent node must be GT_ASG and the
- // local being defined must be specially marked up.
+ // Eg if fwdSubNode is a multi-reg call, parent node must be GT_ASG and
+ // the local being defined must be specially marked up.
//
- if (varTypeIsStruct(fwdSubNode) && fwdSubNode->IsMultiRegCall())
+ if (varTypeIsStruct(fwdSubNode) && fwdSubNode->IsMultiRegNode())
{
GenTree* const parentNode = fsv.GetParentNode();
if (!parentNode->OperIs(GT_ASG))
{
- JITDUMP(" multi-reg struct call, parent not asg\n");
+ JITDUMP(" multi-reg struct node, parent not asg\n");
return false;
}
@@ -680,7 +702,7 @@ bool Compiler::fgForwardSubStatement(Statement* stmt)
if (!parentNodeLHS->OperIs(GT_LCL_VAR))
{
- JITDUMP(" multi-reg struct call, parent not asg(lcl, ...)\n");
+ JITDUMP(" multi-reg struct node, parent not asg(lcl, ...)\n");
return false;
}
@@ -691,7 +713,6 @@ bool Compiler::fgForwardSubStatement(Statement* stmt)
JITDUMP(" [marking V%02u as multi-reg-ret]", lhsLclNum);
lhsVarDsc->lvIsMultiRegRet = true;
- parentNodeLHSLocal->SetMultiReg();
}
// If a method returns a multi-reg type, only forward sub locals,
@@ -731,18 +752,9 @@ bool Compiler::fgForwardSubStatement(Statement* stmt)
JITDUMP(" [marking V%02u as multi-reg-ret]", fwdLclNum);
fwdVarDsc->lvIsMultiRegRet = true;
- fwdSubNodeLocal->SetMultiReg();
fwdSubNodeLocal->gtFlags |= GTF_DONT_CSE;
}
- // If the use is a multi-reg arg, don't forward sub non-locals.
- //
- if (fsv.GetNode()->IsMultiRegNode() && !fwdSubNode->IsMultiRegNode())
- {
- JITDUMP(" would change multi-reg (substitution)\n");
- return false;
- }
-
// If the initial has truncate on store semantics, we need to replicate
// that here with a cast.
//
diff --git a/src/coreclr/jit/gentree.cpp b/src/coreclr/jit/gentree.cpp
index 9913e6f2ce4..4838e8456a8 100644
--- a/src/coreclr/jit/gentree.cpp
+++ b/src/coreclr/jit/gentree.cpp
@@ -252,7 +252,9 @@ void GenTree::InitNodeSize()
}
GenTree::s_gtNodeSizes[GT_CALL] = TREE_NODE_SZ_LARGE;
+#ifndef HOST_64BIT
GenTree::s_gtNodeSizes[GT_CNS_VEC] = TREE_NODE_SZ_LARGE;
+#endif
GenTree::s_gtNodeSizes[GT_CAST] = TREE_NODE_SZ_LARGE;
GenTree::s_gtNodeSizes[GT_FTN_ADDR] = TREE_NODE_SZ_LARGE;
GenTree::s_gtNodeSizes[GT_BOX] = TREE_NODE_SZ_LARGE;
@@ -300,7 +302,11 @@ void GenTree::InitNodeSize()
static_assert_no_msg(sizeof(GenTreeLngCon) <= TREE_NODE_SZ_SMALL);
static_assert_no_msg(sizeof(GenTreeDblCon) <= TREE_NODE_SZ_SMALL);
static_assert_no_msg(sizeof(GenTreeStrCon) <= TREE_NODE_SZ_SMALL);
+#ifdef HOST_64BIT
+ static_assert_no_msg(sizeof(GenTreeVecCon) <= TREE_NODE_SZ_SMALL);
+#else
static_assert_no_msg(sizeof(GenTreeVecCon) <= TREE_NODE_SZ_LARGE); // *** large node
+#endif
static_assert_no_msg(sizeof(GenTreeLclVarCommon) <= TREE_NODE_SZ_SMALL);
static_assert_no_msg(sizeof(GenTreeLclVar) <= TREE_NODE_SZ_SMALL);
static_assert_no_msg(sizeof(GenTreeLclFld) <= TREE_NODE_SZ_SMALL);
@@ -2724,48 +2730,49 @@ AGAIN:
return result;
}
-struct AddrTakenDsc
-{
- Compiler* comp;
- bool hasAddrTakenLcl;
-};
-
-/* static */
-Compiler::fgWalkResult Compiler::gtHasLocalsWithAddrOpCB(GenTree** pTree, fgWalkData* data)
+//------------------------------------------------------------------------------
+// gtHasLocalsWithAddrOp:
+// Check if this tree contains locals with lvHasLdAddrOp or
+// IsAddressExposed() flags set. Does a full tree walk.
+//
+// Paramters:
+// tree - the tree
+//
+// Return Value:
+// True if any sub tree is such a local.
+//
+bool Compiler::gtHasLocalsWithAddrOp(GenTree* tree)
{
- GenTree* tree = *pTree;
- Compiler* comp = data->compiler;
-
- if (tree->gtOper == GT_LCL_VAR)
+ struct LocalsWithAddrOpVisitor : GenTreeVisitor<LocalsWithAddrOpVisitor>
{
- const LclVarDsc* varDsc = comp->lvaGetDesc(tree->AsLclVarCommon());
-
- if (varDsc->lvHasLdAddrOp || varDsc->IsAddressExposed())
+ enum
{
- ((AddrTakenDsc*)data->pCallbackData)->hasAddrTakenLcl = true;
- return WALK_ABORT;
- }
- }
-
- return WALK_CONTINUE;
-}
+ DoPreOrder = true,
+ DoLclVarsOnly = true,
+ };
-/*****************************************************************************
- *
- * Return true if this tree contains locals with lvHasLdAddrOp or IsAddressExposed()
- * flag(s) set.
- */
+ bool HasAddrTakenLocal = false;
-bool Compiler::gtHasLocalsWithAddrOp(GenTree* tree)
-{
- AddrTakenDsc desc;
+ LocalsWithAddrOpVisitor(Compiler* comp) : GenTreeVisitor(comp)
+ {
+ }
- desc.comp = this;
- desc.hasAddrTakenLcl = false;
+ fgWalkResult PreOrderVisit(GenTree** use, GenTree* user)
+ {
+ LclVarDsc* varDsc = m_compiler->lvaGetDesc((*use)->AsLclVarCommon());
+ if (varDsc->lvHasLdAddrOp || varDsc->IsAddressExposed())
+ {
+ HasAddrTakenLocal = true;
+ return WALK_ABORT;
+ }
- fgWalkTreePre(&tree, gtHasLocalsWithAddrOpCB, &desc);
+ return WALK_CONTINUE;
+ }
+ };
- return desc.hasAddrTakenLcl;
+ LocalsWithAddrOpVisitor visitor(this);
+ visitor.WalkTree(&tree, nullptr);
+ return visitor.HasAddrTakenLocal;
}
#ifdef DEBUG
@@ -2897,8 +2904,6 @@ AGAIN:
unreached();
}
}
-
- add = genTreeHashAdd(ulo32(add), vecCon->GetSimdBaseType());
break;
}
@@ -7086,9 +7091,9 @@ GenTree* Compiler::gtNewSconNode(int CPX, CORINFO_MODULE_HANDLE scpHandle)
return node;
}
-GenTreeVecCon* Compiler::gtNewVconNode(var_types type, CorInfoType simdBaseJitType)
+GenTreeVecCon* Compiler::gtNewVconNode(var_types type)
{
- GenTreeVecCon* vecCon = new (this, GT_CNS_VEC) GenTreeVecCon(type, simdBaseJitType);
+ GenTreeVecCon* vecCon = new (this, GT_CNS_VEC) GenTreeVecCon(type);
return vecCon;
}
@@ -7106,45 +7111,36 @@ GenTree* Compiler::gtNewAllBitsSetConNode(var_types type)
allBitsSet = gtNewLconNode(-1);
break;
- default:
- noway_assert(!"Bad type in gtNewAllBitsSetConNode");
- allBitsSet = nullptr;
+#ifdef FEATURE_SIMD
+ case TYP_SIMD8:
+ case TYP_SIMD12:
+ case TYP_SIMD16:
+ case TYP_SIMD32:
+ allBitsSet = gtNewVconNode(type);
+ allBitsSet->AsVecCon()->gtSimd32Val.i64[0] = -1;
+ allBitsSet->AsVecCon()->gtSimd32Val.i64[1] = -1;
+ allBitsSet->AsVecCon()->gtSimd32Val.i64[2] = -1;
+ allBitsSet->AsVecCon()->gtSimd32Val.i64[3] = -1;
break;
+#endif // FEATURE_SIMD
+
+ default:
+ unreached();
}
return allBitsSet;
}
-GenTree* Compiler::gtNewAllBitsSetConNode(var_types type, CorInfoType simdBaseJitType)
-{
- assert(varTypeIsSIMD(type));
- assert(simdBaseJitType != CORINFO_TYPE_UNDEF);
-
- GenTreeVecCon* vecCon = gtNewVconNode(type, simdBaseJitType);
-
- vecCon->gtSimd32Val.i64[0] = -1;
- vecCon->gtSimd32Val.i64[1] = -1;
- vecCon->gtSimd32Val.i64[2] = -1;
- vecCon->gtSimd32Val.i64[3] = -1;
-
- return vecCon;
-}
-
GenTree* Compiler::gtNewZeroConNode(var_types type)
{
GenTree* zero;
+
switch (type)
{
case TYP_INT:
- zero = gtNewIconNode(0);
- break;
-
- case TYP_BYREF:
- FALLTHROUGH;
-
case TYP_REF:
- zero = gtNewIconNode(0);
- zero->gtType = type;
+ case TYP_BYREF:
+ zero = gtNewIconNode(0, type);
break;
case TYP_LONG:
@@ -7152,12 +7148,8 @@ GenTree* Compiler::gtNewZeroConNode(var_types type)
break;
case TYP_FLOAT:
- zero = gtNewDconNode(0.0);
- zero->gtType = type;
- break;
-
case TYP_DOUBLE:
- zero = gtNewDconNode(0.0);
+ zero = gtNewDconNode(0.0, type);
break;
#ifdef FEATURE_SIMD
@@ -7165,26 +7157,16 @@ GenTree* Compiler::gtNewZeroConNode(var_types type)
case TYP_SIMD12:
case TYP_SIMD16:
case TYP_SIMD32:
- zero = gtNewZeroConNode(type, CORINFO_TYPE_FLOAT);
+ zero = gtNewVconNode(type);
+ zero->AsVecCon()->gtSimd32Val = {};
break;
#endif // FEATURE_SIMD
default:
- noway_assert(!"Bad type in gtNewZeroConNode");
- zero = nullptr;
- break;
+ unreached();
}
- return zero;
-}
-GenTree* Compiler::gtNewZeroConNode(var_types type, CorInfoType simdBaseJitType)
-{
- assert(varTypeIsSIMD(type));
- assert(simdBaseJitType != CORINFO_TYPE_UNDEF);
-
- GenTreeVecCon* vecCon = gtNewVconNode(type, simdBaseJitType);
- vecCon->gtSimd32Val = {};
- return vecCon;
+ return zero;
}
GenTree* Compiler::gtNewOneConNode(var_types type)
@@ -7204,15 +7186,13 @@ GenTree* Compiler::gtNewOneConNode(var_types type)
case TYP_FLOAT:
case TYP_DOUBLE:
- one = gtNewDconNode(1.0);
- one->gtType = type;
+ one = gtNewDconNode(1.0, type);
break;
default:
- noway_assert(!"Bad type in gtNewOneConNode");
- one = nullptr;
- break;
+ unreached();
}
+
return one;
}
@@ -8164,7 +8144,7 @@ GenTree* Compiler::gtClone(GenTree* tree, bool complexOK)
case GT_CNS_VEC:
{
- GenTreeVecCon* vecCon = gtNewVconNode(tree->TypeGet(), tree->AsVecCon()->GetSimdBaseJitType());
+ GenTreeVecCon* vecCon = gtNewVconNode(tree->TypeGet());
vecCon->gtSimd32Val = tree->AsVecCon()->gtSimd32Val;
copy = vecCon;
break;
@@ -8344,7 +8324,7 @@ GenTree* Compiler::gtCloneExpr(
case GT_CNS_VEC:
{
- GenTreeVecCon* vecCon = gtNewVconNode(tree->TypeGet(), tree->AsVecCon()->GetSimdBaseJitType());
+ GenTreeVecCon* vecCon = gtNewVconNode(tree->TypeGet());
vecCon->gtSimd32Val = tree->AsVecCon()->gtSimd32Val;
copy = vecCon;
goto DONE;
@@ -8607,7 +8587,7 @@ GenTree* Compiler::gtCloneExpr(
// We're in the SimpleOp case, so it's always unary or binary.
if (GenTree::OperIsUnary(tree->OperGet()))
{
- copy = gtNewOperNode(oper, tree->TypeGet(), tree->AsOp()->gtOp1, /*doSimplifications*/ false);
+ copy = gtNewOperNode(oper, tree->TypeGet(), tree->AsOp()->gtOp1);
}
else
{
@@ -10442,12 +10422,6 @@ void Compiler::gtDispNode(GenTree* tree, IndentStack* indentStack, _In_ _In_opt_
--msgLength;
break;
}
- if (tree->gtFlags & GTF_VAR_CAST)
- {
- printf("C");
- --msgLength;
- break;
- }
if (tree->gtFlags & GTF_VAR_CONTEXT)
{
printf("!");
@@ -11121,8 +11095,15 @@ void Compiler::gtDispConst(GenTree* tree)
if (tree->TypeGet() == TYP_REF)
{
- assert(tree->AsIntCon()->gtIconVal == 0);
- printf(" null");
+ if (tree->AsIntCon()->gtIconVal == 0)
+ {
+ printf(" null");
+ }
+ else
+ {
+ assert(doesMethodHaveFrozenString());
+ printf(" 0x%llx", dspIconVal);
+ }
}
else if ((tree->AsIntCon()->gtIconVal > -1000) && (tree->AsIntCon()->gtIconVal < 1000))
{
@@ -16674,7 +16655,7 @@ GenTreeLclVar* GenTree::IsImplicitByrefParameterValue(Compiler* compiler)
{
lcl = AsLclVar();
}
- else if (OperIs(GT_OBJ))
+ else if (OperIsIndir())
{
GenTree* addr = AsIndir()->Addr();
@@ -17079,12 +17060,13 @@ bool GenTreeVecCon::IsHWIntrinsicCreateConstant(GenTreeHWIntrinsic* node, simd32
switch (node->GetHWIntrinsicId())
{
case NI_Vector128_Create:
-#if defined(TARGET_XARCH)
case NI_Vector128_CreateScalarUnsafe:
+#if defined(TARGET_XARCH)
case NI_Vector256_Create:
case NI_Vector256_CreateScalarUnsafe:
#elif defined(TARGET_ARM64)
case NI_Vector64_Create:
+ case NI_Vector64_CreateScalarUnsafe:
#endif
{
// These intrinsics are meant to set the same value to every element.
@@ -17256,22 +17238,6 @@ bool GenTreeVecCon::HandleArgForHWIntrinsicCreate(GenTree* arg, int argIdx, simd
}
#endif // FEATURE_HW_INTRINSICS
-//----------------------------------------------------------------------------------------------
-// GetSimdBaseType: Gets the var_type for the SimdBaseJitType of a GenTreeVecCon node
-//
-// Returns:
-// the var_type for the SimdBaseJitType of a GenTreeVecCon
-var_types GenTreeVecCon::GetSimdBaseType() const
-{
- CorInfoType simdBaseJitType = GetSimdBaseJitType();
-
- if (simdBaseJitType == CORINFO_TYPE_UNDEF)
- {
- return TYP_UNKNOWN;
- }
- return JitType2PreciseVarType(simdBaseJitType);
-}
-
//------------------------------------------------------------------------
// IsFieldAddr: Is "this" a static or class field address?
//
@@ -17394,8 +17360,6 @@ CORINFO_CLASS_HANDLE Compiler::gtGetStructHandleIfPresent(GenTree* tree)
{
switch (tree->gtOper)
{
- default:
- break;
case GT_MKREFANY:
structHnd = impGetRefAnyClass();
break;
@@ -17421,79 +17385,45 @@ CORINFO_CLASS_HANDLE Compiler::gtGetStructHandleIfPresent(GenTree* tree)
#ifdef FEATURE_SIMD
if (varTypeIsSIMD(tree))
{
- structHnd = gtGetStructHandleForSIMD(tree->gtType, CORINFO_TYPE_FLOAT);
-#ifdef FEATURE_HW_INTRINSICS
- if (structHnd == NO_CLASS_HANDLE)
- {
- structHnd = gtGetStructHandleForHWSIMD(tree->gtType, CORINFO_TYPE_FLOAT);
- }
-#endif
+ structHnd = gtGetCanonicalStructHandleForSIMD(tree->TypeGet());
}
else
-#endif
+#endif // FEATURE_SIMD
{
structHnd = tree->AsLclFld()->GetLayout()->GetClassHandle();
}
break;
case GT_LCL_VAR:
- {
- unsigned lclNum = tree->AsLclVarCommon()->GetLclNum();
- structHnd = lvaGetStruct(lclNum);
+ structHnd = lvaGetDesc(tree->AsLclVar())->GetStructHnd();
break;
- }
case GT_RETURN:
structHnd = gtGetStructHandleIfPresent(tree->AsOp()->gtOp1);
break;
- case GT_IND:
#ifdef FEATURE_SIMD
+ case GT_IND:
if (varTypeIsSIMD(tree))
{
- structHnd = gtGetStructHandleForSIMD(tree->gtType, CORINFO_TYPE_FLOAT);
-#ifdef FEATURE_HW_INTRINSICS
- if (structHnd == NO_CLASS_HANDLE)
- {
- structHnd = gtGetStructHandleForHWSIMD(tree->gtType, CORINFO_TYPE_FLOAT);
- }
-#endif
+ structHnd = gtGetCanonicalStructHandleForSIMD(tree->TypeGet());
}
-#endif
break;
-#ifdef FEATURE_SIMD
case GT_SIMD:
structHnd = gtGetStructHandleForSIMD(tree->gtType, tree->AsSIMD()->GetSimdBaseJitType());
break;
+ case GT_CNS_VEC:
+ structHnd = gtGetCanonicalStructHandleForSIMD(tree->TypeGet());
+ break;
#endif // FEATURE_SIMD
#ifdef FEATURE_HW_INTRINSICS
case GT_HWINTRINSIC:
- if ((tree->gtFlags & GTF_SIMDASHW_OP) != 0)
- {
- structHnd = gtGetStructHandleForSIMD(tree->gtType, tree->AsHWIntrinsic()->GetSimdBaseJitType());
- }
- else
- {
- structHnd = gtGetStructHandleForHWSIMD(tree->gtType, tree->AsHWIntrinsic()->GetSimdBaseJitType());
- }
+ structHnd = gtGetStructHandleForSimdOrHW(tree->TypeGet(), tree->AsHWIntrinsic()->GetSimdBaseJitType(),
+ tree->AsHWIntrinsic()->IsSimdAsHWIntrinsic());
break;
#endif
- case GT_CNS_VEC:
- {
-#if defined(FEATURE_HW_INTRINSICS)
- structHnd = gtGetStructHandleForHWSIMD(tree->gtType, tree->AsVecCon()->GetSimdBaseJitType());
-#endif // FEATURE_HW_INTRINSICS
-
-#if defined(FEATURE_SIMD)
- if (structHnd == NO_CLASS_HANDLE)
- {
- structHnd = gtGetStructHandleForSIMD(tree->gtType, tree->AsVecCon()->GetSimdBaseJitType());
- }
-#endif // FEATURE_SIMD
+ default:
break;
- }
}
- // TODO-1stClassStructs: add a check that `structHnd != NO_CLASS_HANDLE`,
- // nowadays it won't work because the right part of an ASG could have struct type without a handle
- // (check `fgMorphBlockOperand(isBlkReqd`) and a few other cases.
}
+
return structHnd;
}
@@ -18644,7 +18574,6 @@ bool GenTreeSIMD::OperIsMemoryLoad() const
return GetSIMDIntrinsicId() == SIMDIntrinsicInitArray;
}
-// TODO-Review: why are layouts not compared here?
/* static */ bool GenTreeSIMD::Equals(GenTreeSIMD* op1, GenTreeSIMD* op2)
{
return (op1->TypeGet() == op2->TypeGet()) && (op1->GetSIMDIntrinsicId() == op2->GetSIMDIntrinsicId()) &&
@@ -18658,11 +18587,46 @@ bool GenTree::isCommutativeHWIntrinsic() const
{
assert(gtOper == GT_HWINTRINSIC);
+ const GenTreeHWIntrinsic* node = AsHWIntrinsic();
+ NamedIntrinsic id = node->GetHWIntrinsicId();
+
+ if (HWIntrinsicInfo::IsCommutative(id))
+ {
+ return true;
+ }
+
+ if (HWIntrinsicInfo::IsMaybeCommutative(id))
+ {
+ switch (id)
+ {
#ifdef TARGET_XARCH
- return HWIntrinsicInfo::IsCommutative(AsHWIntrinsic()->GetHWIntrinsicId());
-#else
- return false;
+ case NI_SSE_Max:
+ case NI_SSE_Min:
+ {
+ return false;
+ }
+
+ case NI_SSE2_Max:
+ case NI_SSE2_Min:
+ {
+ return !varTypeIsFloating(node->GetSimdBaseType());
+ }
+
+ case NI_AVX_Max:
+ case NI_AVX_Min:
+ {
+ return false;
+ }
#endif // TARGET_XARCH
+
+ default:
+ {
+ unreached();
+ }
+ }
+ }
+
+ return false;
}
bool GenTree::isContainableHWIntrinsic() const
@@ -18680,9 +18644,24 @@ bool GenTree::isContainableHWIntrinsic() const
case NI_SSE2_LoadVector128:
case NI_AVX_LoadAlignedVector256:
case NI_AVX_LoadVector256:
+ {
+ // These loads are contained as part of a HWIntrinsic operation
+ return true;
+ }
+
+ case NI_SSE2_ConvertToInt32:
+ case NI_SSE2_ConvertToUInt32:
+ case NI_SSE2_X64_ConvertToInt64:
+ case NI_SSE2_X64_ConvertToUInt64:
+ case NI_SSE2_Extract:
+ case NI_SSE41_Extract:
+ case NI_SSE41_X64_Extract:
case NI_AVX_ExtractVector128:
+ case NI_AVX2_ConvertToInt32:
+ case NI_AVX2_ConvertToUInt32:
case NI_AVX2_ExtractVector128:
{
+ // These HWIntrinsic operations are contained as part of a store
return true;
}
@@ -18900,11 +18879,11 @@ GenTree* Compiler::gtNewSimdAbsNode(
impCloneExpr(op1Dup1, &op1Dup2, clsHnd, CHECK_SPILL_ALL, nullptr DEBUGARG("Clone op1 for vector abs"));
// op1 = op1 < Zero
- tmp = gtNewZeroConNode(type, simdBaseJitType);
+ tmp = gtNewZeroConNode(type);
op1 = gtNewSimdCmpOpNode(GT_LT, type, op1, tmp, simdBaseJitType, simdSize, isSimdAsHWIntrinsic);
// tmp = Zero - op1Dup1
- tmp = gtNewZeroConNode(type, simdBaseJitType);
+ tmp = gtNewZeroConNode(type);
tmp = gtNewSimdBinOpNode(GT_SUB, type, tmp, op1Dup1, simdBaseJitType, simdSize, isSimdAsHWIntrinsic);
// result = ConditionalSelect(op1, tmp, op1Dup2)
@@ -20355,6 +20334,7 @@ GenTree* Compiler::gtNewSimdCmpOpAllNode(genTreeOps op,
op1 = gtNewSimdCmpOpNode(op, simdType, op1, op2, simdBaseJitType, simdSize,
/* isSimdAsHWIntrinsic */ false);
+ op2 = gtNewAllBitsSetConNode(simdType);
if (simdBaseType == TYP_FLOAT)
{
@@ -20366,8 +20346,6 @@ GenTree* Compiler::gtNewSimdCmpOpAllNode(genTreeOps op,
simdBaseType = TYP_LONG;
simdBaseJitType = CORINFO_TYPE_LONG;
}
-
- op2 = gtNewAllBitsSetConNode(simdType, simdBaseJitType);
break;
}
#elif defined(TARGET_ARM64)
@@ -20396,6 +20374,7 @@ GenTree* Compiler::gtNewSimdCmpOpAllNode(genTreeOps op,
op1 = gtNewSimdCmpOpNode(op, simdType, op1, op2, simdBaseJitType, simdSize,
/* isSimdAsHWIntrinsic */ false);
+ op2 = gtNewAllBitsSetConNode(simdType);
if (simdBaseType == TYP_FLOAT)
{
@@ -20407,8 +20386,6 @@ GenTree* Compiler::gtNewSimdCmpOpAllNode(genTreeOps op,
simdBaseType = TYP_LONG;
simdBaseJitType = CORINFO_TYPE_LONG;
}
-
- op2 = gtNewAllBitsSetConNode(simdType, simdBaseJitType);
break;
}
#else
@@ -20479,6 +20456,7 @@ GenTree* Compiler::gtNewSimdCmpOpAnyNode(genTreeOps op,
op1 = gtNewSimdCmpOpNode(op, simdType, op1, op2, simdBaseJitType, simdSize,
/* isSimdAsHWIntrinsic */ false);
+ op2 = gtNewZeroConNode(simdType);
if (simdBaseType == TYP_FLOAT)
{
@@ -20490,8 +20468,6 @@ GenTree* Compiler::gtNewSimdCmpOpAnyNode(genTreeOps op,
simdBaseType = TYP_LONG;
simdBaseJitType = CORINFO_TYPE_LONG;
}
-
- op2 = gtNewZeroConNode(simdType, simdBaseJitType);
break;
}
@@ -20524,6 +20500,7 @@ GenTree* Compiler::gtNewSimdCmpOpAnyNode(genTreeOps op,
op1 = gtNewSimdCmpOpNode(op, simdType, op1, op2, simdBaseJitType, simdSize,
/* isSimdAsHWIntrinsic */ false);
+ op2 = gtNewZeroConNode(simdType);
if (simdBaseType == TYP_FLOAT)
{
@@ -20535,8 +20512,6 @@ GenTree* Compiler::gtNewSimdCmpOpAnyNode(genTreeOps op,
simdBaseType = TYP_LONG;
simdBaseJitType = CORINFO_TYPE_LONG;
}
-
- op2 = gtNewZeroConNode(simdType, simdBaseJitType);
break;
}
@@ -21610,7 +21585,7 @@ GenTree* Compiler::gtNewSimdShuffleNode(var_types type,
{
// AllBitsSet represents indices that are always "out of range" which means zero should be
// selected for every element. We can special-case this down to just returning a zero node
- return gtNewZeroConNode(type, simdBaseJitType);
+ return gtNewZeroConNode(type);
}
if (op2->IsVectorZero())
@@ -21729,7 +21704,7 @@ GenTree* Compiler::gtNewSimdShuffleNode(var_types type,
GenTree* op1Lower = gtNewSimdHWIntrinsicNode(type, op1, NI_Vector256_GetLower, simdBaseJitType, simdSize,
isSimdAsHWIntrinsic);
- op2 = gtNewVconNode(TYP_SIMD16, simdBaseJitType);
+ op2 = gtNewVconNode(TYP_SIMD16);
op2->AsVecCon()->gtSimd16Val = vecCns.v128[0];
op1Lower = gtNewSimdHWIntrinsicNode(TYP_SIMD16, op1Lower, op2, NI_SSSE3_Shuffle, simdBaseJitType, 16,
@@ -21738,7 +21713,7 @@ GenTree* Compiler::gtNewSimdShuffleNode(var_types type,
GenTree* op1Upper = gtNewSimdHWIntrinsicNode(type, op1Dup, gtNewIconNode(1), NI_AVX_ExtractVector128,
simdBaseJitType, simdSize, isSimdAsHWIntrinsic);
- op2 = gtNewVconNode(TYP_SIMD16, simdBaseJitType);
+ op2 = gtNewVconNode(TYP_SIMD16);
op2->AsVecCon()->gtSimd16Val = vecCns.v128[1];
op1Upper = gtNewSimdHWIntrinsicNode(TYP_SIMD16, op1Upper, op2, NI_SSSE3_Shuffle, simdBaseJitType, 16,
@@ -21755,7 +21730,7 @@ GenTree* Compiler::gtNewSimdShuffleNode(var_types type,
vecCns.u32[i] = (uint8_t)(vecCns.u8[i * elementSize] / elementSize);
}
- op2 = gtNewVconNode(type, simdBaseJitType);
+ op2 = gtNewVconNode(type);
op2->AsVecCon()->gtSimd32Val = vecCns;
// swap the operands to match the encoding requirements
@@ -21777,7 +21752,7 @@ GenTree* Compiler::gtNewSimdShuffleNode(var_types type,
{
simdBaseJitType = varTypeIsUnsigned(simdBaseType) ? CORINFO_TYPE_UBYTE : CORINFO_TYPE_BYTE;
- op2 = gtNewVconNode(type, simdBaseJitType);
+ op2 = gtNewVconNode(type);
op2->AsVecCon()->gtSimd16Val = vecCns.v128[0];
return gtNewSimdHWIntrinsicNode(type, op1, op2, NI_SSSE3_Shuffle, simdBaseJitType, simdSize,
@@ -21824,10 +21799,10 @@ GenTree* Compiler::gtNewSimdShuffleNode(var_types type,
{
assert(!compIsaSupportedDebugOnly(InstructionSet_SSSE3));
- op2 = gtNewVconNode(type, simdBaseJitType);
+ op2 = gtNewVconNode(type);
op2->AsVecCon()->gtSimd16Val = mskCns.v128[0];
- GenTree* zero = gtNewZeroConNode(type, simdBaseJitType);
+ GenTree* zero = gtNewZeroConNode(type);
retNode = gtNewSimdCndSelNode(type, op2, retNode, zero, simdBaseJitType, simdSize, isSimdAsHWIntrinsic);
}
@@ -21869,7 +21844,7 @@ GenTree* Compiler::gtNewSimdShuffleNode(var_types type,
// VectorTableLookup is only valid on byte/sbyte
simdBaseJitType = varTypeIsUnsigned(simdBaseType) ? CORINFO_TYPE_UBYTE : CORINFO_TYPE_BYTE;
- op2 = gtNewVconNode(type, simdBaseJitType);
+ op2 = gtNewVconNode(type);
op2->AsVecCon()->gtSimd16Val = vecCns;
return gtNewSimdHWIntrinsicNode(type, op1, op2, lookupIntrinsic, simdBaseJitType, simdSize, isSimdAsHWIntrinsic);
@@ -22103,7 +22078,7 @@ GenTree* Compiler::gtNewSimdUnOpNode(genTreeOps op,
assert(compIsaSupportedDebugOnly(InstructionSet_AVX));
assert(varTypeIsFloating(simdBaseType) || compIsaSupportedDebugOnly(InstructionSet_AVX2));
}
- op2 = gtNewZeroConNode(type, simdBaseJitType);
+ op2 = gtNewZeroConNode(type);
// Zero - op1
return gtNewSimdBinOpNode(GT_SUB, type, op2, op1, simdBaseJitType, simdSize, isSimdAsHWIntrinsic);
@@ -22112,7 +22087,7 @@ GenTree* Compiler::gtNewSimdUnOpNode(genTreeOps op,
case GT_NOT:
{
assert((simdSize != 32) || compIsaSupportedDebugOnly(InstructionSet_AVX));
- op2 = gtNewAllBitsSetConNode(type, simdBaseJitType);
+ op2 = gtNewAllBitsSetConNode(type);
return gtNewSimdBinOpNode(GT_XOR, type, op1, op2, simdBaseJitType, simdSize, isSimdAsHWIntrinsic);
}
#elif defined(TARGET_ARM64)
@@ -22138,7 +22113,7 @@ GenTree* Compiler::gtNewSimdUnOpNode(genTreeOps op,
else
{
// Zero - op1
- op2 = gtNewZeroConNode(type, simdBaseJitType);
+ op2 = gtNewZeroConNode(type);
return gtNewSimdBinOpNode(GT_SUB, type, op2, op1, simdBaseJitType, simdSize, isSimdAsHWIntrinsic);
}
}
@@ -22265,7 +22240,7 @@ GenTree* Compiler::gtNewSimdWidenLowerNode(
}
else
{
- tmp1 = gtNewZeroConNode(type, simdBaseJitType);
+ tmp1 = gtNewZeroConNode(type);
if (varTypeIsSigned(simdBaseType))
{
@@ -22441,7 +22416,7 @@ GenTree* Compiler::gtNewSimdWidenUpperNode(
}
else
{
- tmp1 = gtNewZeroConNode(type, simdBaseJitType);
+ tmp1 = gtNewZeroConNode(type);
if (varTypeIsSigned(simdBaseType))
{
@@ -22504,7 +22479,7 @@ GenTree* Compiler::gtNewSimdWidenUpperNode(
assert(intrinsic != NI_Illegal);
tmp1 = gtNewSimdHWIntrinsicNode(TYP_SIMD16, op1, intrinsic, simdBaseJitType, simdSize, isSimdAsHWIntrinsic);
- zero = gtNewZeroConNode(TYP_SIMD16, simdBaseJitType);
+ zero = gtNewZeroConNode(TYP_SIMD16);
tmp1 = gtNewSimdHWIntrinsicNode(TYP_SIMD16, tmp1, zero, gtNewIconNode(index), NI_AdvSimd_ExtractVector128,
simdBaseJitType, 16, isSimdAsHWIntrinsic);
return gtNewSimdHWIntrinsicNode(type, tmp1, NI_Vector128_GetLower, simdBaseJitType, simdSize,
@@ -22862,7 +22837,6 @@ void GenTreeHWIntrinsic::SetHWIntrinsicId(NamedIntrinsic intrinsicId)
gtHWIntrinsicId = intrinsicId;
}
-// TODO-Review: why are layouts not compared here?
/* static */ bool GenTreeHWIntrinsic::Equals(GenTreeHWIntrinsic* op1, GenTreeHWIntrinsic* op2)
{
return (op1->TypeGet() == op2->TypeGet()) && (op1->GetHWIntrinsicId() == op2->GetHWIntrinsicId()) &&
diff --git a/src/coreclr/jit/gentree.h b/src/coreclr/jit/gentree.h
index 205644138c2..38eb63944ed 100644
--- a/src/coreclr/jit/gentree.h
+++ b/src/coreclr/jit/gentree.h
@@ -464,15 +464,15 @@ enum GenTreeFlags : unsigned int
GTF_VAR_MULTIREG = 0x02000000, // This is a struct or (on 32-bit platforms) long variable that is used or defined
// to/from a multireg source or destination (e.g. a call arg or return, or an op
- // that returns its result in multiple registers such as a long multiply).
+ // that returns its result in multiple registers such as a long multiply). Set by
+ // (and thus only valid after) lowering.
GTF_LIVENESS_MASK = GTF_VAR_DEF | GTF_VAR_USEASG | GTF_VAR_DEATH_MASK,
- GTF_VAR_CAST = 0x01000000, // GT_LCL_VAR -- has been explicitly cast (variable node may not be type of local)
- GTF_VAR_ITERATOR = 0x00800000, // GT_LCL_VAR -- this is a iterator reference in the loop condition
- GTF_VAR_CLONED = 0x00400000, // GT_LCL_VAR -- this node has been cloned or is a clone
- GTF_VAR_CONTEXT = 0x00200000, // GT_LCL_VAR -- this node is part of a runtime lookup
- GTF_VAR_FOLDED_IND = 0x00100000, // GT_LCL_VAR -- this node was folded from *(typ*)&lclVar expression tree in fgMorphSmpOp()
+ GTF_VAR_ITERATOR = 0x01000000, // GT_LCL_VAR -- this is a iterator reference in the loop condition
+ GTF_VAR_CLONED = 0x00800000, // GT_LCL_VAR -- this node has been cloned or is a clone
+ GTF_VAR_CONTEXT = 0x00400000, // GT_LCL_VAR -- this node is part of a runtime lookup
+ GTF_VAR_FOLDED_IND = 0x00200000, // GT_LCL_VAR -- this node was folded from *(typ*)&lclVar expression tree in fgMorphSmpOp()
// where 'typ' is a small type and 'lclVar' corresponds to a normalized-on-store local variable.
// This flag identifies such nodes in order to make sure that fgDoNormalizeOnStore() is called
// on their parents in post-order morph.
@@ -1860,6 +1860,9 @@ public:
// Returns the GTF flag equivalent for the regIndex'th register of a multi-reg node.
GenTreeFlags GetRegSpillFlagByIdx(int regIndex) const;
+ // Sets the GTF flag equivalent for the regIndex'th register of a multi-reg node.
+ void SetRegSpillFlagByIdx(GenTreeFlags flags, int regIndex);
+
// Last-use information for either GenTreeLclVar or GenTreeCopyOrReload nodes.
private:
GenTreeFlags GetLastUseBit(int regIndex) const;
@@ -2313,20 +2316,18 @@ public:
bool IsReuseRegVal() const
{
// This can be extended to non-constant nodes, but not to local or indir nodes.
- if (IsInvariant() && ((gtFlags & GTF_REUSE_REG_VAL) != 0))
- {
- return true;
- }
- return false;
+ return OperIsConst() && ((gtFlags & GTF_REUSE_REG_VAL) != 0);
}
+
void SetReuseRegVal()
{
- assert(IsInvariant());
+ assert(OperIsConst());
gtFlags |= GTF_REUSE_REG_VAL;
}
+
void ResetReuseRegVal()
{
- assert(IsInvariant());
+ assert(OperIsConst());
gtFlags &= ~GTF_REUSE_REG_VAL;
}
@@ -3378,26 +3379,6 @@ struct GenTreeVecCon : public GenTree
simd32_t gtSimd32Val;
};
-private:
- // TODO-1stClassStructs: Tracking the size and base type should be unnecessary since the
- // size should be `gtType` and the handle should be looked up at callsites where required
-
- unsigned char gtSimdBaseJitType; // SIMD vector base JIT type
-
-public:
- CorInfoType GetSimdBaseJitType() const
- {
- return (CorInfoType)gtSimdBaseJitType;
- }
-
- void SetSimdBaseJitType(CorInfoType simdBaseJitType)
- {
- gtSimdBaseJitType = (unsigned char)simdBaseJitType;
- assert(gtSimdBaseJitType == simdBaseJitType);
- }
-
- var_types GetSimdBaseType() const;
-
#if defined(FEATURE_HW_INTRINSICS)
static bool IsHWIntrinsicCreateConstant(GenTreeHWIntrinsic* node, simd32_t& simd32Val);
@@ -3520,11 +3501,9 @@ public:
}
}
- GenTreeVecCon(var_types type, CorInfoType simdBaseJitType)
- : GenTree(GT_CNS_VEC, type), gtSimdBaseJitType((unsigned char)simdBaseJitType)
+ GenTreeVecCon(var_types type) : GenTree(GT_CNS_VEC, type)
{
assert(varTypeIsSIMD(type));
- assert(gtSimdBaseJitType == simdBaseJitType);
}
#if DEBUGGABLE_GENTREE
@@ -6002,12 +5981,12 @@ private:
struct GenTreeJitIntrinsic : public GenTreeMultiOp
{
protected:
- GenTree* gtInlineOperands[2];
- uint16_t gtLayoutNum;
- unsigned char gtAuxiliaryJitType; // For intrinsics than need another type (e.g. Avx2.Gather* or SIMD (by element))
- regNumberSmall gtOtherReg; // For intrinsics that return 2 registers
- unsigned char gtSimdBaseJitType; // SIMD vector base JIT type
- unsigned char gtSimdSize; // SIMD vector size in bytes, use 0 for scalar intrinsics
+ GenTree* gtInlineOperands[2];
+ regNumberSmall gtOtherReg; // The second register for multi-reg intrinsics.
+ MultiRegSpillFlags gtSpillFlags; // Spill flags for multi-reg intrinsics.
+ unsigned char gtAuxiliaryJitType; // For intrinsics than need another type (e.g. Avx2.Gather* or SIMD (by element))
+ unsigned char gtSimdBaseJitType; // SIMD vector base JIT type
+ unsigned char gtSimdSize; // SIMD vector size in bytes, use 0 for scalar intrinsics
#if defined(FEATURE_SIMD)
union {
@@ -6019,26 +5998,25 @@ protected:
#endif
public:
- unsigned GetLayoutNum() const
+ regNumber GetOtherReg() const
{
- return gtLayoutNum;
+ return (regNumber)gtOtherReg;
}
- void SetLayoutNum(unsigned layoutNum)
+ void SetOtherReg(regNumber reg)
{
- assert(FitsIn<uint16_t>(layoutNum));
- gtLayoutNum = static_cast<uint16_t>(layoutNum);
+ gtOtherReg = (regNumberSmall)reg;
+ assert(gtOtherReg == reg);
}
- regNumber GetOtherReg() const
+ GenTreeFlags GetRegSpillFlagByIdx(unsigned idx) const
{
- return (regNumber)gtOtherReg;
+ return GetMultiRegSpillFlagsByIdx(gtSpillFlags, idx);
}
- void SetOtherReg(regNumber reg)
+ void SetRegSpillFlagByIdx(GenTreeFlags flags, unsigned idx)
{
- gtOtherReg = (regNumberSmall)reg;
- assert(gtOtherReg == reg);
+ gtSpillFlags = SetMultiRegSpillFlagsByIdx(gtSpillFlags, flags, idx);
}
CorInfoType GetAuxiliaryJitType() const
@@ -6114,9 +6092,9 @@ public:
unsigned simdSize,
Operands... operands)
: GenTreeMultiOp(oper, type, allocator, gtInlineOperands DEBUGARG(false), operands...)
- , gtLayoutNum(0)
- , gtAuxiliaryJitType(CORINFO_TYPE_UNDEF)
, gtOtherReg(REG_NA)
+ , gtSpillFlags(0)
+ , gtAuxiliaryJitType(CORINFO_TYPE_UNDEF)
, gtSimdBaseJitType((unsigned char)simdBaseJitType)
, gtSimdSize((unsigned char)simdSize)
, gtHWIntrinsicId(NI_Illegal)
@@ -6142,9 +6120,9 @@ protected:
nodeBuilder.GetBuiltOperands(),
nodeBuilder.GetOperandCount(),
gtInlineOperands DEBUGARG(false))
- , gtLayoutNum(0)
- , gtAuxiliaryJitType(CORINFO_TYPE_UNDEF)
, gtOtherReg(REG_NA)
+ , gtSpillFlags(0)
+ , gtAuxiliaryJitType(CORINFO_TYPE_UNDEF)
, gtSimdBaseJitType((unsigned char)simdBaseJitType)
, gtSimdSize((unsigned char)simdSize)
, gtHWIntrinsicId(NI_Illegal)
@@ -9096,6 +9074,13 @@ inline GenTreeFlags GenTree::GetRegSpillFlagByIdx(int regIndex) const
#endif // !defined(TARGET_64BIT)
#endif // FEATURE_MULTIREG_RET
+#ifdef FEATURE_HW_INTRINSICS
+ if (OperIsHWIntrinsic())
+ {
+ return AsHWIntrinsic()->GetRegSpillFlagByIdx(regIndex);
+ }
+#endif // FEATURE_HW_INTRINSICS
+
if (OperIsScalarLocal())
{
return AsLclVar()->GetRegSpillFlagByIdx(regIndex);
@@ -9106,6 +9091,63 @@ inline GenTreeFlags GenTree::GetRegSpillFlagByIdx(int regIndex) const
}
//-----------------------------------------------------------------------------------
+// SetRegSpillFlagByIdx: Set a specific register's spill flags, based on regIndex,
+// for this multi-reg node.
+//
+// Arguments:
+// flags - the flags to set
+// regIndex - which register's spill flags to set
+//
+// Notes:
+// This must be a multireg node and 'regIndex' must be a valid index for this node.
+// This method takes the GTF "equivalent" flags and sets the packed flags on the
+// multireg node.
+//
+inline void GenTree::SetRegSpillFlagByIdx(GenTreeFlags flags, int regIndex)
+{
+#if FEATURE_MULTIREG_RET
+ if (IsMultiRegCall())
+ {
+ AsCall()->SetRegSpillFlagByIdx(flags, regIndex);
+ return;
+ }
+
+#if FEATURE_ARG_SPLIT
+ if (OperIsPutArgSplit())
+ {
+ AsPutArgSplit()->SetRegSpillFlagByIdx(flags, regIndex);
+ return;
+ }
+#endif // FEATURE_ARG_SPLIT
+
+#if !defined(TARGET_64BIT)
+ if (OperIsMultiRegOp())
+ {
+ AsMultiRegOp()->SetRegSpillFlagByIdx(flags, regIndex);
+ return;
+ }
+#endif // !defined(TARGET_64BIT)
+
+#endif // FEATURE_MULTIREG_RET
+
+#ifdef FEATURE_HW_INTRINSICS
+ if (OperIsHWIntrinsic())
+ {
+ AsHWIntrinsic()->SetRegSpillFlagByIdx(flags, regIndex);
+ return;
+ }
+#endif // FEATURE_HW_INTRINSICS
+
+ if (OperIsScalarLocal())
+ {
+ AsLclVar()->SetRegSpillFlagByIdx(flags, regIndex);
+ return;
+ }
+
+ assert(!"Invalid node type for SetRegSpillFlagByIdx");
+}
+
+//-----------------------------------------------------------------------------------
// GetLastUseBit: Get the last use bit for regIndex
//
// Arguments:
diff --git a/src/coreclr/jit/gtlist.h b/src/coreclr/jit/gtlist.h
index 56ea06b2a06..65a77bf6a3e 100644
--- a/src/coreclr/jit/gtlist.h
+++ b/src/coreclr/jit/gtlist.h
@@ -220,7 +220,6 @@ GTNODE(MUL_LONG , GenTreeOp ,1,GTK_BINOP|DBK_NOTHIR)
GTNODE(AND_NOT , GenTreeOp ,0,GTK_BINOP|DBK_NOTHIR)
#ifdef TARGET_ARM64
-GTNODE(ADDEX, GenTreeOp ,0,GTK_BINOP|DBK_NOTHIR) // Add with sign/zero extension.
GTNODE(BFIZ , GenTreeOp ,0,GTK_BINOP|DBK_NOTHIR) // Bitfield Insert in Zero.
GTNODE(CSNEG_MI , GenTreeOp ,0,GTK_BINOP|DBK_NOTHIR) // Conditional select, negate, minus result
GTNODE(CNEG_LT , GenTreeOp ,0,GTK_UNOP|DBK_NOTHIR) // Conditional, negate, signed less than result
diff --git a/src/coreclr/jit/hwintrinsic.cpp b/src/coreclr/jit/hwintrinsic.cpp
index 33e8530debb..654b93b8905 100644
--- a/src/coreclr/jit/hwintrinsic.cpp
+++ b/src/coreclr/jit/hwintrinsic.cpp
@@ -314,8 +314,38 @@ NamedIntrinsic HWIntrinsicInfo::lookupId(Compiler* comp,
if ((strcmp(methodName, "get_IsSupported") == 0) || isHardwareAcceleratedProp)
{
- return isIsaSupported ? (comp->compExactlyDependsOn(isa) ? NI_IsSupported_True : NI_IsSupported_Dynamic)
- : NI_IsSupported_False;
+ // The `compSupportsHWIntrinsic` above validates `compSupportsIsa` indicating
+ // that the compiler can emit instructions for the ISA but not whether the
+ // hardware supports them.
+ //
+ // The `compExactlyDependsOn` on call then validates that the target hardware
+ // supports the instruction. Normally this is the same ISA as we just checked
+ // but for Vector128/256 on xarch this can be a different ISA since we accelerate
+ // some APIs even when we can't accelerate all APIs.
+ //
+ // When the target hardware does support the instruction set, we can return a
+ // constant true. When it doesn't then we want to report the check as dynamically
+ // supported instead. This allows some targets, such as AOT, to emit a check against
+ // a cached CPU query so lightup can still happen (such as for SSE4.1 when the target
+ // hardware is SSE2).
+ //
+ // When the compiler doesn't support ISA or when it does but the target hardware does
+ // not and we aren't in a scenario with support for a dynamic check, we want to return false.
+
+ if (isIsaSupported)
+ {
+ if (comp->compExactlyDependsOn(isa))
+ {
+ return NI_IsSupported_True;
+ }
+
+ if (comp->IsTargetAbi(CORINFO_NATIVEAOT_ABI))
+ {
+ return NI_IsSupported_Dynamic;
+ }
+ }
+
+ return NI_IsSupported_False;
}
else if (!isIsaSupported)
{
diff --git a/src/coreclr/jit/hwintrinsic.h b/src/coreclr/jit/hwintrinsic.h
index 88e5b4ae575..b1299df1c1f 100644
--- a/src/coreclr/jit/hwintrinsic.h
+++ b/src/coreclr/jit/hwintrinsic.h
@@ -153,6 +153,11 @@ enum HWIntrinsicFlag : unsigned int
// the intrinsic can be used on hardware with AVX but not AVX2 support
HW_Flag_AvxOnlyCompatible = 0x40000,
+ // MaybeCommutative
+ // - if a binary-op intrinsic is maybe commutative (e.g., Max or Min for float/double), its op1 can possibly be
+ // contained
+ HW_Flag_MaybeCommutative = 0x80000,
+
#elif defined(TARGET_ARM64)
// The intrinsic has an immediate operand
// - the value can be (and should be) encoded in a corresponding instruction when the operand value is constant
@@ -626,6 +631,18 @@ struct HWIntrinsicInfo
return (flags & HW_Flag_Commutative) != 0;
}
+ static bool IsMaybeCommutative(NamedIntrinsic id)
+ {
+ HWIntrinsicFlag flags = lookupFlags(id);
+#if defined(TARGET_XARCH)
+ return (flags & HW_Flag_MaybeCommutative) != 0;
+#elif defined(TARGET_ARM64)
+ return false;
+#else
+#error Unsupported platform
+#endif
+ }
+
static bool RequiresCodegen(NamedIntrinsic id)
{
HWIntrinsicFlag flags = lookupFlags(id);
diff --git a/src/coreclr/jit/hwintrinsicarm64.cpp b/src/coreclr/jit/hwintrinsicarm64.cpp
index b4b23fa2ca3..4a77e3ac77a 100644
--- a/src/coreclr/jit/hwintrinsicarm64.cpp
+++ b/src/coreclr/jit/hwintrinsicarm64.cpp
@@ -546,7 +546,9 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic,
}
case NI_Vector64_Create:
+ case NI_Vector64_CreateScalarUnsafe:
case NI_Vector128_Create:
+ case NI_Vector128_CreateScalarUnsafe:
{
uint32_t simdLength = getSIMDVectorLength(simdSize, simdBaseType);
assert((sig->numArgs == 1) || (sig->numArgs == simdLength));
@@ -595,7 +597,7 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic,
// We do this as it simplifies the logic and allows certain code paths to
// have better codegen, such as for 0, AllBitsSet, or certain small constants
- GenTreeVecCon* vecCon = gtNewVconNode(retType, simdBaseJitType);
+ GenTreeVecCon* vecCon = gtNewVconNode(retType);
switch (simdBaseType)
{
@@ -968,7 +970,7 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic,
/* isSimdAsHWIntrinsic */ false);
op1 = gtNewCastNode(TYP_INT, op1, /* isUnsigned */ true, TYP_INT);
- GenTree* zero = gtNewZeroConNode(simdType, simdBaseJitType);
+ GenTree* zero = gtNewZeroConNode(simdType);
ssize_t index = 8 / genTypeSize(simdBaseType);
op2 = gtNewSimdHWIntrinsicNode(simdType, op2, zero, gtNewIconNode(index), NI_AdvSimd_ExtractVector128,
@@ -1035,7 +1037,7 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic,
case NI_Vector128_get_AllBitsSet:
{
assert(sig->numArgs == 0);
- retNode = gtNewAllBitsSetConNode(retType, simdBaseJitType);
+ retNode = gtNewAllBitsSetConNode(retType);
break;
}
@@ -1043,7 +1045,7 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic,
case NI_Vector128_get_Zero:
{
assert(sig->numArgs == 0);
- retNode = gtNewZeroConNode(retType, simdBaseJitType);
+ retNode = gtNewZeroConNode(retType);
break;
}
@@ -1067,7 +1069,7 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic,
// AdvSimd.ExtractVector128(vector, Vector128<T>.Zero, 8 / sizeof(T)).GetLower();
assert(numArgs == 1);
op1 = impPopStack().val;
- GenTree* zero = gtNewZeroConNode(retType, simdBaseJitType);
+ GenTree* zero = gtNewZeroConNode(retType);
ssize_t index = 8 / genTypeSize(simdBaseType);
retNode = gtNewSimdHWIntrinsicNode(TYP_SIMD16, op1, zero, gtNewIconNode(index), NI_AdvSimd_ExtractVector128,
@@ -1800,27 +1802,10 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic,
}
}
- GenTree* loadIntrinsic = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, simdBaseJitType, simdSize);
- // This operation contains an implicit indirection
- // it could point into the global heap or
- // it could throw a null reference exception.
- //
- loadIntrinsic->gtFlags |= (GTF_GLOB_REF | GTF_EXCEPT);
-
assert(HWIntrinsicInfo::IsMultiReg(intrinsic));
- const unsigned lclNum = lvaGrabTemp(true DEBUGARG("Return value temp for multireg intrinsic"));
- impAssignTempGen(lclNum, loadIntrinsic, sig->retTypeSigClass, CHECK_SPILL_ALL);
-
- LclVarDsc* varDsc = lvaGetDesc(lclNum);
- // The following is to exclude the fields of the local to have SSA.
- varDsc->lvIsMultiRegRet = true;
-
- GenTreeLclVar* lclVar = gtNewLclvNode(lclNum, varDsc->lvType);
- lclVar->SetDoNotCSE();
- lclVar->SetMultiReg();
-
- retNode = lclVar;
+ op1 = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, simdBaseJitType, simdSize);
+ retNode = impAssignMultiRegTypeToVar(op1, sig->retTypeSigClass DEBUGARG(CorInfoCallConvExtension::Managed));
break;
}
diff --git a/src/coreclr/jit/hwintrinsiclistarm64.h b/src/coreclr/jit/hwintrinsiclistarm64.h
index 090255492fe..94a7be0f502 100644
--- a/src/coreclr/jit/hwintrinsiclistarm64.h
+++ b/src/coreclr/jit/hwintrinsiclistarm64.h
@@ -39,8 +39,8 @@ HARDWARE_INTRINSIC(Vector64, ConvertToInt64,
HARDWARE_INTRINSIC(Vector64, ConvertToSingle, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen|HW_Flag_BaseTypeFromFirstArg)
HARDWARE_INTRINSIC(Vector64, ConvertToUInt32, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen|HW_Flag_BaseTypeFromFirstArg)
HARDWARE_INTRINSIC(Vector64, ConvertToUInt64, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen|HW_Flag_BaseTypeFromFirstArg)
-HARDWARE_INTRINSIC(Vector64, Create, 8, -1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_mov, INS_mov, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_NoCodeGen|HW_Flag_SpecialImport)
-HARDWARE_INTRINSIC(Vector64, CreateScalarUnsafe, 8, 1, {INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_invalid, INS_invalid, INS_fmov, INS_invalid}, HW_Category_SIMD, HW_Flag_SpecialCodeGen|HW_Flag_SupportsContainment)
+HARDWARE_INTRINSIC(Vector64, Create, 8, -1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_mov, INS_mov, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen)
+HARDWARE_INTRINSIC(Vector64, CreateScalarUnsafe, 8, 1, {INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_invalid, INS_invalid, INS_fmov, INS_invalid}, HW_Category_SIMD, HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen|HW_Flag_SupportsContainment)
HARDWARE_INTRINSIC(Vector64, Divide, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen)
HARDWARE_INTRINSIC(Vector64, Dot, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen)
HARDWARE_INTRINSIC(Vector64, Equals, 8, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen)
@@ -138,8 +138,8 @@ HARDWARE_INTRINSIC(Vector128, ConvertToInt64,
HARDWARE_INTRINSIC(Vector128, ConvertToSingle, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen|HW_Flag_BaseTypeFromFirstArg)
HARDWARE_INTRINSIC(Vector128, ConvertToUInt32, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen|HW_Flag_BaseTypeFromFirstArg)
HARDWARE_INTRINSIC(Vector128, ConvertToUInt64, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen|HW_Flag_BaseTypeFromFirstArg)
-HARDWARE_INTRINSIC(Vector128, Create, 16, -1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_NoCodeGen|HW_Flag_SpecialImport)
-HARDWARE_INTRINSIC(Vector128, CreateScalarUnsafe, 16, 1, {INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_fmov, INS_fmov}, HW_Category_SIMD, HW_Flag_SpecialCodeGen|HW_Flag_SupportsContainment)
+HARDWARE_INTRINSIC(Vector128, Create, 16, -1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen)
+HARDWARE_INTRINSIC(Vector128, CreateScalarUnsafe, 16, 1, {INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_ins, INS_fmov, INS_fmov}, HW_Category_SIMD, HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen|HW_Flag_SupportsContainment)
HARDWARE_INTRINSIC(Vector128, Divide, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen)
HARDWARE_INTRINSIC(Vector128, Dot, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoCodeGen)
HARDWARE_INTRINSIC(Vector128, Equals, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_NoCodeGen)
diff --git a/src/coreclr/jit/hwintrinsiclistxarch.h b/src/coreclr/jit/hwintrinsiclistxarch.h
index 7068e39bd1b..0fff3a98d3b 100644
--- a/src/coreclr/jit/hwintrinsiclistxarch.h
+++ b/src/coreclr/jit/hwintrinsiclistxarch.h
@@ -290,9 +290,9 @@ HARDWARE_INTRINSIC(SSE, LoadHigh,
HARDWARE_INTRINSIC(SSE, LoadLow, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_movlps, INS_invalid}, HW_Category_MemoryLoad, HW_Flag_NoRMWSemantics)
HARDWARE_INTRINSIC(SSE, LoadScalarVector128, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_movss, INS_invalid}, HW_Category_MemoryLoad, HW_Flag_NoRMWSemantics)
HARDWARE_INTRINSIC(SSE, LoadVector128, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_movups, INS_invalid}, HW_Category_MemoryLoad, HW_Flag_NoRMWSemantics)
-HARDWARE_INTRINSIC(SSE, Max, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_maxps, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_Commutative)
+HARDWARE_INTRINSIC(SSE, Max, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_maxps, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_MaybeCommutative)
HARDWARE_INTRINSIC(SSE, MaxScalar, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_maxss, INS_invalid}, HW_Category_SIMDScalar, HW_Flag_CopyUpperBits)
-HARDWARE_INTRINSIC(SSE, Min, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_minps, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_Commutative)
+HARDWARE_INTRINSIC(SSE, Min, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_minps, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_MaybeCommutative)
HARDWARE_INTRINSIC(SSE, MinScalar, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_minss, INS_invalid}, HW_Category_SIMDScalar, HW_Flag_CopyUpperBits)
HARDWARE_INTRINSIC(SSE, MoveHighToLow, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_movhlps, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_NoContainment)
HARDWARE_INTRINSIC(SSE, MoveLowToHigh, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_movlhps, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_NoContainment)
@@ -403,10 +403,10 @@ HARDWARE_INTRINSIC(SSE2, LoadLow,
HARDWARE_INTRINSIC(SSE2, LoadScalarVector128, 16, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_movd, INS_movd, INS_movq, INS_movq, INS_invalid, INS_movsdsse2}, HW_Category_MemoryLoad, HW_Flag_NoRMWSemantics)
HARDWARE_INTRINSIC(SSE2, LoadVector128, 16, 1, {INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_invalid, INS_movupd}, HW_Category_MemoryLoad, HW_Flag_NoRMWSemantics)
HARDWARE_INTRINSIC(SSE2, MaskMove, 16, 3, {INS_maskmovdqu, INS_maskmovdqu, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_MemoryStore, HW_Flag_NoContainment|HW_Flag_NoRMWSemantics|HW_Flag_BaseTypeFromSecondArg)
-HARDWARE_INTRINSIC(SSE2, Max, 16, 2, {INS_invalid, INS_pmaxub, INS_pmaxsw, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_maxpd}, HW_Category_SimpleSIMD, HW_Flag_Commutative)
+HARDWARE_INTRINSIC(SSE2, Max, 16, 2, {INS_invalid, INS_pmaxub, INS_pmaxsw, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_maxpd}, HW_Category_SimpleSIMD, HW_Flag_MaybeCommutative)
HARDWARE_INTRINSIC(SSE2, MemoryFence, 0, 0, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_Special, HW_Flag_NoContainment|HW_Flag_NoRMWSemantics)
HARDWARE_INTRINSIC(SSE2, MaxScalar, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_maxsd}, HW_Category_SIMDScalar, HW_Flag_CopyUpperBits)
-HARDWARE_INTRINSIC(SSE2, Min, 16, 2, {INS_invalid, INS_pminub, INS_pminsw, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_minpd}, HW_Category_SimpleSIMD, HW_Flag_Commutative)
+HARDWARE_INTRINSIC(SSE2, Min, 16, 2, {INS_invalid, INS_pminub, INS_pminsw, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_minpd}, HW_Category_SimpleSIMD, HW_Flag_MaybeCommutative)
HARDWARE_INTRINSIC(SSE2, MinScalar, 16, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_minsd}, HW_Category_SIMDScalar, HW_Flag_CopyUpperBits)
HARDWARE_INTRINSIC(SSE2, MoveMask, 16, 1, {INS_pmovmskb, INS_pmovmskb, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_movmskpd}, HW_Category_SimpleSIMD, HW_Flag_NoContainment|HW_Flag_NoRMWSemantics|HW_Flag_BaseTypeFromFirstArg)
HARDWARE_INTRINSIC(SSE2, MoveScalar, 16, -1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_movq, INS_movq, INS_invalid, INS_movsdsse2}, HW_Category_SIMDScalar, HW_Flag_NoContainment)
@@ -598,8 +598,8 @@ HARDWARE_INTRINSIC(AVX, InsertVector128,
HARDWARE_INTRINSIC(AVX, LoadAlignedVector256, 32, 1, {INS_movdqa, INS_movdqa, INS_movdqa, INS_movdqa, INS_movdqa, INS_movdqa, INS_movdqa, INS_movdqa, INS_movaps, INS_movapd}, HW_Category_MemoryLoad, HW_Flag_NoRMWSemantics)
HARDWARE_INTRINSIC(AVX, LoadDquVector256, 32, 1, {INS_lddqu, INS_lddqu, INS_lddqu, INS_lddqu, INS_lddqu, INS_lddqu, INS_lddqu, INS_lddqu, INS_invalid, INS_invalid}, HW_Category_MemoryLoad, HW_Flag_NoRMWSemantics)
HARDWARE_INTRINSIC(AVX, LoadVector256, 32, 1, {INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_movdqu, INS_movups, INS_movupd}, HW_Category_MemoryLoad, HW_Flag_NoRMWSemantics)
-HARDWARE_INTRINSIC(AVX, Max, 32, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_maxps, INS_maxpd}, HW_Category_SimpleSIMD, HW_Flag_Commutative)
-HARDWARE_INTRINSIC(AVX, Min, 32, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_minps, INS_minpd}, HW_Category_SimpleSIMD, HW_Flag_Commutative)
+HARDWARE_INTRINSIC(AVX, Max, 32, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_maxps, INS_maxpd}, HW_Category_SimpleSIMD, HW_Flag_MaybeCommutative)
+HARDWARE_INTRINSIC(AVX, Min, 32, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_minps, INS_minpd}, HW_Category_SimpleSIMD, HW_Flag_MaybeCommutative)
HARDWARE_INTRINSIC(AVX, MaskLoad, -1, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vmaskmovps, INS_vmaskmovpd}, HW_Category_MemoryLoad, HW_Flag_NoFlag)
HARDWARE_INTRINSIC(AVX, MaskStore, -1, 3, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_vmaskmovps, INS_vmaskmovpd}, HW_Category_MemoryStore, HW_Flag_NoContainment|HW_Flag_BaseTypeFromSecondArg)
HARDWARE_INTRINSIC(AVX, MoveMask, 32, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_movmskps, INS_movmskpd}, HW_Category_SimpleSIMD, HW_Flag_NoContainment|HW_Flag_BaseTypeFromFirstArg)
diff --git a/src/coreclr/jit/hwintrinsicxarch.cpp b/src/coreclr/jit/hwintrinsicxarch.cpp
index e7a0ab3cda1..bee8e827f3a 100644
--- a/src/coreclr/jit/hwintrinsicxarch.cpp
+++ b/src/coreclr/jit/hwintrinsicxarch.cpp
@@ -946,7 +946,7 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic,
// We do this as it simplifies the logic and allows certain code paths to
// have better codegen, such as for 0, AllBitsSet, or certain small constants
- GenTreeVecCon* vecCon = gtNewVconNode(retType, simdBaseJitType);
+ GenTreeVecCon* vecCon = gtNewVconNode(retType);
switch (simdBaseType)
{
@@ -1383,7 +1383,7 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic,
case NI_Vector256_get_AllBitsSet:
{
assert(sig->numArgs == 0);
- retNode = gtNewAllBitsSetConNode(retType, simdBaseJitType);
+ retNode = gtNewAllBitsSetConNode(retType);
break;
}
@@ -1402,7 +1402,7 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic,
case NI_Vector256_get_Zero:
{
assert(sig->numArgs == 0);
- retNode = gtNewZeroConNode(retType, simdBaseJitType);
+ retNode = gtNewZeroConNode(retType);
break;
}
diff --git a/src/coreclr/jit/importer.cpp b/src/coreclr/jit/importer.cpp
index 634a4ee2290..c2c143603d2 100644
--- a/src/coreclr/jit/importer.cpp
+++ b/src/coreclr/jit/importer.cpp
@@ -28,36 +28,6 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
} \
} while (0)
-#define VerifyOrReturn(cond, msg) \
- do \
- { \
- if (!(cond)) \
- { \
- verRaiseVerifyExceptionIfNeeded(INDEBUG(msg) DEBUGARG(__FILE__) DEBUGARG(__LINE__)); \
- return; \
- } \
- } while (0)
-
-#define VerifyOrReturnSpeculative(cond, msg, speculative) \
- do \
- { \
- if (speculative) \
- { \
- if (!(cond)) \
- { \
- return false; \
- } \
- } \
- else \
- { \
- if (!(cond)) \
- { \
- verRaiseVerifyExceptionIfNeeded(INDEBUG(msg) DEBUGARG(__FILE__) DEBUGARG(__LINE__)); \
- return false; \
- } \
- } \
- } while (0)
-
/*****************************************************************************/
void Compiler::impInit()
@@ -1523,18 +1493,9 @@ GenTree* Compiler::impAssignStructPtr(GenTree* destAddr,
}
}
- if (dest->OperIs(GT_LCL_VAR) &&
- (src->IsMultiRegNode() ||
- (src->OperIs(GT_RET_EXPR) && src->AsRetExpr()->gtInlineCandidate->AsCall()->HasMultiRegRetVal())))
+ if (dest->OperIs(GT_LCL_VAR) && src->IsMultiRegNode())
{
- if (lvaEnregMultiRegVars && varTypeIsStruct(dest))
- {
- dest->AsLclVar()->SetMultiReg();
- }
- if (src->OperIs(GT_CALL))
- {
- lvaGetDesc(dest->AsLclVar())->lvIsMultiRegRet = true;
- }
+ lvaGetDesc(dest->AsLclVar())->lvIsMultiRegRet = true;
}
dest->gtFlags |= destFlags;
@@ -1544,12 +1505,6 @@ GenTree* Compiler::impAssignStructPtr(GenTree* destAddr,
GenTree* asgNode = gtNewAssignNode(dest, src);
gtBlockOpInit(asgNode, dest, src, false);
- // TODO-1stClassStructs: Clean up the settings of GTF_DONT_CSE on the lhs
- // of assignments.
- if ((destFlags & GTF_DONT_CSE) == 0)
- {
- dest->gtFlags &= ~(GTF_DONT_CSE);
- }
return asgNode;
}
@@ -3660,22 +3615,29 @@ GenTree* Compiler::impIntrinsic(GenTree* newobjThis,
NamedIntrinsic* pIntrinsicName,
bool* isSpecialIntrinsic)
{
- assert((methodFlags & CORINFO_FLG_INTRINSIC) != 0);
+ bool mustExpand = false;
+ bool isSpecial = false;
+ const bool isIntrinsic = (methodFlags & CORINFO_FLG_INTRINSIC) != 0;
- bool mustExpand = false;
- bool isSpecial = false;
- NamedIntrinsic ni = NI_Illegal;
+ NamedIntrinsic ni = lookupNamedIntrinsic(method);
- if ((methodFlags & CORINFO_FLG_INTRINSIC) != 0)
+ if (isIntrinsic)
{
// The recursive non-virtual calls to Jit intrinsics are must-expand by convention.
mustExpand = gtIsRecursiveCall(method) && !(methodFlags & CORINFO_FLG_VIRTUAL);
+ }
+ else
+ {
+ // For mismatched VM (AltJit) we want to check all methods as intrinsic to ensure
+ // we get more accurate codegen. This particularly applies to HWIntrinsic usage
+ assert(!info.compMatchedVM);
+ }
- ni = lookupNamedIntrinsic(method);
-
- // We specially support the following on all platforms to allow for dead
- // code optimization and to more generally support recursive intrinsics.
+ // We specially support the following on all platforms to allow for dead
+ // code optimization and to more generally support recursive intrinsics.
+ if (isIntrinsic)
+ {
if (ni == NI_IsSupported_True)
{
assert(sig->numArgs == 0);
@@ -3698,29 +3660,62 @@ GenTree* Compiler::impIntrinsic(GenTree* newobjThis,
assert(!mustExpand);
return impSRCSUnsafeIntrinsic(ni, clsHnd, method, sig);
}
+ }
#ifdef FEATURE_HW_INTRINSICS
- if ((ni > NI_HW_INTRINSIC_START) && (ni < NI_HW_INTRINSIC_END))
+ if ((ni > NI_HW_INTRINSIC_START) && (ni < NI_HW_INTRINSIC_END))
+ {
+ if (!isIntrinsic)
{
- GenTree* hwintrinsic = impHWIntrinsic(ni, clsHnd, method, sig, mustExpand);
+#if defined(TARGET_XARCH)
+ // We can't guarantee that all overloads for the xplat intrinsics can be
+ // handled by the AltJit, so limit only the platform specific intrinsics
+ assert((NI_Vector256_Xor + 1) == NI_X86Base_BitScanForward);
- if (mustExpand && (hwintrinsic == nullptr))
+ if (ni < NI_Vector256_Xor)
+#elif defined(TARGET_ARM64)
+ // We can't guarantee that all overloads for the xplat intrinsics can be
+ // handled by the AltJit, so limit only the platform specific intrinsics
+ assert((NI_Vector128_Xor + 1) == NI_AdvSimd_Abs);
+
+ if (ni < NI_Vector128_Xor)
+#else
+#error Unsupported platform
+#endif
{
- return impUnsupportedNamedIntrinsic(CORINFO_HELP_THROW_NOT_IMPLEMENTED, method, sig, mustExpand);
+ // Several of the NI_Vector64/128/256 APIs do not have
+ // all overloads as intrinsic today so they will assert
+ return nullptr;
}
-
- return hwintrinsic;
}
- if ((ni > NI_SIMD_AS_HWINTRINSIC_START) && (ni < NI_SIMD_AS_HWINTRINSIC_END))
- {
- // These intrinsics aren't defined recursively and so they will never be mustExpand
- // Instead, they provide software fallbacks that will be executed instead.
+ GenTree* hwintrinsic = impHWIntrinsic(ni, clsHnd, method, sig, mustExpand);
- assert(!mustExpand);
- return impSimdAsHWIntrinsic(ni, clsHnd, method, sig, newobjThis);
+ if (mustExpand && (hwintrinsic == nullptr))
+ {
+ return impUnsupportedNamedIntrinsic(CORINFO_HELP_THROW_NOT_IMPLEMENTED, method, sig, mustExpand);
}
+
+ return hwintrinsic;
+ }
+
+ if (isIntrinsic && (ni > NI_SIMD_AS_HWINTRINSIC_START) && (ni < NI_SIMD_AS_HWINTRINSIC_END))
+ {
+ // These intrinsics aren't defined recursively and so they will never be mustExpand
+ // Instead, they provide software fallbacks that will be executed instead.
+
+ assert(!mustExpand);
+ return impSimdAsHWIntrinsic(ni, clsHnd, method, sig, newobjThis);
+ }
#endif // FEATURE_HW_INTRINSICS
+
+ if (!isIntrinsic)
+ {
+ // Outside the cases above, there are many intrinsics which apply to only a
+ // subset of overload and where simply matching by name may cause downstream
+ // asserts or other failures. Math.Min is one example, where it only applies
+ // to the floating-point overloads.
+ return nullptr;
}
*pIntrinsicName = ni;
@@ -3918,8 +3913,14 @@ GenTree* Compiler::impIntrinsic(GenTree* newobjThis,
GenTree* lclVar = gtNewLclvNode(rawHandleSlot, TYP_I_IMPL);
GenTree* lclVarAddr = gtNewOperNode(GT_ADDR, TYP_I_IMPL, lclVar);
var_types resultType = JITtype2varType(sig->retType);
- retNode = gtNewOperNode(GT_IND, resultType, lclVarAddr);
-
+ if (resultType == TYP_STRUCT)
+ {
+ retNode = gtNewObjNode(sig->retTypeClass, lclVarAddr);
+ }
+ else
+ {
+ retNode = gtNewIndir(resultType, lclVarAddr);
+ }
break;
}
@@ -4525,7 +4526,7 @@ GenTree* Compiler::impIntrinsic(GenTree* newobjThis,
impPopStack();
impPopStack();
- GenTreeVecCon* vecCon = gtNewVconNode(TYP_SIMD16, callJitType);
+ GenTreeVecCon* vecCon = gtNewVconNode(TYP_SIMD16);
if (callJitType == CORINFO_TYPE_FLOAT)
{
@@ -5966,17 +5967,36 @@ NamedIntrinsic Compiler::lookupNamedIntrinsic(CORINFO_METHOD_HANDLE method)
result = NI_System_Numerics_BitOperations_PopCount;
}
}
-#ifdef FEATURE_HW_INTRINSICS
else if (strcmp(namespaceName, "System.Numerics") == 0)
{
+#ifdef FEATURE_HW_INTRINSICS
CORINFO_SIG_INFO sig;
info.compCompHnd->getMethodSig(method, &sig);
int sizeOfVectorT = getSIMDVectorRegisterByteLength();
- result = SimdAsHWIntrinsicInfo::lookupId(&sig, className, methodName, enclosingClassName, sizeOfVectorT);
- }
+ result = SimdAsHWIntrinsicInfo::lookupId(this, &sig, className, methodName, enclosingClassName, sizeOfVectorT);
#endif // FEATURE_HW_INTRINSICS
+
+ if (result == NI_Illegal)
+ {
+ if (strcmp(methodName, "get_IsHardwareAccelerated") == 0)
+ {
+ // This allows the relevant code paths to be dropped as dead code even
+ // on platforms where FEATURE_HW_INTRINSICS is not supported.
+
+ result = NI_IsSupported_False;
+ }
+ else if (gtIsRecursiveCall(method))
+ {
+ // For the framework itself, any recursive intrinsics will either be
+ // only supported on a single platform or will be guarded by a relevant
+ // IsSupported check so the throw PNSE will be valid or dropped.
+
+ result = NI_Throw_PlatformNotSupportedException;
+ }
+ }
+ }
else if (strcmp(namespaceName, "System.Runtime.CompilerServices") == 0)
{
if (strcmp(className, "Unsafe") == 0)
@@ -6478,87 +6498,6 @@ GenTree* Compiler::impKeepAliveIntrinsic(GenTree* objToKeepAlive)
return gtNewKeepAliveNode(objToKeepAlive);
}
-bool Compiler::verMergeEntryStates(BasicBlock* block, bool* changed)
-{
- unsigned i;
-
- // do some basic checks first
- if (block->bbStackDepthOnEntry() != verCurrentState.esStackDepth)
- {
- return false;
- }
-
- if (verCurrentState.esStackDepth > 0)
- {
- // merge stack types
- StackEntry* parentStack = block->bbStackOnEntry();
- StackEntry* childStack = verCurrentState.esStack;
-
- for (i = 0; i < verCurrentState.esStackDepth; i++, parentStack++, childStack++)
- {
- if (tiMergeToCommonParent(&parentStack->seTypeInfo, &childStack->seTypeInfo, changed) == false)
- {
- return false;
- }
- }
- }
-
- // merge initialization status of this ptr
-
- if (verTrackObjCtorInitState)
- {
- // If we're tracking the CtorInitState, then it must not be unknown in the current state.
- assert(verCurrentState.thisInitialized != TIS_Bottom);
-
- // If the successor block's thisInit state is unknown, copy it from the current state.
- if (block->bbThisOnEntry() == TIS_Bottom)
- {
- *changed = true;
- verSetThisInit(block, verCurrentState.thisInitialized);
- }
- else if (verCurrentState.thisInitialized != block->bbThisOnEntry())
- {
- if (block->bbThisOnEntry() != TIS_Top)
- {
- *changed = true;
- verSetThisInit(block, TIS_Top);
-
- if (block->bbFlags & BBF_FAILED_VERIFICATION)
- {
- // The block is bad. Control can flow through the block to any handler that catches the
- // verification exception, but the importer ignores bad blocks and therefore won't model
- // this flow in the normal way. To complete the merge into the bad block, the new state
- // needs to be manually pushed to the handlers that may be reached after the verification
- // exception occurs.
- //
- // Usually, the new state was already propagated to the relevant handlers while processing
- // the predecessors of the bad block. The exception is when the bad block is at the start
- // of a try region, meaning it is protected by additional handlers that do not protect its
- // predecessors.
- //
- if (block->hasTryIndex() && ((block->bbFlags & BBF_TRY_BEG) != 0))
- {
- // Push TIS_Top to the handlers that protect the bad block. Note that this can cause
- // recursive calls back into this code path (if successors of the current bad block are
- // also bad blocks).
- //
- ThisInitState origTIS = verCurrentState.thisInitialized;
- verCurrentState.thisInitialized = TIS_Top;
- impVerifyEHBlock(block, true);
- verCurrentState.thisInitialized = origTIS;
- }
- }
- }
- }
- }
- else
- {
- assert(verCurrentState.thisInitialized == TIS_Bottom && block->bbThisOnEntry() == TIS_Bottom);
- }
-
- return true;
-}
-
/*****************************************************************************
* 'logMsg' is true if a log message needs to be logged. false if the caller has
* already logged it (presumably in a more detailed fashion than done here)
@@ -6660,21 +6599,6 @@ typeInfo Compiler::verMakeTypeInfo(CorInfoType ciType, CORINFO_CLASS_HANDLE clsH
}
break;
-#ifdef TARGET_64BIT
- case CORINFO_TYPE_NATIVEINT:
- case CORINFO_TYPE_NATIVEUINT:
- if (clsHnd)
- {
- // If we have more precise information, use it
- return verMakeTypeInfo(clsHnd);
- }
- else
- {
- return typeInfo::nativeInt();
- }
- break;
-#endif // TARGET_64BIT
-
case CORINFO_TYPE_VALUECLASS:
case CORINFO_TYPE_REFANY:
tiResult = verMakeTypeInfo(clsHnd);
@@ -6715,9 +6639,9 @@ typeInfo Compiler::verMakeTypeInfo(CorInfoType ciType, CORINFO_CLASS_HANDLE clsH
/******************************************************************************/
-typeInfo Compiler::verMakeTypeInfo(CORINFO_CLASS_HANDLE clsHnd, bool bashStructToRef /* = false */)
+typeInfo Compiler::verMakeTypeInfo(CORINFO_CLASS_HANDLE clsHnd)
{
- if (clsHnd == nullptr)
+ if (clsHnd == NO_CLASS_HANDLE)
{
return typeInfo();
}
@@ -6745,76 +6669,21 @@ typeInfo Compiler::verMakeTypeInfo(CORINFO_CLASS_HANDLE clsHnd, bool bashStructT
return typeInfo();
}
-#ifdef TARGET_64BIT
- if (t == CORINFO_TYPE_NATIVEINT || t == CORINFO_TYPE_NATIVEUINT)
- {
- return typeInfo::nativeInt();
- }
-#endif // TARGET_64BIT
-
if (t != CORINFO_TYPE_UNDEF)
{
return (typeInfo(JITtype2tiType(t)));
}
- else if (bashStructToRef)
- {
- return (typeInfo(TI_REF, clsHnd));
- }
else
{
return (typeInfo(TI_STRUCT, clsHnd));
}
}
- else if (attribs & CORINFO_FLG_GENERIC_TYPE_VARIABLE)
- {
- // See comment in _typeInfo.h for why we do it this way.
- return (typeInfo(TI_REF, clsHnd, true));
- }
else
{
return (typeInfo(TI_REF, clsHnd));
}
}
-/******************************************************************************/
-bool Compiler::verIsSDArray(const typeInfo& ti)
-{
- if (ti.IsNullObjRef())
- { // nulls are SD arrays
- return true;
- }
-
- if (!ti.IsType(TI_REF))
- {
- return false;
- }
-
- if (!info.compCompHnd->isSDArray(ti.GetClassHandleForObjRef()))
- {
- return false;
- }
- return true;
-}
-
-/******************************************************************************/
-/* Given 'arrayObjectType' which is an array type, fetch the element type. */
-/* Returns an error type if anything goes wrong */
-
-typeInfo Compiler::verGetArrayElemType(const typeInfo& arrayObjectType)
-{
- assert(!arrayObjectType.IsNullObjRef()); // you need to check for null explicitly since that is a success case
-
- if (!verIsSDArray(arrayObjectType))
- {
- return typeInfo();
- }
-
- CORINFO_CLASS_HANDLE childClassHandle = nullptr;
- CorInfoType ciType = info.compCompHnd->getChildType(arrayObjectType.GetClassHandleForObjRef(), &childClassHandle);
-
- return verMakeTypeInfo(ciType, childClassHandle);
-}
-
/*****************************************************************************
*/
typeInfo Compiler::verParseArgSigToTypeInfo(CORINFO_SIG_INFO* sig, CORINFO_ARG_LIST_HANDLE args)
@@ -6851,54 +6720,14 @@ bool Compiler::verIsByRefLike(const typeInfo& ti)
return info.compCompHnd->getClassAttribs(ti.GetClassHandleForValueClass()) & CORINFO_FLG_BYREF_LIKE;
}
-bool Compiler::verIsSafeToReturnByRef(const typeInfo& ti)
-{
- if (ti.IsPermanentHomeByRef())
- {
- return true;
- }
- else
- {
- return false;
- }
-}
-
-bool Compiler::verIsBoxable(const typeInfo& ti)
-{
- return (ti.IsPrimitiveType() || ti.IsObjRef() // includes boxed generic type variables
- || ti.IsUnboxedGenericTypeVar() ||
- (ti.IsType(TI_STRUCT) &&
- // exclude byreflike structs
- !(info.compCompHnd->getClassAttribs(ti.GetClassHandleForValueClass()) & CORINFO_FLG_BYREF_LIKE)));
-}
-
-// Is it a boxed value type?
-bool Compiler::verIsBoxedValueType(const typeInfo& ti)
-{
- if (ti.GetType() == TI_REF)
- {
- CORINFO_CLASS_HANDLE clsHnd = ti.GetClassHandleForObjRef();
- return !!eeIsValueClass(clsHnd);
- }
- else
- {
- return false;
- }
-}
-
/*****************************************************************************
*
* Check if a TailCall is legal.
*/
-bool Compiler::verCheckTailCallConstraint(
- OPCODE opcode,
- CORINFO_RESOLVED_TOKEN* pResolvedToken,
- CORINFO_RESOLVED_TOKEN* pConstrainedResolvedToken, // Is this a "constrained." call on a type parameter?
- bool speculative // If true, won't throw if verificatoin fails. Instead it will
- // return false to the caller.
- // If false, it will throw.
- )
+bool Compiler::verCheckTailCallConstraint(OPCODE opcode,
+ CORINFO_RESOLVED_TOKEN* pResolvedToken,
+ CORINFO_RESOLVED_TOKEN* pConstrainedResolvedToken)
{
DWORD mflags;
CORINFO_SIG_INFO sig;
@@ -6917,7 +6746,7 @@ bool Compiler::verCheckTailCallConstraint(
return false;
}
- // for calli, VerifyOrReturn that this is not a virtual method
+ // For calli, check that this is not a virtual method.
if (opcode == CEE_CALLI)
{
/* Get the call sig */
@@ -6933,10 +6762,9 @@ bool Compiler::verCheckTailCallConstraint(
mflags = info.compCompHnd->getMethodAttribs(methodHnd);
- // When verifying generic code we pair the method handle with its
- // owning class to get the exact method signature.
+ // In generic code we pair the method handle with its owning class to get the exact method signature.
methodClassHnd = pResolvedToken->hClass;
- assert(methodClassHnd);
+ assert(methodClassHnd != NO_CLASS_HANDLE);
eeGetMethodSig(methodHnd, &sig, methodClassHnd);
@@ -6945,42 +6773,46 @@ bool Compiler::verCheckTailCallConstraint(
}
// We must have got the methodClassHnd if opcode is not CEE_CALLI
- assert((methodHnd != nullptr && methodClassHnd != nullptr) || opcode == CEE_CALLI);
+ assert((methodHnd != nullptr && methodClassHnd != NO_CLASS_HANDLE) || opcode == CEE_CALLI);
if ((sig.callConv & CORINFO_CALLCONV_MASK) == CORINFO_CALLCONV_VARARG)
{
eeGetCallSiteSig(pResolvedToken->token, pResolvedToken->tokenScope, pResolvedToken->tokenContext, &sig);
}
- // check compatibility of the arguments
- unsigned int argCount;
- argCount = sig.numArgs;
+ // Check compatibility of the arguments.
+ unsigned int argCount = sig.numArgs;
CORINFO_ARG_LIST_HANDLE args;
args = sig.args;
while (argCount--)
{
typeInfo tiDeclared = verParseArgSigToTypeInfo(&sig, args).NormaliseForStack();
- // check that the argument is not a byref for tailcalls
- VerifyOrReturnSpeculative(!verIsByRefLike(tiDeclared), "tailcall on byrefs", speculative);
+ // Check that the argument is not a byref for tailcalls.
+ if (verIsByRefLike(tiDeclared))
+ {
+ return false;
+ }
// For unsafe code, we might have parameters containing pointer to the stack location.
// Disallow the tailcall for this kind.
CORINFO_CLASS_HANDLE classHandle;
CorInfoType ciType = strip(info.compCompHnd->getArgType(&sig, args, &classHandle));
- VerifyOrReturnSpeculative(ciType != CORINFO_TYPE_PTR, "tailcall on CORINFO_TYPE_PTR", speculative);
+ if (ciType == CORINFO_TYPE_PTR)
+ {
+ return false;
+ }
args = info.compCompHnd->getArgNext(args);
}
- // update popCount
+ // Update popCount.
popCount += sig.numArgs;
- // check for 'this' which is on non-static methods, not called via NEWOBJ
+ // Check for 'this' which is on non-static methods, not called via NEWOBJ
if (!(mflags & CORINFO_FLG_STATIC))
{
- // Always update the popCount.
- // This is crucial for the stack calculation to be correct.
+ // Always update the popCount. This is crucial for the stack calculation to be correct.
typeInfo tiThis = impStackTop(popCount).seTypeInfo;
popCount++;
@@ -6992,7 +6824,11 @@ bool Compiler::verCheckTailCallConstraint(
{
tiThis.MakeByRef();
}
- VerifyOrReturnSpeculative(!verIsByRefLike(tiThis), "byref in tailcall", speculative);
+
+ if (verIsByRefLike(tiThis))
+ {
+ return false;
+ }
}
else
{
@@ -7003,13 +6839,19 @@ bool Compiler::verCheckTailCallConstraint(
tiDeclaredThis.MakeByRef();
}
- VerifyOrReturnSpeculative(!verIsByRefLike(tiDeclaredThis), "byref in tailcall", speculative);
+ if (verIsByRefLike(tiDeclaredThis))
+ {
+ return false;
+ }
}
}
// Tail calls on constrained calls should be illegal too:
// when instantiated at a value type, a constrained call may pass the address of a stack allocated value
- VerifyOrReturnSpeculative(!pConstrainedResolvedToken, "byref in constrained tailcall", speculative);
+ if (pConstrainedResolvedToken != nullptr)
+ {
+ return false;
+ }
// Get the exact view of the signature for an array method
if (sig.retType != CORINFO_TYPE_VOID)
@@ -7021,560 +6863,30 @@ bool Compiler::verCheckTailCallConstraint(
}
}
- typeInfo tiCalleeRetType = verMakeTypeInfo(sig.retType, sig.retTypeClass);
- typeInfo tiCallerRetType =
- verMakeTypeInfo(info.compMethodInfo->args.retType, info.compMethodInfo->args.retTypeClass);
-
- // void return type gets morphed into the error type, so we have to treat them specially here
- if (sig.retType == CORINFO_TYPE_VOID)
- {
- VerifyOrReturnSpeculative(info.compMethodInfo->args.retType == CORINFO_TYPE_VOID, "tailcall return mismatch",
- speculative);
- }
- else
- {
- VerifyOrReturnSpeculative(tiCompatibleWith(NormaliseForStack(tiCalleeRetType),
- NormaliseForStack(tiCallerRetType), true),
- "tailcall return mismatch", speculative);
- }
-
- // for tailcall, stack must be empty
- VerifyOrReturnSpeculative(verCurrentState.esStackDepth == popCount, "stack non-empty on tailcall", speculative);
-
- return true; // Yes, tailcall is legal
-}
-
-/*****************************************************************************
- *
- * Checks the IL verification rules for the call
- */
-
-void Compiler::verVerifyCall(OPCODE opcode,
- CORINFO_RESOLVED_TOKEN* pResolvedToken,
- CORINFO_RESOLVED_TOKEN* pConstrainedResolvedToken,
- bool tailCall,
- bool readonlyCall,
- const BYTE* delegateCreateStart,
- const BYTE* codeAddr,
- CORINFO_CALL_INFO* callInfo DEBUGARG(const char* methodName))
-{
- DWORD mflags;
- CORINFO_SIG_INFO* sig = nullptr;
- unsigned int popCount = 0; // we can't pop the stack since impImportCall needs it, so
- // this counter is used to keep track of how many items have been
- // virtually popped
-
- // for calli, VerifyOrReturn that this is not a virtual method
- if (opcode == CEE_CALLI)
- {
- Verify(false, "Calli not verifiable");
- return;
- }
-
- //<NICE> It would be nice to cache the rest of it, but eeFindMethod is the big ticket item.
- mflags = callInfo->verMethodFlags;
-
- sig = &callInfo->verSig;
+ var_types calleeRetType = genActualType(JITtype2varType(sig.retType));
+ var_types callerRetType = genActualType(JITtype2varType(info.compMethodInfo->args.retType));
- if ((sig->callConv & CORINFO_CALLCONV_MASK) == CORINFO_CALLCONV_VARARG)
- {
- eeGetCallSiteSig(pResolvedToken->token, pResolvedToken->tokenScope, pResolvedToken->tokenContext, sig);
- }
+ // Normalize TYP_FLOAT to TYP_DOUBLE (it is ok to return one as the other and vice versa).
+ calleeRetType = (calleeRetType == TYP_FLOAT) ? TYP_DOUBLE : calleeRetType;
+ callerRetType = (callerRetType == TYP_FLOAT) ? TYP_DOUBLE : callerRetType;
- // opcode specific check
- unsigned methodClassFlgs = callInfo->classFlags;
- switch (opcode)
+ // Make sure the types match.
+ if (calleeRetType != callerRetType)
{
- case CEE_CALLVIRT:
- // cannot do callvirt on valuetypes
- VerifyOrReturn(!(methodClassFlgs & CORINFO_FLG_VALUECLASS), "callVirt on value class");
- VerifyOrReturn(sig->hasThis(), "CallVirt on static method");
- break;
-
- case CEE_NEWOBJ:
- {
- assert(!tailCall); // Importer should not allow this
- VerifyOrReturn((mflags & CORINFO_FLG_CONSTRUCTOR) && !(mflags & CORINFO_FLG_STATIC),
- "newobj must be on instance");
-
- if (methodClassFlgs & CORINFO_FLG_DELEGATE)
- {
- VerifyOrReturn(sig->numArgs == 2, "wrong number args to delegate ctor");
- typeInfo tiDeclaredObj = verParseArgSigToTypeInfo(sig, sig->args).NormaliseForStack();
- typeInfo tiDeclaredFtn =
- verParseArgSigToTypeInfo(sig, info.compCompHnd->getArgNext(sig->args)).NormaliseForStack();
- VerifyOrReturn(tiDeclaredFtn.IsNativeIntType(), "ftn arg needs to be a native int type");
-
- assert(popCount == 0);
- typeInfo tiActualObj = impStackTop(1).seTypeInfo;
- typeInfo tiActualFtn = impStackTop(0).seTypeInfo;
-
- VerifyOrReturn(tiActualFtn.IsMethod(), "delegate needs method as first arg");
- VerifyOrReturn(tiCompatibleWith(tiActualObj, tiDeclaredObj, true), "delegate object type mismatch");
- VerifyOrReturn(tiActualObj.IsNullObjRef() || tiActualObj.IsType(TI_REF),
- "delegate object type mismatch");
-
- CORINFO_CLASS_HANDLE objTypeHandle =
- tiActualObj.IsNullObjRef() ? nullptr : tiActualObj.GetClassHandleForObjRef();
-
- // the method signature must be compatible with the delegate's invoke method
-
- // check that for virtual functions, the type of the object used to get the
- // ftn ptr is the same as the type of the object passed to the delegate ctor.
- // since this is a bit of work to determine in general, we pattern match stylized
- // code sequences
-
- // the delegate creation code check, which used to be done later, is now done here
- // so we can read delegateMethodRef directly from
- // from the preceding LDFTN or CEE_LDVIRTFN instruction sequence;
- // we then use it in our call to isCompatibleDelegate().
-
- mdMemberRef delegateMethodRef = mdMemberRefNil;
- VerifyOrReturn(verCheckDelegateCreation(delegateCreateStart, codeAddr, delegateMethodRef),
- "must create delegates with certain IL");
-
- CORINFO_RESOLVED_TOKEN delegateResolvedToken;
- delegateResolvedToken.tokenContext = impTokenLookupContextHandle;
- delegateResolvedToken.tokenScope = info.compScopeHnd;
- delegateResolvedToken.token = delegateMethodRef;
- delegateResolvedToken.tokenType = CORINFO_TOKENKIND_Method;
- info.compCompHnd->resolveToken(&delegateResolvedToken);
-
- CORINFO_CALL_INFO delegateCallInfo;
- eeGetCallInfo(&delegateResolvedToken, nullptr /* constraint typeRef */, CORINFO_CALLINFO_SECURITYCHECKS,
- &delegateCallInfo);
-
- bool isOpenDelegate = false;
- VerifyOrReturn(info.compCompHnd->isCompatibleDelegate(objTypeHandle, delegateResolvedToken.hClass,
- tiActualFtn.GetMethod(), pResolvedToken->hClass,
- &isOpenDelegate),
- "function incompatible with delegate");
-
- // check the constraints on the target method
- VerifyOrReturn(info.compCompHnd->satisfiesClassConstraints(delegateResolvedToken.hClass),
- "delegate target has unsatisfied class constraints");
- VerifyOrReturn(info.compCompHnd->satisfiesMethodConstraints(delegateResolvedToken.hClass,
- tiActualFtn.GetMethod()),
- "delegate target has unsatisfied method constraints");
-
- // See ECMA spec section 1.8.1.5.2 (Delegating via instance dispatch)
- // for additional verification rules for delegates
- CORINFO_METHOD_HANDLE actualMethodHandle = tiActualFtn.GetMethod();
- DWORD actualMethodAttribs = info.compCompHnd->getMethodAttribs(actualMethodHandle);
- if (impIsLDFTN_TOKEN(delegateCreateStart, codeAddr))
- {
-
- if ((actualMethodAttribs & CORINFO_FLG_VIRTUAL) && ((actualMethodAttribs & CORINFO_FLG_FINAL) == 0))
- {
- VerifyOrReturn((tiActualObj.IsThisPtr() && lvaIsOriginalThisReadOnly()) ||
- verIsBoxedValueType(tiActualObj),
- "The 'this' parameter to the call must be either the calling method's "
- "'this' parameter or "
- "a boxed value type.");
- }
- }
-
- if (actualMethodAttribs & CORINFO_FLG_PROTECTED)
- {
- bool targetIsStatic = actualMethodAttribs & CORINFO_FLG_STATIC;
-
- Verify(targetIsStatic || !isOpenDelegate,
- "Unverifiable creation of an open instance delegate for a protected member.");
-
- CORINFO_CLASS_HANDLE instanceClassHnd = (tiActualObj.IsNullObjRef() || targetIsStatic)
- ? info.compClassHnd
- : tiActualObj.GetClassHandleForObjRef();
-
- // In the case of protected methods, it is a requirement that the 'this'
- // pointer be a subclass of the current context. Perform this check.
- Verify(info.compCompHnd->canAccessFamily(info.compMethodHnd, instanceClassHnd),
- "Accessing protected method through wrong type.");
- }
- goto DONE_ARGS;
- }
- }
- // fall thru to default checks
- FALLTHROUGH;
- default:
- VerifyOrReturn(!(mflags & CORINFO_FLG_ABSTRACT), "method abstract");
- }
- VerifyOrReturn(!((mflags & CORINFO_FLG_CONSTRUCTOR) && (methodClassFlgs & CORINFO_FLG_DELEGATE)),
- "can only newobj a delegate constructor");
-
- // check compatibility of the arguments
- unsigned int argCount;
- argCount = sig->numArgs;
- CORINFO_ARG_LIST_HANDLE args;
- args = sig->args;
- while (argCount--)
- {
- typeInfo tiActual = impStackTop(popCount + argCount).seTypeInfo;
-
- typeInfo tiDeclared = verParseArgSigToTypeInfo(sig, args).NormaliseForStack();
- VerifyOrReturn(tiCompatibleWith(tiActual, tiDeclared, true), "type mismatch");
-
- args = info.compCompHnd->getArgNext(args);
- }
-
-DONE_ARGS:
-
- // update popCount
- popCount += sig->numArgs;
-
- // check for 'this' which are is non-static methods, not called via NEWOBJ
- CORINFO_CLASS_HANDLE instanceClassHnd = info.compClassHnd;
- if (!(mflags & CORINFO_FLG_STATIC) && (opcode != CEE_NEWOBJ))
- {
- typeInfo tiThis = impStackTop(popCount).seTypeInfo;
- popCount++;
-
- // If it is null, we assume we can access it (since it will AV shortly)
- // If it is anything but a reference class, there is no hierarchy, so
- // again, we don't need the precise instance class to compute 'protected' access
- if (tiThis.IsType(TI_REF))
- {
- instanceClassHnd = tiThis.GetClassHandleForObjRef();
- }
-
- // Check type compatibility of the this argument
- typeInfo tiDeclaredThis = verMakeTypeInfo(pResolvedToken->hClass);
- if (tiDeclaredThis.IsValueClass())
- {
- tiDeclaredThis.MakeByRef();
- }
-
- // If this is a call to the base class .ctor, set thisPtr Init for
- // this block.
- if (mflags & CORINFO_FLG_CONSTRUCTOR)
- {
- if (verTrackObjCtorInitState && tiThis.IsThisPtr() &&
- verIsCallToInitThisPtr(info.compClassHnd, pResolvedToken->hClass))
- {
- assert(verCurrentState.thisInitialized !=
- TIS_Bottom); // This should never be the case just from the logic of the verifier.
- VerifyOrReturn(verCurrentState.thisInitialized == TIS_Uninit,
- "Call to base class constructor when 'this' is possibly initialized");
- // Otherwise, 'this' is now initialized.
- verCurrentState.thisInitialized = TIS_Init;
- tiThis.SetInitialisedObjRef();
- }
- else
- {
- // We allow direct calls to value type constructors
- // NB: we have to check that the contents of tiThis is a value type, otherwise we could use a
- // constrained callvirt to illegally re-enter a .ctor on a value of reference type.
- VerifyOrReturn(tiThis.IsByRef() && DereferenceByRef(tiThis).IsValueClass(),
- "Bad call to a constructor");
- }
- }
-
- if (pConstrainedResolvedToken != nullptr)
- {
- VerifyOrReturn(tiThis.IsByRef(), "non-byref this type in constrained call");
-
- typeInfo tiConstraint = verMakeTypeInfo(pConstrainedResolvedToken->hClass);
-
- // We just dereference this and test for equality
- tiThis.DereferenceByRef();
- VerifyOrReturn(typeInfo::AreEquivalent(tiThis, tiConstraint),
- "this type mismatch with constrained type operand");
-
- // Now pretend the this type is the boxed constrained type, for the sake of subsequent checks
- tiThis = typeInfo(TI_REF, pConstrainedResolvedToken->hClass);
- }
-
- // To support direct calls on readonly byrefs, just pretend tiDeclaredThis is readonly too
- if (tiDeclaredThis.IsByRef() && tiThis.IsReadonlyByRef())
- {
- tiDeclaredThis.SetIsReadonlyByRef();
- }
-
- VerifyOrReturn(tiCompatibleWith(tiThis, tiDeclaredThis, true), "this type mismatch");
-
- if (tiThis.IsByRef())
- {
- // Find the actual type where the method exists (as opposed to what is declared
- // in the metadata). This is to prevent passing a byref as the "this" argument
- // while calling methods like System.ValueType.GetHashCode() which expect boxed objects.
-
- CORINFO_CLASS_HANDLE actualClassHnd = info.compCompHnd->getMethodClass(pResolvedToken->hMethod);
- VerifyOrReturn(eeIsValueClass(actualClassHnd),
- "Call to base type of valuetype (which is never a valuetype)");
- }
-
- // Rules for non-virtual call to a non-final virtual method:
-
- // Define:
- // The "this" pointer is considered to be "possibly written" if
- // 1. Its address have been taken (LDARGA 0) anywhere in the method.
- // (or)
- // 2. It has been stored to (STARG.0) anywhere in the method.
-
- // A non-virtual call to a non-final virtual method is only allowed if
- // 1. The this pointer passed to the callee is an instance of a boxed value type.
- // (or)
- // 2. The this pointer passed to the callee is the current method's this pointer.
- // (and) The current method's this pointer is not "possibly written".
-
- // Thus the rule is that if you assign to this ANYWHERE you can't make "base" calls to
- // virtual methods. (Luckily this does affect .ctors, since they are not virtual).
- // This is stronger that is strictly needed, but implementing a laxer rule is significantly
- // hard and more error prone.
-
- if (opcode == CEE_CALL && (mflags & CORINFO_FLG_VIRTUAL) && ((mflags & CORINFO_FLG_FINAL) == 0))
- {
- VerifyOrReturn((tiThis.IsThisPtr() && lvaIsOriginalThisReadOnly()) || verIsBoxedValueType(tiThis),
- "The 'this' parameter to the call must be either the calling method's 'this' parameter or "
- "a boxed value type.");
- }
- }
-
- // check any constraints on the callee's class and type parameters
- VerifyOrReturn(info.compCompHnd->satisfiesClassConstraints(pResolvedToken->hClass),
- "method has unsatisfied class constraints");
- VerifyOrReturn(info.compCompHnd->satisfiesMethodConstraints(pResolvedToken->hClass, pResolvedToken->hMethod),
- "method has unsatisfied method constraints");
-
- if (mflags & CORINFO_FLG_PROTECTED)
- {
- VerifyOrReturn(info.compCompHnd->canAccessFamily(info.compMethodHnd, instanceClassHnd),
- "Can't access protected method");
- }
-
- // Get the exact view of the signature for an array method
- if (sig->retType != CORINFO_TYPE_VOID)
- {
- eeGetMethodSig(pResolvedToken->hMethod, sig, pResolvedToken->hClass);
- }
-
- // "readonly." prefixed calls only allowed for the Address operation on arrays.
- // The methods supported by array types are under the control of the EE
- // so we can trust that only the Address operation returns a byref.
- if (readonlyCall)
- {
- typeInfo tiCalleeRetType = verMakeTypeInfo(sig->retType, sig->retTypeClass);
- VerifyOrReturn((methodClassFlgs & CORINFO_FLG_ARRAY) && tiCalleeRetType.IsByRef(),
- "unexpected use of readonly prefix");
- }
-
- // Verify the tailcall
- if (tailCall)
- {
- verCheckTailCallConstraint(opcode, pResolvedToken, pConstrainedResolvedToken, false);
- }
-}
-
-/*****************************************************************************
- * Checks that a delegate creation is done using the following pattern:
- * dup
- * ldvirtftn targetMemberRef
- * OR
- * ldftn targetMemberRef
- *
- * 'delegateCreateStart' points at the last dup or ldftn in this basic block (null if
- * not in this basic block)
- *
- * targetMemberRef is read from the code sequence.
- * targetMemberRef is validated iff verificationNeeded.
- */
-
-bool Compiler::verCheckDelegateCreation(const BYTE* delegateCreateStart,
- const BYTE* codeAddr,
- mdMemberRef& targetMemberRef)
-{
- if (impIsLDFTN_TOKEN(delegateCreateStart, codeAddr))
- {
- targetMemberRef = getU4LittleEndian(&delegateCreateStart[2]);
- return true;
- }
- else if (impIsDUP_LDVIRTFTN_TOKEN(delegateCreateStart, codeAddr))
- {
- targetMemberRef = getU4LittleEndian(&delegateCreateStart[3]);
- return true;
- }
-
- return false;
-}
-
-typeInfo Compiler::verVerifySTIND(const typeInfo& tiTo, const typeInfo& value, const typeInfo& instrType)
-{
- Verify(!tiTo.IsReadonlyByRef(), "write to readonly byref");
- typeInfo ptrVal = verVerifyLDIND(tiTo, instrType);
- typeInfo normPtrVal = typeInfo(ptrVal).NormaliseForStack();
- if (!tiCompatibleWith(value, normPtrVal, true))
- {
- Verify(tiCompatibleWith(value, normPtrVal, true), "type mismatch");
- }
- return ptrVal;
-}
-
-typeInfo Compiler::verVerifyLDIND(const typeInfo& ptr, const typeInfo& instrType)
-{
- assert(!instrType.IsStruct());
-
- typeInfo ptrVal;
- if (ptr.IsByRef())
- {
- ptrVal = DereferenceByRef(ptr);
- if (instrType.IsObjRef() && !ptrVal.IsObjRef())
- {
- Verify(false, "bad pointer");
- }
- else if (!instrType.IsObjRef() && !typeInfo::AreEquivalent(instrType, ptrVal))
- {
- Verify(false, "pointer not consistent with instr");
- }
- }
- else
- {
- Verify(false, "pointer not byref");
- }
-
- return ptrVal;
-}
-
-// Verify that the field is used properly. 'tiThis' is NULL for statics,
-// 'fieldFlags' is the fields attributes, and mutator is true if it is a
-// ld*flda or a st*fld.
-// 'enclosingClass' is given if we are accessing a field in some specific type.
-
-void Compiler::verVerifyField(CORINFO_RESOLVED_TOKEN* pResolvedToken,
- const CORINFO_FIELD_INFO& fieldInfo,
- const typeInfo* tiThis,
- bool mutator,
- bool allowPlainStructAsThis)
-{
- CORINFO_CLASS_HANDLE enclosingClass = pResolvedToken->hClass;
- unsigned fieldFlags = fieldInfo.fieldFlags;
- CORINFO_CLASS_HANDLE instanceClass =
- info.compClassHnd; // for statics, we imagine the instance is the current class.
-
- bool isStaticField = ((fieldFlags & CORINFO_FLG_FIELD_STATIC) != 0);
- if (mutator)
- {
- Verify(!(fieldFlags & CORINFO_FLG_FIELD_UNMANAGED), "mutating an RVA bases static");
- if ((fieldFlags & CORINFO_FLG_FIELD_FINAL))
- {
- Verify((info.compFlags & CORINFO_FLG_CONSTRUCTOR) && enclosingClass == info.compClassHnd &&
- info.compIsStatic == isStaticField,
- "bad use of initonly field (set or address taken)");
- }
- }
-
- if (tiThis == nullptr)
- {
- Verify(isStaticField, "used static opcode with non-static field");
- }
- else
- {
- typeInfo tThis = *tiThis;
-
- if (allowPlainStructAsThis && tThis.IsValueClass())
- {
- tThis.MakeByRef();
- }
-
- // If it is null, we assume we can access it (since it will AV shortly)
- // If it is anything but a reference class, there is no hierarchy, so
- // again, we don't need the precise instance class to compute 'protected' access
- if (tiThis->IsType(TI_REF))
- {
- instanceClass = tiThis->GetClassHandleForObjRef();
- }
-
- // Note that even if the field is static, we require that the this pointer
- // satisfy the same constraints as a non-static field This happens to
- // be simpler and seems reasonable
- typeInfo tiDeclaredThis = verMakeTypeInfo(enclosingClass);
- if (tiDeclaredThis.IsValueClass())
- {
- tiDeclaredThis.MakeByRef();
-
- // we allow read-only tThis, on any field access (even stores!), because if the
- // class implementor wants to prohibit stores he should make the field private.
- // we do this by setting the read-only bit on the type we compare tThis to.
- tiDeclaredThis.SetIsReadonlyByRef();
- }
- else if (verTrackObjCtorInitState && tThis.IsThisPtr())
- {
- // Any field access is legal on "uninitialized" this pointers.
- // The easiest way to implement this is to simply set the
- // initialized bit for the duration of the type check on the
- // field access only. It does not change the state of the "this"
- // for the function as a whole. Note that the "tThis" is a copy
- // of the original "this" type (*tiThis) passed in.
- tThis.SetInitialisedObjRef();
- }
-
- Verify(tiCompatibleWith(tThis, tiDeclaredThis, true), "this type mismatch");
- }
-
- // Presently the JIT does not check that we don't store or take the address of init-only fields
- // since we cannot guarantee their immutability and it is not a security issue.
-
- // check any constraints on the fields's class --- accessing the field might cause a class constructor to run.
- VerifyOrReturn(info.compCompHnd->satisfiesClassConstraints(enclosingClass),
- "field has unsatisfied class constraints");
- if (fieldFlags & CORINFO_FLG_FIELD_PROTECTED)
- {
- Verify(info.compCompHnd->canAccessFamily(info.compMethodHnd, instanceClass),
- "Accessing protected method through wrong type.");
- }
-}
-
-void Compiler::verVerifyCond(const typeInfo& tiOp1, const typeInfo& tiOp2, unsigned opcode)
-{
- if (tiOp1.IsNumberType())
- {
-#ifdef TARGET_64BIT
- Verify(tiCompatibleWith(tiOp1, tiOp2, true), "Cond type mismatch");
-#else // TARGET_64BIT
- // [10/17/2013] Consider changing this: to put on my verification lawyer hat,
- // this is non-conforming to the ECMA Spec: types don't have to be equivalent,
- // but compatible, since we can coalesce native int with int32 (see section III.1.5).
- Verify(typeInfo::AreEquivalent(tiOp1, tiOp2), "Cond type mismatch");
-#endif // !TARGET_64BIT
- }
- else if (tiOp1.IsObjRef())
- {
- switch (opcode)
- {
- case CEE_BEQ_S:
- case CEE_BEQ:
- case CEE_BNE_UN_S:
- case CEE_BNE_UN:
- case CEE_CEQ:
- case CEE_CGT_UN:
- break;
- default:
- Verify(false, "Cond not allowed on object types");
- }
- Verify(tiOp2.IsObjRef(), "Cond type mismatch");
- }
- else if (tiOp1.IsByRef())
- {
- Verify(tiOp2.IsByRef(), "Cond type mismatch");
+ return false;
}
- else
+ else if ((callerRetType == TYP_STRUCT) && (sig.retTypeClass != info.compMethodInfo->args.retTypeClass))
{
- Verify(tiOp1.IsMethod() && tiOp2.IsMethod(), "Cond type mismatch");
+ return false;
}
-}
-void Compiler::verVerifyThisPtrInitialised()
-{
- if (verTrackObjCtorInitState)
+ // For tailcall, stack must be empty.
+ if (verCurrentState.esStackDepth != popCount)
{
- Verify(verCurrentState.thisInitialized == TIS_Init, "this ptr is not initialized");
+ return false;
}
-}
-bool Compiler::verIsCallToInitThisPtr(CORINFO_CLASS_HANDLE context, CORINFO_CLASS_HANDLE target)
-{
- // Either target == context, in this case calling an alternate .ctor
- // Or target is the immediate parent of context
-
- return ((target == context) || (target == info.compCompHnd->getParentType(context)));
+ return true; // Yes, tailcall is legal
}
GenTree* Compiler::impImportLdvirtftn(GenTree* thisPtr,
@@ -9610,10 +8922,16 @@ var_types Compiler::impImportCall(OPCODE opcode,
}
#endif // DEBUG
+ const bool isIntrinsic = (mflags & CORINFO_FLG_INTRINSIC) != 0;
+
// <NICE> Factor this into getCallInfo </NICE>
bool isSpecialIntrinsic = false;
- if ((mflags & CORINFO_FLG_INTRINSIC) != 0)
+
+ if (isIntrinsic || !info.compMatchedVM)
{
+ // For mismatched VM (AltJit) we want to check all methods as intrinsic to ensure
+ // we get more accurate codegen. This particularly applies to HWIntrinsic usage
+
const bool isTailCall = canTailCall && (tailCallFlags != 0);
call =
@@ -9775,13 +9093,8 @@ var_types Compiler::impImportCall(OPCODE opcode,
call = gtNewCallNode(CT_USER_FUNC, callInfo->hMethod, callRetTyp, di);
call->gtFlags |= GTF_CALL_VIRT_VTABLE;
- // Should we expand virtual call targets early for this method?
- //
- if (opts.compExpandCallsEarly)
- {
- // Mark this method to expand the virtual call target early in fgMorpgCall
- call->AsCall()->SetExpandedEarly();
- }
+ // Mark this method to expand the virtual call target early in fgMorphCall
+ call->AsCall()->SetExpandedEarly();
break;
}
@@ -10744,13 +10057,6 @@ DONE_CALL:
typeInfo tiRetVal = verMakeTypeInfo(sig->retType, sig->retTypeClass);
tiRetVal.NormaliseForStack();
- // The CEE_READONLY prefix modifies the verification semantics of an Address
- // operation on an array type.
- if ((clsFlags & CORINFO_FLG_ARRAY) && isReadonlyCall && tiRetVal.IsByRef())
- {
- tiRetVal.SetIsReadonlyByRef();
- }
-
if (call->IsCall())
{
// Sometimes "call" is not a GT_CALL (if we imported an intrinsic that didn't turn into a call)
@@ -12403,7 +11709,7 @@ GenTree* Compiler::impCastClassOrIsInstToTree(
bool partialExpand = false;
const CorInfoHelpFunc helper = info.compCompHnd->getCastingHelper(pResolvedToken, isCastClass);
- GenTree* exactCls = nullptr;
+ CORINFO_CLASS_HANDLE exactCls = NO_CLASS_HANDLE;
// Legality check.
//
@@ -12413,16 +11719,13 @@ GenTree* Compiler::impCastClassOrIsInstToTree(
{
if (isCastClass)
{
- // Jit can only inline expand the normal CHKCASTCLASS helper.
- canExpandInline = (helper == CORINFO_HELP_CHKCASTCLASS);
+ // Jit can only inline expand CHKCASTCLASS and CHKCASTARRAY helpers.
+ canExpandInline = (helper == CORINFO_HELP_CHKCASTCLASS) || (helper == CORINFO_HELP_CHKCASTARRAY);
}
- else
+ else if ((helper == CORINFO_HELP_ISINSTANCEOFCLASS) || (helper == CORINFO_HELP_ISINSTANCEOFARRAY))
{
- if (helper == CORINFO_HELP_ISINSTANCEOFCLASS)
- {
- // If the class is exact, the jit can expand the IsInst check inline.
- canExpandInline = isClassExact;
- }
+ // If the class is exact, the jit can expand the IsInst check inline.
+ canExpandInline = isClassExact;
}
// Check if this cast helper have some profile data
@@ -12467,7 +11770,7 @@ GenTree* Compiler::impCastClassOrIsInstToTree(
canExpandInline = true;
partialExpand = true;
- exactCls = gtNewIconEmbClsHndNode(likelyCls);
+ exactCls = likelyCls;
}
}
}
@@ -12528,8 +11831,9 @@ GenTree* Compiler::impCastClassOrIsInstToTree(
op2Var = fgInsertCommaFormTemp(&op2);
lvaTable[op2Var->AsLclVarCommon()->GetLclNum()].lvIsCSE = true;
}
- temp = gtNewMethodTableLookup(temp);
- condMT = gtNewOperNode(GT_NE, TYP_INT, temp, exactCls != nullptr ? exactCls : op2);
+ temp = gtNewMethodTableLookup(temp);
+ condMT =
+ gtNewOperNode(GT_NE, TYP_INT, temp, (exactCls != NO_CLASS_HANDLE) ? gtNewIconEmbClsHndNode(exactCls) : op2);
GenTree* condNull;
//
@@ -12549,11 +11853,16 @@ GenTree* Compiler::impCastClassOrIsInstToTree(
GenTree* condTrue;
if (isCastClass)
{
- //
- // use the special helper that skips the cases checked by our inlined cast
- //
- const CorInfoHelpFunc specialHelper = CORINFO_HELP_CHKCASTCLASS_SPECIAL;
+ assert((helper == CORINFO_HELP_CHKCASTCLASS) || (helper == CORINFO_HELP_CHKCASTARRAY) ||
+ (helper == CORINFO_HELP_CHKCASTINTERFACE));
+ CorInfoHelpFunc specialHelper = helper;
+ if ((helper == CORINFO_HELP_CHKCASTCLASS) &&
+ ((exactCls == nullptr) || (exactCls == gtGetHelperArgClassHandle(op2))))
+ {
+ // use the special helper that skips the cases checked by our inlined cast
+ specialHelper = CORINFO_HELP_CHKCASTCLASS_SPECIAL;
+ }
condTrue = gtNewHelperCallNode(specialHelper, TYP_REF, partialExpand ? op2 : op2Var, gtClone(op1));
}
else if (partialExpand)
@@ -12580,8 +11889,11 @@ GenTree* Compiler::impCastClassOrIsInstToTree(
if (isCastClass && isClassExact && condTrue->OperIs(GT_CALL))
{
- // condTrue is used only for throwing InvalidCastException in case of casting to an exact class.
- condTrue->AsCall()->gtCallMoreFlags |= GTF_CALL_M_DOES_NOT_RETURN;
+ if (helper == CORINFO_HELP_CHKCASTCLASS)
+ {
+ // condTrue is used only for throwing InvalidCastException in case of casting to an exact class.
+ condTrue->AsCall()->gtCallMoreFlags |= GTF_CALL_M_DOES_NOT_RETURN;
+ }
}
GenTree* qmarkNull;
@@ -15691,11 +15003,9 @@ void Compiler::impImportBlockCode(BasicBlock* block)
if (newBBcreatedForTailcallStress && !hasTailPrefix)
{
// Do a more detailed evaluation of legality
- const bool returnFalseIfInvalid = true;
const bool passedConstraintCheck =
verCheckTailCallConstraint(opcode, &resolvedToken,
- constraintCall ? &constrainedResolvedToken : nullptr,
- returnFalseIfInvalid);
+ constraintCall ? &constrainedResolvedToken : nullptr);
// Avoid setting compHasBackwardsJump = true via tail call stress if the method cannot have
// patchpoints.
@@ -15936,7 +15246,7 @@ void Compiler::impImportBlockCode(BasicBlock* block)
{
// If the object is a struct, what we really want is
// for the field to operate on the address of the struct.
- if (!varTypeGCtype(obj->TypeGet()) && impIsValueType(tiObj))
+ if (varTypeIsStruct(obj))
{
assert(opcode == CEE_LDFLD && objType != nullptr);
@@ -17560,12 +16870,6 @@ void Compiler::impImportBlockCode(BasicBlock* block)
void Compiler::impPushVar(GenTree* op, typeInfo tiRetVal)
{
tiRetVal.NormaliseForStack();
-
- if (verTrackObjCtorInitState && (verCurrentState.thisInitialized != TIS_Init) && tiRetVal.IsThisPtr())
- {
- tiRetVal.SetUninitialisedObjRef();
- }
-
impPushOnStack(op, tiRetVal);
}
@@ -17746,7 +17050,7 @@ GenTree* Compiler::impAssignMultiRegTypeToVar(GenTree* op,
assert(IsMultiRegReturnedType(hClass, callConv));
- // Mark the var so that fields are not promoted and stay together.
+ // Set "lvIsMultiRegRet" to block promotion under "!lvaEnregMultiRegVars".
lvaTable[tmpNum].lvIsMultiRegRet = true;
return ret;
@@ -18171,28 +17475,6 @@ void Compiler::impVerifyEHBlock(BasicBlock* block, bool isTryStart)
while (HBtab != nullptr)
{
- if (isTryStart)
- {
- // Are we verifying that an instance constructor properly initializes it's 'this' pointer once?
- // We do not allow the 'this' pointer to be uninitialized when entering most kinds try regions
- //
- if (verTrackObjCtorInitState && (verCurrentState.thisInitialized != TIS_Init))
- {
- // We trigger an invalid program exception here unless we have a try/fault region.
- //
- if (HBtab->HasCatchHandler() || HBtab->HasFinallyHandler() || HBtab->HasFilter())
- {
- BADCODE(
- "The 'this' pointer of an instance constructor is not initialized upon entry to a try region");
- }
- else
- {
- // Allow a try/fault region to proceed.
- assert(HBtab->HasFaultHandler());
- }
- }
- }
-
// Recursively process the handler block, if we haven't already done so.
BasicBlock* hndBegBB = HBtab->ebdHndBeg;
@@ -18259,18 +17541,6 @@ void Compiler::impVerifyEHBlock(BasicBlock* block, bool isTryStart)
}
}
- // This seems redundant ....??
- if (verTrackObjCtorInitState && HBtab->HasFaultHandler())
- {
- /* Recursively process the handler block */
-
- verCurrentState.esStackDepth = 0;
-
- // Queue up the fault handler for importing
- //
- impImportBlockPending(HBtab->ebdHndBeg);
- }
-
// Now process our enclosing try index (if any)
//
tryIndex = HBtab->ebdEnclosingTryIndex;
@@ -18789,7 +18059,6 @@ void Compiler::impImportBlockPending(BasicBlock* block)
dsc->pdBB = block;
dsc->pdSavedStack.ssDepth = verCurrentState.esStackDepth;
- dsc->pdThisPtrInit = verCurrentState.thisInitialized;
// Save the stack trees for later
@@ -18854,13 +18123,11 @@ void Compiler::impReimportBlockPending(BasicBlock* block)
if (block->bbEntryState)
{
- dsc->pdThisPtrInit = block->bbEntryState->thisInitialized;
dsc->pdSavedStack.ssDepth = block->bbEntryState->esStackDepth;
dsc->pdSavedStack.ssTrees = block->bbEntryState->esStack;
}
else
{
- dsc->pdThisPtrInit = TIS_Bottom;
dsc->pdSavedStack.ssDepth = 0;
dsc->pdSavedStack.ssTrees = nullptr;
}
@@ -19013,7 +18280,6 @@ void Compiler::ReimportSpillClique::Visit(SpillCliqueDir predOrSucc, BasicBlock*
// Set the current stack state to that of the blk->bbEntryState
m_pComp->verResetCurrentState(blk, &m_pComp->verCurrentState);
- assert(m_pComp->verCurrentState.thisInitialized == blk->bbThisOnEntry());
m_pComp->impImportBlockPending(blk);
}
@@ -19103,7 +18369,7 @@ void Compiler::impReimportSpillClique(BasicBlock* block)
// a copy of "srcState", cloning tree pointers as required.
void Compiler::verInitBBEntryState(BasicBlock* block, EntryState* srcState)
{
- if (srcState->esStackDepth == 0 && srcState->thisInitialized == TIS_Bottom)
+ if (srcState->esStackDepth == 0)
{
block->bbEntryState = nullptr;
return;
@@ -19113,8 +18379,7 @@ void Compiler::verInitBBEntryState(BasicBlock* block, EntryState* srcState)
// block->bbEntryState.esRefcount = 1;
- block->bbEntryState->esStackDepth = srcState->esStackDepth;
- block->bbEntryState->thisInitialized = TIS_Bottom;
+ block->bbEntryState->esStackDepth = srcState->esStackDepth;
if (srcState->esStackDepth > 0)
{
@@ -19128,24 +18393,6 @@ void Compiler::verInitBBEntryState(BasicBlock* block, EntryState* srcState)
block->bbEntryState->esStack[level].val = gtCloneExpr(tree);
}
}
-
- if (verTrackObjCtorInitState)
- {
- verSetThisInit(block, srcState->thisInitialized);
- }
-
- return;
-}
-
-void Compiler::verSetThisInit(BasicBlock* block, ThisInitState tis)
-{
- assert(tis != TIS_Bottom); // Precondition.
- if (block->bbEntryState == nullptr)
- {
- block->bbEntryState = new (this, CMK_Unknown) EntryState();
- }
-
- block->bbEntryState->thisInitialized = tis;
}
/*
@@ -19153,11 +18400,9 @@ void Compiler::verSetThisInit(BasicBlock* block, ThisInitState tis)
*/
void Compiler::verResetCurrentState(BasicBlock* block, EntryState* destState)
{
-
if (block->bbEntryState == nullptr)
{
- destState->esStackDepth = 0;
- destState->thisInitialized = TIS_Bottom;
+ destState->esStackDepth = 0;
return;
}
@@ -19169,15 +18414,6 @@ void Compiler::verResetCurrentState(BasicBlock* block, EntryState* destState)
memcpy(destState->esStack, block->bbStackOnEntry(), stackSize);
}
-
- destState->thisInitialized = block->bbThisOnEntry();
-
- return;
-}
-
-ThisInitState BasicBlock::bbThisOnEntry() const
-{
- return bbEntryState ? bbEntryState->thisInitialized : TIS_Bottom;
}
unsigned BasicBlock::bbStackDepthOnEntry() const
@@ -19200,11 +18436,7 @@ StackEntry* BasicBlock::bbStackOnEntry() const
void Compiler::verInitCurrentState()
{
- verTrackObjCtorInitState = false;
- verCurrentState.thisInitialized = TIS_Bottom;
-
// initialize stack info
-
verCurrentState.esStackDepth = 0;
assert(verCurrentState.esStack != nullptr);
@@ -19367,8 +18599,7 @@ void Compiler::impImport()
/* Restore the stack state */
- verCurrentState.thisInitialized = dsc->pdThisPtrInit;
- verCurrentState.esStackDepth = dsc->pdSavedStack.ssDepth;
+ verCurrentState.esStackDepth = dsc->pdSavedStack.ssDepth;
if (verCurrentState.esStackDepth)
{
impRestoreStackState(&dsc->pdSavedStack);
@@ -19417,21 +18648,6 @@ void Compiler::impImport()
#endif
}
-// Checks if a typeinfo (usually stored in the type stack) is a struct.
-// The invariant here is that if it's not a ref or a method and has a class handle
-// it's a valuetype
-bool Compiler::impIsValueType(typeInfo* pTypeInfo)
-{
- if (pTypeInfo && pTypeInfo->IsValueClassWithClsHnd())
- {
- return true;
- }
- else
- {
- return false;
- }
-}
-
//------------------------------------------------------------------------
// impIsInvariant: check if a tree (created during import) is invariant.
//
diff --git a/src/coreclr/jit/importer_vectorization.cpp b/src/coreclr/jit/importer_vectorization.cpp
index 073eb4d1490..dea8b5c8bc3 100644
--- a/src/coreclr/jit/importer_vectorization.cpp
+++ b/src/coreclr/jit/importer_vectorization.cpp
@@ -236,7 +236,7 @@ GenTree* Compiler::impExpandHalfConstEqualsSIMD(
return nullptr;
}
- GenTree* zero = gtNewZeroConNode(simdType, baseType);
+ GenTree* zero = gtNewZeroConNode(simdType);
GenTree* offset1 = gtNewIconNode(dataOffset, TYP_I_IMPL);
GenTree* offset2 = gtNewIconNode(dataOffset + len * sizeof(USHORT) - simdSize, TYP_I_IMPL);
diff --git a/src/coreclr/jit/jit.h b/src/coreclr/jit/jit.h
index e15d3ade77e..8fcc451aa62 100644
--- a/src/coreclr/jit/jit.h
+++ b/src/coreclr/jit/jit.h
@@ -435,8 +435,7 @@ public:
#define NODEBASH_STATS 0 // Collect stats on changed gtOper values in GenTree's.
#define COUNT_AST_OPERS 0 // Display use counts for GenTree operators.
-#define VERBOSE_SIZES 0 // Always display GC info sizes. If set, DISPLAY_SIZES must also be set.
-#define VERBOSE_VERIFY 0 // Dump additional information when verifying code. Useful to debug verification bugs.
+#define VERBOSE_SIZES 0 // Always display GC info sizes. If set, DISPLAY_SIZES must also be set.
#ifdef DEBUG
#define MEASURE_MEM_ALLOC 1 // Collect memory allocation stats.
diff --git a/src/coreclr/jit/jitconfigvalues.h b/src/coreclr/jit/jitconfigvalues.h
index 771cc6e9cf7..23fb5ee3c9f 100644
--- a/src/coreclr/jit/jitconfigvalues.h
+++ b/src/coreclr/jit/jitconfigvalues.h
@@ -76,6 +76,10 @@ CONFIG_INTEGER(JitHideAlignBehindJmp,
CONFIG_INTEGER(JitOptimizeStructHiddenBuffer, W("JitOptimizeStructHiddenBuffer"), 1) // Track assignments to locals done
// through return buffers.
+CONFIG_INTEGER(JitUnrollLoopMaxIterationCount,
+ W("JitUnrollLoopMaxIterationCount"),
+ DEFAULT_UNROLL_LOOP_MAX_ITERATION_COUNT)
+
// Print the alignment boundaries in disassembly.
CONFIG_INTEGER(JitDasmWithAlignmentBoundaries, W("JitDasmWithAlignmentBoundaries"), 0)
@@ -307,6 +311,14 @@ CONFIG_INTEGER(EnableHWIntrinsic, W("EnableHWIntrinsic"), 1) // Allows Base+ h
CONFIG_INTEGER(EnableAES, W("EnableAES"), 1) // Allows AES+ hardware intrinsics to be disabled
CONFIG_INTEGER(EnableAVX, W("EnableAVX"), 1) // Allows AVX+ hardware intrinsics to be disabled
CONFIG_INTEGER(EnableAVX2, W("EnableAVX2"), 1) // Allows AVX2+ hardware intrinsics to be disabled
+CONFIG_INTEGER(EnableAVX512BW, W("EnableAVX512BW"), 1) // Allows AVX512BW+ hardware intrinsics to be disabled
+CONFIG_INTEGER(EnableAVX512BW_VL, W("EnableAVX512BW_VL"), 1) // Allows AVX512BW+ AVX512VL+ hardware intrinsics to be disabled
+CONFIG_INTEGER(EnableAVX512CD, W("EnableAVX512CD"), 1) // Allows AVX512CD+ hardware intrinsics to be disabled
+CONFIG_INTEGER(EnableAVX512CD_VL, W("EnableAVX512CD_VL"), 1) // Allows AVX512CD+ AVX512VL+ hardware intrinsics to be disabled
+CONFIG_INTEGER(EnableAVX512DQ, W("EnableAVX512DQ"), 1) // Allows AVX512DQ+ hardware intrinsics to be disabled
+CONFIG_INTEGER(EnableAVX512DQ_VL, W("EnableAVX512DQ_VL"), 1) // Allows AVX512DQ+ AVX512VL+ hardware intrinsics to be disabled
+CONFIG_INTEGER(EnableAVX512F, W("EnableAVX512F"), 1) // Allows AVX512F+ hardware intrinsics to be disabled
+CONFIG_INTEGER(EnableAVX512F_VL, W("EnableAVX512F_VL"), 1) // Allows AVX512BW+ AVX512VL+ hardware intrinsics to be disabled
CONFIG_INTEGER(EnableAVXVNNI, W("EnableAVXVNNI"), 1) // Allows AVX VNNI+ hardware intrinsics to be disabled
CONFIG_INTEGER(EnableBMI1, W("EnableBMI1"), 1) // Allows BMI1+ hardware intrinsics to be disabled
CONFIG_INTEGER(EnableBMI2, W("EnableBMI2"), 1) // Allows BMI2+ hardware intrinsics to be disabled
@@ -569,10 +581,6 @@ CONFIG_INTEGER(JitRandomlyCollect64BitCounts, W("JitRandomlyCollect64BitCounts")
// Devirtualize virtual calls with getExactClasses (NativeAOT only for now)
CONFIG_INTEGER(JitEnableExactDevirtualization, W("JitEnableExactDevirtualization"), 1)
-// Control when Virtual Calls are expanded
-CONFIG_INTEGER(JitExpandCallsEarly, W("JitExpandCallsEarly"), 1) // Expand Call targets early (in the global morph
- // phase)
-
// Force the generation of CFG checks
CONFIG_INTEGER(JitForceControlFlowGuard, W("JitForceControlFlowGuard"), 0);
// JitCFGUseDispatcher values:
diff --git a/src/coreclr/jit/lclmorph.cpp b/src/coreclr/jit/lclmorph.cpp
index a94d89abd0b..fa6b1798d7b 100644
--- a/src/coreclr/jit/lclmorph.cpp
+++ b/src/coreclr/jit/lclmorph.cpp
@@ -606,18 +606,8 @@ private:
{
assert(val.IsAddress());
- LclVarDsc* varDsc = m_compiler->lvaGetDesc(val.LclNum());
-
- // In general we don't know how an exposed struct field address will be used - it may be used to
- // access only that specific field or it may be used to access other fields in the same struct
- // by using pointer/ref arithmetic. It seems reasonable to make an exception for the "this" arg
- // of calls - it would be highly unusual for a struct member method to attempt to access memory
- // beyond "this" instance. And calling struct member methods is common enough that attempting to
- // mark the entire struct as address exposed results in CQ regressions.
- GenTreeCall* callTree = user->IsCall() ? user->AsCall() : nullptr;
- bool isThisArg = (callTree != nullptr) && callTree->gtArgs.HasThisPointer() &&
- (val.Node() == callTree->gtArgs.GetThisArg()->GetNode());
- bool exposeParentLcl = varDsc->lvIsStructField && !isThisArg;
+ unsigned lclNum = val.LclNum();
+ LclVarDsc* varDsc = m_compiler->lvaGetDesc(lclNum);
bool hasHiddenStructArg = false;
if (m_compiler->opts.compJitOptimizeStructHiddenBuffer)
@@ -627,20 +617,20 @@ private:
// b) Do not later turn into indirections.
//
bool isSuitableLocal =
- varTypeIsStruct(varDsc) && varDsc->lvIsTemp && !m_compiler->lvaIsImplicitByRefLocal(val.LclNum());
+ varTypeIsStruct(varDsc) && varDsc->lvIsTemp && !m_compiler->lvaIsImplicitByRefLocal(lclNum);
#ifdef TARGET_X86
- if (m_compiler->lvaIsArgAccessedViaVarArgsCookie(val.LclNum()))
+ if (m_compiler->lvaIsArgAccessedViaVarArgsCookie(lclNum))
{
isSuitableLocal = false;
}
#endif // TARGET_X86
+ GenTreeCall* callTree = user->IsCall() ? user->AsCall() : nullptr;
+
if (isSuitableLocal && (callTree != nullptr) && callTree->gtArgs.HasRetBuffer() &&
(val.Node() == callTree->gtArgs.GetRetBufferArg()->GetNode()))
{
- assert(!exposeParentLcl);
-
- m_compiler->lvaSetHiddenBufferStructArg(val.LclNum());
+ m_compiler->lvaSetHiddenBufferStructArg(lclNum);
hasHiddenStructArg = true;
callTree->gtCallMoreFlags |= GTF_CALL_M_RETBUFFARG_LCLOPT;
}
@@ -649,7 +639,7 @@ private:
if (!hasHiddenStructArg)
{
m_compiler->lvaSetVarAddrExposed(
- exposeParentLcl ? varDsc->lvParentLcl : val.LclNum() DEBUGARG(AddressExposedReason::ESCAPE_ADDRESS));
+ varDsc->lvIsStructField ? varDsc->lvParentLcl : lclNum DEBUGARG(AddressExposedReason::ESCAPE_ADDRESS));
}
#ifdef TARGET_64BIT
// If the address of a variable is passed in a call and the allocation size of the variable
@@ -993,7 +983,7 @@ private:
return IndirTransform::None;
}
- if (!varTypeIsStruct(indir))
+ if (!indir->TypeIs(TYP_STRUCT))
{
if (varDsc->lvPromoted)
{
@@ -1008,26 +998,6 @@ private:
return IndirTransform::LclFld;
}
- if (varTypeIsSIMD(indir))
- {
- // TODO-ADDR: Skip SIMD indirs for now, SIMD typed LCL_FLDs works most of the time
- // but there are exceptions - fgMorphFieldAssignToSimdSetElement for example.
- return IndirTransform::None;
- }
-
- if (indir->OperIs(GT_IND)) // IND<struct>
- {
- // TODO-ADDR: add this case to the "don't expect" assert above; it requires updating
- // "cpblk" import to not create such nodes for block copies of known size.
- return IndirTransform::None;
- }
-
- if (!user->OperIs(GT_ASG, GT_CALL, GT_RETURN))
- {
- // TODO-ADDR: define the contract for "COMMA(..., LCL<struct>)".
- return IndirTransform::None;
- }
-
ClassLayout* indirLayout = nullptr;
if (indir->OperIs(GT_FIELD))
diff --git a/src/coreclr/jit/lclvars.cpp b/src/coreclr/jit/lclvars.cpp
index a694d31c39b..620a2310d51 100644
--- a/src/coreclr/jit/lclvars.cpp
+++ b/src/coreclr/jit/lclvars.cpp
@@ -4452,7 +4452,7 @@ void Compiler::lvaMarkLclRefs(GenTree* tree, BasicBlock* block, Statement* stmt,
#if FEATURE_PARTIAL_SIMD_CALLEE_SAVE
// TODO-CQ: If the varType needs partial callee save, conservatively do not enregister
- // such variable. In future, need to enable enregisteration for such variables.
+ // such variable. In future, we should enable enregisteration for such variables.
if (!varTypeNeedsPartialCalleeSave(varDsc->GetRegisterType()))
#endif
{
@@ -4463,48 +4463,11 @@ void Compiler::lvaMarkLclRefs(GenTree* tree, BasicBlock* block, Statement* stmt,
}
}
- bool allowStructs = false;
-#ifdef UNIX_AMD64_ABI
- // On System V the type of the var could be a struct type.
- allowStructs = varTypeIsStruct(varDsc);
-#endif // UNIX_AMD64_ABI
-
- /* Variables must be used as the same type throughout the method */
- noway_assert(varDsc->lvType == TYP_UNDEF || tree->gtType == TYP_UNKNOWN || allowStructs ||
- genActualType(varDsc->TypeGet()) == genActualType(tree->gtType) ||
- (tree->gtType == TYP_BYREF && varDsc->TypeGet() == TYP_I_IMPL) ||
- (tree->gtType == TYP_I_IMPL && varDsc->TypeGet() == TYP_BYREF) || (tree->gtFlags & GTF_VAR_CAST) ||
- (varTypeIsFloating(varDsc) && varTypeIsFloating(tree)) ||
- (varTypeIsStruct(varDsc) == varTypeIsStruct(tree)));
-
- /* Remember the type of the reference */
-
- if (tree->gtType == TYP_UNKNOWN || varDsc->lvType == TYP_UNDEF)
- {
- varDsc->lvType = tree->gtType;
- noway_assert(genActualType(varDsc->TypeGet()) == tree->gtType); // no truncation
- }
-
-#ifdef DEBUG
- if (tree->gtFlags & GTF_VAR_CAST)
- {
- // it should never be bigger than the variable slot
-
- // Trees don't store the full information about structs
- // so we can't check them.
- if (tree->TypeGet() != TYP_STRUCT)
- {
- unsigned treeSize = genTypeSize(tree->TypeGet());
- unsigned varSize = genTypeSize(varDsc->TypeGet());
- if (varDsc->TypeGet() == TYP_STRUCT)
- {
- varSize = varDsc->lvSize();
- }
-
- assert(treeSize <= varSize);
- }
- }
-#endif
+ // Check that the LCL_VAR node has the same type as the underlying variable, save a few mismatches we allow.
+ assert(tree->TypeIs(varDsc->TypeGet(), genActualType(varDsc)) ||
+ (tree->TypeIs(TYP_I_IMPL) && (varDsc->TypeGet() == TYP_BYREF)) || // Created for spill clique import.
+ (tree->TypeIs(TYP_BYREF) && (varDsc->TypeGet() == TYP_I_IMPL)) || // Created by inliner substitution.
+ (tree->TypeIs(TYP_INT) && (varDsc->TypeGet() == TYP_LONG))); // Created by "optNarrowTree".
}
}
diff --git a/src/coreclr/jit/lower.cpp b/src/coreclr/jit/lower.cpp
index 805679a1f54..a1d64932225 100644
--- a/src/coreclr/jit/lower.cpp
+++ b/src/coreclr/jit/lower.cpp
@@ -2789,14 +2789,13 @@ GenTree* Lowering::OptimizeConstCompare(GenTree* cmp)
// doing so would produce incorrect results (e.g. RSZ, RSH).
//
// The below list of handled opers is conservative but enough to handle the most common
- // situations. In particular this include CALL, sometimes the JIT unnecessarily widens
- // the result of bool returning calls.
+ // situations.
//
bool removeCast =
#ifdef TARGET_ARM64
- (op2Value == 0) && cmp->OperIs(GT_EQ, GT_NE, GT_GT) &&
+ (op2Value == 0) && cmp->OperIs(GT_EQ, GT_NE, GT_GT) && !castOp->isContained() &&
#endif
- (castOp->OperIs(GT_CALL, GT_LCL_VAR) || castOp->OperIs(GT_OR, GT_XOR, GT_AND)
+ (castOp->OperIs(GT_LCL_VAR, GT_CALL, GT_OR, GT_XOR, GT_AND)
#ifdef TARGET_XARCH
|| IsContainableMemoryOp(castOp)
#endif
@@ -3391,13 +3390,11 @@ void Lowering::LowerStoreLocCommon(GenTreeLclVarCommon* lclStore)
DISPTREERANGE(BlockRange(), lclStore);
JITDUMP("\n");
- GenTree* src = lclStore->gtGetOp1();
- LclVarDsc* varDsc = comp->lvaGetDesc(lclStore);
-
+ GenTree* src = lclStore->gtGetOp1();
+ LclVarDsc* varDsc = comp->lvaGetDesc(lclStore);
const bool srcIsMultiReg = src->IsMultiRegNode();
- const bool dstIsMultiReg = lclStore->IsMultiRegLclVar();
- if (!dstIsMultiReg && varTypeIsStruct(varDsc))
+ if (!srcIsMultiReg && varTypeIsStruct(varDsc))
{
// TODO-Cleanup: we want to check `varDsc->lvRegStruct` as the last condition instead of `!varDsc->lvPromoted`,
// but we do not set it for `CSE` vars so it is currently failing.
@@ -3417,7 +3414,7 @@ void Lowering::LowerStoreLocCommon(GenTreeLclVarCommon* lclStore)
}
}
- if (srcIsMultiReg || dstIsMultiReg)
+ if (srcIsMultiReg)
{
const ReturnTypeDesc* retTypeDesc = nullptr;
if (src->OperIs(GT_CALL))
@@ -3493,7 +3490,7 @@ void Lowering::LowerStoreLocCommon(GenTreeLclVarCommon* lclStore)
#ifdef FEATURE_SIMD
if (varTypeIsSIMD(lclRegType))
{
- GenTree* zeroCon = comp->gtNewZeroConNode(lclRegType, CORINFO_TYPE_FLOAT);
+ GenTree* zeroCon = comp->gtNewZeroConNode(lclRegType);
BlockRange().InsertAfter(src, zeroCon);
BlockRange().Remove(src);
@@ -3578,7 +3575,7 @@ void Lowering::LowerStoreLocCommon(GenTreeLclVarCommon* lclStore)
// src and dst can be in registers, check if we need a bitcast.
if (!src->TypeIs(TYP_STRUCT) && (varTypeUsesFloatReg(lclRegType) != varTypeUsesFloatReg(src)))
{
- assert(!srcIsMultiReg && !dstIsMultiReg);
+ assert(!srcIsMultiReg);
assert(lclStore->OperIsLocalStore());
assert(lclRegType != TYP_UNDEF);
@@ -4992,7 +4989,7 @@ GenTree* Lowering::LowerVirtualVtableCall(GenTreeCall* call)
GenTree* tmpTree = comp->gtNewLclvNode(lclNumTmp, result->TypeGet());
tmpTree = Offset(tmpTree, vtabOffsOfIndirection);
- tmpTree = comp->gtNewOperNode(GT_IND, TYP_I_IMPL, tmpTree, false);
+ tmpTree = comp->gtNewOperNode(GT_IND, TYP_I_IMPL, tmpTree);
GenTree* offs = comp->gtNewIconNode(vtabOffsOfIndirection + vtabOffsAfterIndirection, TYP_INT);
result = comp->gtNewOperNode(GT_ADD, TYP_I_IMPL, comp->gtNewLclvNode(lclNumTmp, result->TypeGet()), offs);
@@ -5216,14 +5213,7 @@ bool Lowering::TryCreateAddrMode(GenTree* addr, bool isContainable, GenTree* par
{
if (!addr->OperIs(GT_ADD) || addr->gtOverflow())
{
-#ifdef TARGET_ARM64
- if (!addr->OperIs(GT_ADDEX))
- {
- return false;
- }
-#else
return false;
-#endif
}
#ifdef TARGET_ARM64
diff --git a/src/coreclr/jit/lowerarmarch.cpp b/src/coreclr/jit/lowerarmarch.cpp
index cd9bd3532c9..1eae6c6dbc0 100644
--- a/src/coreclr/jit/lowerarmarch.cpp
+++ b/src/coreclr/jit/lowerarmarch.cpp
@@ -158,40 +158,187 @@ bool Lowering::IsContainableImmed(GenTree* parentNode, GenTree* childNode) const
//
bool Lowering::IsContainableBinaryOp(GenTree* parentNode, GenTree* childNode) const
{
+ // The node we're checking should be one of the two child nodes
+ assert((parentNode->gtGetOp1() == childNode) || (parentNode->gtGetOp2() == childNode));
+
+ // We cannot contain if the parent node
+ // * is contained
+ // * is not operating on an integer
+ // * is already marking a child node as contained
+ // * is required to throw on overflow
+
if (parentNode->isContained())
return false;
if (!varTypeIsIntegral(parentNode))
return false;
- if (parentNode->gtFlags & GTF_SET_FLAGS)
+ if (parentNode->gtGetOp1()->isContained() || parentNode->gtGetOp2()->isContained())
+ return false;
+
+ if (parentNode->OperMayOverflow() && parentNode->gtOverflow())
return false;
- GenTree* op1 = parentNode->gtGetOp1();
- GenTree* op2 = parentNode->gtGetOp2();
+ // We cannot contain if the child node:
+ // * is not operating on an integer
+ // * is required to set a flag
+ // * is required to throw on overflow
- if (op2 != childNode)
+ if (!varTypeIsIntegral(childNode))
return false;
- if (op1->isContained() || op2->isContained())
+ if ((childNode->gtFlags & GTF_SET_FLAGS) != 0)
return false;
- if (!varTypeIsIntegral(op2))
+ if (childNode->OperMayOverflow() && childNode->gtOverflow())
return false;
- if (op2->gtFlags & GTF_SET_FLAGS)
+ GenTree* matchedOp = nullptr;
+
+ if (childNode->OperIs(GT_MUL))
+ {
+ if (childNode->gtGetOp1()->isContained() || childNode->gtGetOp2()->isContained())
+ {
+ // Cannot contain if either of the childs operands is already contained
+ return false;
+ }
+
+ if ((parentNode->gtFlags & GTF_SET_FLAGS) != 0)
+ {
+ // Cannot contain if the parent operation needs to set flags
+ return false;
+ }
+
+ if (parentNode->OperIs(GT_ADD))
+ {
+ // Find "c + (a * b)" or "(a * b) + c"
+ return IsSafeToContainMem(parentNode, childNode);
+ }
+
+ if (parentNode->OperIs(GT_SUB))
+ {
+ // Find "c - (a * b)"
+ assert(childNode == parentNode->gtGetOp2());
+ return IsSafeToContainMem(parentNode, childNode);
+ }
+
+ // TODO: Handle mneg
return false;
+ }
- // Find "a + b * c" or "a - b * c".
- if (parentNode->OperIs(GT_ADD, GT_SUB) && op2->OperIs(GT_MUL))
+ if (childNode->OperIs(GT_LSH, GT_RSH, GT_RSZ))
{
- if (parentNode->gtOverflow())
+ // Find "a op (b shift cns)"
+
+ if (childNode->gtGetOp1()->isContained())
+ {
+ // Cannot contain if the childs op1 is already contained
+ return false;
+ }
+
+ GenTree* shiftAmountNode = childNode->gtGetOp2();
+
+ if (!shiftAmountNode->IsCnsIntOrI())
+ {
+ // Cannot contain if the childs op2 is not a constant
+ return false;
+ }
+
+ const ssize_t shiftAmount = shiftAmountNode->AsIntCon()->IconValue();
+ const ssize_t maxShift = (static_cast<ssize_t>(genTypeSize(parentNode)) * BITS_IN_BYTE) - 1;
+
+ if ((shiftAmount < 0x01) || (shiftAmount > maxShift))
+ {
+ // Cannot contain if the shift amount is less than 1 or greater than maxShift
return false;
+ }
+
+ if (parentNode->OperIs(GT_ADD, GT_SUB, GT_AND))
+ {
+ // These operations can still report flags
- if (op2->gtOverflow())
+ if (IsSafeToContainMem(parentNode, childNode))
+ {
+ assert(shiftAmountNode->isContained());
+ return true;
+ }
+ }
+
+ if ((parentNode->gtFlags & GTF_SET_FLAGS) != 0)
+ {
+ // Cannot contain if the parent operation needs to set flags
return false;
+ }
- return !op2->gtGetOp1()->isContained() && !op2->gtGetOp2()->isContained();
+ if (parentNode->OperIs(GT_CMP, GT_OR, GT_XOR))
+ {
+ if (IsSafeToContainMem(parentNode, childNode))
+ {
+ assert(shiftAmountNode->isContained());
+ return true;
+ }
+ }
+
+ // TODO: Handle CMN, NEG/NEGS, BIC/BICS, EON, MVN, ORN, TST
+ return false;
+ }
+
+ if (childNode->OperIs(GT_CAST))
+ {
+ // Find "a op cast(b)"
+ GenTree* castOp = childNode->AsCast()->CastOp();
+
+ // We want to prefer the combined op here over containment of the cast op
+ castOp->ClearContained();
+
+ bool isSupportedCast = false;
+
+ if (varTypeIsSmall(childNode->CastToType()))
+ {
+ // The JIT doesn't track upcasts from small types, instead most types
+ // are tracked as TYP_INT and then we get explicit downcasts to the
+ // desired small type instead.
+
+ assert(!varTypeIsFloating(castOp));
+ isSupportedCast = true;
+ }
+ else if (childNode->TypeIs(TYP_LONG) && genActualTypeIsInt(castOp))
+ {
+ // We can handle "INT -> LONG", "INT -> ULONG", "UINT -> LONG", and "UINT -> ULONG"
+ isSupportedCast = true;
+ }
+
+ if (!isSupportedCast)
+ {
+ return false;
+ }
+
+ if (parentNode->OperIs(GT_ADD, GT_SUB))
+ {
+ // These operations can still report flags
+
+ if (IsSafeToContainMem(parentNode, childNode))
+ {
+ return true;
+ }
+ }
+
+ if ((parentNode->gtFlags & GTF_SET_FLAGS) != 0)
+ {
+ // Cannot contain if the parent operation needs to set flags
+ return false;
+ }
+
+ if (parentNode->OperIs(GT_CMP))
+ {
+ if (IsSafeToContainMem(parentNode, childNode))
+ {
+ return true;
+ }
+ }
+
+ // TODO: Handle CMN
+ return false;
}
return false;
@@ -1088,13 +1235,13 @@ GenTree* Lowering::LowerHWIntrinsicCmpOp(GenTreeHWIntrinsic* node, genTreeOps cm
GenTree* op1 = node->Op(1);
GenTree* op2 = node->Op(2);
- // Optimize comparison against Vector64/128<>.Zero via UMAX:
+ // Optimize comparison against Vector64/128<>.Zero via UMAXV:
//
// bool eq = v == Vector128<integer>.Zero
//
// to:
//
- // bool eq = AdvSimd.Arm64.MaxAcross(v.AsUInt16()).ToScalar() == 0;
+ // bool eq = AdvSimd.Arm64.MaxPairwise(v.AsUInt16(), v.AsUInt16()).GetElement(0) == 0;
//
GenTree* op = nullptr;
GenTree* opZero = nullptr;
@@ -1109,20 +1256,36 @@ GenTree* Lowering::LowerHWIntrinsicCmpOp(GenTreeHWIntrinsic* node, genTreeOps cm
opZero = op2;
}
- if (!varTypeIsFloating(simdBaseType) && (op != nullptr))
+ // Special case: "vec ==/!= zero_vector"
+ if (!varTypeIsFloating(simdBaseType) && (op != nullptr) && (simdSize != 12))
{
- // Use USHORT for V64 and UINT for V128 due to better latency/TP on some CPUs
- CorInfoType maxType = (simdSize == 8) ? CORINFO_TYPE_USHORT : CORINFO_TYPE_UINT;
- GenTree* cmp = comp->gtNewSimdHWIntrinsicNode(simdType, op, NI_AdvSimd_Arm64_MaxAcross, maxType, simdSize);
- BlockRange().InsertBefore(node, cmp);
- LowerNode(cmp);
+ GenTree* cmp = op;
+ if (simdSize != 8) // we don't need compression for Vector64
+ {
+ node->Op(1) = op;
+ LIR::Use tmp1Use(BlockRange(), &node->Op(1), node);
+ ReplaceWithLclVar(tmp1Use);
+ op = node->Op(1);
+ GenTree* opClone = comp->gtClone(op);
+ BlockRange().InsertAfter(op, opClone);
+
+ cmp = comp->gtNewSimdHWIntrinsicNode(simdType, op, opClone, NI_AdvSimd_Arm64_MaxPairwise, CORINFO_TYPE_UINT,
+ simdSize);
+ BlockRange().InsertBefore(node, cmp);
+ LowerNode(cmp);
+ }
+
BlockRange().Remove(opZero);
- GenTree* val = comp->gtNewSimdHWIntrinsicNode(TYP_INT, cmp, NI_Vector128_ToScalar, CORINFO_TYPE_UINT, simdSize);
- BlockRange().InsertAfter(cmp, val);
+ GenTree* zroCns = comp->gtNewIconNode(0, TYP_INT);
+ BlockRange().InsertAfter(cmp, zroCns);
+
+ GenTree* val =
+ comp->gtNewSimdHWIntrinsicNode(TYP_LONG, cmp, zroCns, NI_AdvSimd_Extract, CORINFO_TYPE_ULONG, simdSize);
+ BlockRange().InsertAfter(zroCns, val);
LowerNode(val);
- GenTree* cmpZeroCns = comp->gtNewIconNode(0, TYP_INT);
+ GenTree* cmpZeroCns = comp->gtNewIconNode(0, TYP_LONG);
BlockRange().InsertAfter(val, cmpZeroCns);
node->ChangeOper(cmpOp);
@@ -1190,34 +1353,49 @@ GenTree* Lowering::LowerHWIntrinsicCmpOp(GenTreeHWIntrinsic* node, genTreeOps cm
cmp = tmp;
}
- GenTree* msk =
- comp->gtNewSimdHWIntrinsicNode(simdType, cmp, NI_AdvSimd_Arm64_MinAcross, CORINFO_TYPE_UBYTE, simdSize);
- BlockRange().InsertAfter(cmp, msk);
- LowerNode(msk);
+ if (simdSize != 8) // we don't need compression for Vector64
+ {
+ GenTree* msk;
+
+ // Save cmp into a temp as we're going to need to pass it twice to MinPairwise
+ node->Op(1) = cmp;
+ LIR::Use tmp1Use(BlockRange(), &node->Op(1), node);
+ ReplaceWithLclVar(tmp1Use);
+ cmp = node->Op(1);
+ GenTree* cmpClone = comp->gtClone(cmp);
+ BlockRange().InsertAfter(cmp, cmpClone);
+
+ msk = comp->gtNewSimdHWIntrinsicNode(simdType, cmp, cmpClone, NI_AdvSimd_Arm64_MinPairwise, CORINFO_TYPE_UINT,
+ simdSize);
+ BlockRange().InsertAfter(cmpClone, msk);
+ LowerNode(msk);
+
+ cmp = msk;
+ }
GenTree* zroCns = comp->gtNewIconNode(0, TYP_INT);
- BlockRange().InsertAfter(msk, zroCns);
+ BlockRange().InsertAfter(cmp, zroCns);
GenTree* val =
- comp->gtNewSimdHWIntrinsicNode(TYP_UBYTE, msk, zroCns, NI_AdvSimd_Extract, CORINFO_TYPE_UBYTE, simdSize);
+ comp->gtNewSimdHWIntrinsicNode(TYP_LONG, cmp, zroCns, NI_AdvSimd_Extract, CORINFO_TYPE_ULONG, simdSize);
BlockRange().InsertAfter(zroCns, val);
LowerNode(val);
- zroCns = comp->gtNewIconNode(0, TYP_INT);
- BlockRange().InsertAfter(val, zroCns);
+ GenTree* bitMskCns = comp->gtNewIconNode(static_cast<ssize_t>(0xffffffffffffffff), TYP_LONG);
+ BlockRange().InsertAfter(val, bitMskCns);
node->ChangeOper(cmpOp);
- node->gtType = TYP_INT;
+ node->gtType = TYP_LONG;
node->AsOp()->gtOp1 = val;
- node->AsOp()->gtOp2 = zroCns;
+ node->AsOp()->gtOp2 = bitMskCns;
// The CompareEqual will set (condition is true) or clear (condition is false) all bits of the respective element
// The MinAcross then ensures we get either all bits set (all conditions are true) or clear (any condition is false)
// So, we need to invert the condition from the operation since we compare against zero
- GenCondition cmpCnd = (cmpOp == GT_EQ) ? GenCondition::NE : GenCondition::EQ;
- GenTree* cc = LowerNodeCC(node, cmpCnd);
+ GenCondition cmpCnd = (cmpOp == GT_EQ) ? GenCondition::EQ : GenCondition::NE;
+ LowerNodeCC(node, cmpCnd);
node->gtType = TYP_VOID;
node->ClearUnusedValue();
@@ -1281,7 +1459,7 @@ GenTree* Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node)
BlockRange().Remove(arg);
}
- GenTreeVecCon* vecCon = comp->gtNewVconNode(simdType, simdBaseJitType);
+ GenTreeVecCon* vecCon = comp->gtNewVconNode(simdType);
vecCon->gtSimd32Val = simd32Val;
BlockRange().InsertBefore(node, vecCon);
@@ -1815,50 +1993,32 @@ void Lowering::ContainCheckBinary(GenTreeOp* node)
GenTree* op1 = node->gtGetOp1();
GenTree* op2 = node->gtGetOp2();
- // Check and make op2 contained (if it is a containable immediate)
- CheckImmedAndMakeContained(node, op2);
-
-#ifdef TARGET_ARM64
- if (comp->opts.OptimizationEnabled() && IsContainableBinaryOp(node, op2))
+ if (CheckImmedAndMakeContained(node, op2))
{
- MakeSrcContained(node, op2);
+ return;
}
- // Change ADD TO ADDEX for ADD(X, CAST(Y)) or ADD(CAST(X), Y) where CAST is int->long
- // or for ADD(LSH(X, CNS), X) or ADD(X, LSH(X, CNS)) where CNS is in the (0..typeWidth) range
- if (node->OperIs(GT_ADD) && !op1->isContained() && !op2->isContained() && varTypeIsIntegral(node) &&
- !node->gtOverflow())
+ if (node->OperIsCommutative() && CheckImmedAndMakeContained(node, op1))
{
- assert(!node->isContained());
+ MakeSrcContained(node, op1);
+ std::swap(node->gtOp1, node->gtOp2);
+ return;
+ }
- if (op1->OperIs(GT_CAST) || op2->OperIs(GT_CAST))
+#ifdef TARGET_ARM64
+ if (comp->opts.OptimizationEnabled())
+ {
+ if (IsContainableBinaryOp(node, op2))
{
- GenTree* cast = op1->OperIs(GT_CAST) ? op1 : op2;
- if (cast->gtGetOp1()->TypeIs(TYP_INT) && cast->TypeIs(TYP_LONG) && !cast->gtOverflow())
- {
- node->ChangeOper(GT_ADDEX);
- cast->AsCast()->CastOp()->ClearContained(); // Uncontain any memory operands.
- MakeSrcContained(node, cast);
- }
+ MakeSrcContained(node, op2);
+ return;
}
- else if (op1->OperIs(GT_LSH) || op2->OperIs(GT_LSH))
- {
- GenTree* lsh = op1->OperIs(GT_LSH) ? op1 : op2;
- GenTree* shiftBy = lsh->gtGetOp2();
- if (shiftBy->IsCnsIntOrI())
- {
- const ssize_t shiftByCns = shiftBy->AsIntCon()->IconValue();
- const ssize_t maxShift = (ssize_t)genTypeSize(node) * BITS_IN_BYTE;
-
- if ((shiftByCns > 0) && (shiftByCns < maxShift))
- {
- // shiftBy is small so it has to be contained at this point.
- assert(shiftBy->isContained());
- node->ChangeOper(GT_ADDEX);
- MakeSrcContained(node, lsh);
- }
- }
+ if (node->OperIsCommutative() && IsContainableBinaryOp(node, op1))
+ {
+ MakeSrcContained(node, op1);
+ std::swap(node->gtOp1, node->gtOp2);
+ return;
}
}
#endif
diff --git a/src/coreclr/jit/lowerxarch.cpp b/src/coreclr/jit/lowerxarch.cpp
index 3ef7660e6fa..07ec567c511 100644
--- a/src/coreclr/jit/lowerxarch.cpp
+++ b/src/coreclr/jit/lowerxarch.cpp
@@ -1614,7 +1614,7 @@ GenTree* Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node)
BlockRange().Remove(arg);
}
- GenTreeVecCon* vecCon = comp->gtNewVconNode(simdType, simdBaseJitType);
+ GenTreeVecCon* vecCon = comp->gtNewVconNode(simdType);
vecCon->gtSimd32Val = simd32Val;
BlockRange().InsertBefore(node, vecCon);
@@ -1760,7 +1760,7 @@ GenTree* Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node)
// var tmp2 = Vector128<byte>.Zero;
// return Ssse3.Shuffle(tmp1, tmp2);
- tmp2 = comp->gtNewZeroConNode(simdType, simdBaseJitType);
+ tmp2 = comp->gtNewZeroConNode(simdType);
BlockRange().InsertAfter(tmp1, tmp2);
LowerNode(tmp2);
@@ -3393,7 +3393,7 @@ GenTree* Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node)
// op1 = Sse.And(op1, tmp1);
// ...
- GenTreeVecCon* vecCon1 = comp->gtNewVconNode(simdType, simdBaseJitType);
+ GenTreeVecCon* vecCon1 = comp->gtNewVconNode(simdType);
vecCon1->gtSimd16Val = simd16Val;
BlockRange().InsertAfter(op1, vecCon1);
@@ -3422,7 +3422,7 @@ GenTree* Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node)
// op2 = Sse.And(op2, tmp2);
// ...
- GenTreeVecCon* vecCon2 = comp->gtNewVconNode(simdType, simdBaseJitType);
+ GenTreeVecCon* vecCon2 = comp->gtNewVconNode(simdType);
vecCon2->gtSimd16Val = simd16Val;
BlockRange().InsertAfter(op2, vecCon2);
@@ -4784,23 +4784,82 @@ void Lowering::ContainCheckStoreIndir(GenTreeStoreInd* node)
// an int-size or larger store of zero to memory, because we can generate smaller code
// by zeroing a register and then storing it.
GenTree* src = node->Data();
+
if (IsContainableImmed(node, src) && (!src->IsIntegralConst(0) || varTypeIsSmall(node)))
{
MakeSrcContained(node, src);
}
// If the source is a BSWAP, contain it on supported hardware to generate a MOVBE.
- if (comp->opts.OptimizationEnabled() && src->OperIs(GT_BSWAP, GT_BSWAP16) &&
- comp->compOpportunisticallyDependsOn(InstructionSet_MOVBE))
+ if (comp->opts.OptimizationEnabled())
{
- unsigned swapSize = src->OperIs(GT_BSWAP16) ? 2 : genTypeSize(src);
- if ((swapSize == genTypeSize(node)) && IsSafeToContainMem(node, src))
+ if (src->OperIs(GT_BSWAP, GT_BSWAP16) && comp->compOpportunisticallyDependsOn(InstructionSet_MOVBE))
{
- // Prefer containing in the store in case the load has been contained.
- src->gtGetOp1()->ClearContained();
+ unsigned swapSize = src->OperIs(GT_BSWAP16) ? 2 : genTypeSize(src);
+
+ if ((swapSize == genTypeSize(node)) && IsSafeToContainMem(node, src))
+ {
+ // Prefer containing in the store in case the load has been contained.
+ src->gtGetOp1()->ClearContained();
- MakeSrcContained(node, src);
+ MakeSrcContained(node, src);
+ }
}
+#if defined(FEATURE_HW_INTRINSICS)
+ else if (src->OperIsHWIntrinsic())
+ {
+ GenTreeHWIntrinsic* hwintrinsic = src->AsHWIntrinsic();
+ NamedIntrinsic intrinsicId = hwintrinsic->GetHWIntrinsicId();
+ var_types simdBaseType = hwintrinsic->GetSimdBaseType();
+ bool isContainable = false;
+
+ switch (intrinsicId)
+ {
+ case NI_SSE2_ConvertToInt32:
+ case NI_SSE2_ConvertToUInt32:
+ case NI_SSE2_X64_ConvertToInt64:
+ case NI_SSE2_X64_ConvertToUInt64:
+ case NI_AVX2_ConvertToInt32:
+ case NI_AVX2_ConvertToUInt32:
+ {
+ // These intrinsics are "ins reg/mem, xmm"
+ isContainable = varTypeIsIntegral(simdBaseType);
+ break;
+ }
+
+ case NI_SSE2_Extract:
+ case NI_SSE41_Extract:
+ case NI_SSE41_X64_Extract:
+ case NI_AVX_ExtractVector128:
+ case NI_AVX2_ExtractVector128:
+ {
+ // These intrinsics are "ins reg/mem, xmm, imm8"
+
+ size_t numArgs = hwintrinsic->GetOperandCount();
+ GenTree* lastOp = hwintrinsic->Op(numArgs);
+
+ isContainable = HWIntrinsicInfo::isImmOp(intrinsicId, lastOp) && lastOp->IsCnsIntOrI();
+
+ if (isContainable && (intrinsicId == NI_SSE2_Extract))
+ {
+ // The encoding that supports containment is SSE4.1 only
+ isContainable = comp->compOpportunisticallyDependsOn(InstructionSet_SSE41);
+ }
+ break;
+ }
+
+ default:
+ {
+ break;
+ }
+ }
+
+ if (isContainable && IsSafeToContainMem(node, src))
+ {
+ MakeSrcContained(node, src);
+ }
+ }
+#endif // FEATURE_HW_INTRINSICS
}
ContainCheckIndir(node);
@@ -6330,8 +6389,8 @@ void Lowering::ContainCheckHWIntrinsic(GenTreeHWIntrinsic* node)
{
if (varTypeIsIntegral(simdBaseType))
{
- // TODO-XARCH-CQ: These intrinsics are "ins reg/mem, xmm" and don't
- // currently support containment.
+ // These intrinsics are "ins reg/mem, xmm" and get
+ // contained by the relevant store operation instead.
return;
}
@@ -6466,8 +6525,8 @@ void Lowering::ContainCheckHWIntrinsic(GenTreeHWIntrinsic* node)
case NI_AVX_ExtractVector128:
case NI_AVX2_ExtractVector128:
{
- // TODO-XARCH-CQ: These intrinsics are "ins reg/mem, xmm, imm8" and don't
- // currently support containment.
+ // These intrinsics are "ins reg/mem, xmm, imm8" and get
+ // contained by the relevant store operation instead.
break;
}
@@ -6518,9 +6577,10 @@ void Lowering::ContainCheckHWIntrinsic(GenTreeHWIntrinsic* node)
case NI_SSE41_Extract:
case NI_SSE41_X64_Extract:
{
+ // These intrinsics are "ins reg/mem, xmm" and get
+ // contained by the relevant store operation instead.
+
assert(!varTypeIsFloating(simdBaseType));
- // TODO-XARCH-CQ: These intrinsics are "ins reg/mem, xmm, imm8" and don't
- // currently support containment.
break;
}
diff --git a/src/coreclr/jit/lsra.cpp b/src/coreclr/jit/lsra.cpp
index 6119cc7aa43..7971902a247 100644
--- a/src/coreclr/jit/lsra.cpp
+++ b/src/coreclr/jit/lsra.cpp
@@ -4666,7 +4666,11 @@ void LinearScan::allocateRegisters()
{
assert(lastAllocatedRefPosition->registerAssignment != RBM_NONE);
RegRecord* regRecord = lastAllocatedRefPosition->getInterval()->assignedReg;
+
+ INDEBUG(activeRefPosition = lastAllocatedRefPosition);
unassignPhysReg(regRecord, lastAllocatedRefPosition);
+ INDEBUG(activeRefPosition = nullptr);
+
// Now set lastAllocatedRefPosition to null, so that we don't try to spill it again
lastAllocatedRefPosition = nullptr;
}
@@ -4794,6 +4798,7 @@ void LinearScan::allocateRegisters()
}
else
{
+ // Available registers should not hold constants
assert(isRegAvailable(reg, physRegRecord->registerType));
assert(!isRegConstant(reg, physRegRecord->registerType));
assert(nextIntervalRef[reg] == MaxLocation);
@@ -5043,7 +5048,13 @@ void LinearScan::allocateRegisters()
// enough that it may not warrant the additional complexity.
if (assignedRegister != REG_NA)
{
- unassignPhysReg(getRegisterRecord(assignedRegister), currentInterval->firstRefPosition);
+ RegRecord* regRecord = getRegisterRecord(assignedRegister);
+ Interval* assignedInterval = regRecord->assignedInterval;
+ unassignPhysReg(regRecord, currentInterval->firstRefPosition);
+ if (assignedInterval->isConstant)
+ {
+ clearConstantReg(assignedRegister, assignedInterval->registerType);
+ }
INDEBUG(dumpLsraAllocationEvent(LSRA_EVENT_NO_REG_ALLOCATED, currentInterval));
}
currentRefPosition->registerAssignment = RBM_NONE;
@@ -6951,25 +6962,10 @@ void LinearScan::resolveRegisters()
// register specified by multi-reg index of current RefPosition.
// Note that the spill flag on treeNode indicates that one or
// more its allocated registers are in that state.
- if (treeNode->IsMultiRegCall())
- {
- GenTreeCall* call = treeNode->AsCall();
- call->SetRegSpillFlagByIdx(GTF_SPILL, currentRefPosition->getMultiRegIdx());
- }
-#if FEATURE_ARG_SPLIT
- else if (treeNode->OperIsPutArgSplit())
- {
- GenTreePutArgSplit* splitArg = treeNode->AsPutArgSplit();
- splitArg->SetRegSpillFlagByIdx(GTF_SPILL, currentRefPosition->getMultiRegIdx());
- }
-#ifdef TARGET_ARM
- else if (compFeatureArgSplit() && treeNode->OperIsMultiRegOp())
+ if (treeNode->IsMultiRegNode())
{
- GenTreeMultiRegOp* multiReg = treeNode->AsMultiRegOp();
- multiReg->SetRegSpillFlagByIdx(GTF_SPILL, currentRefPosition->getMultiRegIdx());
+ treeNode->SetRegSpillFlagByIdx(GTF_SPILL, currentRefPosition->getMultiRegIdx());
}
-#endif // TARGET_ARM
-#endif // FEATURE_ARG_SPLIT
}
// If the value is reloaded or moved to a different register, we need to insert
diff --git a/src/coreclr/jit/lsraarm64.cpp b/src/coreclr/jit/lsraarm64.cpp
index 1d6ad58b67c..e3495ee6886 100644
--- a/src/coreclr/jit/lsraarm64.cpp
+++ b/src/coreclr/jit/lsraarm64.cpp
@@ -288,7 +288,6 @@ int LinearScan::BuildNode(GenTree* tree)
}
FALLTHROUGH;
- case GT_ADDEX:
case GT_AND:
case GT_AND_NOT:
case GT_OR:
diff --git a/src/coreclr/jit/lsraarmarch.cpp b/src/coreclr/jit/lsraarmarch.cpp
index 2c42d385758..d41eef6ad2e 100644
--- a/src/coreclr/jit/lsraarmarch.cpp
+++ b/src/coreclr/jit/lsraarmarch.cpp
@@ -554,11 +554,17 @@ int LinearScan::BuildPutArgSplit(GenTreePutArgSplit* argNode)
{
assert(src->TypeIs(TYP_STRUCT) && src->isContained());
- // We can use a ldr/str sequence so we need an internal register
- buildInternalIntRegisterDefForNode(argNode, allRegs(TYP_INT) & ~argMask);
-
if (src->OperIs(GT_OBJ))
{
+ // If the PUTARG_SPLIT clobbers only one register we may need an
+ // extra internal register in case there is a conflict between the
+ // source address register and target register.
+ if (argNode->gtNumRegs == 1)
+ {
+ // We can use a ldr/str sequence so we need an internal register
+ buildInternalIntRegisterDefForNode(argNode, allRegs(TYP_INT) & ~argMask);
+ }
+
// We will generate code that loads from the OBJ's address, which must be in a register.
srcCount = BuildOperandUses(src->AsObj()->Addr());
}
diff --git a/src/coreclr/jit/lsrabuild.cpp b/src/coreclr/jit/lsrabuild.cpp
index 25f6c93f5a7..370bfc393f2 100644
--- a/src/coreclr/jit/lsrabuild.cpp
+++ b/src/coreclr/jit/lsrabuild.cpp
@@ -3130,27 +3130,38 @@ int LinearScan::BuildOperandUses(GenTree* node, regMaskTP candidates)
#ifdef FEATURE_HW_INTRINSICS
if (node->OperIsHWIntrinsic())
{
- if (node->AsHWIntrinsic()->OperIsMemoryLoad())
+ GenTreeHWIntrinsic* hwintrinsic = node->AsHWIntrinsic();
+
+ if (hwintrinsic->OperIsMemoryLoad())
{
- return BuildAddrUses(node->AsHWIntrinsic()->Op(1));
+ return BuildAddrUses(hwintrinsic->Op(1));
}
- assert(node->AsHWIntrinsic()->GetOperandCount() == 1);
- BuildUse(node->AsHWIntrinsic()->Op(1), candidates);
+ size_t numArgs = hwintrinsic->GetOperandCount();
+
+ if (numArgs != 1)
+ {
+ assert(numArgs == 2);
+ assert(hwintrinsic->Op(2)->isContained());
+ assert(hwintrinsic->Op(2)->IsCnsIntOrI());
+ }
+
+ BuildUse(hwintrinsic->Op(1), candidates);
return 1;
}
#endif // FEATURE_HW_INTRINSICS
#ifdef TARGET_ARM64
if (node->OperIs(GT_MUL) || node->OperIsCmpCompare() || node->OperIs(GT_AND))
{
- // Can be contained for MultiplyAdd on arm64.
+ // MUL can be contained for madd or msub on arm64.
// Compare and AND may be contained due to If Conversion.
return BuildBinaryUses(node->AsOp(), candidates);
}
- if (node->OperIs(GT_NEG, GT_CAST, GT_LSH))
+ if (node->OperIs(GT_NEG, GT_CAST, GT_LSH, GT_RSH, GT_RSZ))
{
- // GT_NEG can be contained for MultiplyAdd on arm64
- // GT_CAST and GT_LSH for ADD with sign/zero extension
+ // NEG can be contained for mneg on arm64
+ // CAST and LSH for ADD with sign/zero extension
+ // LSH, RSH, and RSZ for various "shifted register" instructions on arm64
return BuildOperandUses(node->gtGetOp1(), candidates);
}
#endif
diff --git a/src/coreclr/jit/morph.cpp b/src/coreclr/jit/morph.cpp
index a40cc67b451..15ceeb5f013 100644
--- a/src/coreclr/jit/morph.cpp
+++ b/src/coreclr/jit/morph.cpp
@@ -3147,7 +3147,7 @@ GenTreeCall* Compiler::fgMorphArgs(GenTreeCall* call)
{
GenTree** parentArgx = &arg.EarlyNodeRef();
- // Morph the arg node, and update the parent and argEntry pointers.
+ // Morph the arg node and update the node pointer.
GenTree* argx = *parentArgx;
if (argx == nullptr)
{
@@ -4548,8 +4548,8 @@ GenTree* Compiler::fgMorphIndexAddr(GenTreeIndexAddr* indexAddr)
{
unsigned arrRefTmpNum = lvaGrabTemp(true DEBUGARG("arr expr"));
arrRefDefn = gtNewTempAssign(arrRefTmpNum, arrRef);
- arrRef = gtNewLclvNode(arrRefTmpNum, arrRef->TypeGet());
- arrRef2 = gtNewLclvNode(arrRefTmpNum, arrRef->TypeGet());
+ arrRef = gtNewLclvNode(arrRefTmpNum, lvaGetDesc(arrRefTmpNum)->TypeGet());
+ arrRef2 = gtNewLclvNode(arrRefTmpNum, lvaGetDesc(arrRefTmpNum)->TypeGet());
}
else
{
@@ -4563,8 +4563,8 @@ GenTree* Compiler::fgMorphIndexAddr(GenTreeIndexAddr* indexAddr)
{
unsigned indexTmpNum = lvaGrabTemp(true DEBUGARG("index expr"));
indexDefn = gtNewTempAssign(indexTmpNum, index);
- index = gtNewLclvNode(indexTmpNum, index->TypeGet());
- index2 = gtNewLclvNode(indexTmpNum, index->TypeGet());
+ index = gtNewLclvNode(indexTmpNum, lvaGetDesc(indexTmpNum)->TypeGet());
+ index2 = gtNewLclvNode(indexTmpNum, lvaGetDesc(indexTmpNum)->TypeGet());
}
else
{
@@ -4807,7 +4807,7 @@ GenTree* Compiler::fgMorphExpandStackArgForVarArgs(GenTreeLclVarCommon* lclNode)
}
GenTree* argNode;
- if (varTypeIsStruct(lclNode))
+ if (lclNode->TypeIs(TYP_STRUCT))
{
argNode = gtNewObjNode(lclNode->GetLayout(this), argAddr);
}
@@ -4887,7 +4887,7 @@ GenTree* Compiler::fgMorphExpandImplicitByRefArg(GenTreeLclVarCommon* lclNode)
unsigned offset = lclNode->GetLclOffs() + fieldOffset;
var_types argNodeType = lclNode->TypeGet();
ClassLayout* argNodeLayout = nullptr;
- if (varTypeIsStruct(argNodeType))
+ if (argNodeType == TYP_STRUCT)
{
argNodeLayout = lclNode->GetLayout(this);
}
@@ -4909,7 +4909,7 @@ GenTree* Compiler::fgMorphExpandImplicitByRefArg(GenTreeLclVarCommon* lclNode)
GenTree* newArgNode;
if (!isAddress)
{
- if (varTypeIsStruct(argNodeType))
+ if (argNodeType == TYP_STRUCT)
{
newArgNode = gtNewObjNode(argNodeLayout, addrNode);
}
@@ -8505,7 +8505,7 @@ GenTree* Compiler::fgExpandVirtualVtableCallTarget(GenTreeCall* call)
// [tmp + vtabOffsOfIndirection]
GenTree* tmpTree1 = gtNewOperNode(GT_ADD, TYP_I_IMPL, gtNewLclvNode(varNum1, TYP_I_IMPL),
gtNewIconNode(vtabOffsOfIndirection, TYP_I_IMPL));
- tmpTree1 = gtNewOperNode(GT_IND, TYP_I_IMPL, tmpTree1, false);
+ tmpTree1 = gtNewOperNode(GT_IND, TYP_I_IMPL, tmpTree1);
tmpTree1->gtFlags |= GTF_IND_NONFAULTING;
tmpTree1->gtFlags |= GTF_IND_INVARIANT;
@@ -8519,7 +8519,7 @@ GenTree* Compiler::fgExpandVirtualVtableCallTarget(GenTreeCall* call)
GenTree* asgVar2 = gtNewTempAssign(varNum2, tmpTree2); // var2 = <expression>
// This last indirection is not invariant, but is non-faulting
- result = gtNewOperNode(GT_IND, TYP_I_IMPL, gtNewLclvNode(varNum2, TYP_I_IMPL), false); // [var2]
+ result = gtNewOperNode(GT_IND, TYP_I_IMPL, gtNewLclvNode(varNum2, TYP_I_IMPL)); // [var2]
result->gtFlags |= GTF_IND_NONFAULTING;
result = gtNewOperNode(GT_ADD, TYP_I_IMPL, result, gtNewLclvNode(varNum2, TYP_I_IMPL)); // [var2] + var2
@@ -8532,7 +8532,7 @@ GenTree* Compiler::fgExpandVirtualVtableCallTarget(GenTreeCall* call)
{
// result = [vtab + vtabOffsOfIndirection]
result = gtNewOperNode(GT_ADD, TYP_I_IMPL, vtab, gtNewIconNode(vtabOffsOfIndirection, TYP_I_IMPL));
- result = gtNewOperNode(GT_IND, TYP_I_IMPL, result, false);
+ result = gtNewOperNode(GT_IND, TYP_I_IMPL, result);
result->gtFlags |= GTF_IND_NONFAULTING;
result->gtFlags |= GTF_IND_INVARIANT;
}
@@ -8549,7 +8549,7 @@ GenTree* Compiler::fgExpandVirtualVtableCallTarget(GenTreeCall* call)
// result = [result + vtabOffsAfterIndirection]
result = gtNewOperNode(GT_ADD, TYP_I_IMPL, result, gtNewIconNode(vtabOffsAfterIndirection, TYP_I_IMPL));
// This last indirection is not invariant, but is non-faulting
- result = gtNewOperNode(GT_IND, TYP_I_IMPL, result, false);
+ result = gtNewOperNode(GT_IND, TYP_I_IMPL, result);
result->gtFlags |= GTF_IND_NONFAULTING;
}
@@ -9138,7 +9138,7 @@ GenTree* Compiler::fgMorphOneAsgBlockOp(GenTree* tree)
noway_assert(src->IsIntegralConst(0));
noway_assert(destVarDsc != nullptr);
- src = gtNewZeroConNode(asgType, CORINFO_TYPE_FLOAT);
+ src = gtNewZeroConNode(asgType);
}
else
#endif
@@ -11403,97 +11403,49 @@ DONE_MORPHING_CHILDREN:
}
case GT_ADDR:
-
- // Can not remove op1 if it is currently a CSE candidate.
- if (gtIsActiveCSE_Candidate(op1))
+ // Can not remove a GT_ADDR if it is currently a CSE candidate.
+ if (gtIsActiveCSE_Candidate(tree))
{
break;
}
- if (op1->OperGet() == GT_IND)
+ // Perform the transform ADDR(IND(...)) == (...).
+ if (op1->OperIsIndir())
{
- // Can not remove a GT_ADDR if it is currently a CSE candidate.
- if (gtIsActiveCSE_Candidate(tree))
- {
- break;
- }
-
- // Perform the transform ADDR(IND(...)) == (...).
GenTree* addr = op1->AsIndir()->Addr();
- noway_assert(varTypeIsI(addr));
-
- DEBUG_DESTROY_NODE(op1);
- DEBUG_DESTROY_NODE(tree);
-
- return addr;
- }
- else if (op1->OperGet() == GT_OBJ)
- {
- // Can not remove a GT_ADDR if it is currently a CSE candidate.
- if (gtIsActiveCSE_Candidate(tree))
- {
- break;
- }
-
- // Perform the transform ADDR(OBJ(...)) == (...).
- GenTree* addr = op1->AsObj()->Addr();
-
- noway_assert(varTypeIsGC(addr->gtType) || addr->gtType == TYP_I_IMPL);
+ noway_assert(varTypeIsI(genActualType(addr)));
DEBUG_DESTROY_NODE(op1);
DEBUG_DESTROY_NODE(tree);
return addr;
}
- else if ((op1->gtOper == GT_COMMA) && !optValnumCSE_phase)
+ // Perform the transform ADDR(COMMA(x, ..., z)) == COMMA(x, ..., ADDR(z)).
+ else if (op1->OperIs(GT_COMMA) && !optValnumCSE_phase)
{
- // Perform the transform ADDR(COMMA(x, ..., z)) == COMMA(x, ..., ADDR(z)).
- // (Be sure to mark "z" as an l-value...)
-
ArrayStack<GenTree*> commas(getAllocator(CMK_ArrayStack));
for (GenTree* comma = op1; comma != nullptr && comma->gtOper == GT_COMMA; comma = comma->gtGetOp2())
{
commas.Push(comma);
}
- GenTree* commaNode = commas.Top();
- tree = op1;
- commaNode->AsOp()->gtOp2->gtFlags |= GTF_DONT_CSE;
-
- // If the node we're about to put under a GT_ADDR is an indirection, it
- // doesn't need to be materialized, since we only want the addressing mode. Because
- // of this, this GT_IND is not a faulting indirection and we don't have to extract it
- // as a side effect.
- GenTree* commaOp2 = commaNode->AsOp()->gtOp2;
- if (commaOp2->OperIsBlk())
- {
- commaOp2->SetOper(GT_IND);
- }
- if (commaOp2->gtOper == GT_IND)
- {
- commaOp2->gtFlags |= GTF_IND_NONFAULTING;
- commaOp2->gtFlags &= ~GTF_EXCEPT;
- commaOp2->gtFlags |= (commaOp2->AsOp()->gtOp1->gtFlags & GTF_EXCEPT);
- }
-
- op1 = gtNewOperNode(GT_ADDR, TYP_BYREF, commaOp2);
- commaNode->AsOp()->gtOp2 = op1;
- // Originally, I gave all the comma nodes type "byref". But the ADDR(IND(x)) == x transform
- // might give op1 a type different from byref (like, say, native int). So now go back and give
- // all the comma nodes the type of op1.
+ GenTree* commaNode = commas.Top();
+ GenTree* addr = gtNewOperNode(GT_ADDR, TYP_BYREF, commaNode->AsOp()->gtOp2);
+ commaNode->AsOp()->gtOp2 = addr;
+ // Retype the comma nodes to match "addr" and update their side effects.
while (!commas.Empty())
{
GenTree* comma = commas.Pop();
- comma->gtType = op1->gtType;
+ comma->gtType = addr->TypeGet();
#ifdef DEBUG
comma->gtDebugFlags |= GTF_DEBUG_NODE_MORPHED;
#endif
gtUpdateNodeSideEffects(comma);
}
- return tree;
+ return op1;
}
break;
@@ -12389,7 +12341,7 @@ GenTree* Compiler::fgOptimizeHWIntrinsic(GenTreeHWIntrinsic* node)
if (GenTreeVecCon::IsHWIntrinsicCreateConstant(node, simd32Val))
{
- GenTreeVecCon* vecCon = gtNewVconNode(node->TypeGet(), node->GetSimdBaseJitType());
+ GenTreeVecCon* vecCon = gtNewVconNode(node->TypeGet());
for (GenTree* arg : node->Operands())
{
@@ -13626,8 +13578,8 @@ GenTree* Compiler::fgMorphModToSubMulDiv(GenTreeOp* tree)
GenTree* dividend = div->IsReverseOp() ? opB : opA;
GenTree* divisor = div->IsReverseOp() ? opA : opB;
- div->gtOp1 = gtClone(dividend);
- div->gtOp2 = gtClone(divisor);
+ div->gtOp1 = gtCloneExpr(dividend);
+ div->gtOp2 = gtCloneExpr(divisor);
var_types type = div->gtType;
GenTree* const mul = gtNewOperNode(GT_MUL, type, div, divisor);
@@ -17333,7 +17285,7 @@ bool Compiler::fgMorphArrayOpsStmt(MorphMDArrayTempCache* pTempCache, BasicBlock
// Side-effect; create a temp.
// unsigned newIdxLcl = m_compiler->lvaGrabTemp(true DEBUGARG("MD array index copy"));
unsigned newIdxLcl = m_pTempCache->GrabTemp(idx->TypeGet());
- GenTree* newIdx = m_compiler->gtNewLclvNode(newIdxLcl, idx->TypeGet());
+ GenTree* newIdx = m_compiler->gtNewLclvNode(newIdxLcl, genActualType(idx));
idxToUse[i] = newIdx;
idxToCopy[i] = newIdxLcl;
anyIdxWithSideEffects = true;
diff --git a/src/coreclr/jit/morphblock.cpp b/src/coreclr/jit/morphblock.cpp
index 20638c459e4..288f55657cc 100644
--- a/src/coreclr/jit/morphblock.cpp
+++ b/src/coreclr/jit/morphblock.cpp
@@ -56,8 +56,8 @@ protected:
FieldByField,
OneAsgBlock,
StructBlock,
- SkipCallSrc,
- SkipMultiRegIntrinsicSrc,
+ SkipMultiRegSrc,
+ SkipSingleRegCallSrc,
Nop
};
@@ -363,7 +363,7 @@ void MorphInitBlockHelper::MorphStructCases()
if (varTypeIsSIMD(m_asg) && (m_dst == m_dstLclNode) && m_src->IsIntegralConst(0))
{
assert(m_dstVarDsc != nullptr);
- m_src = m_comp->gtNewZeroConNode(m_asg->TypeGet(), CORINFO_TYPE_FLOAT);
+ m_src = m_comp->gtNewZeroConNode(m_asg->TypeGet());
m_result->AsOp()->gtOp2 = m_src;
}
#endif // FEATURE_SIMD
@@ -655,18 +655,15 @@ void MorphInitBlockHelper::TryInitFieldByField()
break;
case TYP_REF:
case TYP_BYREF:
- assert(initPattern == 0);
- src = m_comp->gtNewZeroConNode(fieldType);
- break;
#ifdef FEATURE_SIMD
case TYP_SIMD8:
case TYP_SIMD12:
case TYP_SIMD16:
case TYP_SIMD32:
+#endif // FEATURE_SIMD
assert(initPattern == 0);
- src = m_comp->gtNewZeroConNode(fieldType, CORINFO_TYPE_FLOAT);
+ src = m_comp->gtNewZeroConNode(fieldType);
break;
-#endif // FEATURE_SIMD
default:
unreached();
}
@@ -803,44 +800,25 @@ void MorphCopyBlockHelper::PrepareSrc()
// TrySpecialCases: check special cases that require special transformations.
// The current special cases include assignments with calls in RHS.
//
-// Notes:
-// It could change multiReg flags or change m_dst node.
-//
void MorphCopyBlockHelper::TrySpecialCases()
{
-#ifdef FEATURE_HW_INTRINSICS
- if (m_src->OperIsHWIntrinsic() && HWIntrinsicInfo::IsMultiReg(m_src->AsHWIntrinsic()->GetHWIntrinsicId()))
+ if (m_src->IsMultiRegNode())
{
- assert(m_src->IsMultiRegNode());
- JITDUMP("Not morphing a multireg intrinsic\n");
- m_transformationDecision = BlockTransformation::SkipMultiRegIntrinsicSrc;
- m_result = m_asg;
- }
-#endif // FEATURE_HW_INTRINSICS
+ assert(m_dst->OperIs(GT_LCL_VAR));
-#if FEATURE_MULTIREG_RET
- // If this is a multi-reg return, we will not do any morphing of this node.
- if (m_src->IsMultiRegCall())
- {
- assert(m_dst->OperGet() == GT_LCL_VAR);
- JITDUMP("Not morphing a multireg call return\n");
- m_transformationDecision = BlockTransformation::SkipCallSrc;
+ // This will exclude field locals (if any) from SSA: we do not have a way to
+ // associate multiple SSA definitions (SSA numbers) with one store.
+ m_dstVarDsc->lvIsMultiRegRet = true;
+
+ JITDUMP("Not morphing a multireg node return\n");
+ m_transformationDecision = BlockTransformation::SkipMultiRegSrc;
m_result = m_asg;
}
- else if (m_dst->IsMultiRegLclVar() && !m_src->IsMultiRegNode())
- {
- m_dst->AsLclVar()->ClearMultiReg();
- }
-#endif // FEATURE_MULTIREG_RET
-
- if (m_transformationDecision == BlockTransformation::Undefined)
+ else if (m_src->IsCall() && m_dst->OperIs(GT_LCL_VAR) && m_dstVarDsc->CanBeReplacedWithItsField(m_comp))
{
- if (m_src->IsCall() && m_dst->OperIs(GT_LCL_VAR) && m_dstVarDsc->CanBeReplacedWithItsField(m_comp))
- {
- JITDUMP("Not morphing a single reg call return\n");
- m_transformationDecision = BlockTransformation::SkipCallSrc;
- m_result = m_asg;
- }
+ JITDUMP("Not morphing a single reg call return\n");
+ m_transformationDecision = BlockTransformation::SkipSingleRegCallSrc;
+ m_result = m_asg;
}
}
@@ -1131,12 +1109,6 @@ void MorphCopyBlockHelper::MorphStructCases()
// Mark it as DoNotEnregister.
m_comp->lvaSetVarDoNotEnregister(m_dstLclNum DEBUGARG(DoNotEnregisterReason::BlockOp));
}
- else if (m_dst->IsMultiRegLclVar())
- {
- // Handle this as lvIsMultiRegRet; this signals to SSA that it can't consider these fields
- // SSA candidates (we don't have a way to represent multiple SSANums on MultiRegLclVar nodes).
- m_dstVarDsc->lvIsMultiRegRet = true;
- }
}
if (!m_srcDoFldAsg && (m_srcVarDsc != nullptr) && !m_srcSingleLclVarAsg)
@@ -1432,7 +1404,6 @@ GenTree* MorphCopyBlockHelper::CopyFieldByField()
(m_srcVarDsc->lvType == TYP_STRUCT) ? m_srcVarDsc->lvExactSize : genTypeSize(m_srcVarDsc);
if (destSize == srcSize)
{
- m_srcLclNode->gtFlags |= GTF_VAR_CAST;
m_srcLclNode->ChangeOper(GT_LCL_FLD);
m_srcLclNode->gtType = destType;
m_comp->lvaSetVarDoNotEnregister(m_srcLclNum DEBUGARG(DoNotEnregisterReason::LocalField));
diff --git a/src/coreclr/jit/optcse.cpp b/src/coreclr/jit/optcse.cpp
index 76912c0e174..3d300d898e8 100644
--- a/src/coreclr/jit/optcse.cpp
+++ b/src/coreclr/jit/optcse.cpp
@@ -478,8 +478,9 @@ unsigned Compiler::optValnumCSE_Index(GenTree* tree, Statement* stmt)
assert(vnStore->IsVNConstant(vnLibNorm));
// We don't share small offset constants when they require a reloc
+ // Also, we don't share non-null const gc handles
//
- if (!tree->AsIntConCommon()->ImmedValNeedsReloc(this))
+ if (!tree->AsIntConCommon()->ImmedValNeedsReloc(this) && ((tree->IsIntegralConst(0)) || !varTypeIsGC(tree)))
{
// Here we make constants that have the same upper bits use the same key
//
diff --git a/src/coreclr/jit/optimizer.cpp b/src/coreclr/jit/optimizer.cpp
index daba57fb577..d2f53ebc826 100644
--- a/src/coreclr/jit/optimizer.cpp
+++ b/src/coreclr/jit/optimizer.cpp
@@ -4201,11 +4201,17 @@ PhaseStatus Compiler::optUnrollLoops()
// If there is no iteration (totalIter == 0), we will remove the loop body entirely.
unrollLimitSz = INT_MAX;
}
- else if (!(loopFlags & LPFLG_SIMD_LIMIT))
+ else if (totalIter <= opts.compJitUnrollLoopMaxIterationCount)
{
- // Otherwise unroll only if limit is Vector_.Length
- // (as a heuristic, not for correctness/structural reasons)
- JITDUMP("Failed to unroll loop " FMT_LP ": constant limit isn't Vector<T>.Length (heuristic)\n", lnum);
+ // We can unroll this
+ }
+ else if ((loopFlags & LPFLG_SIMD_LIMIT) != 0)
+ {
+ // We can unroll this
+ }
+ else
+ {
+ JITDUMP("Failed to unroll loop " FMT_LP ": insufficiently simple loop (heuristic)\n", lnum);
continue;
}
@@ -5850,12 +5856,6 @@ bool Compiler::optNarrowTree(GenTree* tree, var_types srct, var_types dstt, Valu
tree->gtType = dstt;
tree->SetVNs(vnpNarrow);
-
- /* Make sure we don't mess up the variable type */
- if ((oper == GT_LCL_VAR) || (oper == GT_LCL_FLD))
- {
- tree->gtFlags |= GTF_VAR_CAST;
- }
}
return true;
@@ -8860,9 +8860,10 @@ ssize_t Compiler::optGetArrayRefScaleAndIndex(GenTree* mul, GenTree** pIndex DEB
//
struct OptTestInfo
{
- GenTree* testTree; // The root node of basic block with GT_JTRUE or GT_RETURN type to check boolean condition on
- GenTree* compTree; // The compare node (i.e. GT_EQ or GT_NE node) of the testTree
- bool isBool; // If the compTree is boolean expression
+ Statement* testStmt; // Last statement of the basic block
+ GenTree* testTree; // The root node of the testStmt (GT_JTRUE or GT_RETURN).
+ GenTree* compTree; // The compare node (i.e. GT_EQ or GT_NE node) of the testTree
+ bool isBool; // If the compTree is boolean expression
};
//-----------------------------------------------------------------------------
@@ -9202,7 +9203,9 @@ Statement* OptBoolsDsc::optOptimizeBoolsChkBlkCond()
m_t3 = testTree3;
}
+ m_testInfo1.testStmt = s1;
m_testInfo1.testTree = testTree1;
+ m_testInfo2.testStmt = s2;
m_testInfo2.testTree = testTree2;
return s1;
@@ -9244,16 +9247,14 @@ bool OptBoolsDsc::optOptimizeBoolsChkTypeCostCond()
return false;
#endif
// The second condition must not contain side effects
-
+ //
if (m_c2->gtFlags & GTF_GLOB_EFFECT)
{
return false;
}
// The second condition must not be too expensive
-
- m_comp->gtPrepareCost(m_c2);
-
+ //
if (m_c2->GetCostEx() > 12)
{
return false;
@@ -9325,6 +9326,14 @@ void OptBoolsDsc::optOptimizeBoolsUpdateTrees()
cmpOp1->gtRequestSetFlags();
#endif
+ // Recost/rethread the tree if necessary
+ //
+ if (m_comp->fgStmtListThreaded)
+ {
+ m_comp->gtSetStmtInfo(m_testInfo1.testStmt);
+ m_comp->fgSetStmtSeq(m_testInfo1.testStmt);
+ }
+
if (!optReturnBlock)
{
// Update edges if m_b1: BBJ_COND and m_b2: BBJ_COND
@@ -9416,6 +9425,9 @@ void OptBoolsDsc::optOptimizeBoolsUpdateTrees()
{
m_comp->fgUpdateLoopsAfterCompacting(m_b1, m_b3);
}
+
+ // Update IL range of first block
+ m_b1->bbCodeOffsEnd = optReturnBlock ? m_b3->bbCodeOffsEnd : m_b2->bbCodeOffsEnd;
}
//-----------------------------------------------------------------------------
@@ -9584,11 +9596,13 @@ void OptBoolsDsc::optOptimizeBoolsGcStress()
}
assert(m_b1->bbJumpKind == BBJ_COND);
- GenTree* cond = m_b1->lastStmt()->GetRootNode();
+ Statement* const stmt = m_b1->lastStmt();
+ GenTree* const cond = stmt->GetRootNode();
assert(cond->gtOper == GT_JTRUE);
OptTestInfo test;
+ test.testStmt = stmt;
test.testTree = cond;
GenTree* comparand = optIsBoolComp(&test);
@@ -9615,6 +9629,14 @@ void OptBoolsDsc::optOptimizeBoolsGcStress()
// morphing it into a TYP_I_IMPL.
noway_assert(relop->AsOp()->gtOp2->gtOper == GT_CNS_INT);
relop->AsOp()->gtOp2->gtType = TYP_I_IMPL;
+
+ // Recost/rethread the tree if necessary
+ //
+ if (m_comp->fgStmtListThreaded)
+ {
+ m_comp->gtSetStmtInfo(test.testStmt);
+ m_comp->fgSetStmtSeq(test.testStmt);
+ }
}
#endif
diff --git a/src/coreclr/jit/rationalize.cpp b/src/coreclr/jit/rationalize.cpp
index 981df75d0a0..7e2b2376391 100644
--- a/src/coreclr/jit/rationalize.cpp
+++ b/src/coreclr/jit/rationalize.cpp
@@ -432,7 +432,7 @@ void Rationalizer::RewriteAssignment(LIR::Use& use)
if (initVal->IsIntegralConst(0))
{
- GenTree* zeroCon = comp->gtNewZeroConNode(simdType, simdBaseJitType);
+ GenTree* zeroCon = comp->gtNewZeroConNode(simdType);
assignment->gtOp2 = zeroCon;
value = zeroCon;
diff --git a/src/coreclr/jit/redundantbranchopts.cpp b/src/coreclr/jit/redundantbranchopts.cpp
index ad7f1255a39..1eec7530b6b 100644
--- a/src/coreclr/jit/redundantbranchopts.cpp
+++ b/src/coreclr/jit/redundantbranchopts.cpp
@@ -46,44 +46,58 @@ PhaseStatus Compiler::optRedundantBranches()
//
if (block->bbJumpKind == BBJ_COND)
{
- madeChanges |= m_compiler->optRedundantRelop(block);
+ bool madeChangesThisBlock = m_compiler->optRedundantRelop(block);
- BasicBlock* bbNext = block->bbNext;
- BasicBlock* bbJump = block->bbJumpDest;
+ BasicBlock* const bbNext = block->bbNext;
+ BasicBlock* const bbJump = block->bbJumpDest;
- madeChanges |= m_compiler->optRedundantBranch(block);
+ madeChangesThisBlock |= m_compiler->optRedundantBranch(block);
- // It's possible that either bbNext or bbJump were unlinked and it's proven
- // to be profitable to pay special attention to their successors.
- if (madeChanges && (bbNext->countOfInEdges() == 0))
+ // If we modified some flow out of block but it's still
+ // a BBJ_COND, retry; perhaps one of the later optimizations
+ // we can do has enabled one of the earlier optimizations.
+ //
+ if (madeChangesThisBlock && (block->bbJumpKind == BBJ_COND))
+ {
+ JITDUMP("Will retry RBO in " FMT_BB " after partial optimization\n", block->bbNum);
+ madeChangesThisBlock |= m_compiler->optRedundantBranch(block);
+ }
+
+ // It's possible that the changed flow into bbNext or bbJump may unblock
+ // further optimizations there.
+ //
+ // Note this misses cascading retries, consider reworking the overall
+ // strategy here to iterate until closure.
+ //
+ if (madeChangesThisBlock && (bbNext->countOfInEdges() == 0))
{
for (BasicBlock* succ : bbNext->Succs())
{
+ JITDUMP("Will retry RBO in " FMT_BB "; pred " FMT_BB " now unreachable\n", succ->bbNum,
+ bbNext->bbNum);
m_compiler->optRedundantBranch(succ);
}
}
- if (madeChanges && (bbJump->countOfInEdges() == 0))
+ if (madeChangesThisBlock && (bbJump->countOfInEdges() == 0))
{
for (BasicBlock* succ : bbJump->Succs())
{
+ JITDUMP("Will retry RBO in " FMT_BB "; pred " FMT_BB " now unreachable\n", succ->bbNum,
+ bbNext->bbNum);
m_compiler->optRedundantBranch(succ);
}
}
+
+ madeChanges |= madeChangesThisBlock;
}
}
};
+ optReachableBitVecTraits = nullptr;
OptRedundantBranchesDomTreeVisitor visitor(this);
visitor.WalkTree();
- // Reset visited flags, in case we set any.
- //
- for (BasicBlock* const block : Blocks())
- {
- block->bbFlags &= ~BBF_VISITED;
- }
-
#if DEBUG
if (verbose && visitor.madeChanges)
{
@@ -143,7 +157,8 @@ struct RelopImplicationRule
//
// clang-format off
//
-#define V(x) (VNFunc)GT_##x
+#define V(x) (VNFunc)GT_ ## x
+#define U(x) VNF_ ## x ## _UN
static const RelopImplicationRule s_implicationRules[] =
{
@@ -151,13 +166,17 @@ static const RelopImplicationRule s_implicationRules[] =
{V(EQ), true, false, V(GE), false},
{V(EQ), true, false, V(LE), false},
{V(EQ), true, false, V(GT), true},
+ {V(EQ), true, false, U(GT), true},
{V(EQ), true, false, V(LT), true},
+ {V(EQ), true, false, U(LT), true},
// NE
{V(NE), false, true, V(GE), true},
{V(NE), false, true, V(LE), true},
{V(NE), false, true, V(GT), false},
+ {V(NE), false, true, U(GT), false},
{V(NE), false, true, V(LT), false},
+ {V(NE), false, true, U(LT), false},
// LE
{V(LE), false, true, V(EQ), false},
@@ -165,23 +184,47 @@ static const RelopImplicationRule s_implicationRules[] =
{V(LE), false, true, V(GE), true},
{V(LE), false, true, V(LT), false},
+ // LE_UN
+ {U(LE), false, true, V(EQ), false},
+ {U(LE), false, true, V(NE), true},
+ {U(LE), false, true, U(GE), true},
+ {U(LE), false, true, U(LT), false},
+
// GT
{V(GT), true, false, V(EQ), true},
{V(GT), true, false, V(NE), false},
{V(GT), true, false, V(GE), false},
{V(GT), true, false, V(LT), true},
+ // GT_UN
+ {U(GT), true, false, V(EQ), true},
+ {U(GT), true, false, V(NE), false},
+ {U(GT), true, false, U(GE), false},
+ {U(GT), true, false, U(LT), true},
+
// GE
{V(GE), false, true, V(EQ), false},
{V(GE), false, true, V(NE), true},
{V(GE), false, true, V(LE), true},
{V(GE), false, true, V(GT), false},
+ // GE_UN
+ {U(GE), false, true, V(EQ), false},
+ {U(GE), false, true, V(NE), true},
+ {U(GE), false, true, U(LE), true},
+ {U(GE), false, true, U(GT), false},
+
// LT
{V(LT), true, false, V(EQ), true},
{V(LT), true, false, V(NE), false},
{V(LT), true, false, V(LE), false},
{V(LT), true, false, V(GT), true},
+
+ // LT_UN
+ {U(LT), true, false, V(EQ), true},
+ {U(LT), true, false, V(NE), false},
+ {U(LT), true, false, U(LE), false},
+ {U(LT), true, false, U(GT), true},
};
// clang-format on
@@ -237,17 +280,15 @@ void Compiler::optRelopImpliesRelop(RelopImplicationInfo* rii)
// VNs are not directly related. See if dominating
// compare encompasses a related VN.
//
- VNFuncApp funcApp;
- if (!vnStore->GetVNFunc(rii->domCmpNormVN, &funcApp))
+ VNFuncApp domApp;
+ if (!vnStore->GetVNFunc(rii->domCmpNormVN, &domApp))
{
return;
}
- genTreeOps const oper = genTreeOps(funcApp.m_func);
-
// Exclude floating point relops.
//
- if (varTypeIsFloating(vnStore->TypeOfVN(funcApp.m_args[0])))
+ if (varTypeIsFloating(vnStore->TypeOfVN(domApp.m_args[0])))
{
return;
}
@@ -261,30 +302,29 @@ void Compiler::optRelopImpliesRelop(RelopImplicationInfo* rii)
const bool inRange = true;
#endif
- // Dominating compare has the form R(x,y)
- // See if tree compare has the form R*(x,y) or R*(y,x) where we can infer R* from R
- //
- // Could also extend to the unsigned VN relops.
+ // If the dominating compare has the form R(x,y), see if tree compare has the
+ // form R*(x,y) or R*(y,x) where we can infer R* from R.
//
- VNFuncApp treeApp;
- if (inRange && GenTree::OperIsCompare(oper) && vnStore->GetVNFunc(rii->treeNormVN, &treeApp))
+ VNFunc const domFunc = domApp.m_func;
+ VNFuncApp treeApp;
+ if (inRange && ValueNumStore::VNFuncIsComparison(domFunc) && vnStore->GetVNFunc(rii->treeNormVN, &treeApp))
{
- genTreeOps const treeOper = genTreeOps(treeApp.m_func);
- genTreeOps domOper = oper;
-
- if (((treeApp.m_args[0] == funcApp.m_args[0]) && (treeApp.m_args[1] == funcApp.m_args[1])) ||
- ((treeApp.m_args[0] == funcApp.m_args[1]) && (treeApp.m_args[1] == funcApp.m_args[0])))
+ if (((treeApp.m_args[0] == domApp.m_args[0]) && (treeApp.m_args[1] == domApp.m_args[1])) ||
+ ((treeApp.m_args[0] == domApp.m_args[1]) && (treeApp.m_args[1] == domApp.m_args[0])))
{
- const bool swapped = (treeApp.m_args[0] == funcApp.m_args[1]);
+ const bool swapped = (treeApp.m_args[0] == domApp.m_args[1]);
+
+ VNFunc const treeFunc = treeApp.m_func;
+ VNFunc domFunc1 = domFunc;
if (swapped)
{
- domOper = GenTree::SwapRelop(domOper);
+ domFunc1 = ValueNumStore::SwapRelop(domFunc);
}
for (const RelopImplicationRule& rule : s_implicationRules)
{
- if ((rule.domRelop == (VNFunc)domOper) && (rule.treeRelop == (VNFunc)treeOper))
+ if ((rule.domRelop == domFunc1) && (rule.treeRelop == treeFunc))
{
rii->canInfer = true;
rii->vnRelation = ValueNumStore::VN_RELATION_KIND::VRK_Inferred;
@@ -292,8 +332,8 @@ void Compiler::optRelopImpliesRelop(RelopImplicationInfo* rii)
rii->canInferFromFalse = rule.canInferFromFalse;
rii->reverseSense = rule.reverse;
- JITDUMP("Can infer %s from [%s] %s\n", GenTree::OpName(treeOper),
- rii->canInferFromTrue ? "true" : "false", GenTree::OpName(oper));
+ JITDUMP("Can infer %s from [%s] dominating %s\n", ValueNumStore::VNFuncName(treeFunc),
+ rii->canInferFromTrue ? "true" : "false", ValueNumStore::VNFuncName(domFunc));
return;
}
}
@@ -305,17 +345,18 @@ void Compiler::optRelopImpliesRelop(RelopImplicationInfo* rii)
//
// Look for {EQ,NE}({AND,OR,NOT}, 0)
//
+ genTreeOps const oper = genTreeOps(domFunc);
if (!GenTree::StaticOperIs(oper, GT_EQ, GT_NE))
{
return;
}
- if (funcApp.m_args[1] != vnStore->VNZeroForType(TYP_INT))
+ if (domApp.m_args[1] != vnStore->VNZeroForType(TYP_INT))
{
return;
}
- const ValueNum predVN = funcApp.m_args[0];
+ const ValueNum predVN = domApp.m_args[0];
VNFuncApp predFuncApp;
if (!vnStore->GetVNFunc(predVN, &predFuncApp))
{
@@ -384,6 +425,8 @@ void Compiler::optRelopImpliesRelop(RelopImplicationInfo* rii)
//
bool Compiler::optRedundantBranch(BasicBlock* const block)
{
+ JITDUMP("\n--- Trying RBO in " FMT_BB " ---\n", block->bbNum);
+
Statement* const stmt = block->lastStmt();
if (stmt == nullptr)
@@ -494,7 +537,7 @@ bool Compiler::optRedundantBranch(BasicBlock* const block)
if (++matchCount > matchLimit)
{
JITDUMP("Bailing out; %d matches found w/o optimizing\n", matchCount);
- return false;
+ break;
}
// Was this an inference from an unrelated relop (GE => GT, say)?
@@ -546,7 +589,7 @@ bool Compiler::optRedundantBranch(BasicBlock* const block)
// However we may be able to update the flow from block's predecessors so they
// bypass block and instead transfer control to jump's successors (aka jump threading).
//
- const bool wasThreaded = optJumpThread(block, domBlock, domIsSameRelop);
+ const bool wasThreaded = optJumpThreadDom(block, domBlock, domIsSameRelop);
if (wasThreaded)
{
@@ -611,7 +654,10 @@ bool Compiler::optRedundantBranch(BasicBlock* const block)
//
if (relopValue == -1)
{
- return false;
+ // We were unable to determine the relop value via dominance checks.
+ // See if we can jump thread via phi disambiguation.
+ //
+ return optJumpThreadPhi(block, tree, treeNormVN);
}
// Be conservative if there is an exception effect and we're in an EH region
@@ -655,93 +701,72 @@ bool Compiler::optRedundantBranch(BasicBlock* const block)
}
//------------------------------------------------------------------------
-// optJumpThread: try and bypass the current block by rerouting
-// flow from predecessors directly to successors.
-//
-// Arguments:
-// block - block with branch to optimize
-// domBlock - a dominating block that has an equivalent branch
-// domIsSameRelop - if true, dominating block does the same compare;
-// if false, dominating block does a reverse compare
-//
-// Returns:
-// True if the branch was optimized.
-//
-// Notes:
+// JumpThreadInfo
//
-// Conceptually this just transforms flow as follows:
-//
-// domBlock domBlock
-// / | / |
-// Ts Fs Ts Fs True/False successor
-// .... .... .... ....
-// Tp Fp Tp Fp True/False pred
-// \ / | |
-// \ / | |
-// block ==> | |
-// / \ | |
-// / \ | |
-// Tt Ft Tt Ft True/false target
+// Describes the relationship between a block-ending predicate value and the
+// block's predecessors.
//
-// However we may try to re-purpose block, and so end up producing flow more like this:
+struct JumpThreadInfo
+{
+ JumpThreadInfo(Compiler* comp, BasicBlock* block)
+ : m_block(block)
+ , m_trueTarget(block->bbJumpDest)
+ , m_falseTarget(block->bbNext)
+ , m_fallThroughPred(nullptr)
+ , m_ambiguousVNBlock(nullptr)
+ , m_truePreds(BlockSetOps::MakeEmpty(comp))
+ , m_ambiguousPreds(BlockSetOps::MakeEmpty(comp))
+ , m_numPreds(0)
+ , m_numAmbiguousPreds(0)
+ , m_numTruePreds(0)
+ , m_numFalsePreds(0)
+ , m_ambiguousVN(ValueNumStore::NoVN)
+ {
+ }
+
+ // Block we're trying to optimize
+ BasicBlock* const m_block;
+ // Block successor if predicate is true
+ BasicBlock* const m_trueTarget;
+ // Block successor if predicate is false
+ BasicBlock* const m_falseTarget;
+ // Unique pred that falls through to block, if any
+ BasicBlock* m_fallThroughPred;
+ // Block that brings in the ambiguous VN
+ BasicBlock* m_ambiguousVNBlock;
+ // Pred blocks for which the predicate will be true
+ BlockSet m_truePreds;
+ // Pred blocks that can't be threaded or for which the predicate
+ // value can't be determined
+ BlockSet m_ambiguousPreds;
+ // Total number of predecessors
+ int m_numPreds;
+ // Number of predecessors that can't be threaded or for which the predicate
+ // value can't be determined
+ int m_numAmbiguousPreds;
+ // Number of predecessors for which predicate is true
+ int m_numTruePreds;
+ // Number of predecessors for which predicate is false
+ int m_numFalsePreds;
+ // Refined VN for ambiguous cases
+ ValueNum m_ambiguousVN;
+};
+
+//------------------------------------------------------------------------
+// optJumpThreadCheck: see if block is suitable for jump threading.
//
-// domBlock domBlock
-// / | / |
-// Ts Fs Ts Fs True/False successor
-// .... .... .... ....
-// Tp Fp Tp Fp True/False pred
-// \ / | |
-// \ / | |
-// block ==> | block (repurposed)
-// / \ | |
-// / \ | |
-// Tt Ft Tt Ft True/false target
+// Arguments:
+// block - block in question
+// domBlock - dom block used in inferencing (if any)
//
-bool Compiler::optJumpThread(BasicBlock* const block, BasicBlock* const domBlock, bool domIsSameRelop)
+bool Compiler::optJumpThreadCheck(BasicBlock* const block, BasicBlock* const domBlock)
{
- assert(block->bbJumpKind == BBJ_COND);
- assert(domBlock->bbJumpKind == BBJ_COND);
-
if (fgCurBBEpochSize != (fgBBNumMax + 1))
{
JITDUMP("Looks like we've added a new block (e.g. during optLoopHoist) since last renumber, so no threading\n");
return false;
}
- // If the dominating block is not the immediate dominator
- // we might need to duplicate a lot of code to thread
- // the jumps. See if that's the case.
- //
- const bool isIDom = domBlock == block->bbIDom;
- if (!isIDom)
- {
- // Walk up the dom tree until we hit dom block.
- //
- // If none of the doms in the stretch are BBJ_COND,
- // then we must have already optimized them, and
- // so should not have to duplicate code to thread.
- //
- BasicBlock* idomBlock = block->bbIDom;
- while ((idomBlock != nullptr) && (idomBlock != domBlock))
- {
- if (idomBlock->bbJumpKind == BBJ_COND)
- {
- JITDUMP(" -- " FMT_BB " not closest branching dom, so no threading\n", idomBlock->bbNum);
- return false;
- }
- JITDUMP(" -- bypassing %sdom " FMT_BB " as it was already optimized\n",
- (idomBlock == block->bbIDom) ? "i" : "", idomBlock->bbNum);
- idomBlock = idomBlock->bbIDom;
- }
-
- // If we didn't bail out above, we should have reached domBlock.
- //
- assert(idomBlock == domBlock);
- }
-
- JITDUMP("Both successors of %sdom " FMT_BB " reach " FMT_BB " -- attempting jump threading\n", isIDom ? "i" : "",
- domBlock->bbNum, block->bbNum);
-
// If the block is the first block of try-region, then skip jump threading
if (bbIsTryBeg(block))
{
@@ -757,6 +782,9 @@ bool Compiler::optJumpThread(BasicBlock* const block, BasicBlock* const domBlock
// This only blocks jump threading in a small number of cases.
// Revisit once we can ensure that loop headers are not critical blocks.
//
+ // Likewise we can't properly update the loop table if we thread the entry block.
+ // Not clear how much impact this has.
+ //
for (unsigned loopNum = 0; loopNum < optLoopCount; loopNum++)
{
const LoopDsc& loop = optLoopTable[loopNum];
@@ -771,6 +799,12 @@ bool Compiler::optJumpThread(BasicBlock* const block, BasicBlock* const domBlock
JITDUMP(FMT_BB " is the header for " FMT_LP "; no threading\n", block->bbNum, loopNum);
return false;
}
+
+ if (block == loop.lpEntry)
+ {
+ JITDUMP(FMT_BB " is the entry for " FMT_LP "; no threading\n", block->bbNum, loopNum);
+ return false;
+ }
}
// Since flow is going to bypass block, make sure there
@@ -807,7 +841,7 @@ bool Compiler::optJumpThread(BasicBlock* const block, BasicBlock* const domBlock
// same EH region, as we might not be able to fully
// describe control flow between them.
//
- if (BasicBlock::sameEHRegion(block, domBlock))
+ if ((domBlock != nullptr) && BasicBlock::sameEHRegion(block, domBlock))
{
// We will ignore the side effect on this tree.
//
@@ -821,6 +855,97 @@ bool Compiler::optJumpThread(BasicBlock* const block, BasicBlock* const domBlock
}
}
+ return true;
+}
+
+//------------------------------------------------------------------------
+// optJumpThreadDom: try and bypass the current block by rerouting
+// flow from predecessors directly to successors.
+//
+// Arguments:
+// block - block with branch to optimize
+// domBlock - a dominating block that has an equivalent branch
+// domIsSameRelop - if true, dominating block does the same compare;
+// if false, dominating block does a reverse compare
+//
+// Returns:
+// True if the branch was optimized.
+//
+// Notes:
+//
+// Conceptually this just transforms flow as follows:
+//
+// domBlock domBlock
+// / | / |
+// Ts Fs Ts Fs True/False successor
+// .... .... .... ....
+// Tp Fp Tp Fp True/False pred
+// \ / | |
+// \ / | |
+// block ==> | |
+// / \ | |
+// / \ | |
+// Tt Ft Tt Ft True/false target
+//
+// However we may try to re-purpose block, and so end up producing flow more like this:
+//
+// domBlock domBlock
+// / | / |
+// Ts Fs Ts Fs True/False successor
+// .... .... .... ....
+// Tp Fp Tp Fp True/False pred
+// \ / | |
+// \ / | |
+// block ==> | block (repurposed)
+// / \ | |
+// / \ | |
+// Tt Ft Tt Ft True/false target
+//
+bool Compiler::optJumpThreadDom(BasicBlock* const block, BasicBlock* const domBlock, bool domIsSameRelop)
+{
+ assert(block->bbJumpKind == BBJ_COND);
+ assert(domBlock->bbJumpKind == BBJ_COND);
+
+ // If the dominating block is not the immediate dominator
+ // we might need to duplicate a lot of code to thread
+ // the jumps. See if that's the case.
+ //
+ const bool isIDom = domBlock == block->bbIDom;
+ if (!isIDom)
+ {
+ // Walk up the dom tree until we hit dom block.
+ //
+ // If none of the doms in the stretch are BBJ_COND,
+ // then we must have already optimized them, and
+ // so should not have to duplicate code to thread.
+ //
+ BasicBlock* idomBlock = block->bbIDom;
+ while ((idomBlock != nullptr) && (idomBlock != domBlock))
+ {
+ if (idomBlock->bbJumpKind == BBJ_COND)
+ {
+ JITDUMP(" -- " FMT_BB " not closest branching dom, so no threading\n", idomBlock->bbNum);
+ return false;
+ }
+ JITDUMP(" -- bypassing %sdom " FMT_BB " as it was already optimized\n",
+ (idomBlock == block->bbIDom) ? "i" : "", idomBlock->bbNum);
+ idomBlock = idomBlock->bbIDom;
+ }
+
+ // If we didn't bail out above, we should have reached domBlock.
+ //
+ assert(idomBlock == domBlock);
+ }
+
+ JITDUMP("Both successors of %sdom " FMT_BB " reach " FMT_BB " -- attempting jump threading\n", isIDom ? "i" : "",
+ domBlock->bbNum, block->bbNum);
+
+ const bool check = optJumpThreadCheck(block, domBlock);
+ if (!check)
+ {
+ return false;
+ }
+
// In order to optimize we have to be able to determine which predecessors
// are correlated exclusively with a true value for block's relop, and which
// are correlated exclusively with a false value (aka true preds and false preds).
@@ -879,40 +1004,32 @@ bool Compiler::optJumpThread(BasicBlock* const block, BasicBlock* const domBlock
// latter should prove useful in subsequent work, where we aim to enable jump
// threading in cases where block has side effects.
//
- int numPreds = 0;
- int numAmbiguousPreds = 0;
- int numTruePreds = 0;
- int numFalsePreds = 0;
- BasicBlock* fallThroughPred = nullptr;
- BasicBlock* const trueSuccessor = domIsSameRelop ? domBlock->bbJumpDest : domBlock->bbNext;
- BasicBlock* const falseSuccessor = domIsSameRelop ? domBlock->bbNext : domBlock->bbJumpDest;
- BasicBlock* const trueTarget = block->bbJumpDest;
- BasicBlock* const falseTarget = block->bbNext;
- BlockSet truePreds = BlockSetOps::MakeEmpty(this);
- BlockSet ambiguousPreds = BlockSetOps::MakeEmpty(this);
+ BasicBlock* const domTrueSuccessor = domIsSameRelop ? domBlock->bbJumpDest : domBlock->bbNext;
+ BasicBlock* const domFalseSuccessor = domIsSameRelop ? domBlock->bbNext : domBlock->bbJumpDest;
+ JumpThreadInfo jti(this, block);
for (BasicBlock* const predBlock : block->PredBlocks())
{
- numPreds++;
+ jti.m_numPreds++;
// Treat switch preds as ambiguous for now.
//
if (predBlock->bbJumpKind == BBJ_SWITCH)
{
JITDUMP(FMT_BB " is a switch pred\n", predBlock->bbNum);
- BlockSetOps::AddElemD(this, ambiguousPreds, predBlock->bbNum);
- numAmbiguousPreds++;
+ BlockSetOps::AddElemD(this, jti.m_ambiguousPreds, predBlock->bbNum);
+ jti.m_numAmbiguousPreds++;
continue;
}
- const bool isTruePred =
- ((predBlock == domBlock) && (trueSuccessor == block)) || optReachable(trueSuccessor, predBlock, domBlock);
- const bool isFalsePred =
- ((predBlock == domBlock) && (falseSuccessor == block)) || optReachable(falseSuccessor, predBlock, domBlock);
+ const bool isTruePred = ((predBlock == domBlock) && (domTrueSuccessor == block)) ||
+ optReachable(domTrueSuccessor, predBlock, domBlock);
+ const bool isFalsePred = ((predBlock == domBlock) && (domFalseSuccessor == block)) ||
+ optReachable(domFalseSuccessor, predBlock, domBlock);
if (isTruePred == isFalsePred)
{
- // Either both reach, or neither reaches.
+ // Either both dom successors reach, or neither reaches.
//
// We should rarely see (false,false) given that optReachable is returning
// up to date results, but as we optimize we create unreachable blocks,
@@ -921,38 +1038,38 @@ bool Compiler::optJumpThread(BasicBlock* const block, BasicBlock* const domBlock
// lead to more complications, and it isn't that common. So we tolerate it.
//
JITDUMP(FMT_BB " is an ambiguous pred\n", predBlock->bbNum);
- BlockSetOps::AddElemD(this, ambiguousPreds, predBlock->bbNum);
- numAmbiguousPreds++;
+ BlockSetOps::AddElemD(this, jti.m_ambiguousPreds, predBlock->bbNum);
+ jti.m_numAmbiguousPreds++;
continue;
}
if (isTruePred)
{
- if (!BasicBlock::sameEHRegion(predBlock, trueTarget))
+ if (!BasicBlock::sameEHRegion(predBlock, jti.m_trueTarget))
{
JITDUMP(FMT_BB " is an eh constrained pred\n", predBlock->bbNum);
- numAmbiguousPreds++;
- BlockSetOps::AddElemD(this, ambiguousPreds, predBlock->bbNum);
+ jti.m_numAmbiguousPreds++;
+ BlockSetOps::AddElemD(this, jti.m_ambiguousPreds, predBlock->bbNum);
continue;
}
- numTruePreds++;
- BlockSetOps::AddElemD(this, truePreds, predBlock->bbNum);
+ jti.m_numTruePreds++;
+ BlockSetOps::AddElemD(this, jti.m_truePreds, predBlock->bbNum);
JITDUMP(FMT_BB " is a true pred\n", predBlock->bbNum);
}
else
{
assert(isFalsePred);
- if (!BasicBlock::sameEHRegion(predBlock, falseTarget))
+ if (!BasicBlock::sameEHRegion(predBlock, jti.m_falseTarget))
{
JITDUMP(FMT_BB " is an eh constrained pred\n", predBlock->bbNum);
- BlockSetOps::AddElemD(this, ambiguousPreds, predBlock->bbNum);
- numAmbiguousPreds++;
+ BlockSetOps::AddElemD(this, jti.m_ambiguousPreds, predBlock->bbNum);
+ jti.m_numAmbiguousPreds++;
continue;
}
- numFalsePreds++;
+ jti.m_numFalsePreds++;
JITDUMP(FMT_BB " is a false pred\n", predBlock->bbNum);
}
@@ -961,45 +1078,352 @@ bool Compiler::optJumpThread(BasicBlock* const block, BasicBlock* const domBlock
if (predBlock->bbNext == block)
{
JITDUMP(FMT_BB " is the fall-through pred\n", predBlock->bbNum);
- assert(fallThroughPred == nullptr);
- fallThroughPred = predBlock;
+ assert(jti.m_fallThroughPred == nullptr);
+ jti.m_fallThroughPred = predBlock;
+ }
+ }
+
+ // Do the optimization.
+ //
+ return optJumpThreadCore(jti);
+}
+
+//------------------------------------------------------------------------
+// optJumpThreadPhi: attempt jump threading by disambiguating through phis.
+//
+// Arguments:
+// block - block with relop we're trying to optimize
+// tree - relop we're trying to optimize
+// treeNormVN - liberal normal VN from the relop
+//
+// Returns:
+// True if the branch was optimized.
+//
+bool Compiler::optJumpThreadPhi(BasicBlock* block, GenTree* tree, ValueNum treeNormVN)
+{
+ // First see if block is eligible for threading.
+ //
+ const bool check = optJumpThreadCheck(block, /* domBlock*/ nullptr);
+ if (!check)
+ {
+ return false;
+ }
+
+ // We expect the controlling predicate to be a relop and so be a func app with two args.
+ //
+ // We should have screened out constants already. Might want to check if some other kind
+ // of leaf can meaningfully make it here.
+ //
+ VNFuncApp treeNormVNFuncApp;
+ if (!vnStore->GetVNFunc(treeNormVN, &treeNormVNFuncApp) || !(treeNormVNFuncApp.m_arity == 2))
+ {
+ return false;
+ }
+
+ // Find occurrences of phi def VNs in the relop VN.
+ // We currently just do one level of func destructuring.
+ //
+ unsigned funcArgToPhiLocalMap[] = {BAD_VAR_NUM, BAD_VAR_NUM};
+ GenTree* funcArgToPhiDefNodeMap[] = {nullptr, nullptr};
+ bool foundPhiDef = false;
+
+ for (int i = 0; i < 2; i++)
+ {
+ const ValueNum phiDefVN = treeNormVNFuncApp.m_args[i];
+ VNFuncApp phiDefFuncApp;
+ if (!vnStore->GetVNFunc(phiDefVN, &phiDefFuncApp) || (phiDefFuncApp.m_func != VNF_PhiDef))
+ {
+ // This input is not a phi def. If it's a func app it might depend on
+ // transitively on a phi def; consider a general search utility.
+ //
+ continue;
+ }
+
+ // The PhiDef args tell us which local and which SSA def of that local.
+ //
+ assert(phiDefFuncApp.m_arity == 3);
+ const unsigned lclNum = unsigned(phiDefFuncApp.m_args[0]);
+ const unsigned ssaDefNum = unsigned(phiDefFuncApp.m_args[1]);
+ const ValueNum phiVN = ValueNum(phiDefFuncApp.m_args[2]);
+ JITDUMP("... JT-PHI [interestingVN] in " FMT_BB " relop %s operand VN is PhiDef for V%02u:%u " FMT_VN "\n",
+ block->bbNum, i == 0 ? "first" : "second", lclNum, ssaDefNum, phiVN);
+ if (!foundPhiDef)
+ {
+ DISPTREE(tree);
+ }
+
+ // Find the PHI for lclNum local in the current block.
+ //
+ GenTree* phiNode = nullptr;
+ for (Statement* const stmt : block->Statements())
+ {
+ // If the tree is not an SSA def, break out of the loop: we're done.
+ if (!stmt->IsPhiDefnStmt())
+ {
+ break;
+ }
+
+ GenTree* const phiDefNode = stmt->GetRootNode();
+ assert(phiDefNode->IsPhiDefn());
+ GenTreeLclVarCommon* const phiDefLclNode = phiDefNode->AsOp()->gtOp1->AsLclVarCommon();
+ if (phiDefLclNode->GetLclNum() == lclNum)
+ {
+ if (phiDefLclNode->GetSsaNum() == ssaDefNum)
+ {
+ funcArgToPhiLocalMap[i] = lclNum;
+ funcArgToPhiDefNodeMap[i] = phiDefNode;
+ foundPhiDef = true;
+ JITDUMP("Found local PHI [%06u] for V%02u\n", dspTreeID(phiDefNode), lclNum);
+ }
+ else
+ {
+ // Relop input is phi def from some other block.
+ //
+ break;
+ }
+ }
}
}
+ if (!foundPhiDef)
+ {
+ // No usable PhiDef VNs in the relop's VN.
+ //
+ JITDUMP("No usable PhiDef VNs\n");
+ return false;
+ }
+
+ // At least one relop input depends on a local phi. Walk pred by pred and
+ // see if the relop value is correlated with the pred.
+ //
+ JumpThreadInfo jti(this, block);
+ for (BasicBlock* const predBlock : block->PredBlocks())
+ {
+ jti.m_numPreds++;
+
+ // Find VNs for the relevant phi inputs from this block.
+ //
+ ValueNum newRelopArgs[] = {treeNormVNFuncApp.m_args[0], treeNormVNFuncApp.m_args[1]};
+ bool updatedArg = false;
+
+ for (int i = 0; i < 2; i++)
+ {
+ if (funcArgToPhiLocalMap[i] == BAD_VAR_NUM)
+ {
+ // this relop VN arg not phi dependent
+ continue;
+ }
+
+ GenTree* const phiNode = funcArgToPhiDefNodeMap[i];
+ GenTreePhi* const phi = phiNode->gtGetOp2()->AsPhi();
+ for (GenTreePhi::Use& use : phi->Uses())
+ {
+ GenTreePhiArg* const phiArgNode = use.GetNode()->AsPhiArg();
+ assert(phiArgNode->GetLclNum() == funcArgToPhiLocalMap[i]);
+
+ if (phiArgNode->gtPredBB == predBlock)
+ {
+ ValueNum phiArgVN = phiArgNode->GetVN(VNK_Liberal);
+
+ // We sometimes see cases where phi args do not have VNs.
+ // (I recall seeing this before... track down why)
+ //
+ if (phiArgVN != ValueNumStore::NoVN)
+ {
+ newRelopArgs[i] = phiArgVN;
+ updatedArg = true;
+
+ // paranoia: keep walking uses to make sure no other
+ // comes from this pred
+ break;
+ }
+ }
+ }
+ }
+
+ // We may not find predBlock in the phi args, as we only have one phi
+ // arg per ssa num, not one per pred.
+ //
+ // See SsaBuilder::AddPhiArgsToSuccessors.
+ //
+ if (!updatedArg)
+ {
+ JITDUMP("Could not map phi inputs from pred " FMT_BB "\n", predBlock->bbNum);
+ JITDUMP(FMT_BB " is an ambiguous pred\n", predBlock->bbNum);
+ BlockSetOps::AddElemD(this, jti.m_ambiguousPreds, predBlock->bbNum);
+ jti.m_numAmbiguousPreds++;
+ continue;
+ }
+
+ // We have a refined set of args for the relop VN for this
+ // pred. See if that simplifies the relop.
+ //
+ const ValueNum substVN =
+ vnStore->VNForFunc(tree->TypeGet(), treeNormVNFuncApp.m_func, newRelopArgs[0], newRelopArgs[1]);
+
+ JITDUMP("... substituting (" FMT_VN "," FMT_VN ") for (" FMT_VN "," FMT_VN ") in " FMT_VN " gives " FMT_VN "\n",
+ newRelopArgs[0], newRelopArgs[1], treeNormVNFuncApp.m_args[0], treeNormVNFuncApp.m_args[1], treeNormVN,
+ substVN);
+
+ // If this VN is constant, we're all set!
+ //
+ // Note there are other cases we could possibly handle here, say if the substituted
+ // VN not constant but is related to some dominating relop VN.
+ //
+ if (vnStore->IsVNConstant(substVN))
+ {
+ const bool relopIsTrue = (substVN == vnStore->VNZeroForType(TYP_INT)) ? 0 : 1;
+ JITDUMP("... substituted VN implies relop is %d when coming from pred " FMT_BB "\n", relopIsTrue,
+ predBlock->bbNum);
+
+ if (relopIsTrue)
+ {
+ if (!BasicBlock::sameEHRegion(predBlock, jti.m_trueTarget))
+ {
+ JITDUMP(FMT_BB " is an eh constrained pred\n", predBlock->bbNum);
+ jti.m_numAmbiguousPreds++;
+ BlockSetOps::AddElemD(this, jti.m_ambiguousPreds, predBlock->bbNum);
+ continue;
+ }
+
+ jti.m_numTruePreds++;
+ BlockSetOps::AddElemD(this, jti.m_truePreds, predBlock->bbNum);
+ JITDUMP(FMT_BB " is a true pred\n", predBlock->bbNum);
+ }
+ else
+ {
+ if (!BasicBlock::sameEHRegion(predBlock, jti.m_falseTarget))
+ {
+ JITDUMP(FMT_BB " is an eh constrained pred\n", predBlock->bbNum);
+ BlockSetOps::AddElemD(this, jti.m_ambiguousPreds, predBlock->bbNum);
+ jti.m_numAmbiguousPreds++;
+ continue;
+ }
+
+ jti.m_numFalsePreds++;
+ JITDUMP(FMT_BB " is a false pred\n", predBlock->bbNum);
+ }
+ }
+ else
+ {
+ JITDUMP(FMT_BB " is an ambiguous pred\n", predBlock->bbNum);
+ BlockSetOps::AddElemD(this, jti.m_ambiguousPreds, predBlock->bbNum);
+ jti.m_numAmbiguousPreds++;
+
+ // If this was the first ambiguous pred, remember the substVN
+ // and the block that providced it, case we can use later to
+ // sharpen the predicate's liberal normal VN.
+ //
+ if ((jti.m_numAmbiguousPreds == 1) && (substVN != treeNormVN))
+ {
+ assert(jti.m_ambiguousVN == ValueNumStore::NoVN);
+ assert(jti.m_ambiguousVNBlock == nullptr);
+
+ jti.m_ambiguousVN = substVN;
+ jti.m_ambiguousVNBlock = predBlock;
+ }
+
+ continue;
+ }
+
+ // Note if the true or false pred is the fall through pred.
+ //
+ if (predBlock->bbNext == block)
+ {
+ JITDUMP(FMT_BB " is the fall-through pred\n", predBlock->bbNum);
+ assert(jti.m_fallThroughPred == nullptr);
+ jti.m_fallThroughPred = predBlock;
+ }
+ }
+
+ // Do the optimization.
+ //
+ return optJumpThreadCore(jti);
+}
+
+//------------------------------------------------------------------------
+// optJumpThreadCore: restructure block flow based on jump thread information
+//
+// Arguments:
+// jti - information on how to jump thread this block
+//
+// Returns:
+// True if the branch was optimized.
+//
+bool Compiler::optJumpThreadCore(JumpThreadInfo& jti)
+{
// All preds should have been classified.
//
- assert(numPreds == numTruePreds + numFalsePreds + numAmbiguousPreds);
+ assert(jti.m_numPreds == jti.m_numTruePreds + jti.m_numFalsePreds + jti.m_numAmbiguousPreds);
- if ((numTruePreds == 0) && (numFalsePreds == 0))
+ // There should be at least one pred that can bypass block.
+ //
+ if ((jti.m_numTruePreds == 0) && (jti.m_numFalsePreds == 0))
{
// This is possible, but should be rare.
//
- JITDUMP(FMT_BB " only has ambiguous preds, not optimizing\n", block->bbNum);
+ JITDUMP(FMT_BB " only has ambiguous preds, not jump threading\n", jti.m_block->bbNum);
return false;
}
- if ((numAmbiguousPreds > 0) && (fallThroughPred != nullptr))
+ bool modifiedFlow = false;
+
+ if ((jti.m_numAmbiguousPreds > 0) && (jti.m_fallThroughPred != nullptr))
{
- // Treat the fall through pred as an ambiguous pred.
- JITDUMP(FMT_BB " has both ambiguous preds and a fall through pred\n", block->bbNum);
- JITDUMP("Treating fall through pred " FMT_BB " as an ambiguous pred\n", fallThroughPred->bbNum);
+ // If fall through pred is BBJ_NONE, and we have only (ambiguous, true) or (ambiguous, false) preds,
+ // we can change the fall through to BBJ_ALWAYS.
+ //
+ const bool fallThroughIsTruePred = BlockSetOps::IsMember(this, jti.m_truePreds, jti.m_fallThroughPred->bbNum);
- if (BlockSetOps::IsMember(this, truePreds, fallThroughPred->bbNum))
+ if ((jti.m_fallThroughPred->bbJumpKind == BBJ_NONE) && ((fallThroughIsTruePred && (jti.m_numFalsePreds == 0)) ||
+ (!fallThroughIsTruePred && (jti.m_numTruePreds == 0))))
{
- BlockSetOps::RemoveElemD(this, truePreds, fallThroughPred->bbNum);
- assert(numTruePreds > 0);
- numTruePreds--;
+ JITDUMP(FMT_BB " has ambiguous preds and a (%s) fall through pred and no (%s) preds.\n"
+ "Converting fall through pred " FMT_BB " to BBJ_ALWAYS\n",
+ jti.m_block->bbNum, fallThroughIsTruePred ? "true" : "false",
+ fallThroughIsTruePred ? "false" : "true", jti.m_fallThroughPred->bbNum);
+
+ // Possibly defer this until after early out below.
+ //
+ jti.m_fallThroughPred->bbJumpKind = BBJ_ALWAYS;
+ jti.m_fallThroughPred->bbJumpDest = jti.m_block;
+ modifiedFlow = true;
}
else
{
- assert(numFalsePreds > 0);
- numFalsePreds--;
+ // Treat the fall through pred as an ambiguous pred.
+ JITDUMP(FMT_BB " has both ambiguous preds and a fall through pred\n", jti.m_block->bbNum);
+ JITDUMP("Treating fall through pred " FMT_BB " as an ambiguous pred\n", jti.m_fallThroughPred->bbNum);
+
+ if (fallThroughIsTruePred)
+ {
+ BlockSetOps::RemoveElemD(this, jti.m_truePreds, jti.m_fallThroughPred->bbNum);
+ assert(jti.m_numTruePreds > 0);
+ jti.m_numTruePreds--;
+ }
+ else
+ {
+ assert(jti.m_numFalsePreds > 0);
+ jti.m_numFalsePreds--;
+ }
+
+ assert(!(BlockSetOps::IsMember(this, jti.m_ambiguousPreds, jti.m_fallThroughPred->bbNum)));
+ BlockSetOps::AddElemD(this, jti.m_ambiguousPreds, jti.m_fallThroughPred->bbNum);
+ jti.m_numAmbiguousPreds++;
}
- assert(!(BlockSetOps::IsMember(this, ambiguousPreds, fallThroughPred->bbNum)));
- BlockSetOps::AddElemD(this, ambiguousPreds, fallThroughPred->bbNum);
- numAmbiguousPreds++;
- fallThroughPred = nullptr;
+ jti.m_fallThroughPred = nullptr;
+ }
+
+ // There still should be at least one pred that can bypass block.
+ //
+ if ((jti.m_numTruePreds == 0) && (jti.m_numFalsePreds == 0))
+ {
+ // This is possible, but also should be rare.
+ //
+ JITDUMP(FMT_BB " now only has ambiguous preds, not jump threading\n", jti.m_block->bbNum);
+ assert(!modifiedFlow);
+ return false;
}
// Determine if either set of preds will route via block.
@@ -1007,13 +1431,13 @@ bool Compiler::optJumpThread(BasicBlock* const block, BasicBlock* const domBlock
bool truePredsWillReuseBlock = false;
bool falsePredsWillReuseBlock = false;
- if (fallThroughPred != nullptr)
+ if (jti.m_fallThroughPred != nullptr)
{
- assert(numAmbiguousPreds == 0);
- truePredsWillReuseBlock = BlockSetOps::IsMember(this, truePreds, fallThroughPred->bbNum);
+ assert(jti.m_numAmbiguousPreds == 0);
+ truePredsWillReuseBlock = BlockSetOps::IsMember(this, jti.m_truePreds, jti.m_fallThroughPred->bbNum);
falsePredsWillReuseBlock = !truePredsWillReuseBlock;
}
- else if (numAmbiguousPreds == 0)
+ else if (jti.m_numAmbiguousPreds == 0)
{
truePredsWillReuseBlock = true;
falsePredsWillReuseBlock = !truePredsWillReuseBlock;
@@ -1029,35 +1453,36 @@ bool Compiler::optJumpThread(BasicBlock* const block, BasicBlock* const domBlock
//
if (truePredsWillReuseBlock)
{
- Statement* lastStmt = block->lastStmt();
- fgRemoveStmt(block, lastStmt);
- JITDUMP(" repurposing " FMT_BB " to always jump to " FMT_BB "\n", block->bbNum, trueTarget->bbNum);
- fgRemoveRefPred(block->bbNext, block);
- block->bbJumpKind = BBJ_ALWAYS;
+ Statement* const lastStmt = jti.m_block->lastStmt();
+ fgRemoveStmt(jti.m_block, lastStmt);
+ JITDUMP(" repurposing " FMT_BB " to always jump to " FMT_BB "\n", jti.m_block->bbNum, jti.m_trueTarget->bbNum);
+ fgRemoveRefPred(jti.m_falseTarget, jti.m_block);
+ jti.m_block->bbJumpKind = BBJ_ALWAYS;
}
else if (falsePredsWillReuseBlock)
{
- Statement* lastStmt = block->lastStmt();
- fgRemoveStmt(block, lastStmt);
- JITDUMP(" repurposing " FMT_BB " to always fall through to " FMT_BB "\n", block->bbNum, falseTarget->bbNum);
- fgRemoveRefPred(block->bbJumpDest, block);
- block->bbJumpKind = BBJ_NONE;
+ Statement* const lastStmt = jti.m_block->lastStmt();
+ fgRemoveStmt(jti.m_block, lastStmt);
+ JITDUMP(" repurposing " FMT_BB " to always fall through to " FMT_BB "\n", jti.m_block->bbNum,
+ jti.m_falseTarget->bbNum);
+ fgRemoveRefPred(jti.m_trueTarget, jti.m_block);
+ jti.m_block->bbJumpKind = BBJ_NONE;
}
// Now reroute the flow from the predecessors.
// If this pred is in the set that will reuse block, do nothing.
// Else revise pred to branch directly to the appropriate successor of block.
//
- for (BasicBlock* const predBlock : block->PredBlocks())
+ for (BasicBlock* const predBlock : jti.m_block->PredBlocks())
{
// If this was an ambiguous pred, skip.
//
- if (BlockSetOps::IsMember(this, ambiguousPreds, predBlock->bbNum))
+ if (BlockSetOps::IsMember(this, jti.m_ambiguousPreds, predBlock->bbNum))
{
continue;
}
- const bool isTruePred = BlockSetOps::IsMember(this, truePreds, predBlock->bbNum);
+ const bool isTruePred = BlockSetOps::IsMember(this, jti.m_truePreds, predBlock->bbNum);
// Do we need to alter flow from this pred?
//
@@ -1066,39 +1491,80 @@ bool Compiler::optJumpThread(BasicBlock* const block, BasicBlock* const domBlock
// No, we can leave as is.
//
JITDUMP("%s pred " FMT_BB " will continue to target " FMT_BB "\n", isTruePred ? "true" : "false",
- predBlock->bbNum, block->bbNum);
+ predBlock->bbNum, jti.m_block->bbNum);
continue;
}
// Yes, we need to jump to the appropriate successor.
// Note we should not be altering flow for the fall-through pred.
//
- assert(predBlock != fallThroughPred);
- assert(predBlock->bbNext != block);
+ assert(predBlock != jti.m_fallThroughPred);
if (isTruePred)
{
- assert(!optReachable(falseSuccessor, predBlock, domBlock));
JITDUMP("Jump flow from pred " FMT_BB " -> " FMT_BB
" implies predicate true; we can safely redirect flow to be " FMT_BB " -> " FMT_BB "\n",
- predBlock->bbNum, block->bbNum, predBlock->bbNum, trueTarget->bbNum);
+ predBlock->bbNum, jti.m_block->bbNum, predBlock->bbNum, jti.m_trueTarget->bbNum);
- fgRemoveRefPred(block, predBlock);
- fgReplaceJumpTarget(predBlock, trueTarget, block);
- fgAddRefPred(trueTarget, predBlock);
+ if (predBlock->bbJumpKind == BBJ_SWITCH)
+ {
+ fgReplaceSwitchJumpTarget(predBlock, jti.m_trueTarget, jti.m_block);
+ }
+ else
+ {
+ fgRemoveRefPred(jti.m_block, predBlock);
+ fgReplaceJumpTarget(predBlock, jti.m_trueTarget, jti.m_block);
+ fgAddRefPred(jti.m_trueTarget, predBlock);
+ }
}
else
{
JITDUMP("Jump flow from pred " FMT_BB " -> " FMT_BB
" implies predicate false; we can safely redirect flow to be " FMT_BB " -> " FMT_BB "\n",
- predBlock->bbNum, block->bbNum, predBlock->bbNum, falseTarget->bbNum);
+ predBlock->bbNum, jti.m_block->bbNum, predBlock->bbNum, jti.m_falseTarget->bbNum);
- fgRemoveRefPred(block, predBlock);
- fgReplaceJumpTarget(predBlock, falseTarget, block);
- fgAddRefPred(falseTarget, predBlock);
+ if (predBlock->bbJumpKind == BBJ_SWITCH)
+ {
+ fgReplaceSwitchJumpTarget(predBlock, jti.m_falseTarget, jti.m_block);
+ }
+ else
+ {
+ fgRemoveRefPred(jti.m_block, predBlock);
+ fgReplaceJumpTarget(predBlock, jti.m_falseTarget, jti.m_block);
+ fgAddRefPred(jti.m_falseTarget, predBlock);
+ }
}
}
+ // If block didn't get fully optimized, and now has just one pred, see if
+ // we can sharpen the predicate's VN.
+ //
+ // (Todo, perhaps: revisit all the uses of the old SSA def, update to the
+ // surviving ssa input, and update all the value numbers...)
+ //
+ BasicBlock* const ambBlock = jti.m_ambiguousVNBlock;
+ if ((ambBlock != nullptr) && (jti.m_block->bbJumpKind == BBJ_COND) &&
+ (jti.m_block->GetUniquePred(this) == ambBlock))
+ {
+ JITDUMP(FMT_BB " has just one remaining predcessor " FMT_BB "\n", jti.m_block->bbNum, ambBlock->bbNum);
+
+ Statement* const stmt = jti.m_block->lastStmt();
+ assert(stmt != nullptr);
+ GenTree* const jumpTree = stmt->GetRootNode();
+ assert(jumpTree->OperIs(GT_JTRUE));
+ GenTree* const tree = jumpTree->AsOp()->gtOp1;
+ assert(tree->OperIsCompare());
+
+ ValueNum treeOldVN = tree->GetVN(VNK_Liberal);
+ ValueNum treeNormVN = ValueNumStore::NoVN;
+ ValueNum treeExcVN = ValueNumStore::NoVN;
+ vnStore->VNUnpackExc(treeOldVN, &treeNormVN, &treeExcVN);
+ ValueNum treeNewVN = vnStore->VNWithExc(jti.m_ambiguousVN, treeExcVN);
+ tree->SetVN(VNK_Liberal, treeNewVN);
+
+ JITDUMP("Updating [%06u] liberal VN from " FMT_VN " to " FMT_VN "\n", dspTreeID(tree), treeOldVN, treeNewVN);
+ }
+
// We optimized.
//
fgModified = true;
@@ -1566,9 +2032,15 @@ bool Compiler::optReachable(BasicBlock* const fromBlock, BasicBlock* const toBlo
return true;
}
- for (BasicBlock* const block : Blocks())
+ if (optReachableBitVecTraits == nullptr)
{
- block->bbFlags &= ~BBF_VISITED;
+ optReachableBitVecTraits = new (this, CMK_Reachability) BitVecTraits(fgBBNumMax + 1, this);
+ optReachableBitVec = BitVecOps::MakeEmpty(optReachableBitVecTraits);
+ }
+ else
+ {
+ assert(BitVecTraits::GetSize(optReachableBitVecTraits) == fgBBNumMax + 1);
+ BitVecOps::ClearD(optReachableBitVecTraits, optReachableBitVec);
}
ArrayStack<BasicBlock*> stack(getAllocator(CMK_Reachability));
@@ -1577,7 +2049,6 @@ bool Compiler::optReachable(BasicBlock* const fromBlock, BasicBlock* const toBlo
while (!stack.Empty())
{
BasicBlock* const nextBlock = stack.Pop();
- nextBlock->bbFlags |= BBF_VISITED;
assert(nextBlock != toBlock);
if (nextBlock == excludedBlock)
@@ -1592,11 +2063,13 @@ bool Compiler::optReachable(BasicBlock* const fromBlock, BasicBlock* const toBlo
return true;
}
- if ((succ->bbFlags & BBF_VISITED) != 0)
+ if (BitVecOps::IsMember(optReachableBitVecTraits, optReachableBitVec, succ->bbNum))
{
continue;
}
+ BitVecOps::AddElemD(optReachableBitVecTraits, optReachableBitVec, succ->bbNum);
+
stack.Push(succ);
}
}
diff --git a/src/coreclr/jit/regset.cpp b/src/coreclr/jit/regset.cpp
index d28a90ec36f..3020198acad 100644
--- a/src/coreclr/jit/regset.cpp
+++ b/src/coreclr/jit/regset.cpp
@@ -292,36 +292,19 @@ void RegSet::rsSpillTree(regNumber reg, GenTree* tree, unsigned regIdx /* =0 */)
{
assert(tree != nullptr);
- GenTreeCall* call = nullptr;
- GenTreeLclVar* lcl = nullptr;
- var_types treeType;
-#if defined(TARGET_ARM)
- GenTreePutArgSplit* splitArg = nullptr;
- GenTreeMultiRegOp* multiReg = nullptr;
-#endif
+ var_types treeType = TYP_UNDEF;
+ bool isMultiRegTree = false;
- if (tree->IsMultiRegCall())
- {
- call = tree->AsCall();
- const ReturnTypeDesc* retTypeDesc = call->GetReturnTypeDesc();
- treeType = retTypeDesc->GetReturnRegType(regIdx);
- }
-#ifdef TARGET_ARM
- else if (tree->OperIsPutArgSplit())
- {
- splitArg = tree->AsPutArgSplit();
- treeType = splitArg->GetRegType(regIdx);
- }
- else if (tree->OperIsMultiRegOp())
- {
- multiReg = tree->AsMultiRegOp();
- treeType = multiReg->GetRegType(regIdx);
- }
-#endif // TARGET_ARM
- else if (tree->IsMultiRegLclVar())
+ if (tree->IsMultiRegLclVar())
{
LclVarDsc* varDsc = m_rsCompiler->lvaGetDesc(tree->AsLclVar());
treeType = varDsc->TypeGet();
+ isMultiRegTree = true;
+ }
+ else if (tree->IsMultiRegNode())
+ {
+ treeType = tree->GetRegTypeByIndex(regIdx);
+ isMultiRegTree = true;
}
else
{
@@ -353,29 +336,9 @@ void RegSet::rsSpillTree(regNumber reg, GenTree* tree, unsigned regIdx /* =0 */)
assert((tree->gtFlags & GTF_SPILL) != 0);
GenTreeFlags regFlags = GTF_EMPTY;
- if (call != nullptr)
- {
- regFlags = call->GetRegSpillFlagByIdx(regIdx);
- assert((regFlags & GTF_SPILL) != 0);
- regFlags &= ~GTF_SPILL;
- }
-#ifdef TARGET_ARM
- else if (splitArg != nullptr)
- {
- regFlags = splitArg->GetRegSpillFlagByIdx(regIdx);
- assert((regFlags & GTF_SPILL) != 0);
- regFlags &= ~GTF_SPILL;
- }
- else if (multiReg != nullptr)
+ if (isMultiRegTree)
{
- regFlags = multiReg->GetRegSpillFlagByIdx(regIdx);
- assert((regFlags & GTF_SPILL) != 0);
- regFlags &= ~GTF_SPILL;
- }
-#endif // TARGET_ARM
- else if (lcl != nullptr)
- {
- regFlags = lcl->GetRegSpillFlagByIdx(regIdx);
+ regFlags = tree->GetRegSpillFlagByIdx(regIdx);
assert((regFlags & GTF_SPILL) != 0);
regFlags &= ~GTF_SPILL;
}
@@ -385,13 +348,7 @@ void RegSet::rsSpillTree(regNumber reg, GenTree* tree, unsigned regIdx /* =0 */)
tree->gtFlags &= ~GTF_SPILL;
}
-#if defined(TARGET_ARM)
- assert(tree->GetRegNum() == reg || (call != nullptr && call->GetRegNumByIdx(regIdx) == reg) ||
- (splitArg != nullptr && splitArg->GetRegNumByIdx(regIdx) == reg) ||
- (multiReg != nullptr && multiReg->GetRegNumByIdx(regIdx) == reg));
-#else
- assert(tree->GetRegNum() == reg || (call != nullptr && call->GetRegNumByIdx(regIdx) == reg));
-#endif // !TARGET_ARM
+ assert(tree->GetRegByIndex(regIdx) == reg);
// Are any registers free for spillage?
SpillDsc* spill = SpillDsc::alloc(m_rsCompiler, this, tempType);
@@ -407,8 +364,12 @@ void RegSet::rsSpillTree(regNumber reg, GenTree* tree, unsigned regIdx /* =0 */)
#ifdef DEBUG
if (m_rsCompiler->verbose)
{
- printf("\t\t\t\t\t\t\tThe register %s spilled with ", m_rsCompiler->compRegVarName(reg));
+ printf("\t\t\t\t\t\t\tThe register %s spilled with ", m_rsCompiler->compRegVarName(reg));
Compiler::printTreeID(spill->spillTree);
+ if (isMultiRegTree)
+ {
+ printf("[%u]", regIdx);
+ }
}
#endif
@@ -435,29 +396,11 @@ void RegSet::rsSpillTree(regNumber reg, GenTree* tree, unsigned regIdx /* =0 */)
// Mark the tree node as having been spilled
rsMarkSpill(tree, reg);
- // In case of multi-reg call node also mark the specific
- // result reg as spilled.
- if (call != nullptr)
- {
- regFlags |= GTF_SPILLED;
- call->SetRegSpillFlagByIdx(regFlags, regIdx);
- }
-#ifdef TARGET_ARM
- else if (splitArg != nullptr)
- {
- regFlags |= GTF_SPILLED;
- splitArg->SetRegSpillFlagByIdx(regFlags, regIdx);
- }
- else if (multiReg != nullptr)
- {
- regFlags |= GTF_SPILLED;
- multiReg->SetRegSpillFlagByIdx(regFlags, regIdx);
- }
-#endif // TARGET_ARM
- else if (lcl != nullptr)
+ // In case of multi-reg call node also mark the specific result reg as spilled.
+ if (isMultiRegTree)
{
regFlags |= GTF_SPILLED;
- lcl->SetRegSpillFlagByIdx(regFlags, regIdx);
+ tree->SetRegSpillFlagByIdx(regFlags, regIdx);
}
}
@@ -534,15 +477,13 @@ TempDsc* RegSet::rsGetSpillTempWord(regNumber reg, SpillDsc* dsc, SpillDsc* prev
// oldReg - reg of tree that was spilled.
//
// Return Value:
-// None.
+// TempDsc the caller is expected to release.
//
// Assumptions:
-// 1. It is the responsibility of the caller to free the spill temp.
-// 2. RyuJIT backend specific: In case of multi-reg call node
-// GTF_SPILLED flag associated with reg is cleared. It is the
-// responsibility of caller to clear GTF_SPILLED flag on call node
-// itself after ensuring there are no outstanding regs in GTF_SPILLED
-// state.
+// In case of multi-reg node GTF_SPILLED flag associated with reg is
+// cleared. It is the responsibility of caller to clear GTF_SPILLED
+// flag on call node itself after ensuring there are no outstanding
+// regs in GTF_SPILLED state.
//
TempDsc* RegSet::rsUnspillInPlace(GenTree* tree, regNumber oldReg, unsigned regIdx /* =0 */)
{
@@ -554,36 +495,12 @@ TempDsc* RegSet::rsUnspillInPlace(GenTree* tree, regNumber oldReg, unsigned regI
// Get the temp
TempDsc* temp = rsGetSpillTempWord(oldReg, spillDsc, prevDsc);
- // The value is now unspilled
- if (tree->IsMultiRegCall())
+ // The value is now unspilled.
+ if (tree->IsMultiRegNode())
{
- GenTreeCall* call = tree->AsCall();
- GenTreeFlags flags = call->GetRegSpillFlagByIdx(regIdx);
+ GenTreeFlags flags = tree->GetRegSpillFlagByIdx(regIdx);
flags &= ~GTF_SPILLED;
- call->SetRegSpillFlagByIdx(flags, regIdx);
- }
-#if defined(TARGET_ARM)
- else if (tree->OperIsPutArgSplit())
- {
- GenTreePutArgSplit* splitArg = tree->AsPutArgSplit();
- GenTreeFlags flags = splitArg->GetRegSpillFlagByIdx(regIdx);
- flags &= ~GTF_SPILLED;
- splitArg->SetRegSpillFlagByIdx(flags, regIdx);
- }
- else if (tree->OperIsMultiRegOp())
- {
- GenTreeMultiRegOp* multiReg = tree->AsMultiRegOp();
- GenTreeFlags flags = multiReg->GetRegSpillFlagByIdx(regIdx);
- flags &= ~GTF_SPILLED;
- multiReg->SetRegSpillFlagByIdx(flags, regIdx);
- }
-#endif // TARGET_ARM
- else if (tree->IsMultiRegLclVar())
- {
- GenTreeLclVar* lcl = tree->AsLclVar();
- GenTreeFlags flags = lcl->GetRegSpillFlagByIdx(regIdx);
- flags &= ~GTF_SPILLED;
- lcl->SetRegSpillFlagByIdx(flags, regIdx);
+ tree->SetRegSpillFlagByIdx(flags, regIdx);
}
else
{
@@ -593,8 +510,12 @@ TempDsc* RegSet::rsUnspillInPlace(GenTree* tree, regNumber oldReg, unsigned regI
#ifdef DEBUG
if (m_rsCompiler->verbose)
{
- printf("\t\t\t\t\t\t\tTree-Node marked unspilled from ");
+ printf("\t\t\t\t\t\t\tTree-Node marked unspilled from ");
Compiler::printTreeID(tree);
+ if (tree->IsMultiRegNode())
+ {
+ printf("[%u]", regIdx);
+ }
printf("\n");
}
#endif
diff --git a/src/coreclr/jit/simd.cpp b/src/coreclr/jit/simd.cpp
index 1682c43461f..7c16993e4e1 100644
--- a/src/coreclr/jit/simd.cpp
+++ b/src/coreclr/jit/simd.cpp
@@ -910,6 +910,30 @@ CorInfoType Compiler::getBaseJitTypeAndSizeOfSIMDType(CORINFO_CLASS_HANDLE typeH
if (simdBaseJitType != CORINFO_TYPE_UNDEF)
{
setUsesSIMDTypes(true);
+
+ CORINFO_CLASS_HANDLE* pCanonicalHnd = nullptr;
+ switch (size)
+ {
+ case 8:
+ pCanonicalHnd = &m_simdHandleCache->CanonicalSimd8Handle;
+ break;
+ case 12:
+ // There is no need for a canonical SIMD12 handle because it is always Vector3.
+ break;
+ case 16:
+ pCanonicalHnd = &m_simdHandleCache->CanonicalSimd16Handle;
+ break;
+ case 32:
+ pCanonicalHnd = &m_simdHandleCache->CanonicalSimd32Handle;
+ break;
+ default:
+ unreached();
+ }
+
+ if ((pCanonicalHnd != nullptr) && (*pCanonicalHnd == NO_CLASS_HANDLE))
+ {
+ *pCanonicalHnd = typeHnd;
+ }
}
return simdBaseJitType;
diff --git a/src/coreclr/jit/simdashwintrinsic.cpp b/src/coreclr/jit/simdashwintrinsic.cpp
index ac19a94ade9..dce3bb604c4 100644
--- a/src/coreclr/jit/simdashwintrinsic.cpp
+++ b/src/coreclr/jit/simdashwintrinsic.cpp
@@ -51,7 +51,8 @@ const SimdAsHWIntrinsicInfo& SimdAsHWIntrinsicInfo::lookup(NamedIntrinsic id)
//
// Return Value:
// The NamedIntrinsic associated with methodName and classId
-NamedIntrinsic SimdAsHWIntrinsicInfo::lookupId(CORINFO_SIG_INFO* sig,
+NamedIntrinsic SimdAsHWIntrinsicInfo::lookupId(Compiler* comp,
+ CORINFO_SIG_INFO* sig,
const char* className,
const char* methodName,
const char* enclosingClassName,
@@ -73,6 +74,11 @@ NamedIntrinsic SimdAsHWIntrinsicInfo::lookupId(CORINFO_SIG_INFO* sig,
isInstanceMethod = true;
}
+ if (strcmp(methodName, "get_IsHardwareAccelerated") == 0)
+ {
+ return comp->IsBaselineSimdIsaSupported() ? NI_IsSupported_True : NI_IsSupported_False;
+ }
+
for (int i = 0; i < (NI_SIMD_AS_HWINTRINSIC_END - NI_SIMD_AS_HWINTRINSIC_START - 1); i++)
{
const SimdAsHWIntrinsicInfo& intrinsicInfo = simdAsHWIntrinsicInfoArray[i];
@@ -553,7 +559,7 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic,
case NI_VectorT128_get_AllBitsSet:
case NI_VectorT256_get_AllBitsSet:
{
- return gtNewAllBitsSetConNode(retType, simdBaseJitType);
+ return gtNewAllBitsSetConNode(retType);
}
case NI_VectorT128_get_Count:
@@ -570,7 +576,7 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic,
case NI_VectorT128_get_One:
case NI_VectorT256_get_One:
{
- GenTreeVecCon* vecCon = gtNewVconNode(retType, simdBaseJitType);
+ GenTreeVecCon* vecCon = gtNewVconNode(retType);
uint32_t simdLength = getSIMDVectorLength(simdSize, simdBaseType);
switch (simdBaseType)
@@ -648,12 +654,12 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic,
case NI_VectorT128_get_Zero:
case NI_VectorT256_get_Zero:
{
- return gtNewZeroConNode(retType, simdBaseJitType);
+ return gtNewZeroConNode(retType);
}
#elif defined(TARGET_ARM64)
case NI_VectorT128_get_AllBitsSet:
{
- return gtNewAllBitsSetConNode(retType, simdBaseJitType);
+ return gtNewAllBitsSetConNode(retType);
}
case NI_VectorT128_get_Count:
@@ -668,7 +674,7 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic,
case NI_Vector4_get_One:
case NI_VectorT128_get_One:
{
- GenTreeVecCon* vecCon = gtNewVconNode(retType, simdBaseJitType);
+ GenTreeVecCon* vecCon = gtNewVconNode(retType);
uint32_t simdLength = getSIMDVectorLength(simdSize, simdBaseType);
switch (simdBaseType)
@@ -745,7 +751,7 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic,
case NI_Vector4_get_Zero:
case NI_VectorT128_get_Zero:
{
- return gtNewZeroConNode(retType, simdBaseJitType);
+ return gtNewZeroConNode(retType);
}
#else
#error Unsupported platform
diff --git a/src/coreclr/jit/simdashwintrinsic.h b/src/coreclr/jit/simdashwintrinsic.h
index ae377ff5740..cea53927c81 100644
--- a/src/coreclr/jit/simdashwintrinsic.h
+++ b/src/coreclr/jit/simdashwintrinsic.h
@@ -68,7 +68,8 @@ struct SimdAsHWIntrinsicInfo
static const SimdAsHWIntrinsicInfo& lookup(NamedIntrinsic id);
- static NamedIntrinsic lookupId(CORINFO_SIG_INFO* sig,
+ static NamedIntrinsic lookupId(Compiler* comp,
+ CORINFO_SIG_INFO* sig,
const char* className,
const char* methodName,
const char* enclosingClassName,
diff --git a/src/coreclr/jit/typeinfo.cpp b/src/coreclr/jit/typeinfo.cpp
deleted file mode 100644
index 6bc69965d09..00000000000
--- a/src/coreclr/jit/typeinfo.cpp
+++ /dev/null
@@ -1,345 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-/*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-XX XX
-XX typeInfo XX
-XX XX
-XX XX
-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-*/
-
-#include "jitpch.h"
-#ifdef _MSC_VER
-#pragma hdrstop
-#endif
-
-#include "_typeinfo.h"
-
-bool Compiler::tiCompatibleWith(const typeInfo& child, const typeInfo& parent, bool normalisedForStack) const
-{
- return typeInfo::tiCompatibleWith(info.compCompHnd, child, parent, normalisedForStack);
-}
-
-bool Compiler::tiMergeCompatibleWith(const typeInfo& child, const typeInfo& parent, bool normalisedForStack) const
-{
- return typeInfo::tiMergeCompatibleWith(info.compCompHnd, child, parent, normalisedForStack);
-}
-
-bool Compiler::tiMergeToCommonParent(typeInfo* pDest, const typeInfo* pSrc, bool* changed) const
-{
- return typeInfo::tiMergeToCommonParent(info.compCompHnd, pDest, pSrc, changed);
-}
-
-static bool tiCompatibleWithByRef(COMP_HANDLE CompHnd, const typeInfo& child, const typeInfo& parent)
-{
- assert(parent.IsByRef());
-
- if (!child.IsByRef())
- {
- return false;
- }
-
- if (child.IsReadonlyByRef() && !parent.IsReadonlyByRef())
- {
- return false;
- }
-
- // Byrefs are compatible if the underlying types are equivalent
- typeInfo childTarget = ::DereferenceByRef(child);
- typeInfo parentTarget = ::DereferenceByRef(parent);
-
- if (typeInfo::AreEquivalent(childTarget, parentTarget))
- {
- return true;
- }
-
- // Make sure that both types have a valid m_cls
- if ((childTarget.IsType(TI_REF) || childTarget.IsType(TI_STRUCT)) &&
- (parentTarget.IsType(TI_REF) || parentTarget.IsType(TI_STRUCT)))
- {
- return CompHnd->areTypesEquivalent(childTarget.GetClassHandle(), parentTarget.GetClassHandle());
- }
-
- return false;
-}
-
-/*****************************************************************************
- * Verify child is compatible with the template parent. Basically, that
- * child is a "subclass" of parent -it can be substituted for parent
- * anywhere. Note that if parent contains fancy flags, such as "uninitialized"
- * , "is this ptr", or "has byref local/field" info, then child must also
- * contain those flags, otherwise FALSE will be returned !
- *
- * Rules for determining compatibility:
- *
- * If parent is a primitive type or value class, then child must be the
- * same primitive type or value class. The exception is that the built in
- * value classes System/Boolean etc. are treated as synonyms for
- * TI_BYTE etc.
- *
- * If parent is a byref of a primitive type or value class, then child
- * must be a byref of the same (rules same as above case).
- *
- * Byrefs are compatible only with byrefs.
- *
- * If parent is an object, child must be a subclass of it, implement it
- * (if it is an interface), or be null.
- *
- * If parent is an array, child must be the same or subclassed array.
- *
- * If parent is a null objref, only null is compatible with it.
- *
- * If the "uninitialized", "by ref local/field", "this pointer" or other flags
- * are different, the items are incompatible.
- *
- * parent CANNOT be an undefined (dead) item.
- *
- */
-
-bool typeInfo::tiCompatibleWith(COMP_HANDLE CompHnd,
- const typeInfo& child,
- const typeInfo& parent,
- bool normalisedForStack)
-{
- assert(child.IsDead() || !normalisedForStack || typeInfo::AreEquivalent(::NormaliseForStack(child), child));
- assert(parent.IsDead() || !normalisedForStack || typeInfo::AreEquivalent(::NormaliseForStack(parent), parent));
-
- if (typeInfo::AreEquivalent(child, parent))
- {
- return true;
- }
-
- if (parent.IsUnboxedGenericTypeVar() || child.IsUnboxedGenericTypeVar())
- {
- return false; // need to have had child == parent
- }
- else if (parent.IsType(TI_REF))
- {
- // An uninitialized objRef is not compatible to initialized.
- if (child.IsUninitialisedObjRef() && !parent.IsUninitialisedObjRef())
- {
- return false;
- }
-
- if (child.IsNullObjRef())
- { // NULL can be any reference type
- return true;
- }
- if (!child.IsType(TI_REF))
- {
- return false;
- }
-
- return CompHnd->canCast(child.m_cls, parent.m_cls);
- }
- else if (parent.IsType(TI_METHOD))
- {
- if (!child.IsType(TI_METHOD))
- {
- return false;
- }
-
- // Right now we don't bother merging method handles
- return false;
- }
- else if (parent.IsType(TI_STRUCT))
- {
- if (!child.IsType(TI_STRUCT))
- {
- return false;
- }
-
- // Structures are compatible if they are equivalent
- return CompHnd->areTypesEquivalent(child.m_cls, parent.m_cls);
- }
- else if (parent.IsByRef())
- {
- return tiCompatibleWithByRef(CompHnd, child, parent);
- }
-#ifdef TARGET_64BIT
- // On 64-bit targets we have precise representation for native int, so these rules
- // represent the fact that the ECMA spec permits the implicit conversion
- // between an int32 and a native int.
- else if (parent.IsType(TI_INT) && typeInfo::AreEquivalent(nativeInt(), child))
- {
- return true;
- }
- else if (typeInfo::AreEquivalent(nativeInt(), parent) && child.IsType(TI_INT))
- {
- return true;
- }
-#endif // TARGET_64BIT
- return false;
-}
-
-bool typeInfo::tiMergeCompatibleWith(COMP_HANDLE CompHnd,
- const typeInfo& child,
- const typeInfo& parent,
- bool normalisedForStack)
-{
- if (!child.IsPermanentHomeByRef() && parent.IsPermanentHomeByRef())
- {
- return false;
- }
-
- return typeInfo::tiCompatibleWith(CompHnd, child, parent, normalisedForStack);
-}
-
-/*****************************************************************************
- * Merge pDest and pSrc to find some commonality (e.g. a common parent).
- * Copy the result to pDest, marking it dead if no commonality can be found.
- *
- * null ^ null -> null
- * Object ^ null -> Object
- * [I4 ^ null -> [I4
- * InputStream ^ OutputStream -> Stream
- * InputStream ^ NULL -> InputStream
- * [I4 ^ Object -> Object
- * [I4 ^ [Object -> Array
- * [I4 ^ [R8 -> Array
- * [Foo ^ I4 -> DEAD
- * [Foo ^ [I1 -> Array
- * [InputStream ^ [OutputStream -> Array
- * DEAD ^ X -> DEAD
- * [Intfc ^ [OutputStream -> Array
- * Intf ^ [OutputStream -> Object
- * [[InStream ^ [[OutStream -> Array
- * [[InStream ^ [OutStream -> Array
- * [[Foo ^ [Object -> Array
- *
- * Importantly:
- * [I1 ^ [U1 -> either [I1 or [U1
- * etc.
- *
- * Also, System/Int32 and I4 merge -> I4, etc.
- *
- * Returns FALSE if the merge was completely incompatible (i.e. the item became
- * dead).
- *
- */
-
-bool typeInfo::tiMergeToCommonParent(COMP_HANDLE CompHnd, typeInfo* pDest, const typeInfo* pSrc, bool* changed)
-{
- assert(pSrc->IsDead() || typeInfo::AreEquivalent(::NormaliseForStack(*pSrc), *pSrc));
- assert(pDest->IsDead() || typeInfo::AreEquivalent(::NormaliseForStack(*pDest), *pDest));
-
- // Merge the auxiliary information like "this" pointer tracking, etc...
-
- // Remember the pre-state, so we can tell if it changed.
- *changed = false;
- DWORD destFlagsBefore = pDest->m_flags;
-
- // This bit is only set if both pDest and pSrc have it set
- pDest->m_flags &= (pSrc->m_flags | ~TI_FLAG_THIS_PTR);
-
- // This bit is set if either pDest or pSrc have it set
- pDest->m_flags |= (pSrc->m_flags & TI_FLAG_UNINIT_OBJREF);
-
- // This bit is set if either pDest or pSrc have it set
- pDest->m_flags |= (pSrc->m_flags & TI_FLAG_BYREF_READONLY);
-
- // If the byref wasn't permanent home in both sides, then merge won't have the bit set
- pDest->m_flags &= (pSrc->m_flags | ~TI_FLAG_BYREF_PERMANENT_HOME);
-
- if (pDest->m_flags != destFlagsBefore)
- {
- *changed = true;
- }
-
- // OK the main event. Merge the main types
- if (typeInfo::AreEquivalent(*pDest, *pSrc))
- {
- return true;
- }
-
- if (pDest->IsUnboxedGenericTypeVar() || pSrc->IsUnboxedGenericTypeVar())
- {
- // Should have had *pDest == *pSrc
- goto FAIL;
- }
- if (pDest->IsType(TI_REF))
- {
- if (pSrc->IsType(TI_NULL))
- { // NULL can be any reference type
- return true;
- }
- if (!pSrc->IsType(TI_REF))
- {
- goto FAIL;
- }
-
- // Ask the EE to find the common parent, This always succeeds since System.Object always works
- CORINFO_CLASS_HANDLE pDestClsBefore = pDest->m_cls;
- pDest->m_cls = CompHnd->mergeClasses(pDest->GetClassHandle(), pSrc->GetClassHandle());
- if (pDestClsBefore != pDest->m_cls)
- {
- *changed = true;
- }
- return true;
- }
- else if (pDest->IsType(TI_NULL))
- {
- if (pSrc->IsType(TI_REF)) // NULL can be any reference type
- {
- *pDest = *pSrc;
- *changed = true;
- return true;
- }
- goto FAIL;
- }
- else if (pDest->IsType(TI_STRUCT))
- {
- if (pSrc->IsType(TI_STRUCT) && CompHnd->areTypesEquivalent(pDest->GetClassHandle(), pSrc->GetClassHandle()))
- {
- return true;
- }
- goto FAIL;
- }
- else if (pDest->IsByRef())
- {
- return tiCompatibleWithByRef(CompHnd, *pSrc, *pDest);
- }
-#ifdef TARGET_64BIT
- // On 64-bit targets we have precise representation for native int, so these rules
- // represent the fact that the ECMA spec permits the implicit conversion
- // between an int32 and a native int.
- else if (typeInfo::AreEquivalent(*pDest, typeInfo::nativeInt()) && pSrc->IsType(TI_INT))
- {
- return true;
- }
- else if (typeInfo::AreEquivalent(*pSrc, typeInfo::nativeInt()) && pDest->IsType(TI_INT))
- {
- *pDest = *pSrc;
- *changed = true;
- return true;
- }
-#endif // TARGET_64BIT
-
-FAIL:
- *pDest = typeInfo();
- return false;
-}
-
-#ifdef DEBUG
-#if VERBOSE_VERIFY
-// Utility method to have a detailed dump of a TypeInfo object
-void typeInfo::Dump() const
-{
- char flagsStr[8];
-
- flagsStr[0] = ((m_flags & TI_FLAG_UNINIT_OBJREF) != 0) ? 'U' : '-';
- flagsStr[1] = ((m_flags & TI_FLAG_BYREF) != 0) ? 'B' : '-';
- flagsStr[2] = ((m_flags & TI_FLAG_BYREF_READONLY) != 0) ? 'R' : '-';
- flagsStr[3] = ((m_flags & TI_FLAG_NATIVE_INT) != 0) ? 'N' : '-';
- flagsStr[4] = ((m_flags & TI_FLAG_THIS_PTR) != 0) ? 'T' : '-';
- flagsStr[5] = ((m_flags & TI_FLAG_BYREF_PERMANENT_HOME) != 0) ? 'P' : '-';
- flagsStr[6] = ((m_flags & TI_FLAG_GENERIC_TYPE_VAR) != 0) ? 'G' : '-';
- flagsStr[7] = '\0';
-
- printf("[%s(%X) {%s}]", tiType2Str(m_bits.type), m_cls, flagsStr);
-}
-#endif // VERBOSE_VERIFY
-#endif // DEBUG
diff --git a/src/coreclr/jit/valuenum.cpp b/src/coreclr/jit/valuenum.cpp
index 9b6238101fa..5ea27c4b866 100644
--- a/src/coreclr/jit/valuenum.cpp
+++ b/src/coreclr/jit/valuenum.cpp
@@ -5284,6 +5284,52 @@ bool ValueNumStore::IsVNHandle(ValueNum vn)
}
//------------------------------------------------------------------------
+// SwapRelop: return VNFunc for swapped relop
+//
+// Arguments:
+// vnf - vnf for original relop
+//
+// Returns:
+// VNFunc for swapped relop, or VNF_MemOpaque if the original VNFunc
+// was not a relop.
+//
+VNFunc ValueNumStore::SwapRelop(VNFunc vnf)
+{
+ VNFunc swappedFunc = VNF_MemOpaque;
+ if (vnf >= VNF_Boundary)
+ {
+ switch (vnf)
+ {
+ case VNF_LT_UN:
+ swappedFunc = VNF_GT_UN;
+ break;
+ case VNF_LE_UN:
+ swappedFunc = VNF_GE_UN;
+ break;
+ case VNF_GE_UN:
+ swappedFunc = VNF_LE_UN;
+ break;
+ case VNF_GT_UN:
+ swappedFunc = VNF_LT_UN;
+ break;
+ default:
+ break;
+ }
+ }
+ else
+ {
+ const genTreeOps op = (genTreeOps)vnf;
+
+ if (GenTree::OperIsCompare(op))
+ {
+ swappedFunc = (VNFunc)GenTree::SwapRelop(op);
+ }
+ }
+
+ return swappedFunc;
+}
+
+//------------------------------------------------------------------------
// GetRelatedRelop: return value number for reversed/swapped comparison
//
// Arguments:
@@ -5354,36 +5400,11 @@ ValueNum ValueNumStore::GetRelatedRelop(ValueNum vn, VN_RELATION_KIND vrk)
//
if (swap)
{
- if (newFunc >= VNF_Boundary)
- {
- switch (newFunc)
- {
- case VNF_LT_UN:
- newFunc = VNF_GT_UN;
- break;
- case VNF_LE_UN:
- newFunc = VNF_GE_UN;
- break;
- case VNF_GE_UN:
- newFunc = VNF_LE_UN;
- break;
- case VNF_GT_UN:
- newFunc = VNF_LT_UN;
- break;
- default:
- return NoVN;
- }
- }
- else
- {
- const genTreeOps op = (genTreeOps)newFunc;
+ newFunc = SwapRelop(newFunc);
- if (!GenTree::OperIsCompare(op))
- {
- return NoVN;
- }
-
- newFunc = (VNFunc)GenTree::SwapRelop(op);
+ if (newFunc == VNF_MemOpaque)
+ {
+ return NoVN;
}
}
@@ -7028,6 +7049,12 @@ void ValueNumStore::InitValueNumStoreStatics()
ValueNumFuncSetArity(func, newArity);
}
+
+ if (HWIntrinsicInfo::IsCommutative(id))
+ {
+ VNFunc func = VNFunc(VNF_HWI_FIRST + (id - NI_HW_INTRINSIC_START - 1));
+ vnfOpAttribs[func] |= VNFOA_Commutative;
+ }
}
#endif // FEATURE_HW_INTRINSICS
@@ -8162,7 +8189,7 @@ void Compiler::fgValueNumberTreeConst(GenTree* tree)
}
else
{
- assert(tree->IsIconHandle(GTF_ICON_STR_HDL)); // Constant object can be only frozen string.
+ assert(doesMethodHaveFrozenString()); // Constant object can be only frozen string.
tree->gtVNPair.SetBoth(
vnStore->VNForHandle(ssize_t(tree->AsIntConCommon()->IconValue()), tree->GetIconHandleFlag()));
}
@@ -8485,7 +8512,8 @@ void Compiler::fgValueNumberTree(GenTree* tree)
}
else
{
- assert((varDsc->TypeGet() == TYP_I_IMPL) && lcl->TypeIs(TYP_BYREF));
+ assert(((varDsc->TypeGet() == TYP_I_IMPL) && lcl->TypeIs(TYP_BYREF)) ||
+ ((varDsc->TypeGet() == TYP_BYREF) && lcl->TypeIs(TYP_I_IMPL)));
lcl->gtVNPair = wholeLclVarVNP;
}
}
@@ -8591,37 +8619,6 @@ void Compiler::fgValueNumberTree(GenTree* tree)
{
fgValueNumberBlockAssignment(tree);
}
- else if (oper == GT_ADDR)
- {
- // We have special representations for byrefs to lvalues.
- GenTree* location = tree->AsUnOp()->gtGetOp1();
- if (location->OperIs(GT_LCL_VAR, GT_LCL_FLD))
- {
- GenTreeLclVarCommon* lclNode = location->AsLclVarCommon();
- ValueNum addrVN =
- vnStore->VNForFunc(TYP_BYREF, VNF_PtrToLoc, vnStore->VNForIntCon(lclNode->GetLclNum()),
- vnStore->VNForIntPtrCon(lclNode->GetLclOffs()));
- tree->gtVNPair.SetBoth(addrVN); // No exceptions for local addresses.
- }
- else if ((location->gtOper == GT_IND) || location->OperIsBlk())
- {
- // They just cancel, so fetch the ValueNumber from the op1 of the GT_IND node.
- //
- GenTree* addr = location->AsIndir()->Addr();
- ValueNumPair addrVNP = addr->gtVNPair;
-
- // For the CSE phase mark the address as GTF_DONT_CSE
- // because it will end up with the same value number as tree (the GT_ADDR).
- addr->gtFlags |= GTF_DONT_CSE;
-
- tree->gtVNPair = vnStore->VNPWithExc(addrVNP, vnStore->VNPExceptionSet(location->gtVNPair));
- }
- else
- {
- // May be more cases to do here! But we'll punt for now.
- tree->gtVNPair = vnStore->VNPUniqueWithExc(TYP_BYREF, vnStore->VNPExceptionSet(location->gtVNPair));
- }
- }
else if ((oper == GT_IND) || GenTree::OperIsBlk(oper))
{
// So far, we handle cases in which the address is a ptr-to-local, or if it's
@@ -8869,6 +8866,26 @@ void Compiler::fgValueNumberTree(GenTree* tree)
}
break;
+ case GT_ADDR:
+ {
+ GenTree* location = tree->AsUnOp()->gtGetOp1();
+
+ if (location->OperIsLocalRead())
+ {
+ GenTreeLclVarCommon* lclNode = location->AsLclVarCommon();
+ ValueNum addrVN =
+ vnStore->VNForFunc(TYP_BYREF, VNF_PtrToLoc, vnStore->VNForIntCon(lclNode->GetLclNum()),
+ vnStore->VNForIntPtrCon(lclNode->GetLclOffs()));
+ tree->gtVNPair.SetBoth(addrVN); // No exceptions for local addresses.
+ }
+ else
+ {
+ tree->gtVNPair = vnStore->VNPUniqueWithExc(tree->TypeGet(),
+ vnStore->VNPExceptionSet(location->gtVNPair));
+ }
+ }
+ break;
+
case GT_ARR_ADDR:
fgValueNumberArrIndexAddr(tree->AsArrAddr());
break;
diff --git a/src/coreclr/jit/valuenum.h b/src/coreclr/jit/valuenum.h
index d998591039f..dad46cb8cd8 100644
--- a/src/coreclr/jit/valuenum.h
+++ b/src/coreclr/jit/valuenum.h
@@ -304,9 +304,6 @@ private:
// (Requires InitValueNumStoreStatics to have been run.)
static bool VNFuncIsCommutative(VNFunc vnf);
- // Returns "true" iff "vnf" is a comparison (and thus binary) operator.
- static bool VNFuncIsComparison(VNFunc vnf);
-
bool VNEvalCanFoldBinaryFunc(var_types type, VNFunc func, ValueNum arg0VN, ValueNum arg1VN);
bool VNEvalCanFoldUnaryFunc(var_types type, VNFunc func, ValueNum arg0VN);
@@ -982,6 +979,13 @@ public:
//
ValueNum GetRelatedRelop(ValueNum vn, VN_RELATION_KIND vrk);
+ // Return VNFunc for swapped relop, or VNF_MemOpaque if the function
+ // is not a relop.
+ static VNFunc SwapRelop(VNFunc vnf);
+
+ // Returns "true" iff "vnf" is a comparison (and thus binary) operator.
+ static bool VNFuncIsComparison(VNFunc vnf);
+
// Convert a vartype_t to the value number's storage type for that vartype_t.
// For example, ValueNum of type TYP_LONG are stored in a map of INT64 variables.
// Lang is the language (C++) type for the corresponding vartype_t.
diff --git a/src/coreclr/md/compiler/CMakeLists.txt b/src/coreclr/md/compiler/CMakeLists.txt
index 3ef387534a4..2182d0ebf4c 100644
--- a/src/coreclr/md/compiler/CMakeLists.txt
+++ b/src/coreclr/md/compiler/CMakeLists.txt
@@ -37,7 +37,6 @@ set(MDCOMPILER_HEADERS
disp.h
filtermanager.h
importhelper.h
- mdperf.h
mdutil.h
regmeta.h
)
diff --git a/src/coreclr/md/compiler/assemblymd.cpp b/src/coreclr/md/compiler/assemblymd.cpp
index 1282109db30..7372e4cbe29 100644
--- a/src/coreclr/md/compiler/assemblymd.cpp
+++ b/src/coreclr/md/compiler/assemblymd.cpp
@@ -44,7 +44,6 @@ STDMETHODIMP RegMeta::GetAssemblyProps( // S_OK or error.
mda, ppbPublicKey, pcbPublicKey, pulHashAlgId, szName, cchName, pchName, pMetaData,
pdwAssemblyFlags));
- START_MD_PERF();
LOCKREAD();
_ASSERTE(TypeFromToken(mda) == mdtAssembly && RidFromToken(mda));
@@ -83,7 +82,6 @@ STDMETHODIMP RegMeta::GetAssemblyProps( // S_OK or error.
IfFailGo(pMiniMd->getNameOfAssembly(pRecord, szName, cchName, pchName));
ErrExit:
- STOP_MD_PERF(GetAssemblyProps);
END_ENTRYPOINT_NOTHROW;
@@ -116,7 +114,6 @@ STDMETHODIMP RegMeta::GetAssemblyRefProps( // S_OK or error.
mdar, ppbPublicKeyOrToken, pcbPublicKeyOrToken, szName, cchName,
pchName, pMetaData, ppbHashValue, pdwAssemblyRefFlags));
- START_MD_PERF();
LOCKREAD();
_ASSERTE(TypeFromToken(mdar) == mdtAssemblyRef && RidFromToken(mdar));
@@ -148,7 +145,6 @@ STDMETHODIMP RegMeta::GetAssemblyRefProps( // S_OK or error.
IfFailGo(pMiniMd->getNameOfAssemblyRef(pRecord, szName, cchName, pchName));
ErrExit:
- STOP_MD_PERF(GetAssemblyRefProps);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -176,7 +172,6 @@ STDMETHODIMP RegMeta::GetFileProps( // S_OK or error.
LOG((LOGMD, "RegMeta::GetFileProps(%#08x, %#08x, %#08x, %#08x, %#08x, %#08x, %#08x)\n",
mdf, szName, cchName, pchName, ppbHashValue, pcbHashValue, pdwFileFlags));
- START_MD_PERF();
LOCKREAD();
_ASSERTE(TypeFromToken(mdf) == mdtFile && RidFromToken(mdf));
@@ -195,7 +190,6 @@ STDMETHODIMP RegMeta::GetFileProps( // S_OK or error.
}
ErrExit:
- STOP_MD_PERF(GetFileProps);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -225,7 +219,6 @@ STDMETHODIMP RegMeta::GetExportedTypeProps( // S_OK or error.
mdct, szName, cchName, pchName,
ptkImplementation, ptkTypeDef, pdwExportedTypeFlags));
- START_MD_PERF();
LOCKREAD();
_ASSERTE(TypeFromToken(mdct) == mdtExportedType && RidFromToken(mdct));
@@ -273,7 +266,6 @@ STDMETHODIMP RegMeta::GetExportedTypeProps( // S_OK or error.
}
ErrExit:
- STOP_MD_PERF(GetExportedTypeProps);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -304,7 +296,6 @@ STDMETHODIMP RegMeta::GetManifestResourceProps( // S_OK or error.
ptkImplementation, pdwOffset,
pdwResourceFlags));
- START_MD_PERF();
LOCKREAD();
_ASSERTE(TypeFromToken(mdmr) == mdtManifestResource && RidFromToken(mdmr));
@@ -321,7 +312,6 @@ STDMETHODIMP RegMeta::GetManifestResourceProps( // S_OK or error.
IfFailGo(pMiniMd->getNameOfManifestResource(pRecord, szName, cchName, pchName));
ErrExit:
- STOP_MD_PERF(GetManifestResourceProps);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -346,7 +336,6 @@ STDMETHODIMP RegMeta::EnumAssemblyRefs( // S_OK or error
LOG((LOGMD, "MD RegMeta::EnumAssemblyRefs(%#08x, %#08x, %#08x, %#08x)\n",
phEnum, rAssemblyRefs, cMax, pcTokens));
- START_MD_PERF();
LOCKREAD();
@@ -373,7 +362,6 @@ STDMETHODIMP RegMeta::EnumAssemblyRefs( // S_OK or error
ErrExit:
HENUMInternal::DestroyEnumIfEmpty(ppmdEnum);
- STOP_MD_PERF(EnumAssemblyRefs);
END_ENTRYPOINT_NOTHROW;
@@ -398,7 +386,6 @@ STDMETHODIMP RegMeta::EnumFiles( // S_OK or error
LOG((LOGMD, "MD RegMeta::EnumFiles(%#08x, %#08x, %#08x, %#08x)\n",
phEnum, rFiles, cMax, pcTokens));
- START_MD_PERF();
LOCKREAD();
if (*ppmdEnum == 0)
@@ -424,7 +411,6 @@ STDMETHODIMP RegMeta::EnumFiles( // S_OK or error
ErrExit:
HENUMInternal::DestroyEnumIfEmpty(ppmdEnum);
- STOP_MD_PERF(EnumFiles);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -449,7 +435,6 @@ STDMETHODIMP RegMeta::EnumExportedTypes( // S_OK or error
LOG((LOGMD, "MD RegMeta::EnumExportedTypes(%#08x, %#08x, %#08x, %#08x)\n",
phEnum, rExportedTypes, cMax, pcTokens));
- START_MD_PERF();
LOCKREAD();
if (*ppmdEnum == 0)
@@ -497,7 +482,6 @@ ErrExit:
HENUMInternal::DestroyEnumIfEmpty(ppmdEnum);
HENUMInternal::DestroyEnum(pEnum);
- STOP_MD_PERF(EnumExportedTypes);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -522,7 +506,6 @@ STDMETHODIMP RegMeta::EnumManifestResources( // S_OK or error
LOG((LOGMD, "MD RegMeta::EnumManifestResources(%#08x, %#08x, %#08x, %#08x)\n",
phEnum, rManifestResources, cMax, pcTokens));
- START_MD_PERF();
LOCKREAD();
if (*ppmdEnum == 0)
@@ -548,7 +531,6 @@ STDMETHODIMP RegMeta::EnumManifestResources( // S_OK or error
ErrExit:
HENUMInternal::DestroyEnumIfEmpty(ppmdEnum);
- STOP_MD_PERF(EnumManifestResources);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -566,7 +548,6 @@ STDMETHODIMP RegMeta::GetAssemblyFromScope( // S_OK or error
BEGIN_ENTRYPOINT_NOTHROW;
LOG((LOGMD, "MD RegMeta::GetAssemblyFromScope(%#08x)\n", ptkAssembly));
- START_MD_PERF();
LOCKREAD();
_ASSERTE(ptkAssembly);
@@ -580,7 +561,6 @@ STDMETHODIMP RegMeta::GetAssemblyFromScope( // S_OK or error
IfFailGo( CLDB_E_RECORD_NOTFOUND );
}
ErrExit:
- STOP_MD_PERF(GetAssemblyFromScope);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -604,7 +584,6 @@ STDMETHODIMP RegMeta::FindExportedTypeByName( // S_OK or error
LOG((LOGMD, "MD RegMeta::FindExportedTypeByName(%S, %#08x, %#08x)\n",
MDSTR(szName), tkEnclosingType, ptkExportedType));
- START_MD_PERF();
LOCKREAD();
@@ -627,7 +606,6 @@ STDMETHODIMP RegMeta::FindExportedTypeByName( // S_OK or error
tkEnclosingType,
ptkExportedType));
ErrExit:
- STOP_MD_PERF(FindExportedTypeByName);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -650,7 +628,6 @@ STDMETHODIMP RegMeta::FindManifestResourceByName( // S_OK or error
LOG((LOGMD, "MD RegMeta::FindManifestResourceByName(%S, %#08x)\n",
MDSTR(szName), ptkManifestResource));
- START_MD_PERF();
LOCKREAD();
@@ -684,7 +661,6 @@ STDMETHODIMP RegMeta::FindManifestResourceByName( // S_OK or error
IfFailGo( CLDB_E_RECORD_NOTFOUND );
ErrExit:
- STOP_MD_PERF(FindManifestResourceByName);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -708,14 +684,12 @@ STDMETHODIMP RegMeta::FindAssembliesByName( // S_OK or error
LOG((LOGMD, "RegMeta::FindAssembliesByName(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
szAppBase, szPrivateBin, szAssemblyName, ppIUnk, cMax, pcAssemblies));
- START_MD_PERF();
// No need to lock this function. It is going through fusion to find the matching Assemblies by name
IfFailGo(COR_E_NOTSUPPORTED);
ErrExit:
- STOP_MD_PERF(FindAssembliesByName);
END_ENTRYPOINT_NOTHROW;
return hr;
diff --git a/src/coreclr/md/compiler/assemblymd_emit.cpp b/src/coreclr/md/compiler/assemblymd_emit.cpp
index 32d8f63f038..6eeb0bcb125 100644
--- a/src/coreclr/md/compiler/assemblymd_emit.cpp
+++ b/src/coreclr/md/compiler/assemblymd_emit.cpp
@@ -47,7 +47,6 @@ STDMETHODIMP RegMeta::DefineAssembly( // S_OK or error.
pbPublicKey, cbPublicKey, ulHashAlgId, MDSTR(szName), pMetaData,
dwAssemblyFlags, pma));
- START_MD_PERF();
LOCKWRITE();
_ASSERTE(szName && pMetaData && pma);
@@ -95,7 +94,6 @@ STDMETHODIMP RegMeta::DefineAssembly( // S_OK or error.
ErrExit:
- STOP_MD_PERF(DefineAssembly);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -128,7 +126,6 @@ STDMETHODIMP RegMeta::DefineAssemblyRef( // S_OK or error.
pbPublicKeyOrToken, cbPublicKeyOrToken, MDSTR(szName), pMetaData, pbHashValue,
cbHashValue, dwAssemblyRefFlags, pmar));
- START_MD_PERF();
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
@@ -187,7 +184,6 @@ STDMETHODIMP RegMeta::DefineAssemblyRef( // S_OK or error.
ErrExit:
SetCallerExternal();
- STOP_MD_PERF(DefineAssemblyRef);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -213,7 +209,6 @@ STDMETHODIMP RegMeta::DefineFile( // S_OK or error.
LOG((LOGMD, "RegMeta::DefineFile(%S, %#08x, %#08x, %#08x, %#08x)\n",
MDSTR(szName), pbHashValue, cbHashValue, dwFileFlags, pmf));
- START_MD_PERF();
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
@@ -260,7 +255,6 @@ STDMETHODIMP RegMeta::DefineFile( // S_OK or error.
IfFailGo(_SetFileProps(*pmf, pbHashValue, cbHashValue, dwFileFlags));
ErrExit:
- STOP_MD_PERF(DefineFile);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -290,7 +284,6 @@ STDMETHODIMP RegMeta::DefineExportedType( // S_OK or error.
MDSTR(szName), tkImplementation, tkTypeDef,
dwExportedTypeFlags, pmct));
- START_MD_PERF();
LOCKWRITE();
// Validate name for prefix.
@@ -360,7 +353,6 @@ STDMETHODIMP RegMeta::DefineExportedType( // S_OK or error.
dwExportedTypeFlags));
ErrExit:
- STOP_MD_PERF(DefineExportedType);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -386,7 +378,6 @@ STDMETHODIMP RegMeta::DefineManifestResource( // S_OK or error.
LOG((LOGMD, "RegMeta::DefineManifestResource(%S, %#08x, %#08x, %#08x, %#08x)\n",
MDSTR(szName), tkImplementation, dwOffset, dwResourceFlags, pmmr));
- START_MD_PERF();
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
@@ -439,7 +430,6 @@ STDMETHODIMP RegMeta::DefineManifestResource( // S_OK or error.
ErrExit:
- STOP_MD_PERF(DefineManifestResource);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -466,7 +456,6 @@ STDMETHODIMP RegMeta::SetAssemblyProps( // S_OK or error.
LOG((LOGMD, "RegMeta::SetAssemblyProps(%#08x, %#08x, %#08x, %#08x %S, %#08x, %#08x)\n",
ma, pbPublicKey, cbPublicKey, ulHashAlgId, MDSTR(szName), pMetaData, dwAssemblyFlags));
- START_MD_PERF();
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
@@ -474,7 +463,6 @@ STDMETHODIMP RegMeta::SetAssemblyProps( // S_OK or error.
IfFailGo(_SetAssemblyProps(ma, pbPublicKey, cbPublicKey, ulHashAlgId, szName, pMetaData, dwAssemblyFlags));
ErrExit:
- STOP_MD_PERF(SetAssemblyProps);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -503,7 +491,6 @@ STDMETHODIMP RegMeta::SetAssemblyRefProps( // S_OK or error.
ar, pbPublicKeyOrToken, cbPublicKeyOrToken, MDSTR(szName), pMetaData, pbHashValue, cbHashValue,
dwAssemblyRefFlags));
- START_MD_PERF();
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
@@ -519,7 +506,6 @@ STDMETHODIMP RegMeta::SetAssemblyRefProps( // S_OK or error.
dwAssemblyRefFlags));
ErrExit:
- STOP_MD_PERF(SetAssemblyRefProps);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -543,7 +529,6 @@ STDMETHODIMP RegMeta::SetFileProps( // S_OK or error.
LOG((LOGMD, "RegMeta::SetFileProps(%#08x, %#08x, %#08x, %#08x)\n",
file, pbHashValue, cbHashValue, dwFileFlags));
- START_MD_PERF();
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
@@ -552,7 +537,6 @@ STDMETHODIMP RegMeta::SetFileProps( // S_OK or error.
ErrExit:
- STOP_MD_PERF(SetFileProps);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -575,14 +559,12 @@ STDMETHODIMP RegMeta::SetExportedTypeProps( // S_OK or error.
LOG((LOGMD, "RegMeta::SetExportedTypeProps(%#08x, %#08x, %#08x, %#08x)\n",
ct, tkImplementation, tkTypeDef, dwExportedTypeFlags));
- START_MD_PERF();
LOCKWRITE();
IfFailGo( _SetExportedTypeProps( ct, tkImplementation, tkTypeDef, dwExportedTypeFlags) );
ErrExit:
- STOP_MD_PERF(SetExportedTypeProps);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -609,14 +591,12 @@ STDMETHODIMP RegMeta::SetManifestResourceProps(// S_OK or error.
TypeFromToken(tkImplementation) == mdtAssemblyRef ||
tkImplementation == mdTokenNil);
- START_MD_PERF();
LOCKWRITE();
IfFailGo( _SetManifestResourceProps( mr, tkImplementation, dwOffset, dwResourceFlags) );
ErrExit:
- STOP_MD_PERF(SetManifestResourceProps);
END_ENTRYPOINT_NOTHROW;
return hr;
diff --git a/src/coreclr/md/compiler/custattr_emit.cpp b/src/coreclr/md/compiler/custattr_emit.cpp
index 6d5d01135ce..d1462dc74b9 100644
--- a/src/coreclr/md/compiler/custattr_emit.cpp
+++ b/src/coreclr/md/compiler/custattr_emit.cpp
@@ -16,7 +16,6 @@
#include "rwutil.h"
#include "mdlog.h"
#include "importhelper.h"
-#include "mdperf.h"
#include "posterror.h"
#include "cahlprinternal.h"
#include "custattr.h"
@@ -712,7 +711,6 @@ STDMETHODIMP RegMeta::DefineCustomAttribute(
LOG((LOGMD, "RegMeta::DefineCustomAttribute(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n", tkOwner, tkCtor,
pCustomAttribute, cbCustomAttribute, pcv));
- START_MD_PERF();
LOCKWRITE();
_ASSERTE(TypeFromToken(tkCtor) == mdtMethodDef || TypeFromToken(tkCtor) == mdtMemberRef);
@@ -825,7 +823,6 @@ STDMETHODIMP RegMeta::DefineCustomAttribute(
IfFailGo(UpdateENCLog(TokenFromRid(iRecord, mdtCustomAttribute)));
ErrExit:
- STOP_MD_PERF(DefineCustomAttribute);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -849,7 +846,6 @@ STDMETHODIMP RegMeta::SetCustomAttributeValue( // Return code.
CustomAttributeRec *pRecord = NULL;// Existing custom Attribute record.
- START_MD_PERF();
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
@@ -863,7 +859,6 @@ STDMETHODIMP RegMeta::SetCustomAttributeValue( // Return code.
IfFailGo(UpdateENCLog(tkAttr));
ErrExit:
- STOP_MD_PERF(SetCustomAttributeValue);
END_ENTRYPOINT_NOTHROW;
return hr;
diff --git a/src/coreclr/md/compiler/custattr_import.cpp b/src/coreclr/md/compiler/custattr_import.cpp
index 5313634b2c7..c7b40c1981f 100644
--- a/src/coreclr/md/compiler/custattr_import.cpp
+++ b/src/coreclr/md/compiler/custattr_import.cpp
@@ -16,7 +16,6 @@
#include "rwutil.h"
#include "mdlog.h"
#include "importhelper.h"
-#include "mdperf.h"
#include "posterror.h"
#include "cahlprinternal.h"
#include "custattr.h"
@@ -71,7 +70,6 @@ STDMETHODIMP RegMeta::GetCustomAttributeByName( // S_OK or error.
int iLen; // A length.
CMiniMdRW *pMiniMd = NULL;
- START_MD_PERF();
LOCKREAD();
pMiniMd = &(m_pStgdb->m_MiniMd);
@@ -83,7 +81,6 @@ STDMETHODIMP RegMeta::GetCustomAttributeByName( // S_OK or error.
ErrExit:
- STOP_MD_PERF(GetCustomAttributeByName);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -114,7 +111,6 @@ STDMETHODIMP RegMeta::EnumCustomAttributes(
LOG((LOGMD, "RegMeta::EnumCustomAttributes(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
phEnum, tk, tkType, rCustomAttributes, cMax, pcCustomAttributes));
- START_MD_PERF();
LOCKREAD();
if ( *ppmdEnum == 0 )
@@ -230,7 +226,6 @@ ErrExit:
HENUMInternal::DestroyEnumIfEmpty(ppmdEnum);
HENUMInternal::DestroyEnum(pEnum);
- STOP_MD_PERF(EnumCustomAttributes);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -253,7 +248,6 @@ STDMETHODIMP RegMeta::GetCustomAttributeProps(
CMiniMdRW *pMiniMd;
- START_MD_PERF();
LOCKREAD();
_ASSERTE(TypeFromToken(cv) == mdtCustomAttribute);
@@ -276,7 +270,6 @@ STDMETHODIMP RegMeta::GetCustomAttributeProps(
ErrExit:
- STOP_MD_PERF(GetCustomAttributeProps);
END_ENTRYPOINT_NOTHROW;
return hr;
diff --git a/src/coreclr/md/compiler/emit.cpp b/src/coreclr/md/compiler/emit.cpp
index 1397eb2d29e..7c4208ba7db 100644
--- a/src/coreclr/md/compiler/emit.cpp
+++ b/src/coreclr/md/compiler/emit.cpp
@@ -48,7 +48,6 @@ STDMETHODIMP RegMeta::DefineMethod( // S_OK or error.
LOG((LOGMD, "MD: RegMeta::DefineMethod(0x%08x, %S, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
td, MDSTR(szName), dwMethodFlags, pvSigBlob, cbSigBlob, ulCodeRVA, dwImplFlags, pmd));
- START_MD_PERF();
LOCKWRITE();
@@ -132,7 +131,6 @@ STDMETHODIMP RegMeta::DefineMethod( // S_OK or error.
ErrExit:
SetCallerExternal();
- STOP_MD_PERF(DefineMethod);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -159,7 +157,6 @@ STDMETHODIMP RegMeta::DefineMethodImpl( // S_OK or error.
LOG((LOGMD, "MD RegMeta::DefineMethodImpl(0x%08x, 0x%08x, 0x%08x)\n",
td, tkBody, tkDecl));
- START_MD_PERF();
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
@@ -198,7 +195,6 @@ STDMETHODIMP RegMeta::DefineMethodImpl( // S_OK or error.
IfFailGo(UpdateENCLog2(TBL_MethodImpl, iMethodImplRec));
ErrExit:
- STOP_MD_PERF(DefineMethodImpl);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -224,7 +220,6 @@ STDMETHODIMP RegMeta::SetMethodImplFlags( // [IN] S_OK or error.
LOG((LOGMD, "MD RegMeta::SetMethodImplFlags(0x%08x, 0x%08x)\n",
md, dwImplFlags));
- START_MD_PERF();
LOCKWRITE();
_ASSERTE(TypeFromToken(md) == mdtMethodDef && dwImplFlags != UINT32_MAX);
@@ -236,7 +231,6 @@ STDMETHODIMP RegMeta::SetMethodImplFlags( // [IN] S_OK or error.
IfFailGo(UpdateENCLog(md));
ErrExit:
- STOP_MD_PERF(SetMethodImplFlags);
END_ENTRYPOINT_NOTHROW;
return hr;
#endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER
@@ -263,7 +257,6 @@ STDMETHODIMP RegMeta::SetFieldRVA( // [IN] S_OK or error.
LOG((LOGMD, "MD RegMeta::SetFieldRVA(0x%08x, 0x%08x)\n",
fd, ulRVA));
- START_MD_PERF();
LOCKWRITE();
_ASSERTE(TypeFromToken(fd) == mdtFieldDef);
@@ -297,7 +290,6 @@ STDMETHODIMP RegMeta::SetFieldRVA( // [IN] S_OK or error.
IfFailGo(UpdateENCLog2(TBL_FieldRVA, iFieldRVA));
ErrExit:
- STOP_MD_PERF(SetFieldRVA);
END_ENTRYPOINT_NOTHROW;
return hr;
#endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER
@@ -397,7 +389,6 @@ STDMETHODIMP RegMeta::DefineTypeRefByName( // S_OK or error.
LOG((LOGMD, "MD RegMeta::DefineTypeRefByName(0x%08x, %S, 0x%08x)\n",
tkResolutionScope, MDSTR(szName), ptr));
- START_MD_PERF();
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
@@ -406,7 +397,6 @@ STDMETHODIMP RegMeta::DefineTypeRefByName( // S_OK or error.
IfFailGo(_DefineTypeRef(tkResolutionScope, szName, TRUE, ptr));
ErrExit:
- STOP_MD_PERF(DefineTypeRefByName);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -449,7 +439,6 @@ STDMETHODIMP RegMeta::DefineImportType( // S_OK or error.
pAssemImport, pbHashValue, cbHashValue,
pImport, tdImport, pAssemEmit, ptr));
- START_MD_PERF();
LOCKWRITE();
@@ -487,7 +476,6 @@ ErrExit:
pImport2MDCommon->Release();
if (pAssemImportMDCommon)
pAssemImportMDCommon->Release();
- STOP_MD_PERF(DefineImportType);
END_ENTRYPOINT_NOTHROW;
return hr;
#endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER
@@ -517,7 +505,6 @@ STDMETHODIMP RegMeta::DefineMemberRef( // S_OK or error
LOG((LOGMD, "MD RegMeta::DefineMemberRef(0x%08x, %S, 0x%08x, 0x%08x, 0x%08x)\n",
tkImport, MDSTR(szName), pvSigBlob, cbSigBlob, pmr));
- START_MD_PERF();
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
@@ -579,7 +566,6 @@ STDMETHODIMP RegMeta::DefineMemberRef( // S_OK or error
ErrExit:
- STOP_MD_PERF(DefineMemberRef);
END_ENTRYPOINT_NOTHROW;
return hr;
#endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER
@@ -611,7 +597,6 @@ STDMETHODIMP RegMeta::DefineImportMember( // S_OK or error.
" 0x%08x, 0x%08x, 0x%08x)\n",
pAssemImport, pbHashValue, cbHashValue, pImport, mbMember,
pAssemEmit, tkImport, pmr));
- START_MD_PERF();
// No need to lock this function. All the functions that it calls are public APIs.
@@ -696,7 +681,6 @@ STDMETHODIMP RegMeta::DefineImportMember( // S_OK or error.
pmr));
ErrExit:
- STOP_MD_PERF(DefineImportMember);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -727,7 +711,6 @@ STDMETHODIMP RegMeta::DefineEvent(
LOG((LOGMD, "MD RegMeta::DefineEvent(0x%08x, %S, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
td, szEvent, dwEventFlags, tkEventType, mdAddOn, mdRemoveOn, mdFire, rmdOtherMethods, pmdEvent));
- START_MD_PERF();
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
@@ -748,7 +731,6 @@ STDMETHODIMP RegMeta::DefineEvent(
IfFailGo(UpdateENCLog(*pmdEvent));
ErrExit:
- STOP_MD_PERF(DefineEvent);
END_ENTRYPOINT_NOTHROW;
return hr;
#endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER
@@ -777,7 +759,6 @@ STDMETHODIMP RegMeta::SetClassLayout(
LOG((LOGMD, "MD RegMeta::SetClassLayout(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
td, dwPackSize, rFieldOffsets, ulClassSize));
- START_MD_PERF();
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
@@ -804,7 +785,6 @@ STDMETHODIMP RegMeta::SetClassLayout(
ErrExit:
- STOP_MD_PERF(SetClassLayout);
END_ENTRYPOINT_NOTHROW;
return hr;
#endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER
@@ -918,7 +898,6 @@ STDMETHODIMP RegMeta::DeleteClassLayout(
ULONG index;
LOG((LOGMD, "MD RegMeta::DeleteClassLayout(0x%08x)\n", td));
- START_MD_PERF();
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
@@ -965,7 +944,6 @@ STDMETHODIMP RegMeta::DeleteClassLayout(
}
}
ErrExit:
- STOP_MD_PERF(DeleteClassLayout);
END_ENTRYPOINT_NOTHROW;
return hr;
#else //!FEATURE_METADATA_EMIT_ALL
@@ -991,7 +969,6 @@ STDMETHODIMP RegMeta::SetFieldMarshal(
LOG((LOGMD, "MD RegMeta::SetFieldMarshal(0x%08x, 0x%08x, 0x%08x)\n",
tk, pvNativeType, cbNativeType));
- START_MD_PERF();
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
@@ -999,7 +976,6 @@ STDMETHODIMP RegMeta::SetFieldMarshal(
hr = _SetFieldMarshal(tk, pvNativeType, cbNativeType);
ErrExit:
- STOP_MD_PERF(SetFieldMarshal);
END_ENTRYPOINT_NOTHROW;
return hr;
#endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER
@@ -1078,7 +1054,6 @@ STDMETHODIMP RegMeta::DeleteFieldMarshal(
LOG((LOGMD, "MD RegMeta::DeleteFieldMarshal(0x%08x)\n", tk));
- START_MD_PERF();
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
@@ -1121,7 +1096,6 @@ STDMETHODIMP RegMeta::DeleteFieldMarshal(
IfFailGo(UpdateENCLog2(TBL_FieldMarshal, iFieldMarshRec));
ErrExit:
- STOP_MD_PERF(DeleteFieldMarshal);
END_ENTRYPOINT_NOTHROW;
return hr;
#else //!FEATURE_METADATA_EMIT_ALL
@@ -1146,7 +1120,6 @@ STDMETHODIMP RegMeta::DefinePermissionSet(
LOG((LOGMD, "MD RegMeta::DefinePermissionSet(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
tk, dwAction, pvPermission, cbPermission, ppm));
- START_MD_PERF();
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
@@ -1154,7 +1127,6 @@ STDMETHODIMP RegMeta::DefinePermissionSet(
IfFailGo(_DefinePermissionSet(tk, dwAction, pvPermission, cbPermission, ppm));
ErrExit:
- STOP_MD_PERF(DefinePermissionSet);
END_ENTRYPOINT_NOTHROW;
return hr;
#else //!FEATURE_METADATA_EMIT_ALL
@@ -1234,7 +1206,6 @@ HRESULT RegMeta::_DefinePermissionSet(
IfFailGo(UpdateENCLog(tkPerm));
ErrExit:
- STOP_MD_PERF(DefinePermissionSet);
return hr;
#else //!FEATURE_METADATA_EMIT_ALL
return E_NOTIMPL;
@@ -1259,7 +1230,6 @@ STDMETHODIMP RegMeta::SetRVA( // [IN] S_OK or error.
LOG((LOGMD, "MD RegMeta::SetRVA(0x%08x, 0x%08x)\n",
md, ulRVA));
- START_MD_PERF();
LOCKWRITE();
@@ -1267,7 +1237,6 @@ STDMETHODIMP RegMeta::SetRVA( // [IN] S_OK or error.
IfFailGo(_SetRVA(md, ulRVA, UINT32_MAX)); // 0xbaad
ErrExit:
- STOP_MD_PERF(SetRVA);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -1293,7 +1262,6 @@ STDMETHODIMP RegMeta::GetTokenFromSig( // [IN] S_OK or error.
LOG((LOGMD, "MD RegMeta::GetTokenFromSig(0x%08x, 0x%08x, 0x%08x)\n",
pvSig, cbSig, pmsig));
- START_MD_PERF();
LOCKWRITE();
@@ -1303,7 +1271,6 @@ STDMETHODIMP RegMeta::GetTokenFromSig( // [IN] S_OK or error.
IfFailGo(_GetTokenFromSig(pvSig, cbSig, pmsig));
ErrExit:
- STOP_MD_PERF(GetTokenFromSig);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -1325,7 +1292,6 @@ STDMETHODIMP RegMeta::DefineModuleRef( // S_OK or error.
BEGIN_ENTRYPOINT_NOTHROW;
LOG((LOGMD, "MD RegMeta::DefineModuleRef(%S, 0x%08x)\n", MDSTR(szName), pmur));
- START_MD_PERF();
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
@@ -1333,7 +1299,6 @@ STDMETHODIMP RegMeta::DefineModuleRef( // S_OK or error.
hr = _DefineModuleRef(szName, pmur);
ErrExit:
- STOP_MD_PERF(DefineModuleRef);
END_ENTRYPOINT_NOTHROW;
return hr;
#endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER
@@ -1411,7 +1376,6 @@ STDMETHODIMP RegMeta::SetParent( // S_OK or error.
LOG((LOGMD, "MD RegMeta::SetParent(0x%08x, 0x%08x)\n",
mr, tk));
- START_MD_PERF();
LOCKWRITE();
_ASSERTE(TypeFromToken(mr) == mdtMemberRef);
@@ -1433,7 +1397,6 @@ STDMETHODIMP RegMeta::SetParent( // S_OK or error.
ErrExit:
- STOP_MD_PERF(SetParent);
END_ENTRYPOINT_NOTHROW;
return hr;
#endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER
@@ -1459,7 +1422,6 @@ STDMETHODIMP RegMeta::GetTokenFromTypeSpec( // [IN] S_OK or error.
LOG((LOGMD, "MD RegMeta::GetTokenFromTypeSpec(0x%08x, 0x%08x, 0x%08x)\n",
pvSig, cbSig, ptypespec));
- START_MD_PERF();
LOCKWRITE();
_ASSERTE(ptypespec);
@@ -1497,7 +1459,6 @@ STDMETHODIMP RegMeta::GetTokenFromTypeSpec( // [IN] S_OK or error.
ErrExit:
- STOP_MD_PERF(GetTokenFromTypeSpec);
END_ENTRYPOINT_NOTHROW;
return hr;
#endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER
@@ -1530,7 +1491,6 @@ STDMETHODIMP RegMeta::DefineUserString( // S_OK or error.
LOG((LOGMD, "MD RegMeta::DefineUserString(0x%08x, 0x%08x, 0x%08x)\n",
szString, cchString, pstk));
- START_MD_PERF();
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
@@ -1561,7 +1521,6 @@ STDMETHODIMP RegMeta::DefineUserString( // S_OK or error.
ErrExit:
END_ENTRYPOINT_NOTHROW;
- STOP_MD_PERF(DefineUserString);
return hr;
#endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER
} // RegMeta::DefineUserString
@@ -1584,7 +1543,6 @@ STDMETHODIMP RegMeta::DeleteToken(
BEGIN_ENTRYPOINT_NOTHROW;
LOG((LOGMD, "MD RegMeta::DeleteToken(0x%08x)\n", tkObj));
- START_MD_PERF();
LOCKWRITE();
if (!IsValidToken(tkObj))
@@ -1744,7 +1702,6 @@ STDMETHODIMP RegMeta::DeleteToken(
ErrExit:
- STOP_MD_PERF(DeleteToken);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -1771,7 +1728,6 @@ STDMETHODIMP RegMeta::SetTypeDefProps( // S_OK or error.
LOG((LOGMD, "RegMeta::SetTypeDefProps(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
td, dwTypeDefFlags, tkExtends, rtkImplements));
- START_MD_PERF();
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
@@ -1780,7 +1736,6 @@ STDMETHODIMP RegMeta::SetTypeDefProps( // S_OK or error.
ErrExit:
- STOP_MD_PERF(SetTypeDefProps);
END_ENTRYPOINT_NOTHROW;
return hr;
#endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER
@@ -1808,7 +1763,6 @@ STDMETHODIMP RegMeta::DefineNestedType( // S_OK or error.
LOG((LOGMD, "RegMeta::DefineNestedType(%S, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
MDSTR(szTypeDef), dwTypeDefFlags, tkExtends,
rtkImplements, tdEncloser, ptd));
- START_MD_PERF();
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
@@ -1820,7 +1774,6 @@ STDMETHODIMP RegMeta::DefineNestedType( // S_OK or error.
tkExtends, rtkImplements, tdEncloser, ptd));
ErrExit:
- STOP_MD_PERF(DefineNestedType);
END_ENTRYPOINT_NOTHROW;
return hr;
#endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER
@@ -1850,7 +1803,6 @@ STDMETHODIMP RegMeta::DefineGenericParam( // S_OK or error.
LOG((LOGMD, "RegMeta::DefineGenericParam(0x%08x, %d, 0x%08x, %S, 0x%08x, 0x%08x, 0x%08x)\n",
tkOwner, ulParamSeq, dwParamFlags, szName, reserved, rtkConstraints, pgp));
- START_MD_PERF();
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
@@ -1918,7 +1870,6 @@ ErrExit:
if(pgp != NULL)
*pgp = tkRet;
- STOP_MD_PERF(DefineGenericParam);
END_ENTRYPOINT_NOTHROW;
@@ -1945,7 +1896,6 @@ STDMETHODIMP RegMeta::SetGenericParamProps( // S_OK or error.
LOG((LOGMD, "RegMeta::SetGenericParamProps(0x%08x, 0x%08x, %S, 0x%08x, 0x%08x, 0x%08x)\n",
gp, dwParamFlags,szName,reserved,rtkConstraints));
- START_MD_PERF();
if (reserved != 0)
IfFailGo(META_E_BAD_INPUT_PARAMETER);
@@ -1966,7 +1916,6 @@ STDMETHODIMP RegMeta::SetGenericParamProps( // S_OK or error.
hr = META_E_BAD_INPUT_PARAMETER;
ErrExit:
- STOP_MD_PERF(SetGenericParamProps);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -2062,7 +2011,6 @@ STDMETHODIMP RegMeta::GetReferencedTypeSysTables( // S_OK or error.
BEGIN_ENTRYPOINT_NOTHROW;
LOG((LOGMD, "RegMeta::GetReferencedTypeSysTables()\n"));
- START_MD_PERF();
ULONG64 refTablesBitVector = 0;
ULONG count = 0;
@@ -2097,7 +2045,6 @@ STDMETHODIMP RegMeta::GetReferencedTypeSysTables( // S_OK or error.
}
ErrExit:
- STOP_MD_PERF(GetReferencedTypeSysTables);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -2119,12 +2066,10 @@ STDMETHODIMP RegMeta::DefinePdbStream( // S_OK or error.
BEGIN_ENTRYPOINT_NOTHROW;
LOG((LOGMD, "RegMeta::DefinePdbStream()\n"));
- START_MD_PERF();
IfFailGo(m_pStgdb->m_pPdbHeap->SetData(pdbStream));
ErrExit:
- STOP_MD_PERF(DefinePdbStream);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -2160,7 +2105,6 @@ STDMETHODIMP RegMeta::DefineDocument( // S_OK or error.
BEGIN_ENTRYPOINT_NOTHROW;
LOG((LOGMD, "RegMeta::DefineDocument(%s)\n", docName));
- START_MD_PERF();
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
@@ -2232,7 +2176,6 @@ ErrExit:
if (partsIndexes != NULL)
delete[] partsIndexes;
- STOP_MD_PERF(DefineDocument);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -2255,7 +2198,6 @@ STDMETHODIMP RegMeta::DefineSequencePoints( // S_OK or error.
BEGIN_ENTRYPOINT_NOTHROW;
LOG((LOGMD, "RegMeta::DefineSequencePoints()\n"));
- START_MD_PERF();
LOCKWRITE();
@@ -2272,7 +2214,6 @@ STDMETHODIMP RegMeta::DefineSequencePoints( // S_OK or error.
MethodDebugInformationRec::COL_SequencePoints, pMethodDbgInfo, sequencePtsBlob, sequencePtsBlobSize));
ErrExit:
- STOP_MD_PERF(DefineSequencePoints);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -2298,7 +2239,6 @@ STDMETHODIMP RegMeta::DefineLocalScope( // S_OK or error.
BEGIN_ENTRYPOINT_NOTHROW;
LOG((LOGMD, "RegMeta::DefineLocalScope()\n"));
- START_MD_PERF();
LOCKWRITE();
@@ -2318,7 +2258,6 @@ STDMETHODIMP RegMeta::DefineLocalScope( // S_OK or error.
m_pStgdb->m_MiniMd.SetSorted(TBL_LocalScope, true);
ErrExit:
- STOP_MD_PERF(DefineLocalScope);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -2342,7 +2281,6 @@ STDMETHODIMP RegMeta::DefineLocalVariable( // S_OK or error.
BEGIN_ENTRYPOINT_NOTHROW;
LOG((LOGMD, "RegMeta::DefineLocalVariable(%s)\n", name));
- START_MD_PERF();
LOCKWRITE();
@@ -2359,7 +2297,6 @@ STDMETHODIMP RegMeta::DefineLocalVariable( // S_OK or error.
*locVarToken = TokenFromRid(localVariableRecord, mdtLocalVariable);
ErrExit:
- STOP_MD_PERF(DefineLocalVariable);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -2389,7 +2326,6 @@ STDMETHODIMP RegMeta::DefineMethodSpec( // S_OK or error
LOG((LOGMD, "MD RegMeta::DefineMethodSpec(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
tkImport, pvSigBlob, cbSigBlob, pmi));
- START_MD_PERF();
LOCKWRITE();
// See if this version of the metadata can do Generics
@@ -2451,7 +2387,6 @@ STDMETHODIMP RegMeta::DefineMethodSpec( // S_OK or error
ErrExit:
- STOP_MD_PERF(DefineMethodSpec);
END_ENTRYPOINT_NOTHROW;
return hr;
#endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER
@@ -2475,7 +2410,6 @@ STDMETHODIMP RegMeta::SetMethodProps( // S_OK or error.
LOG((LOGMD, "RegMeta::SetMethodProps(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
md, dwMethodFlags, ulCodeRVA, dwImplFlags));
- START_MD_PERF();
LOCKWRITE();
if (dwMethodFlags != UINT32_MAX)
@@ -2489,7 +2423,6 @@ STDMETHODIMP RegMeta::SetMethodProps( // S_OK or error.
ErrExit:
- STOP_MD_PERF(SetMethodProps);
END_ENTRYPOINT_NOTHROW;
return hr;
#endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER
@@ -2516,7 +2449,6 @@ STDMETHODIMP RegMeta::SetEventProps( // S_OK or error.
LOG((LOGMD, "MD RegMeta::SetEventProps(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
ev, dwEventFlags, tkEventType, mdAddOn, mdRemoveOn, mdFire, rmdOtherMethods));
- START_MD_PERF();
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
@@ -2526,7 +2458,6 @@ STDMETHODIMP RegMeta::SetEventProps( // S_OK or error.
ErrExit:
- STOP_MD_PERF(SetEventProps);
END_ENTRYPOINT_NOTHROW;
return hr;
#endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER
@@ -2552,7 +2483,6 @@ STDMETHODIMP RegMeta::SetPermissionSetProps( // S_OK or error.
LOG((LOGMD, "MD RegMeta::SetPermissionSetProps(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
tk, dwAction, pvPermission, cbPermission, ppm));
- START_MD_PERF();
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
@@ -2570,7 +2500,6 @@ STDMETHODIMP RegMeta::SetPermissionSetProps( // S_OK or error.
IfFailGo(_SetPermissionSetProps(tkPerm, dwAction, pvPermission, cbPermission));
ErrExit:
- STOP_MD_PERF(SetPermissionSetProps);
END_ENTRYPOINT_NOTHROW;
return hr;
#else //!FEATURE_METADATA_EMIT_ALL
@@ -2596,7 +2525,6 @@ STDMETHODIMP RegMeta::DefinePinvokeMap( // Return code.
LOG((LOGMD, "MD RegMeta::DefinePinvokeMap(0x%08x, 0x%08x, %S, 0x%08x)\n",
tk, dwMappingFlags, MDSTR(szImportName), mrImportDLL));
- START_MD_PERF();
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
@@ -2605,7 +2533,6 @@ STDMETHODIMP RegMeta::DefinePinvokeMap( // Return code.
ErrExit:
- STOP_MD_PERF(DefinePinvokeMap);
END_ENTRYPOINT_NOTHROW;
return hr;
#endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER
@@ -2724,7 +2651,6 @@ STDMETHODIMP RegMeta::SetPinvokeMap( // Return code.
LOG((LOGMD, "MD RegMeta::SetPinvokeMap(0x%08x, 0x%08x, %S, 0x%08x)\n",
tk, dwMappingFlags, MDSTR(szImportName), mrImportDLL));
- START_MD_PERF();
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
@@ -2753,7 +2679,6 @@ STDMETHODIMP RegMeta::SetPinvokeMap( // Return code.
ErrExit:
- STOP_MD_PERF(SetPinvokeMap);
END_ENTRYPOINT_NOTHROW;
return hr;
#endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER
@@ -2774,7 +2699,6 @@ STDMETHODIMP RegMeta::DeletePinvokeMap( // Return code.
RID iRecord;
LOG((LOGMD, "MD RegMeta::DeletePinvokeMap(0x%08x)\n", tk));
- START_MD_PERF();
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
@@ -2817,7 +2741,6 @@ STDMETHODIMP RegMeta::DeletePinvokeMap( // Return code.
IfFailGo(UpdateENCLog2(TBL_ImplMap, iRecord));
ErrExit:
- STOP_MD_PERF(DeletePinvokeMap);
END_ENTRYPOINT_NOTHROW;
return hr;
#else //!FEATURE_METADATA_EMIT_ALL
@@ -2854,7 +2777,6 @@ HRESULT RegMeta::DefineField( // S_OK or error.
LOG((LOGMD, "MD: RegMeta::DefineField(0x%08x, %S, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
td, MDSTR(szName), dwFieldFlags, pvSigBlob, cbSigBlob, dwCPlusTypeFlag, pValue, cchValue, pmd));
- START_MD_PERF();
LOCKWRITE();
_ASSERTE(pmd);
@@ -2940,7 +2862,6 @@ HRESULT RegMeta::DefineField( // S_OK or error.
ErrExit:
SetCallerExternal();
- STOP_MD_PERF(DefineField);
END_ENTRYPOINT_NOTHROW;
@@ -2983,7 +2904,6 @@ HRESULT RegMeta::DefineProperty(
td, szProperty, dwPropFlags, pvSig, cbSig, dwCPlusTypeFlag, pValue, cchValue, mdSetter, mdGetter,
rmdOtherMethods, pmdProp));
- START_MD_PERF();
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
@@ -3057,7 +2977,6 @@ HRESULT RegMeta::DefineProperty(
ErrExit:
SetCallerExternal();
- STOP_MD_PERF(DefineProperty);
END_ENTRYPOINT_NOTHROW;
@@ -3091,7 +3010,6 @@ HRESULT RegMeta::DefineParam(
LOG((LOGMD, "MD RegMeta::DefineParam(0x%08x, 0x%08x, %S, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
md, ulParamSeq, MDSTR(szName), dwParamFlags, dwCPlusTypeFlag, pValue, cchValue, ppd));
- START_MD_PERF();
LOCKWRITE();
_ASSERTE(TypeFromToken(md) == mdtMethodDef && md != mdMethodDefNil &&
@@ -3143,7 +3061,6 @@ ErrExit:
END_ENTRYPOINT_NOTHROW;
SetCallerExternal();
- STOP_MD_PERF(DefineParam);
return hr;
#endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER
} // RegMeta::DefineParam
@@ -3168,7 +3085,6 @@ HRESULT RegMeta::SetFieldProps( // S_OK or error.
LOG((LOGMD, "MD: RegMeta::SetFieldProps(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
fd, dwFieldFlags, dwCPlusTypeFlag, pValue, cchValue));
- START_MD_PERF();
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
@@ -3185,7 +3101,6 @@ HRESULT RegMeta::SetFieldProps( // S_OK or error.
ErrExit:
- STOP_MD_PERF(SetFieldProps);
END_ENTRYPOINT_NOTHROW;
return hr;
#endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER
@@ -3215,7 +3130,6 @@ HRESULT RegMeta::SetPropertyProps( // S_OK or error.
LOG((LOGMD, "MD RegMeta::SetPropertyProps(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
pr, dwPropFlags, dwCPlusTypeFlag, pValue, cchValue, mdSetter, mdGetter,
rmdOtherMethods));
- START_MD_PERF();
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
@@ -3224,7 +3138,6 @@ HRESULT RegMeta::SetPropertyProps( // S_OK or error.
ErrExit:
- STOP_MD_PERF(SetPropertyProps);
END_ENTRYPOINT_NOTHROW;
return hr;
#endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER
@@ -3251,7 +3164,6 @@ HRESULT RegMeta::SetParamProps( // Return code.
LOG((LOGMD, "MD RegMeta::SetParamProps(0x%08x, %S, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
pd, MDSTR(szName), dwParamFlags, dwCPlusTypeFlag, pValue, cchValue));
- START_MD_PERF();
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
@@ -3260,7 +3172,6 @@ HRESULT RegMeta::SetParamProps( // Return code.
ErrExit:
- STOP_MD_PERF(SetParamProps);
END_ENTRYPOINT_NOTHROW;
return hr;
#endif //!FEATURE_METADATA_EMIT_IN_DEBUGGER
diff --git a/src/coreclr/md/compiler/import.cpp b/src/coreclr/md/compiler/import.cpp
index b50a5b3d42a..a19a1e68499 100644
--- a/src/coreclr/md/compiler/import.cpp
+++ b/src/coreclr/md/compiler/import.cpp
@@ -19,7 +19,6 @@
#include "corpriv.h"
#include "importhelper.h"
#include "mdlog.h"
-#include "mdperf.h"
#include "stgio.h"
//*****************************************************************************
@@ -49,7 +48,6 @@ STDMETHODIMP RegMeta::EnumMembers( // S_OK, S_FALSE, or error.
LOG((LOGMD, "MD RegMeta::EnumMembers(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
phEnum, cl, rMembers, cMax, pcTokens));
- START_MD_PERF();
LOCKREAD();
if ( *ppmdEnum == 0 )
@@ -105,7 +103,6 @@ ErrExit:
HENUMInternal::DestroyEnumIfEmpty(ppmdEnum);
HENUMInternal::DestroyEnum(pEnum);
- STOP_MD_PERF(EnumMembers);
END_ENTRYPOINT_NOTHROW;
@@ -142,7 +139,6 @@ STDMETHODIMP RegMeta::EnumMembersWithName( // S_OK, S_FALSE, or error.
LOG((LOGMD, "MD RegMeta::EnumMembersWithName(0x%08x, 0x%08x, %S, 0x%08x, 0x%08x, 0x%08x)\n",
phEnum, cl, MDSTR(szName), rMembers, cMax, pcTokens));
- START_MD_PERF();
LOCKREAD();
if ( *ppmdEnum == 0 )
@@ -226,7 +222,6 @@ ErrExit:
HENUMInternal::DestroyEnumIfEmpty(ppmdEnum);
HENUMInternal::DestroyEnum(pEnum);
- STOP_MD_PERF(EnumMembersWithName);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -257,7 +252,6 @@ STDMETHODIMP RegMeta::EnumMethods(
- START_MD_PERF();
LOCKREAD();
if ( *ppmdEnum == 0 )
@@ -322,7 +316,6 @@ ErrExit:
HENUMInternal::DestroyEnumIfEmpty(ppmdEnum);
HENUMInternal::DestroyEnum(pEnum);
- STOP_MD_PERF(EnumMethods);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -362,7 +355,6 @@ STDMETHODIMP RegMeta::EnumMethodsWithName( // S_OK, S_FALSE, or error.
- START_MD_PERF();
LOCKREAD();
@@ -426,7 +418,6 @@ ErrExit:
HENUMInternal::DestroyEnumIfEmpty(ppmdEnum);
HENUMInternal::DestroyEnum(pEnum);
- STOP_MD_PERF(EnumMethodsWithName);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -458,7 +449,6 @@ RegMeta::EnumFields(
LOG((LOGMD, "MD RegMeta::EnumFields(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
phEnum, td, rFields, cMax, pcTokens));
- START_MD_PERF();
LOCKREAD();
if (*ppmdEnum == NULL)
@@ -523,7 +513,6 @@ ErrExit:
HENUMInternal::DestroyEnumIfEmpty(ppmdEnum);
HENUMInternal::DestroyEnum(pEnum);
- STOP_MD_PERF(EnumFields);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -562,7 +551,6 @@ STDMETHODIMP RegMeta::EnumFieldsWithName( // S_OK, S_FALSE, or error.
- START_MD_PERF();
LOCKREAD();
if ( *ppmdEnum == 0 )
@@ -624,7 +612,6 @@ ErrExit:
HENUMInternal::DestroyEnumIfEmpty(ppmdEnum);
HENUMInternal::DestroyEnum(pEnum);
- STOP_MD_PERF(EnumFieldsWithName);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -653,7 +640,6 @@ STDMETHODIMP RegMeta::EnumParams( // S_OK, S_FALSE, or error.
LOG((LOGMD, "MD RegMeta::EnumParams(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
phEnum, mb, rParams, cMax, pcTokens));
- START_MD_PERF();
LOCKREAD();
@@ -696,7 +682,6 @@ ErrExit:
HENUMInternal::DestroyEnumIfEmpty(ppmdEnum);
HENUMInternal::DestroyEnum(pEnum);
- STOP_MD_PERF(EnumParams);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -729,7 +714,6 @@ STDMETHODIMP RegMeta::EnumMemberRefs( // S_OK, S_FALSE, or error.
- START_MD_PERF();
LOCKREAD();
if ( *ppmdEnum == 0 )
@@ -772,7 +756,6 @@ ErrExit:
HENUMInternal::DestroyEnumIfEmpty(ppmdEnum);
HENUMInternal::DestroyEnum(pEnum);
- STOP_MD_PERF(EnumMemberRefs);
END_ENTRYPOINT_NOTHROW;
@@ -806,7 +789,6 @@ STDMETHODIMP RegMeta::EnumMethodImpls( // S_OK, S_FALSE, or error
- START_MD_PERF();
LOCKREAD();
HENUMInternal::ZeroEnum(&hEnum);
@@ -851,7 +833,6 @@ ErrExit:
HENUMInternal::DestroyEnum(pEnum);
HENUMInternal::ClearEnum(&hEnum);
- STOP_MD_PERF(EnumMethodImpls);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -887,7 +868,6 @@ STDMETHODIMP RegMeta::EnumPermissionSets( // S_OK, S_FALSE, or error.
LOG((LOGMD, "MD RegMeta::EnumPermissionSets(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
phEnum, tk, dwActions, rPermission, cMax, pcTokens));
- START_MD_PERF();
LOCKREAD();
if ( *ppmdEnum == 0 )
@@ -971,7 +951,6 @@ ErrExit:
HENUMInternal::DestroyEnumIfEmpty(ppmdEnum);
HENUMInternal::DestroyEnum(pEnum);
- STOP_MD_PERF(EnumPermissionSets);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -996,7 +975,6 @@ STDMETHODIMP RegMeta::FindMember(
LOG((LOGMD, "MD RegMeta::FindMember(0x%08x, %S, 0x%08x, 0x%08x, 0x%08x)\n",
td, MDSTR(szName), pvSigBlob, cbSigBlob, pmb));
- START_MD_PERF();
// Don't lock this function. All of the functions that it calls are public APIs. keep it that way.
@@ -1019,7 +997,6 @@ STDMETHODIMP RegMeta::FindMember(
pmb) );
}
ErrExit:
- STOP_MD_PERF(FindMember);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -1048,7 +1025,6 @@ STDMETHODIMP RegMeta::FindMethod(
LOG((LOGMD, "MD RegMeta::FindMethod(0x%08x, %S, 0x%08x, 0x%08x, 0x%08x)\n",
td, MDSTR(szName), pvSigBlob, cbSigBlob, pmb));
- START_MD_PERF();
LOCKREAD();
if (szName == NULL)
@@ -1066,7 +1042,6 @@ STDMETHODIMP RegMeta::FindMethod(
pmb));
ErrExit:
- STOP_MD_PERF(FindMethod);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -1093,7 +1068,6 @@ RegMeta::FindField(
LOG((LOGMD, "MD RegMeta::FindField(0x%08x, %S, 0x%08x, 0x%08x, 0x%08x)\n",
td, MDSTR(szName), pvSigBlob, cbSigBlob, pmb));
- START_MD_PERF();
LOCKREAD();
if (szName == NULL)
@@ -1113,7 +1087,6 @@ RegMeta::FindField(
pmb));
ErrExit:
- STOP_MD_PERF(FindField);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -1144,7 +1117,6 @@ STDMETHODIMP RegMeta::FindMemberRef(
- START_MD_PERF();
// <TODO>@todo: Can this causing building hash table? If so, should this consider the write lock?</TODO>
LOCKREAD();
@@ -1162,7 +1134,6 @@ STDMETHODIMP RegMeta::FindMemberRef(
ErrExit:
- STOP_MD_PERF(FindMemberRef);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -1196,7 +1167,6 @@ STDMETHODIMP RegMeta::GetMethodProps(
- START_MD_PERF();
LOCKREAD();
_ASSERTE(TypeFromToken(mb) == mdtMethodDef);
@@ -1245,7 +1215,6 @@ STDMETHODIMP RegMeta::GetMethodProps(
}
ErrExit:
- STOP_MD_PERF(GetMethodProps);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -1276,7 +1245,6 @@ STDMETHODIMP RegMeta::GetMemberRefProps( // S_OK or error.
- START_MD_PERF();
LOCKREAD();
_ASSERTE(TypeFromToken(mr) == mdtMemberRef);
@@ -1312,7 +1280,6 @@ STDMETHODIMP RegMeta::GetMemberRefProps( // S_OK or error.
ErrExit:
- STOP_MD_PERF(GetMemberRefProps);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -1342,7 +1309,6 @@ STDMETHODIMP RegMeta::EnumProperties( // S_OK, S_FALSE, or error.
LOG((LOGMD, "MD RegMeta::EnumProperties(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
phEnum, td, rProperties, cMax, pcProperties));
- START_MD_PERF();
LOCKREAD();
if (IsNilToken(td))
@@ -1422,7 +1388,6 @@ ErrExit:
HENUMInternal::DestroyEnum(pEnum);
- STOP_MD_PERF(EnumProperties);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -1453,7 +1418,6 @@ STDMETHODIMP RegMeta::EnumEvents( // S_OK, S_FALSE, or error.
LOG((LOGMD, "MD RegMeta::EnumEvents(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
phEnum, td, rEvents, cMax, pcEvents));
- START_MD_PERF();
LOCKREAD();
_ASSERTE(TypeFromToken(td) == mdtTypeDef);
@@ -1524,7 +1488,6 @@ ErrExit:
HENUMInternal::DestroyEnumIfEmpty(ppmdEnum);
HENUMInternal::DestroyEnum(pEnum);
- STOP_MD_PERF(EnumEvents);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -1562,7 +1525,6 @@ STDMETHODIMP RegMeta::GetEventProps( // S_OK, S_FALSE, or error.
ev, pClass, MDSTR(szEvent), cchEvent, pchEvent, pdwEventFlags, ptkEventType,
pmdAddOn, pmdRemoveOn, pmdFire, rmdOtherMethod, cMax, pcOtherMethod));
- START_MD_PERF();
LOCKREAD();
_ASSERTE(TypeFromToken(ev) == mdtEvent);
@@ -1637,7 +1599,6 @@ STDMETHODIMP RegMeta::GetEventProps( // S_OK, S_FALSE, or error.
ErrExit:
HENUMInternal::ClearEnum(&hEnum);
- STOP_MD_PERF(GetEventProps);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -1667,7 +1628,6 @@ STDMETHODIMP RegMeta::EnumMethodSemantics( // S_OK, S_FALSE, or error.
LOG((LOGMD, "MD RegMeta::EnumMethodSemantics(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
phEnum, mb, rEventProp, cMax, pcEventProp));
- START_MD_PERF();
LOCKREAD();
@@ -1703,7 +1663,6 @@ ErrExit:
HENUMInternal::DestroyEnumIfEmpty(ppmdEnum);
HENUMInternal::DestroyEnum(pEnum);
- STOP_MD_PERF(EnumMethodSemantics);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -1733,7 +1692,6 @@ STDMETHODIMP RegMeta::GetMethodSemantics( // S_OK, S_FALSE, or error.
- START_MD_PERF();
LOCKREAD();
_ASSERTE(TypeFromToken(mb) == mdtMethodDef);
@@ -1759,7 +1717,6 @@ STDMETHODIMP RegMeta::GetMethodSemantics( // S_OK, S_FALSE, or error.
ErrExit:
HENUMInternal::ClearEnum(&hEnum);
- STOP_MD_PERF(GetMethodSemantics);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -1792,7 +1749,6 @@ STDMETHODIMP RegMeta::GetClassLayout(
LOG((LOGMD, "MD RegMeta::GetClassLayout(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
td, pdwPackSize, rFieldOffset, cMax, pcFieldOffset, pulClassSize));
- START_MD_PERF();
LOCKREAD();
IfFailGo(pMiniMd->FindClassLayoutHelper(td, &ridClassLayout));
@@ -1875,7 +1831,6 @@ STDMETHODIMP RegMeta::GetClassLayout(
hr = CLDB_E_RECORD_NOTFOUND;
ErrExit:
- STOP_MD_PERF(GetClassLayout);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -1905,7 +1860,6 @@ STDMETHODIMP RegMeta::GetFieldMarshal(
LOG((LOGMD, "MD RegMeta::GetFieldMarshal(0x%08x, 0x%08x, 0x%08x)\n",
tk, ppvNativeType, pcbNativeType));
- START_MD_PERF();
LOCKREAD();
_ASSERTE(TypeFromToken(tk) == mdtParamDef || TypeFromToken(tk) == mdtFieldDef);
@@ -1922,7 +1876,6 @@ STDMETHODIMP RegMeta::GetFieldMarshal(
IfFailGo(pMiniMd->getNativeTypeOfFieldMarshal(pFieldMarshalRec, ppvNativeType, pcbNativeType));
ErrExit:
- STOP_MD_PERF(GetFieldMarshal);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -1948,7 +1901,6 @@ RegMeta::GetRVA(
LOG((LOGMD, "MD RegMeta::GetRVA(0x%08x, 0x%08x, 0x%08x)\n",
tk, pulCodeRVA, pdwImplFlags));
- START_MD_PERF();
LOCKREAD();
if (TypeFromToken(tk) == mdtMethodDef)
@@ -2004,7 +1956,6 @@ RegMeta::GetRVA(
}
}
ErrExit:
- STOP_MD_PERF(GetRVA);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -2031,7 +1982,6 @@ STDMETHODIMP RegMeta::GetPermissionSetProps(
CMiniMdRW *pMiniMd = NULL;
DeclSecurityRec *pRecord = NULL;
- START_MD_PERF();
LOCKREAD();
pMiniMd = &(m_pStgdb->m_MiniMd);
@@ -2052,7 +2002,6 @@ STDMETHODIMP RegMeta::GetPermissionSetProps(
ErrExit:
- STOP_MD_PERF(GetPermissionSetProps);
END_ENTRYPOINT_NOTHROW;
return hr;
} // STDMETHODIMP RegMeta::GetPermissionSetProps()
@@ -2087,7 +2036,6 @@ STDMETHODIMP RegMeta::GetSigFromToken( // S_OK or error.
- START_MD_PERF();
LOCKREAD();
_ASSERTE(TypeFromToken(mdSig) == mdtSignature);
@@ -2099,7 +2047,6 @@ STDMETHODIMP RegMeta::GetSigFromToken( // S_OK or error.
ErrExit:
- STOP_MD_PERF(GetSigFromToken);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -2126,7 +2073,6 @@ STDMETHODIMP RegMeta::GetModuleRefProps( // S_OK or error.
LOG((LOGMD, "MD RegMeta::GetModuleRefProps(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
mur, szName, cchName, pchName));
- START_MD_PERF();
LOCKREAD();
IfFailGo(pMiniMd->GetModuleRefRecord(RidFromToken(mur), &pModuleRefRec));
@@ -2141,7 +2087,6 @@ STDMETHODIMP RegMeta::GetModuleRefProps( // S_OK or error.
ErrExit:
- STOP_MD_PERF(GetModuleRefProps);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -2168,7 +2113,6 @@ STDMETHODIMP RegMeta::EnumModuleRefs( // S_OK or error.
LOG((LOGMD, "MD RegMeta::EnumModuleRefs(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
phEnum, rModuleRefs, cMax, pcModuleRefs));
- START_MD_PERF();
LOCKREAD();
if (*ppmdEnum == NULL)
@@ -2197,7 +2141,6 @@ STDMETHODIMP RegMeta::EnumModuleRefs( // S_OK or error.
ErrExit:
HENUMInternal::DestroyEnumIfEmpty(ppmdEnum);
- STOP_MD_PERF(EnumModuleRefs);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -2224,7 +2167,6 @@ STDMETHODIMP RegMeta::GetTypeSpecFromToken( // S_OK or error.
- START_MD_PERF();
LOCKREAD();
_ASSERTE(TypeFromToken(typespec) == mdtTypeSpec);
@@ -2235,7 +2177,6 @@ STDMETHODIMP RegMeta::GetTypeSpecFromToken( // S_OK or error.
ErrExit:
- STOP_MD_PERF(GetTypeSpecFromToken);
END_ENTRYPOINT_NOTHROW;
return hr;
} // STDMETHODIMP RegMeta::GetTypeSpecFromToken()
@@ -2269,7 +2210,6 @@ STDMETHODIMP RegMeta::GetNameFromToken( // S_OK or error.
LOG((LOGMD, "MD RegMeta::GetNameFromToken(0x%08x, 0x%08x)\n",
tk, pszUtf8NamePtr));
- START_MD_PERF();
LOCKREAD();
_ASSERTE(pszUtf8NamePtr);
@@ -2293,7 +2233,6 @@ STDMETHODIMP RegMeta::GetNameFromToken( // S_OK or error.
ErrExit:
- STOP_MD_PERF(GetNameFromToken);
END_ENTRYPOINT_NOTHROW;
@@ -2328,7 +2267,6 @@ STDMETHODIMP RegMeta::EnumUnresolvedMethods( // S_OK or error.
LOG((LOGMD, "MD RegMeta::EnumUnresolvedMethods(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
phEnum, rMethods, cMax, pcTokens));
- START_MD_PERF();
// take the write lock. Because we should have not have two EnumUnresolvedMethods being called at the
// same time. Ref to Def map may be calculated incorrectly.
@@ -2437,7 +2375,6 @@ ErrExit:
HENUMInternal::DestroyEnumIfEmpty(ppmdEnum);
HENUMInternal::DestroyEnum(pEnum);
- STOP_MD_PERF(EnumUnresolvedMethods);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -2465,7 +2402,6 @@ STDMETHODIMP RegMeta::GetUserString( // S_OK or error.
LOG((LOGMD, "MD RegMeta::GetUserString(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
stk, wszString, cchStringSize, pcchStringSize));
- START_MD_PERF();
LOCKREAD();
// Get the string data.
@@ -2512,7 +2448,6 @@ STDMETHODIMP RegMeta::GetUserString( // S_OK or error.
}
ErrExit:
- STOP_MD_PERF(GetUserString);
END_ENTRYPOINT_NOTHROW;
return hr;
} // RegMeta::GetUserString
@@ -2538,7 +2473,6 @@ STDMETHODIMP RegMeta::GetPinvokeMap( // S_OK or error.
LOG((LOGMD, "MD RegMeta::GetPinvokeMap(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
tk, pdwMappingFlags, szImportName, cchImportName, pchImportName, pmrImportDLL));
- START_MD_PERF();
LOCKREAD();
_ASSERTE(TypeFromToken(tk) == mdtFieldDef ||
@@ -2560,7 +2494,6 @@ STDMETHODIMP RegMeta::GetPinvokeMap( // S_OK or error.
if (szImportName || pchImportName)
IfFailGo(m_pStgdb->m_MiniMd.getImportNameOfImplMap(pRecord, szImportName, cchImportName, pchImportName));
ErrExit:
- STOP_MD_PERF(GetPinvokeMap);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -2585,7 +2518,6 @@ STDMETHODIMP RegMeta::EnumSignatures( // S_OK or error.
LOG((LOGMD, "MD RegMeta::EnumSignatures(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
phEnum, rSignatures, cmax, pcSignatures));
- START_MD_PERF();
LOCKREAD();
if (*ppsigEnum == NULL)
@@ -2614,7 +2546,6 @@ STDMETHODIMP RegMeta::EnumSignatures( // S_OK or error.
ErrExit:
HENUMInternal::DestroyEnumIfEmpty(ppsigEnum);
- STOP_MD_PERF(EnumSignatures);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -2640,7 +2571,6 @@ STDMETHODIMP RegMeta::EnumTypeSpecs( // S_OK or error.
LOG((LOGMD, "MD RegMeta::EnumTypeSpecs(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
phEnum, rTypeSpecs, cmax, pcTypeSpecs));
- START_MD_PERF();
LOCKREAD();
if (*ppEnum == NULL)
@@ -2669,7 +2599,6 @@ STDMETHODIMP RegMeta::EnumTypeSpecs( // S_OK or error.
ErrExit:
HENUMInternal::DestroyEnumIfEmpty(ppEnum);
- STOP_MD_PERF(EnumTypeSpecs);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -2695,7 +2624,6 @@ STDMETHODIMP RegMeta::EnumUserStrings( // S_OK or error.
LOG((LOGMD, "MD RegMeta::EnumUserStrings(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
phEnum, rStrings, cmax, pcStrings));
- START_MD_PERF();
LOCKREAD();
if (*ppEnum == NULL)
@@ -2748,7 +2676,6 @@ ErrExit:
HENUMInternal::DestroyEnumIfEmpty(ppEnum);
HENUMInternal::DestroyEnum(pEnum);
- STOP_MD_PERF(EnumUserStrings);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -2771,7 +2698,6 @@ STDMETHODIMP RegMeta::GetParamForMethodIndex( // S_OK or error.
LOG((LOGMD, "MD RegMeta::GetParamForMethodIndex(0x%08x, 0x%08x, 0x%08x)\n",
md, ulParamSeq, ppd));
- START_MD_PERF();
LOCKREAD();
_ASSERTE((TypeFromToken(md) == mdtMethodDef) && (ulParamSeq != UINT32_MAX) && (ppd != NULL));
@@ -2779,7 +2705,6 @@ STDMETHODIMP RegMeta::GetParamForMethodIndex( // S_OK or error.
IfFailGo(_FindParamOfMethod(md, ulParamSeq, ppd));
ErrExit:
- STOP_MD_PERF(GetParamForMethodIndex);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -2813,7 +2738,6 @@ HRESULT RegMeta::GetMemberProps(
- START_MD_PERF();
_ASSERTE(TypeFromToken(mb) == mdtMethodDef || TypeFromToken(mb) == mdtFieldDef);
@@ -2851,7 +2775,6 @@ HRESULT RegMeta::GetMemberProps(
pchValue) );
}
ErrExit:
- STOP_MD_PERF(GetMemberProps);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -2884,7 +2807,6 @@ HRESULT RegMeta::GetFieldProps(
fd, pClass, szField, cchField, pchField, pdwAttr, ppvSigBlob, pcbSigBlob, pdwCPlusTypeFlag,
ppValue, pchValue));
- START_MD_PERF();
LOCKREAD();
_ASSERTE(TypeFromToken(fd) == mdtFieldDef);
@@ -2963,7 +2885,6 @@ HRESULT RegMeta::GetFieldProps(
}
ErrExit:
- STOP_MD_PERF(GetFieldProps);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -3009,7 +2930,6 @@ HRESULT RegMeta::GetPropertyProps( // S_OK, S_FALSE, or error.
- START_MD_PERF();
LOCKREAD();
_ASSERTE(TypeFromToken(prop) == mdtProperty);
@@ -3132,7 +3052,6 @@ HRESULT RegMeta::GetPropertyProps( // S_OK, S_FALSE, or error.
ErrExit:
HENUMInternal::ClearEnum(&hEnum);
- STOP_MD_PERF(GetPropertyProps);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -3164,7 +3083,6 @@ HRESULT RegMeta::GetParamProps( // S_OK or error.
LOG((LOGMD, "MD RegMeta::GetParamProps(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
pd, pmd, pulSequence, szName, cchName, pchName, pdwAttr, pdwCPlusTypeFlag, ppValue, pchValue));
- START_MD_PERF();
LOCKREAD();
_ASSERTE(TypeFromToken(pd) == mdtParamDef);
@@ -3226,7 +3144,6 @@ HRESULT RegMeta::GetParamProps( // S_OK or error.
IfFailGo( pMiniMd->getNameOfParam(pParamRec, szName, cchName, pchName) );
ErrExit:
- STOP_MD_PERF(GetParamProps);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -3257,7 +3174,6 @@ HRESULT RegMeta::GetGenericParamProps( // S_OK or error.
LOG((LOGMD, "MD RegMeta::GetGenericParamProps(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
rd, pulSequence, pdwAttr, ptOwner, reserved, szName, cchName, pchName));
- START_MD_PERF();
LOCKREAD();
pMiniMd = &(m_pStgdb->m_MiniMd);
@@ -3285,7 +3201,6 @@ HRESULT RegMeta::GetGenericParamProps( // S_OK or error.
hr = META_E_BAD_INPUT_PARAMETER;
ErrExit:
- STOP_MD_PERF(GetGenericParamProps);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -3310,7 +3225,6 @@ HRESULT RegMeta::GetGenericParamConstraintProps( // S_OK or error.
LOG((LOGMD, "MD RegMeta::GetGenericParamConstraintProps(0x%08x, 0x%08x, 0x%08x)\n",
rd, ptGenericParam, ptkConstraintType));
- START_MD_PERF();
LOCKREAD();
pMiniMd = &(m_pStgdb->m_MiniMd);
@@ -3333,7 +3247,6 @@ HRESULT RegMeta::GetGenericParamConstraintProps( // S_OK or error.
hr = META_E_BAD_INPUT_PARAMETER;
ErrExit:
- STOP_MD_PERF(GetGenericParamConstraintProps);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -3357,7 +3270,6 @@ HRESULT RegMeta::GetMethodSpecProps( // S_OK or error.
LOG((LOGMD, "MD RegMeta::GetMethodSpecProps(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
mi, tkParent, ppvSigBlob, pcbSigBlob));
- START_MD_PERF();
LOCKREAD();
pMiniMd = &(m_pStgdb->m_MiniMd);
@@ -3389,7 +3301,6 @@ HRESULT RegMeta::GetMethodSpecProps( // S_OK or error.
ErrExit:
- STOP_MD_PERF(GetMethodSpecProps);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -3409,7 +3320,6 @@ HRESULT RegMeta::GetPEKind( // S_OK or error.
LOG((LOGMD, "MD RegMeta::GetPEKind(0x%08x, 0x%08x)\n",pdwPEKind,pdwMachine));
- START_MD_PERF();
LOCKREAD();
@@ -3420,7 +3330,6 @@ HRESULT RegMeta::GetPEKind( // S_OK or error.
ErrExit:
- STOP_MD_PERF(GetPEKind);
END_ENTRYPOINT_NOTHROW;
return hr;
} // HRESULT RegMeta::GetPEKind()
@@ -3445,7 +3354,6 @@ HRESULT RegMeta::GetVersionString( // S_OK or error.
LOG((LOGMD, "MD RegMeta::GetVersionString(0x%08x, 0x%08x, 0x%08x)\n",pwzBuf,cchBufSize,pchBufSize));
- START_MD_PERF();
LOCKREAD();
if (m_pStgdb->m_pvMd != NULL)
@@ -3478,7 +3386,6 @@ HRESULT RegMeta::GetVersionString( // S_OK or error.
ErrExit:
- STOP_MD_PERF(GetVersionString);
END_ENTRYPOINT_NOTHROW;
return hr;
} // HRESULT RegMeta::GetVersionString()
@@ -3502,7 +3409,6 @@ HRESULT RegMeta::GetNestedClassProps( // S_OK or error.
LOG((LOGMD, "MD RegMeta::GetNestedClassProps(0x%08x, 0x%08x)\n",
tdNestedClass, ptdEnclosingClass));
- START_MD_PERF();
LOCKREAD();
// If not a typedef -- return error.
@@ -3527,7 +3433,6 @@ HRESULT RegMeta::GetNestedClassProps( // S_OK or error.
*ptdEnclosingClass = pMiniMd->getEnclosingClassOfNestedClass(pRecord);
ErrExit:
- STOP_MD_PERF(GetNestedClassProps);
END_ENTRYPOINT_NOTHROW;
return hr;
diff --git a/src/coreclr/md/compiler/mdperf.cpp b/src/coreclr/md/compiler/mdperf.cpp
deleted file mode 100644
index 016b28d9a4c..00000000000
--- a/src/coreclr/md/compiler/mdperf.cpp
+++ /dev/null
@@ -1,95 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//*****************************************************************************
-// MDperf.cpp
-//
-
-//
-// This file provides Compiler Support functionality in metadata.
-//*****************************************************************************
-
-#include "stdafx.h"
-
-#include "mdperf.h"
-
-#ifdef FEATURE_METADATA_PERF_STATS
-
-//-----------------------------------------------------------------------------
-// Global array containing the name of the APIs. This is shared across
-// all instances of MDCompilerPerf.
-//-----------------------------------------------------------------------------
-char g_szNameOfAPI[LAST_MD_API][API_NAME_STR_SIZE];
-
-//-----------------------------------------------------------------------------
-// Constructor. Initialize counters to 0. Initialize names of MD APIs.
-//-----------------------------------------------------------------------------
-MDCompilerPerf::MDCompilerPerf()
-{
- // Initialize counters
- for (int idx=0; idx < LAST_MD_API; idx++)
- {
- MDPerfStats[idx].dwCalledNumTimes = 0;
- MDPerfStats[idx].dwQueryPerfCycles = 0;
- }
-
-#undef MD_FUNC
-#define MD_FUNC(MDTag)\
- strncpy(g_szNameOfAPI[MDTag ## _ENUM], #MDTag, API_NAME_STR_SIZE-1);
-
- MD_COMPILER_PERF_TABLE; // Relies on the MD_FUNC defined above.
-}
-
-MDCompilerPerf::~MDCompilerPerf()
- {
- // Output the stats and cleanup.
- MetaDataPerfReport ();
- }
-
-//-----------------------------------------------------------------------------
-// Output stats. <TODO>TODO: grow this into stats for per fautomation</TODO>
-//-----------------------------------------------------------------------------
-void MDCompilerPerf::MetaDataPerfReport ()
-{
- LARGE_INTEGER freqVal;
- DWORD totalCalls=0, totalCycles=0;
-
- if (!QueryPerformanceFrequency(&freqVal))
- {
- printf("Perf counters not supported\n");
- return;
- }
-
- for (int idx=0; idx < LAST_MD_API; idx++)
- {
- totalCalls += MDPerfStats[idx].dwCalledNumTimes;
- totalCycles += MDPerfStats[idx].dwQueryPerfCycles;
- }
-
- if (!(totalCalls && totalCycles && freqVal.QuadPart))
- {
- // if any of above is 0 then things don't look good.
- printf("No data gathered ...\n");
- return;
- }
-
- printf("\n%-32.32s %-16.16s %-16.16s %-16.16s\n", "API Name", "# Calls", "Cycles", "Time (msec)");
- for (idx=0; idx < LAST_MD_API; idx++)
- {
- if(MDPerfStats[idx].dwCalledNumTimes != 0)
- printf( "%-32.32s %-9d [%3.2d%%] %-16d %-8.2f [%3.2d%%]\n",
- g_szNameOfAPI[idx],
- MDPerfStats[idx].dwCalledNumTimes,
- (MDPerfStats[idx].dwCalledNumTimes*100)/totalCalls,
- MDPerfStats[idx].dwQueryPerfCycles,
- ((float)MDPerfStats[idx].dwQueryPerfCycles*1000)/(float)freqVal.QuadPart,
- (MDPerfStats[idx].dwQueryPerfCycles*100)/totalCycles);
- }
- printf( "%-32.32s %-9d [100%%] %-16d %-8.2f [100%%]\n\n",
- "Total Stats",
- totalCalls,
- totalCycles,
- ((float)totalCycles*1000)/(float)freqVal.QuadPart);
-
-}
-
-#endif //FEATURE_METADATA_PERF_STATS
diff --git a/src/coreclr/md/compiler/mdperf.h b/src/coreclr/md/compiler/mdperf.h
deleted file mode 100644
index b7726b36e32..00000000000
--- a/src/coreclr/md/compiler/mdperf.h
+++ /dev/null
@@ -1,241 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//*****************************************************************************
-// Mdperf.h
-//
-
-//
-//*****************************************************************************
-
-#ifndef __MDCOMPILERPERF_H__
-#define __MDCOMPILERPERF_H__
-
-//#define FEATURE_METADATA_PERF_STATS
-
-#ifdef FEATURE_METADATA_PERF_STATS
-
-// Avoid dynamic allocs to display the API names.
-#define API_NAME_STR_SIZE 80
-
-//-----------------------------------------------------------------------------
-// In order to add instrumentation for an API, two changes have to be made.
-// One, add the API name in the table below (MD_TABLE).
-// Second, add two lines of code (shown below) in the implementation
-// of the API itself. e.g.
-// RegMeta::MyNewMetataDataAPI(...)
-// {
-// LOG(...);
-// START_MD_PERF(); // <------ add this line as is.
-// ....
-// // API implementation
-// ErrExit:
-// STOP_MD_PERF(RegMeta_MyNewMetaDataAPI); // <---------- add this line with the appropriate name
-// return (hr);
-// ]
-//
-//-----------------------------------------------------------------------------
-#define MD_COMPILER_PERF_TABLE\
- MD_FUNC(SaveToMemory)\
- MD_FUNC(DefineMethod)\
- MD_FUNC(DefineMethodImpl)\
- MD_FUNC(SetRVA)\
- MD_FUNC(DefineTypeRefByName)\
- MD_FUNC(DefineImportType)\
- MD_FUNC(DefineMemberRef)\
- MD_FUNC(DefineImportMember)\
- MD_FUNC(DefineEvent)\
- MD_FUNC(SetClassLayout)\
- MD_FUNC(DeleteClassLayout)\
- MD_FUNC(SetFieldMarshal)\
- MD_FUNC(DeleteFieldMarshal)\
- MD_FUNC(DefinePermissionSet)\
- MD_FUNC(SetMemberIndex)\
- MD_FUNC(GetTokenFromSig)\
- MD_FUNC(DefineModuleRef)\
- MD_FUNC(SetParent)\
- MD_FUNC(GetTokenFromTypeSpec)\
- MD_FUNC(DefineUserString)\
- MD_FUNC(DeleteToken)\
- MD_FUNC(SetTypeDefProps)\
- MD_FUNC(DefineNestedType)\
- MD_FUNC(SetMethodProps)\
- MD_FUNC(SetEventProps)\
- MD_FUNC(SetPermissionSetProps)\
- MD_FUNC(DefinePinvokeMap)\
- MD_FUNC(SetPinvokeMap)\
- MD_FUNC(DeletePinvokeMap)\
- MD_FUNC(DefineField)\
- MD_FUNC(DefineProperty)\
- MD_FUNC(DefineParam)\
- MD_FUNC(SetFieldProps)\
- MD_FUNC(SetPropertyProps)\
- MD_FUNC(SetParamProps)\
- MD_FUNC(EnumMembers)\
- MD_FUNC(EnumMembersWithName)\
- MD_FUNC(EnumMethods)\
- MD_FUNC(EnumMethodsWithName)\
- MD_FUNC(EnumFields)\
- MD_FUNC(EnumFieldsWithName)\
- MD_FUNC(EnumParams)\
- MD_FUNC(EnumMemberRefs)\
- MD_FUNC(EnumMethodImpls)\
- MD_FUNC(EnumPermissionSets)\
- MD_FUNC(FindMember)\
- MD_FUNC(FindMethod)\
- MD_FUNC(FindField)\
- MD_FUNC(FindMemberRef)\
- MD_FUNC(GetMethodProps)\
- MD_FUNC(GetMemberRefProps)\
- MD_FUNC(EnumProperties)\
- MD_FUNC(EnumEvents)\
- MD_FUNC(GetEventProps)\
- MD_FUNC(EnumMethodSemantics)\
- MD_FUNC(GetMethodSemantics)\
- MD_FUNC(GetClassLayout)\
- MD_FUNC(GetFieldMarshal)\
- MD_FUNC(GetRVA)\
- MD_FUNC(GetPermissionSetProps)\
- MD_FUNC(GetSigFromToken)\
- MD_FUNC(GetModuleRefProps)\
- MD_FUNC(EnumModuleRefs)\
- MD_FUNC(GetTypeSpecFromToken)\
- MD_FUNC(GetNameFromToken)\
- MD_FUNC(EnumUnresolvedMethods)\
- MD_FUNC(GetUserString)\
- MD_FUNC(GetPinvokeMap)\
- MD_FUNC(EnumSignatures)\
- MD_FUNC(EnumTypeSpecs)\
- MD_FUNC(EnumUserStrings)\
- MD_FUNC(GetParamForMethodIndex)\
- MD_FUNC(GetMemberProps)\
- MD_FUNC(GetFieldProps)\
- MD_FUNC(GetPropertyProps)\
- MD_FUNC(GetParamProps)\
- MD_FUNC(SetModuleProps)\
- MD_FUNC(Save)\
- MD_FUNC(SaveToStream)\
- MD_FUNC(GetSaveSize)\
- MD_FUNC(Merge)\
- MD_FUNC(DefineCustomAttribute)\
- MD_FUNC(SetCustomAttributeValue)\
- MD_FUNC(DefineSecurityAttributeSet)\
- MD_FUNC(UnmarkAll)\
- MD_FUNC(MarkToken)\
- MD_FUNC(IsTokenMarked)\
- MD_FUNC(DefineTypeDef)\
- MD_FUNC(SetHandler)\
- MD_FUNC(CountEnum)\
- MD_FUNC(ResetEnum)\
- MD_FUNC(EnumTypeDefs)\
- MD_FUNC(EnumInterfaceImpls)\
- MD_FUNC(EnumTypeRefs)\
- MD_FUNC(FindTypeDefByName)\
- MD_FUNC(FindTypeDefByGUID)\
- MD_FUNC(GetScopeProps)\
- MD_FUNC(GetModuleFromScope)\
- MD_FUNC(GetTypeDefProps)\
- MD_FUNC(GetInterfaceImplProps)\
- MD_FUNC(GetCustomAttributeByName)\
- MD_FUNC(GetTypeRefProps)\
- MD_FUNC(ResolveTypeRef)\
- MD_FUNC(EnumCustomAttributes)\
- MD_FUNC(GetCustomAttributeProps)\
- MD_FUNC(FindTypeRef)\
- MD_FUNC(RefToDefOptimization)\
- MD_FUNC(DefineAssembly)\
- MD_FUNC(DefineAssemblyRef)\
- MD_FUNC(DefineFile)\
- MD_FUNC(DefineExportedType)\
- MD_FUNC(DefineManifestResource)\
- MD_FUNC(DefineExecutionLocation)\
- MD_FUNC(SetAssemblyProps)\
- MD_FUNC(SetAssemblyRefProps)\
- MD_FUNC(SetFileProps)\
- MD_FUNC(SetExportedTypeProps)\
- MD_FUNC(GetAssemblyProps)\
- MD_FUNC(GetAssemblyRefProps)\
- MD_FUNC(GetFileProps)\
- MD_FUNC(GetExportedTypeProps)\
- MD_FUNC(GetManifestResourceProps)\
- MD_FUNC(EnumAssemblyRefs)\
- MD_FUNC(EnumFiles)\
- MD_FUNC(EnumExportedTypes)\
- MD_FUNC(EnumManifestResources)\
- MD_FUNC(EnumExecutionLocations)\
- MD_FUNC(GetAssemblyFromScope)\
- MD_FUNC(FindExportedTypeByName)\
- MD_FUNC(FindManifestResourceByName)\
- MD_FUNC(FindAssembliesByName)\
- MD_FUNC(SetGenericPars)\
- MD_FUNC(DefineGenericParam)\
- MD_FUNC(SetGenericParamProps)\
- MD_FUNC(EnumGenericParamConstraints)\
- MD_FUNC(GetGenericParamProps)\
- MD_FUNC(GetGenericParamConstraintProps)\
- MD_FUNC(GetPEKind)\
- MD_FUNC(GetVersionString)\
- MD_FUNC(GetAssemblyUnification)
-
-//-----------------------------------------------------------------------------
-// Create an enum of all the API names. This is the index to access the APIs.
-//-----------------------------------------------------------------------------
-#undef MD_FUNC
-#define MD_FUNC(MDTag)\
- MDTag ## _ENUM,
-
-typedef enum _MDAPIs
-{
- MD_COMPILER_PERF_TABLE
- LAST_MD_API
-} MDApis;
-
-//-----------------------------------------------------------------------------
-// Declare the struct which contais all the interesting stats for a particular
-// API call.
-//-----------------------------------------------------------------------------
-typedef struct _MDAPIPerfData
-{
- DWORD dwQueryPerfCycles; // # of cycles spent in this call
- DWORD dwCalledNumTimes; // # of times this API was called
-} MDAPIPerfData;
-
-
-//-----------------------------------------------------------------------------
-// MDCompilerPerf
-//-----------------------------------------------------------------------------
-class MDCompilerPerf
-{
-public:
- MDCompilerPerf();
- ~MDCompilerPerf();
-
-private:
- MDAPIPerfData MDPerfStats[LAST_MD_API];
-
- void MetaDataPerfReport ();
-};
-
-// Note that this macro declares a local var.
-#define START_MD_PERF()\
- LARGE_INTEGER __startVal;\
- QueryPerformanceCounter(&__startVal);
-
-#undef MD_FUNC
-#define MD_FUNC(MDTag)\
- MDTag ## _ENUM
-
-// Note that this macro uses the local var startVal declared in START_MD_PERF()
-#define STOP_MD_PERF(MDTag)\
- LARGE_INTEGER __stopVal;\
- QueryPerformanceCounter(&__stopVal);\
- m_MDCompilerPerf.MDPerfStats[MD_FUNC(MDTag)].dwCalledNumTimes++;\
- m_MDCompilerPerf.MDPerfStats[MD_FUNC(MDTag)].dwQueryPerfCycles += (DWORD)(__stopVal.QuadPart - __startVal.QuadPart);
-
-#else //!FEATURE_METADATA_PERF_STATS
-
-#define START_MD_PERF()
-#define STOP_MD_PERF(MDTag)
-
-#endif //!FEATURE_METADATA_PERF_STATS
-
-#endif // __MDCOMPILERPERF_H__
diff --git a/src/coreclr/md/compiler/regmeta.cpp b/src/coreclr/md/compiler/regmeta.cpp
index 25279297573..d4a74bd9c2e 100644
--- a/src/coreclr/md/compiler/regmeta.cpp
+++ b/src/coreclr/md/compiler/regmeta.cpp
@@ -17,7 +17,6 @@
#include "mdlog.h"
#include "importhelper.h"
#include "filtermanager.h"
-#include "mdperf.h"
#include "switches.h"
#include "posterror.h"
#include "stgio.h"
diff --git a/src/coreclr/md/compiler/regmeta.h b/src/coreclr/md/compiler/regmeta.h
index 8a2ef8b4386..5a0b1773c54 100644
--- a/src/coreclr/md/compiler/regmeta.h
+++ b/src/coreclr/md/compiler/regmeta.h
@@ -17,10 +17,7 @@
#include <metamodelrw.h>
#include "../inc/mdlog.h"
#include "utsem.h"
-
#include "rwutil.h"
-#include "mdperf.h"
-
#include "sigparser.h"
class FilterManager;
@@ -2037,10 +2034,6 @@ private:
LONG m_cRef; // Ref count.
IUnknown *m_pFreeThreadedMarshaler; // FreeThreadedMarshaler
-#ifdef FEATURE_METADATA_PERF_STATS
- MDCompilerPerf m_MDCompilerPerf; // Compiler perf object to store all stats.
-#endif
-
// If true, cached in list of global scopes. This is very dangerous because it may allow
// unpredictable state sharing between seemingly unrelated dispensers.
bool m_bCached;
diff --git a/src/coreclr/md/compiler/regmeta_compilersupport.cpp b/src/coreclr/md/compiler/regmeta_compilersupport.cpp
index b2d635530b8..e65d3c37eca 100644
--- a/src/coreclr/md/compiler/regmeta_compilersupport.cpp
+++ b/src/coreclr/md/compiler/regmeta_compilersupport.cpp
@@ -17,7 +17,6 @@
#include "mdlog.h"
#include "importhelper.h"
#include "filtermanager.h"
-#include "mdperf.h"
#include "switches.h"
#include "posterror.h"
#include "stgio.h"
diff --git a/src/coreclr/md/compiler/regmeta_emit.cpp b/src/coreclr/md/compiler/regmeta_emit.cpp
index 7fd689df573..1b03550699c 100644
--- a/src/coreclr/md/compiler/regmeta_emit.cpp
+++ b/src/coreclr/md/compiler/regmeta_emit.cpp
@@ -20,7 +20,6 @@
#include "mdlog.h"
#include "importhelper.h"
#include "filtermanager.h"
-#include "mdperf.h"
#include "switches.h"
#include "posterror.h"
#include "stgio.h"
@@ -58,7 +57,6 @@ STDMETHODIMP RegMeta::SetModuleProps( // S_OK or error.
LOG((LOGMD, "RegMeta::SetModuleProps(%S)\n", MDSTR(szName)));
- START_MD_PERF()
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
@@ -77,7 +75,6 @@ STDMETHODIMP RegMeta::SetModuleProps( // S_OK or error.
ErrExit:
- STOP_MD_PERF(SetModuleProps);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -95,7 +92,6 @@ STDMETHODIMP RegMeta::Save( // S_OK or error.
BEGIN_ENTRYPOINT_NOTHROW;
LOG((LOGMD, "RegMeta::Save(%S, 0x%08x)\n", MDSTR(szFile), dwSaveFlags));
- START_MD_PERF()
LOCKWRITE();
// Check reserved param..
@@ -119,7 +115,6 @@ STDMETHODIMP RegMeta::Save( // S_OK or error.
ErrExit:
- STOP_MD_PERF(Save);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -139,13 +134,11 @@ STDMETHODIMP RegMeta::SaveToStream( // S_OK or error.
LOCKWRITE();
LOG((LOGMD, "RegMeta::SaveToStream(0x%08x, 0x%08x)\n", pIStream, dwSaveFlags));
- START_MD_PERF()
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
hr = _SaveToStream(pIStream, dwSaveFlags);
- STOP_MD_PERF(SaveToStream);
#if defined(_DEBUG)
if (CLRConfig::GetConfigValue(CLRConfig::INTERNAL_MD_RegMetaDump))
@@ -200,7 +193,6 @@ STDMETHODIMP RegMeta::SaveToMemory( // S_OK or error.
LOG((LOGMD, "MD RegMeta::SaveToMemory(0x%08x, 0x%08x)\n",
pbData, cbData));
- START_MD_PERF();
#ifdef _DEBUG
ULONG cbActual; // Size of the real data.
@@ -219,7 +211,6 @@ STDMETHODIMP RegMeta::SaveToMemory( // S_OK or error.
ErrExit:
if (pStream)
pStream->Release();
- STOP_MD_PERF(SaveToMemory);
END_ENTRYPOINT_NOTHROW;
return (hr);
@@ -239,7 +230,6 @@ STDMETHODIMP RegMeta::GetSaveSize( // S_OK or error.
FilterTable *ft = NULL;
LOG((LOGMD, "RegMeta::GetSaveSize(0x%08x, 0x%08x)\n", fSave, pdwSaveSize));
- START_MD_PERF();
LOCKWRITE();
ft = m_pStgdb->m_MiniMd.GetFilterTable();
@@ -284,7 +274,6 @@ STDMETHODIMP RegMeta::GetSaveSize( // S_OK or error.
hr = m_pStgdb->GetSaveSize(fSave, (UINT32 *)pdwSaveSize, m_ReorderingOptions);
ErrExit:
- STOP_MD_PERF(GetSaveSize);
END_ENTRYPOINT_NOTHROW;
@@ -314,7 +303,6 @@ HRESULT RegMeta::UnmarkAll()
LOG((LOGMD, "RegMeta::UnmarkAll\n"));
- START_MD_PERF();
LOCKWRITE();
#if 0
@@ -429,7 +417,6 @@ HRESULT RegMeta::UnmarkAll()
}
ErrExit:
- STOP_MD_PERF(UnmarkAll);
END_ENTRYPOINT_NOTHROW;
@@ -475,7 +462,6 @@ STDMETHODIMP RegMeta::MarkToken( // Return code.
BEGIN_ENTRYPOINT_NOTHROW;
// LOG((LOGMD, "RegMeta::MarkToken(0x%08x)\n", tk));
- START_MD_PERF();
LOCKWRITE();
if (m_pStgdb->m_MiniMd.GetFilterTable() == NULL || m_pFilterManager == NULL)
@@ -551,7 +537,6 @@ STDMETHODIMP RegMeta::MarkToken( // Return code.
}
ErrExit:
- STOP_MD_PERF(MarkToken);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -574,7 +559,6 @@ HRESULT RegMeta::IsTokenMarked(
FilterTable *pFilter = NULL;
LOG((LOGMD, "RegMeta::IsTokenMarked(0x%08x)\n", tk));
- START_MD_PERF();
LOCKREAD();
pFilter = m_pStgdb->m_MiniMd.GetFilterTable();
@@ -635,7 +619,6 @@ HRESULT RegMeta::IsTokenMarked(
}
ErrExit:
- STOP_MD_PERF(IsTokenMarked);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -660,7 +643,6 @@ STDMETHODIMP RegMeta::DefineTypeDef( // S_OK or error.
LOG((LOGMD, "RegMeta::DefineTypeDef(%S, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
MDSTR(szTypeDef), dwTypeDefFlags, tkExtends,
rtkImplements, ptd));
- START_MD_PERF();
LOCKWRITE();
IfFailGo(m_pStgdb->m_MiniMd.PreUpdate());
@@ -670,7 +652,6 @@ STDMETHODIMP RegMeta::DefineTypeDef( // S_OK or error.
IfFailGo(_DefineTypeDef(szTypeDef, dwTypeDefFlags,
tkExtends, rtkImplements, mdTokenNil, ptd));
ErrExit:
- STOP_MD_PERF(DefineTypeDef);
END_ENTRYPOINT_NOTHROW;
@@ -691,7 +672,6 @@ STDMETHODIMP RegMeta::SetHandler( // S_OK.
IMapToken *pIMap = NULL;
LOG((LOGMD, "RegMeta::SetHandler(0x%08x)\n", pUnk));
- START_MD_PERF();
LOCKWRITE();
m_pHandler = pUnk;
@@ -708,7 +688,6 @@ STDMETHODIMP RegMeta::SetHandler( // S_OK.
ErrExit:
- STOP_MD_PERF(SetHandler);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -817,7 +796,6 @@ HRESULT RegMeta::RefToDefOptimization()
- START_MD_PERF();
// the Ref to Def map is still up-to-date
if (IsMemberDefDirty() == false && IsTypeDefDirty() == false && m_hasOptimizedRefToDef == true)
@@ -960,7 +938,6 @@ HRESULT RegMeta::RefToDefOptimization()
SetTypeDefDirty(false);
m_hasOptimizedRefToDef = true;
ErrExit:
- STOP_MD_PERF(RefToDefOptimization);
return hr;
} // RegMeta::RefToDefOptimization
diff --git a/src/coreclr/md/compiler/regmeta_import.cpp b/src/coreclr/md/compiler/regmeta_import.cpp
index 490097962ee..77f6c4a547d 100644
--- a/src/coreclr/md/compiler/regmeta_import.cpp
+++ b/src/coreclr/md/compiler/regmeta_import.cpp
@@ -20,7 +20,6 @@
#include "mdlog.h"
#include "importhelper.h"
#include "filtermanager.h"
-#include "mdperf.h"
#include "switches.h"
#include "posterror.h"
#include "stgio.h"
@@ -96,7 +95,6 @@ HRESULT CountEnum(
// No need to lock this function.
LOG((LOGMD, "RegMeta::CountEnum(0x%08x, 0x%08x)\n", hEnum, pulCount));
- START_MD_PERF();
_ASSERTE( pulCount );
@@ -116,7 +114,6 @@ HRESULT CountEnum(
else
*pulCount = pmdEnum->m_ulCount;
ErrExit:
- STOP_MD_PERF(CountEnum);
return hr;
} // ::CountEnum
@@ -148,7 +145,6 @@ STDMETHODIMP RegMeta::ResetEnum(
// No need to lock this function.
LOG((LOGMD, "RegMeta::ResetEnum(0x%08x, 0x%08x)\n", hEnum, ulPos));
- START_MD_PERF();
if (pmdEnum == NULL)
goto ErrExit;
@@ -156,7 +152,6 @@ STDMETHODIMP RegMeta::ResetEnum(
pmdEnum->u.m_ulCur = pmdEnum->u.m_ulStart + ulPos;
ErrExit:
- STOP_MD_PERF(ResetEnum);
END_ENTRYPOINT_NOTHROW;
return hr;
} // RegMeta::ResetEnum
@@ -179,7 +174,6 @@ STDMETHODIMP RegMeta::EnumTypeDefs(
LOG((LOGMD, "RegMeta::EnumTypeDefs(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
phEnum, rTypeDefs, cMax, pcTypeDefs));
- START_MD_PERF();
LOCKREAD();
@@ -229,7 +223,6 @@ ErrExit:
HENUMInternal::DestroyEnumIfEmpty(ppmdEnum);
HENUMInternal::DestroyEnum(pEnum);
- STOP_MD_PERF(EnumTypeDefs);
END_ENTRYPOINT_NOTHROW;
@@ -259,7 +252,6 @@ STDMETHODIMP RegMeta::EnumInterfaceImpls(
LOG((LOGMD, "RegMeta::EnumInterfaceImpls(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
phEnum, td, rImpls, cMax, pcImpls));
- START_MD_PERF();
LOCKREAD();
_ASSERTE(TypeFromToken(td) == mdtTypeDef);
@@ -306,7 +298,6 @@ ErrExit:
HENUMInternal::DestroyEnumIfEmpty(ppmdEnum);
HENUMInternal::DestroyEnum(pEnum);
- STOP_MD_PERF(EnumInterfaceImpls);
END_ENTRYPOINT_NOTHROW;
@@ -331,7 +322,6 @@ STDMETHODIMP RegMeta::EnumGenericParams(HCORENUM *phEnum, mdToken tkOwner,
LOG((LOGMD, "RegMeta::EnumGenericParams(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
phEnum, tkOwner, rTokens, cMaxTokens, pcTokens));
- START_MD_PERF();
LOCKREAD();
pMiniMd = &(m_pStgdb->m_MiniMd);
@@ -400,7 +390,6 @@ ErrExit:
HENUMInternal::DestroyEnumIfEmpty(ppmdEnum);
HENUMInternal::DestroyEnum(pEnum);
- STOP_MD_PERF(EnumGenericPars);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -427,7 +416,6 @@ STDMETHODIMP RegMeta::EnumMethodSpecs(
LOG((LOGMD, "RegMeta::EnumMethodSpecs(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
phEnum, tkOwner, rTokens, cMaxTokens, pcTokens));
- START_MD_PERF();
LOCKREAD();
pMiniMd = &(m_pStgdb->m_MiniMd);
@@ -504,7 +492,6 @@ ErrExit:
HENUMInternal::DestroyEnumIfEmpty(ppmdEnum);
HENUMInternal::DestroyEnum(pEnum);
- STOP_MD_PERF(EnumMethodSpecs);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -531,7 +518,6 @@ STDMETHODIMP RegMeta::EnumGenericParamConstraints(
LOG((LOGMD, "RegMeta::EnumGenericParamConstraints(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
phEnum, tkOwner, rTokens, cMaxTokens, pcTokens));
- START_MD_PERF();
LOCKREAD();
pMiniMd = &(m_pStgdb->m_MiniMd);
@@ -592,7 +578,6 @@ ErrExit:
HENUMInternal::DestroyEnumIfEmpty(ppmdEnum);
HENUMInternal::DestroyEnum(pEnum);
- STOP_MD_PERF(EnumGenericParamConstraints);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -619,7 +604,6 @@ STDMETHODIMP RegMeta::EnumTypeRefs(
LOG((LOGMD, "RegMeta::EnumTypeRefs(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
phEnum, rTypeRefs, cMax, pcTypeRefs));
- START_MD_PERF();
LOCKREAD();
if ( pEnum == 0 )
@@ -641,7 +625,6 @@ ErrExit:
HENUMInternal::DestroyEnumIfEmpty(ppmdEnum);
- STOP_MD_PERF(EnumTypeRefs);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -660,7 +643,6 @@ STDMETHODIMP RegMeta::FindTypeDefByName(// S_OK or error.
LOG((LOGMD, "{%08x} RegMeta::FindTypeDefByName(%S, 0x%08x, 0x%08x)\n",
this, MDSTR(wzTypeDef), tkEnclosingClass, ptd));
- START_MD_PERF();
LOCKREAD();
@@ -688,7 +670,6 @@ STDMETHODIMP RegMeta::FindTypeDefByName(// S_OK or error.
ptd);
ErrExit:
- STOP_MD_PERF(FindTypeDefByName);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -713,7 +694,6 @@ STDMETHODIMP RegMeta::GetScopeProps(
LOG((LOGMD, "RegMeta::GetScopeProps(%S, 0x%08x, 0x%08x, 0x%08x)\n",
MDSTR(szName), cchName, pchName, pmvid));
- START_MD_PERF();
LOCKREAD();
// there is only one module record
@@ -728,7 +708,6 @@ STDMETHODIMP RegMeta::GetScopeProps(
IfFailGo( pMiniMd->getNameOfModule(pModuleRec, szName, cchName, pchName) );
ErrExit:
- STOP_MD_PERF(GetScopeProps);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -744,7 +723,6 @@ STDMETHODIMP RegMeta::GetModuleFromScope(// S_OK.
BEGIN_ENTRYPOINT_NOTHROW;
LOG((LOGMD, "RegMeta::GetModuleFromScope(0x%08x)\n", pmd));
- START_MD_PERF();
_ASSERTE(pmd);
@@ -752,7 +730,6 @@ STDMETHODIMP RegMeta::GetModuleFromScope(// S_OK.
*pmd = TokenFromRid(1, mdtModule);
- STOP_MD_PERF(GetModuleFromScope);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -773,7 +750,6 @@ HRESULT RegMeta::IsGlobal( // S_OK ir error.
mdToken tkParent; // Parent of field or method.
LOG((LOGMD, "RegMeta::GetTokenForGlobalType(0x%08x, %08x)\n", tk, pbGlobal));
- //START_MD_PERF();
// No need to lock this function.
@@ -812,7 +788,6 @@ HRESULT RegMeta::IsGlobal( // S_OK ir error.
}
ErrExit:
- //STOP_MD_PERF(GetModuleFromScope);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -841,7 +816,6 @@ RegMeta::GetTypeDefProps(
LOG((LOGMD, "{%08x} RegMeta::GetTypeDefProps(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
this, td, szTypeDef, cchTypeDef, pchTypeDef,
pdwTypeDefFlags, ptkExtends));
- START_MD_PERF();
LOCKREAD();
if (TypeFromToken(td) != mdtTypeDef)
@@ -922,7 +896,6 @@ RegMeta::GetTypeDefProps(
ErrExit:
END_ENTRYPOINT_NOTHROW;
- STOP_MD_PERF(GetTypeDefProps);
return hr;
} // RegMeta::GetTypeDefProps
@@ -946,7 +919,6 @@ STDMETHODIMP RegMeta::GetInterfaceImplProps( // S_OK or error.
LOG((LOGMD, "RegMeta::GetInterfaceImplProps(0x%08x, 0x%08x, 0x%08x)\n",
iiImpl, pClass, ptkIface));
- START_MD_PERF();
LOCKREAD();
_ASSERTE(TypeFromToken(iiImpl) == mdtInterfaceImpl);
@@ -964,7 +936,6 @@ STDMETHODIMP RegMeta::GetInterfaceImplProps( // S_OK or error.
}
ErrExit:
- STOP_MD_PERF(GetInterfaceImplProps);
END_ENTRYPOINT_NOTHROW;
return hr;
@@ -992,7 +963,6 @@ RegMeta::GetTypeRefProps(
LOG((LOGMD, "RegMeta::GetTypeRefProps(0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
tr, ptkResolutionScope, szTypeRef, cchTypeRef, pchTypeRef));
- START_MD_PERF();
LOCKREAD();
if (TypeFromToken(tr) != mdtTypeRef)
@@ -1060,7 +1030,6 @@ RegMeta::GetTypeRefProps(
}
ErrExit:
- STOP_MD_PERF(GetTypeRefProps);
END_ENTRYPOINT_NOTHROW;
return hr;
} // RegMeta::GetTypeRefProps
@@ -1088,7 +1057,6 @@ STDMETHODIMP RegMeta::FindTypeRef( // S_OK or error.
LOG((LOGMD, "RegMeta::FindTypeRef(0x%8x, %ls, 0x%08x)\n",
tkResolutionScope, MDSTR(wzTypeName), ptk));
- START_MD_PERF();
LOCKREAD();
// Convert the name to UTF8.
@@ -1103,7 +1071,6 @@ STDMETHODIMP RegMeta::FindTypeRef( // S_OK or error.
ptk);
ErrExit:
- STOP_MD_PERF(FindTypeRef);
END_ENTRYPOINT_NOTHROW;
return hr;
diff --git a/src/coreclr/md/compiler/regmeta_vm.cpp b/src/coreclr/md/compiler/regmeta_vm.cpp
index 80746137bfb..0cd3e4ab90d 100644
--- a/src/coreclr/md/compiler/regmeta_vm.cpp
+++ b/src/coreclr/md/compiler/regmeta_vm.cpp
@@ -19,7 +19,6 @@
#include "mdlog.h"
#include "importhelper.h"
#include "filtermanager.h"
-#include "mdperf.h"
#include "switches.h"
#include "posterror.h"
#include "stgio.h"
@@ -166,7 +165,6 @@ RegMeta::ResolveTypeRef(
LOG((LOGMD, "{%08x} RegMeta::ResolveTypeRef(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
this, tr, riid, ppIScope, ptd));
- START_MD_PERF();
LOCKREAD();
pMiniMd = &(m_pStgdb->m_MiniMd);
@@ -189,7 +187,6 @@ RegMeta::ResolveTypeRef(
*ppIScope = NULL;
}
- STOP_MD_PERF(ResolveTypeRef);
hr = E_INVALIDARG;
goto ErrExit;
}
@@ -198,7 +195,6 @@ RegMeta::ResolveTypeRef(
{
// Shortcut when we receive a TypeDef token
*ptd = tr;
- STOP_MD_PERF(ResolveTypeRef);
hr = this->QueryInterface(riid, (void **)ppIScope);
goto ErrExit;
}
@@ -233,7 +229,6 @@ RegMeta::ResolveTypeRef(
IfFailGo(META_E_CANNOTRESOLVETYPEREF);
ErrExit:
- STOP_MD_PERF(ResolveTypeRef);
END_ENTRYPOINT_NOTHROW;
return hr;
diff --git a/src/coreclr/nativeaot/Bootstrap/main.cpp b/src/coreclr/nativeaot/Bootstrap/main.cpp
index fed5a155a0c..9f4281cff93 100644
--- a/src/coreclr/nativeaot/Bootstrap/main.cpp
+++ b/src/coreclr/nativeaot/Bootstrap/main.cpp
@@ -94,7 +94,6 @@ static char& __unbox_z = __stop___unbox;
#endif // _MSC_VER
extern "C" bool RhInitialize();
-extern "C" void RhpEnableConservativeStackReporting();
extern "C" void RhpShutdown();
extern "C" void RhSetRuntimeInitializationCallback(int (*fPtr)());
@@ -152,8 +151,6 @@ static int InitializeRuntime()
if (!RhInitialize())
return -1;
- // RhpEnableConservativeStackReporting();
-
void * osModule = PalGetModuleHandleFromPointer((void*)&NATIVEAOT_ENTRYPOINT);
// TODO: pass struct with parameters instead of the large signature of RhRegisterOSModule
diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILCompiler.SingleEntry.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILCompiler.SingleEntry.targets
index 4ea64f9b83b..1b3d56e863c 100644
--- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILCompiler.SingleEntry.targets
+++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILCompiler.SingleEntry.targets
@@ -23,6 +23,8 @@
<OSHostArch Condition="$([MSBuild]::IsOSPlatform('Windows')) and
$([System.Environment]::GetEnvironmentVariable('PROCESSOR_ARCHITECTURE', EnvironmentVariableTarget.Machine)) == 'ARM64'">arm64</OSHostArch>
+ <OSHostArch Condition="$([MSBuild]::IsOSPlatform('osx')) and '$(CrossBuild)' == 'true'">x64</OSHostArch>
+
<IlcHostArch Condition="'$(IlcHostArch)' == ''">$(OSHostArch)</IlcHostArch>
<IlcHostPackageName>runtime.$(OSIdentifier)-$(IlcHostArch).Microsoft.DotNet.ILCompiler</IlcHostPackageName>
diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
index 58937c04c18..28b87236e70 100644
--- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
+++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
@@ -29,11 +29,12 @@ The .NET Foundation licenses this file to you under the MIT license.
<FullRuntimeName Condition="'$(ServerGarbageCollection)' == 'true'">libRuntime.ServerGC</FullRuntimeName>
<CrossCompileRid />
- <CrossCompileRid Condition="'$(TargetOS)' != 'OSX' and !$(RuntimeIdentifier.EndsWith('-$(OSHostArch)'))">$(RuntimeIdentifier)</CrossCompileRid>
+ <CrossCompileRid Condition="!$(RuntimeIdentifier.EndsWith('-$(OSHostArch)'))">$(RuntimeIdentifier)</CrossCompileRid>
<CrossCompileArch />
<CrossCompileArch Condition="$(CrossCompileRid.EndsWith('-x64'))">x86_64</CrossCompileArch>
- <CrossCompileArch Condition="$(CrossCompileRid.EndsWith('-arm64'))">aarch64</CrossCompileArch>
+ <CrossCompileArch Condition="$(CrossCompileRid.EndsWith('-arm64')) and '$(TargetOS)' != 'OSX'">aarch64</CrossCompileArch>
+ <CrossCompileArch Condition="$(CrossCompileRid.EndsWith('-arm64')) and '$(TargetOS)' == 'OSX'">arm64</CrossCompileArch>
<TargetTriple />
<TargetTriple Condition="'$(CrossCompileArch)' != ''">$(CrossCompileArch)-linux-gnu</TargetTriple>
@@ -85,7 +86,8 @@ The .NET Foundation licenses this file to you under the MIT license.
<ItemGroup>
<LinkerArg Include="@(NativeLibrary)" />
<LinkerArg Include="--sysroot=$(SysRoot)" Condition="'$(SysRoot)' != ''" />
- <LinkerArg Include="--target=$(TargetTriple)" Condition="'$(TargetTriple)' != ''" />
+ <LinkerArg Include="--target=$(TargetTriple)" Condition="'$(TargetOS)' != 'OSX' and '$(TargetTriple)' != ''" />
+ <LinkerArg Include="-arch $(CrossCompileArch)" Condition="'$(TargetOS)' == 'OSX' and '$(CrossCompileArch)' != ''" />
<LinkerArg Include="-g" Condition="$(NativeDebugSymbols) == 'true'" />
<LinkerArg Include="-Wl,--strip-debug" Condition="$(NativeDebugSymbols) != 'true' and '$(TargetOS)' != 'OSX'" />
<LinkerArg Include="-Wl,-rpath,'$(IlcRPath)'" />
diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets
index e78e9b01bfb..3b29974d5af 100644
--- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets
+++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets
@@ -47,6 +47,7 @@ The .NET Foundation licenses this file to you under the MIT license.
<PropertyGroup>
<UseSystemResourceKeys Condition="$(IlcDisableReflection) == 'true'">true</UseSystemResourceKeys>
<EventSourceSupport Condition="$(IlcDisableReflection) == 'true'">false</EventSourceSupport>
+ <EventSourceSupport Condition="$(EventSourceSupport) == ''">false</EventSourceSupport>
</PropertyGroup>
<PropertyGroup Condition="'$(SuppressAotAnalysisWarnings)' == 'true'">
diff --git a/src/coreclr/nativeaot/Runtime/CommonMacros.h b/src/coreclr/nativeaot/Runtime/CommonMacros.h
index dba787f1ad5..a4a82be3753 100644
--- a/src/coreclr/nativeaot/Runtime/CommonMacros.h
+++ b/src/coreclr/nativeaot/Runtime/CommonMacros.h
@@ -223,7 +223,7 @@ enum STARTUP_TIMELINE_EVENT_ID
#ifdef PROFILE_STARTUP
extern unsigned __int64 g_startupTimelineEvents[NUM_STARTUP_TIMELINE_EVENTS];
-#define STARTUP_TIMELINE_EVENT(eventid) PalQueryPerformanceCounter((LARGE_INTEGER*)&g_startupTimelineEvents[eventid]);
+#define STARTUP_TIMELINE_EVENT(eventid) g_startupTimelineEvents[eventid] = PalQueryPerformanceCounter();
#else // PROFILE_STARTUP
#define STARTUP_TIMELINE_EVENT(eventid)
#endif // PROFILE_STARTUP
diff --git a/src/coreclr/nativeaot/Runtime/IntrinsicConstants.h b/src/coreclr/nativeaot/Runtime/IntrinsicConstants.h
index f13851f87c1..e80b42ccb0e 100644
--- a/src/coreclr/nativeaot/Runtime/IntrinsicConstants.h
+++ b/src/coreclr/nativeaot/Runtime/IntrinsicConstants.h
@@ -24,6 +24,14 @@ enum XArchIntrinsicConstants
XArchIntrinsicConstants_Lzcnt = 0x1000,
XArchIntrinsicConstants_AvxVnni = 0x2000,
XArchIntrinsicConstants_Movbe = 0x4000,
+ XArchIntrinsicConstants_Avx512f = 0x8000,
+ XArchIntrinsicConstants_Avx512f_vl = 0x10000,
+ XArchIntrinsicConstants_Avx512bw = 0x20000,
+ XArchIntrinsicConstants_Avx512bw_vl = 0x40000,
+ XArchIntrinsicConstants_Avx512cd = 0x80000,
+ XArchIntrinsicConstants_Avx512cd_vl = 0x100000,
+ XArchIntrinsicConstants_Avx512dq = 0x200000,
+ XArchIntrinsicConstants_Avx512dq_vl = 0x400000,
};
#endif //HOST_X86 || HOST_AMD64
diff --git a/src/coreclr/nativeaot/Runtime/ObjectLayout.h b/src/coreclr/nativeaot/Runtime/ObjectLayout.h
index 1d4888c3a3c..78ba3a925e8 100644
--- a/src/coreclr/nativeaot/Runtime/ObjectLayout.h
+++ b/src/coreclr/nativeaot/Runtime/ObjectLayout.h
@@ -136,6 +136,5 @@ static uintptr_t const MAX_STRING_LENGTH = 0x3FFFFFDF;
class WeakReference : public Object
{
public:
- uintptr_t m_Handle;
- uint8_t m_trackResurrection;
+ uintptr_t m_HandleAndKind;
};
diff --git a/src/coreclr/nativeaot/Runtime/PalRedhawk.h b/src/coreclr/nativeaot/Runtime/PalRedhawk.h
index 90578c47f0a..6b14fcb2b20 100644
--- a/src/coreclr/nativeaot/Runtime/PalRedhawk.h
+++ b/src/coreclr/nativeaot/Runtime/PalRedhawk.h
@@ -744,6 +744,9 @@ REDHAWK_PALIMPORT bool REDHAWK_PALAPI PalDetachThread(void* thread);
REDHAWK_PALIMPORT uint64_t PalGetCurrentThreadIdForLogging();
+REDHAWK_PALIMPORT uint64_t PalQueryPerformanceCounter();
+REDHAWK_PALIMPORT uint64_t PalQueryPerformanceFrequency();
+
REDHAWK_PALIMPORT void PalPrintFatalError(const char* message);
#ifdef TARGET_UNIX
@@ -772,7 +775,9 @@ REDHAWK_PALIMPORT void __cpuidex(int cpuInfo[4], int function_id, int subFunctio
#endif
REDHAWK_PALIMPORT uint32_t REDHAWK_PALAPI xmmYmmStateSupport();
+REDHAWK_PALIMPORT uint32_t REDHAWK_PALAPI avx512StateSupport();
REDHAWK_PALIMPORT bool REDHAWK_PALAPI PalIsAvxEnabled();
+REDHAWK_PALIMPORT bool REDHAWK_PALAPI PalIsAvx512Enabled();
#endif // defined(HOST_X86) || defined(HOST_AMD64)
diff --git a/src/coreclr/nativeaot/Runtime/PalRedhawkFunctions.h b/src/coreclr/nativeaot/Runtime/PalRedhawkFunctions.h
index 99b6b4bdbb8..b03fc004c29 100644
--- a/src/coreclr/nativeaot/Runtime/PalRedhawkFunctions.h
+++ b/src/coreclr/nativeaot/Runtime/PalRedhawkFunctions.h
@@ -125,18 +125,6 @@ inline HANDLE PalLoadLibraryExW(const WCHAR * arg1, HANDLE arg2, uint32_t arg3)
return LoadLibraryExW(arg1, arg2, arg3);
}
-extern "C" UInt32_BOOL __stdcall QueryPerformanceCounter(LARGE_INTEGER *);
-inline UInt32_BOOL PalQueryPerformanceCounter(LARGE_INTEGER * arg1)
-{
- return QueryPerformanceCounter(arg1);
-}
-
-extern "C" UInt32_BOOL __stdcall QueryPerformanceFrequency(LARGE_INTEGER *);
-inline UInt32_BOOL PalQueryPerformanceFrequency(LARGE_INTEGER * arg1)
-{
- return QueryPerformanceFrequency(arg1);
-}
-
extern "C" void __stdcall RaiseException(uint32_t, uint32_t, uint32_t, const uint32_t *);
inline void PalRaiseException(uint32_t arg1, uint32_t arg2, uint32_t arg3, const uint32_t * arg4)
{
diff --git a/src/coreclr/nativeaot/Runtime/RhConfigValues.h b/src/coreclr/nativeaot/Runtime/RhConfigValues.h
index 36ceafaeba0..a58486a6c6d 100644
--- a/src/coreclr/nativeaot/Runtime/RhConfigValues.h
+++ b/src/coreclr/nativeaot/Runtime/RhConfigValues.h
@@ -16,6 +16,7 @@ DEBUG_CONFIG_VALUE_WITH_DEFAULT(BreakOnAssert, 1)
RETAIL_CONFIG_VALUE(StressLogLevel)
RETAIL_CONFIG_VALUE(TotalStressLogSize)
RETAIL_CONFIG_VALUE(gcServer)
+RETAIL_CONFIG_VALUE(gcConservative) // Enables conservative stack reporting
DEBUG_CONFIG_VALUE(GcStressThrottleMode) // gcstm_TriggerAlways / gcstm_TriggerOnFirstHit / gcstm_TriggerRandom
DEBUG_CONFIG_VALUE(GcStressFreqCallsite) // Number of times to force GC out of GcStressFreqDenom (for GCSTM_RANDOM)
DEBUG_CONFIG_VALUE(GcStressFreqLoop) // Number of times to force GC out of GcStressFreqDenom (for GCSTM_RANDOM)
diff --git a/src/coreclr/nativeaot/Runtime/amd64/GC.asm b/src/coreclr/nativeaot/Runtime/amd64/GC.asm
index 1dc8a851253..7c90f905384 100644
--- a/src/coreclr/nativeaot/Runtime/amd64/GC.asm
+++ b/src/coreclr/nativeaot/Runtime/amd64/GC.asm
@@ -18,4 +18,19 @@ LEAF_ENTRY xmmYmmStateSupport, _TEXT
ret
LEAF_END xmmYmmStateSupport, _TEXT
+;; extern "C" DWORD __stdcall avx512StateSupport();
+LEAF_ENTRY avx512StateSupport, _TEXT
+ mov ecx, 0 ; Specify xcr0
+ xgetbv ; result in EDX:EAX
+ and eax, 0E6H
+ cmp eax, 0E6H ; check OS has enabled XMM, YMM and ZMM state support
+ jne not_supported
+ mov eax, 1
+ jmp done
+ not_supported:
+ mov eax, 0
+ done:
+ ret
+LEAF_END avx512StateSupport, _TEXT
+
end
diff --git a/src/coreclr/nativeaot/Runtime/eventtrace.cpp b/src/coreclr/nativeaot/Runtime/eventtrace.cpp
index 5cdd8c91f85..b93d1197b95 100644
--- a/src/coreclr/nativeaot/Runtime/eventtrace.cpp
+++ b/src/coreclr/nativeaot/Runtime/eventtrace.cpp
@@ -992,9 +992,6 @@ HRESULT ETW::GCLog::ForceGCForDiagnostics()
ThreadStore::AttachCurrentThread();
Thread* pThread = ThreadStore::GetCurrentThread();
- // Doing this prevents the GC from trying to walk this thread's stack for roots.
- pThread->SetGCSpecial(true);
-
// While doing the GC, much code assumes & asserts the thread doing the GC is in
// cooperative mode.
pThread->DisablePreemptiveMode();
diff --git a/src/coreclr/nativeaot/Runtime/gcrhenv.cpp b/src/coreclr/nativeaot/Runtime/gcrhenv.cpp
index aac6c1e4469..ec3f1be198f 100644
--- a/src/coreclr/nativeaot/Runtime/gcrhenv.cpp
+++ b/src/coreclr/nativeaot/Runtime/gcrhenv.cpp
@@ -177,6 +177,11 @@ bool RedhawkGCInterface::InitializeSubsystems()
g_heap_type = GC_HEAP_WKS;
#endif
+ if (g_pRhConfig->GetgcConservative())
+ {
+ GetRuntimeInstance()->EnableConservativeStackReporting();
+ }
+
HRESULT hr = GCHeapUtilities::InitializeDefaultGC();
if (FAILED(hr))
return false;
@@ -1177,9 +1182,9 @@ bool GCToEEInterface::EagerFinalized(Object* obj)
ASSERT(GCHeapUtilities::GetGCHeap()->IsGCInProgressHelper());
WeakReference* weakRefObj = (WeakReference*)obj;
- OBJECTHANDLE handle = (OBJECTHANDLE)weakRefObj->m_Handle;
- weakRefObj->m_Handle = 0;
- HandleType handleType = weakRefObj->m_trackResurrection ? HandleType::HNDTYPE_WEAK_LONG : HandleType::HNDTYPE_WEAK_SHORT;
+ OBJECTHANDLE handle = (OBJECTHANDLE)(weakRefObj->m_HandleAndKind & ~(uintptr_t)1);
+ HandleType handleType = (weakRefObj->m_HandleAndKind & 1) ? HandleType::HNDTYPE_WEAK_LONG : HandleType::HNDTYPE_WEAK_SHORT;
+ weakRefObj->m_HandleAndKind &= (uintptr_t)1;
GCHandleUtilities::GetGCHandleManager()->DestroyHandleOfType(handle, handleType);
return true;
}
@@ -1234,7 +1239,7 @@ bool GCToEEInterface::CreateThread(void (*threadStart)(void*), void* arg, bool i
ThreadStore::AttachCurrentThread(false);
}
- ThreadStore::RawGetCurrentThread()->SetGCSpecial(true);
+ ThreadStore::RawGetCurrentThread()->SetGCSpecial();
auto realStartRoutine = pStartContext->m_pRealStartRoutine;
void* realContext = pStartContext->m_pRealContext;
diff --git a/src/coreclr/nativeaot/Runtime/rhcommon.h b/src/coreclr/nativeaot/Runtime/rhcommon.h
deleted file mode 100644
index 434f665aa86..00000000000
--- a/src/coreclr/nativeaot/Runtime/rhcommon.h
+++ /dev/null
@@ -1,16 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-//
-// This file is here because we share some common code with the CLR and that platform uses common.h as a
-// precompiled header. Due to limitations on precompilation (a precompiled header must be included first
-// and must not be preceded by any other preprocessor directive) we cannot conditionally include common.h,
-// so the simplest solution is to maintain this empty header under Redhawk.
-//
-
-//
-// For our DAC build, we precompile gcrhenv.h because it is extremely large (~3MB of text). For non-DAC
-// builds, we do not do this because the majority of the files have more constrained #includes.
-//
-
-#include "stdint.h"
diff --git a/src/coreclr/nativeaot/Runtime/startup.cpp b/src/coreclr/nativeaot/Runtime/startup.cpp
index 62a0f3ba922..e2b4395da7d 100644
--- a/src/coreclr/nativeaot/Runtime/startup.cpp
+++ b/src/coreclr/nativeaot/Runtime/startup.cpp
@@ -245,6 +245,48 @@ bool DetectCPUFeatures()
{
g_cpuFeatures |= XArchIntrinsicConstants_AvxVnni;
}
+
+ if (PalIsAvx512Enabled() && (avx512StateSupport() == 1)) // XGETBV XRC0[7:5] == 111
+ {
+ if ((cpuidInfo[EBX] & (1 << 16)) != 0) // AVX512F
+ {
+ g_cpuFeatures |= XArchIntrinsicConstants_Avx512f;
+
+ bool isAVX512_VLSupported = false;
+ if ((cpuidInfo[EBX] & (1 << 31)) != 0) // AVX512VL
+ {
+ g_cpuFeatures |= XArchIntrinsicConstants_Avx512f_vl;
+ isAVX512_VLSupported = true;
+ }
+
+ if ((cpuidInfo[EBX] & (1 << 30)) != 0) // AVX512BW
+ {
+ g_cpuFeatures |= XArchIntrinsicConstants_Avx512bw;
+ if (isAVX512_VLSupported)
+ {
+ g_cpuFeatures |= XArchIntrinsicConstants_Avx512bw_vl;
+ }
+ }
+
+ if ((cpuidInfo[EBX] & (1 << 28)) != 0) // AVX512CD
+ {
+ g_cpuFeatures |= XArchIntrinsicConstants_Avx512cd;
+ if (isAVX512_VLSupported)
+ {
+ g_cpuFeatures |= XArchIntrinsicConstants_Avx512cd_vl;
+ }
+ }
+
+ if ((cpuidInfo[EBX] & (1 << 17)) != 0) // AVX512DQ
+ {
+ g_cpuFeatures |= XArchIntrinsicConstants_Avx512dq;
+ if (isAVX512_VLSupported)
+ {
+ g_cpuFeatures |= XArchIntrinsicConstants_Avx512dq_vl;
+ }
+ }
+ }
+ }
}
}
}
@@ -466,11 +508,6 @@ extern "C" bool RhInitialize()
return true;
}
-COOP_PINVOKE_HELPER(void, RhpEnableConservativeStackReporting, ())
-{
- GetRuntimeInstance()->EnableConservativeStackReporting();
-}
-
//
// Currently called only from a managed executable once Main returns, this routine does whatever is needed to
// cleanup managed state before exiting. There's not a lot here at the moment since we're always about to let
diff --git a/src/coreclr/nativeaot/Runtime/stressLog.cpp b/src/coreclr/nativeaot/Runtime/stressLog.cpp
index da766cd6d8b..86c3b2267a1 100644
--- a/src/coreclr/nativeaot/Runtime/stressLog.cpp
+++ b/src/coreclr/nativeaot/Runtime/stressLog.cpp
@@ -58,14 +58,9 @@ inline __declspec(naked) unsigned __int64 getTimeStamp() {
}
#else // HOST_X86
-unsigned __int64 getTimeStamp() {
-
- LARGE_INTEGER ret;
- ZeroMemory(&ret, sizeof(LARGE_INTEGER));
-
- PalQueryPerformanceCounter(&ret);
-
- return ret.QuadPart;
+unsigned __int64 getTimeStamp()
+{
+ return PalQueryPerformanceCounter();
}
#endif // HOST_X86 else
@@ -76,10 +71,7 @@ unsigned __int64 getTimeStamp() {
*/
unsigned __int64 getTickFrequency()
{
- LARGE_INTEGER ret;
- ZeroMemory(&ret, sizeof(LARGE_INTEGER));
- PalQueryPerformanceFrequency(&ret);
- return ret.QuadPart;
+ return PalQueryPerformanceFrequency();
}
#endif // DACCESS_COMPILE
diff --git a/src/coreclr/nativeaot/Runtime/thread.cpp b/src/coreclr/nativeaot/Runtime/thread.cpp
index 0c50b4f3b49..fd70a59aef8 100644
--- a/src/coreclr/nativeaot/Runtime/thread.cpp
+++ b/src/coreclr/nativeaot/Runtime/thread.cpp
@@ -305,14 +305,12 @@ bool Thread::IsInitialized()
// -----------------------------------------------------------------------------------------------------------
// GC support APIs - do not use except from GC itself
//
-void Thread::SetGCSpecial(bool isGCSpecial)
+void Thread::SetGCSpecial()
{
if (!IsInitialized())
Construct();
- if (isGCSpecial)
- SetState(TSF_IsGcSpecialThread);
- else
- ClearState(TSF_IsGcSpecialThread);
+
+ SetState(TSF_IsGcSpecialThread);
}
bool Thread::IsGCSpecial()
@@ -603,6 +601,12 @@ void Thread::Hijack()
return;
}
+ if (IsGCSpecial())
+ {
+ // GC threads can not be forced to run preemptively, so we will not try.
+ return;
+ }
+
#ifdef FEATURE_SUSPEND_REDIRECTION
// if the thread is redirected, leave it as-is.
if (IsStateSet(TSF_Redirected))
diff --git a/src/coreclr/nativeaot/Runtime/thread.h b/src/coreclr/nativeaot/Runtime/thread.h
index eeebabf05ea..a83cc952199 100644
--- a/src/coreclr/nativeaot/Runtime/thread.h
+++ b/src/coreclr/nativeaot/Runtime/thread.h
@@ -263,7 +263,7 @@ public:
//
// GC support APIs - do not use except from GC itself
//
- void SetGCSpecial(bool isGCSpecial);
+ void SetGCSpecial();
bool IsGCSpecial();
bool CatchAtSafePoint();
diff --git a/src/coreclr/nativeaot/Runtime/threadstore.cpp b/src/coreclr/nativeaot/Runtime/threadstore.cpp
index b8827f2a6a5..f899301e84c 100644
--- a/src/coreclr/nativeaot/Runtime/threadstore.cpp
+++ b/src/coreclr/nativeaot/Runtime/threadstore.cpp
@@ -210,12 +210,8 @@ void ThreadStore::UnlockThreadStore()
// when iteration == -1, only usecLimit is used
void SpinWait(int iteration, int usecLimit)
{
- LARGE_INTEGER li;
- PalQueryPerformanceCounter(&li);
- int64_t startTicks = li.QuadPart;
-
- PalQueryPerformanceFrequency(&li);
- int64_t ticksPerSecond = li.QuadPart;
+ int64_t startTicks = PalQueryPerformanceCounter();
+ int64_t ticksPerSecond = PalQueryPerformanceFrequency();
int64_t endTicks = startTicks + (usecLimit * ticksPerSecond) / 1000000;
int l = min((unsigned)iteration, 30);
@@ -226,8 +222,7 @@ void SpinWait(int iteration, int usecLimit)
System_YieldProcessor();
}
- PalQueryPerformanceCounter(&li);
- int64_t currentTicks = li.QuadPart;
+ int64_t currentTicks = PalQueryPerformanceCounter();
if (currentTicks > endTicks)
{
break;
diff --git a/src/coreclr/nativeaot/Runtime/unix/PalRedhawkUnix.cpp b/src/coreclr/nativeaot/Runtime/unix/PalRedhawkUnix.cpp
index bcdbe419d2e..127217ec32d 100644
--- a/src/coreclr/nativeaot/Runtime/unix/PalRedhawkUnix.cpp
+++ b/src/coreclr/nativeaot/Runtime/unix/PalRedhawkUnix.cpp
@@ -655,45 +655,7 @@ REDHAWK_PALEXPORT bool REDHAWK_PALAPI PalStartFinalizerThread(_In_ BackgroundCal
// time).
REDHAWK_PALEXPORT uint64_t REDHAWK_PALAPI PalGetTickCount64()
{
- uint64_t retval = 0;
-
-#if HAVE_CLOCK_GETTIME_NSEC_NP
- {
- retval = clock_gettime_nsec_np(CLOCK_UPTIME_RAW) / tccMilliSecondsToNanoSeconds;
- }
-#elif HAVE_CLOCK_MONOTONIC
- {
- clockid_t clockType =
-#if HAVE_CLOCK_MONOTONIC_COARSE
- CLOCK_MONOTONIC_COARSE; // good enough resolution, fastest speed
-#else
- CLOCK_MONOTONIC;
-#endif
- struct timespec ts;
- if (clock_gettime(clockType, &ts) == 0)
- {
- retval = (ts.tv_sec * tccSecondsToMilliSeconds) + (ts.tv_nsec / tccMilliSecondsToNanoSeconds);
- }
- else
- {
- ASSERT_UNCONDITIONALLY("clock_gettime(CLOCK_MONOTONIC) failed\n");
- }
- }
-#else
- {
- struct timeval tv;
- if (gettimeofday(&tv, NULL) == 0)
- {
- retval = (tv.tv_sec * tccSecondsToMilliSeconds) + (tv.tv_usec / tccMilliSecondsToMicroSeconds);
- }
- else
- {
- ASSERT_UNCONDITIONALLY("gettimeofday() failed\n");
- }
- }
-#endif
-
- return retval;
+ return GCToOSInterface::GetLowPrecisionTimeStamp();
}
REDHAWK_PALEXPORT HANDLE REDHAWK_PALAPI PalGetModuleHandleFromPointer(_In_ void* pointer)
@@ -719,6 +681,11 @@ REDHAWK_PALEXPORT bool REDHAWK_PALAPI PalIsAvxEnabled()
return true;
}
+REDHAWK_PALEXPORT bool REDHAWK_PALAPI PalIsAvx512Enabled()
+{
+ return true;
+}
+
REDHAWK_PALEXPORT void PalPrintFatalError(const char* message)
{
// Write the message using lowest-level OS API available. This is used to print the stack overflow
@@ -1210,24 +1177,14 @@ extern "C" void GetSystemTimeAsFileTime(FILETIME *lpSystemTimeAsFileTime)
lpSystemTimeAsFileTime->dwHighDateTime = (uint32_t)(result >> 32);
}
-extern "C" UInt32_BOOL QueryPerformanceCounter(LARGE_INTEGER *lpPerformanceCount)
+extern "C" uint64_t PalQueryPerformanceCounter()
{
- // TODO: More efficient, platform-specific implementation
- struct timeval tv;
- if (gettimeofday(&tv, NULL) == -1)
- {
- ASSERT_UNCONDITIONALLY("gettimeofday() failed");
- return UInt32_FALSE;
- }
- lpPerformanceCount->QuadPart =
- (int64_t) tv.tv_sec * (int64_t) tccSecondsToMicroSeconds + (int64_t) tv.tv_usec;
- return UInt32_TRUE;
+ return GCToOSInterface::QueryPerformanceCounter();
}
-extern "C" UInt32_BOOL QueryPerformanceFrequency(LARGE_INTEGER *lpFrequency)
+extern "C" uint64_t PalQueryPerformanceFrequency()
{
- lpFrequency->QuadPart = (int64_t) tccSecondsToMicroSeconds;
- return UInt32_TRUE;
+ return GCToOSInterface::QueryPerformanceFrequency();
}
extern "C" uint64_t PalGetCurrentThreadIdForLogging()
@@ -1287,6 +1244,19 @@ REDHAWK_PALEXPORT uint32_t REDHAWK_PALAPI xmmYmmStateSupport()
// check OS has enabled both XMM and YMM state support
return ((eax & 0x06) == 0x06) ? 1 : 0;
}
+
+REDHAWK_PALEXPORT uint32_t REDHAWK_PALAPI avx512StateSupport()
+{
+ DWORD eax;
+ __asm(" xgetbv\n" \
+ : "=a"(eax) /*output in eax*/\
+ : "c"(0) /*inputs - 0 in ecx*/\
+ : "edx" /* registers that are clobbered*/
+ );
+ // check OS has enabled XMM, YMM and ZMM state support
+ return ((eax & 0xE6) == 0x0E6) ? 1 : 0;
+}
+
#endif // defined(HOST_X86) || defined(HOST_AMD64)
#if defined (HOST_ARM64)
diff --git a/src/coreclr/nativeaot/Runtime/windows/PalRedhawkMinWin.cpp b/src/coreclr/nativeaot/Runtime/windows/PalRedhawkMinWin.cpp
index 20238e87501..c8390ea1fd5 100644
--- a/src/coreclr/nativeaot/Runtime/windows/PalRedhawkMinWin.cpp
+++ b/src/coreclr/nativeaot/Runtime/windows/PalRedhawkMinWin.cpp
@@ -218,6 +218,16 @@ REDHAWK_PALEXPORT bool REDHAWK_PALAPI PalDetachThread(void* thread)
return true;
}
+extern "C" uint64_t PalQueryPerformanceCounter()
+{
+ return GCToOSInterface::QueryPerformanceCounter();
+}
+
+extern "C" uint64_t PalQueryPerformanceFrequency()
+{
+ return GCToOSInterface::QueryPerformanceFrequency();
+}
+
extern "C" uint64_t PalGetCurrentThreadIdForLogging()
{
return GetCurrentThreadId();
@@ -563,6 +573,31 @@ REDHAWK_PALEXPORT bool REDHAWK_PALAPI PalIsAvxEnabled()
return TRUE;
}
+REDHAWK_PALEXPORT bool REDHAWK_PALAPI PalIsAvx512Enabled()
+{
+ typedef DWORD64(WINAPI* PGETENABLEDXSTATEFEATURES)();
+ PGETENABLEDXSTATEFEATURES pfnGetEnabledXStateFeatures = NULL;
+
+ HMODULE hMod = LoadLibraryExW(L"kernel32", NULL, LOAD_LIBRARY_SEARCH_SYSTEM32);
+ if (hMod == NULL)
+ return FALSE;
+
+ pfnGetEnabledXStateFeatures = (PGETENABLEDXSTATEFEATURES)GetProcAddress(hMod, "GetEnabledXStateFeatures");
+
+ if (pfnGetEnabledXStateFeatures == NULL)
+ {
+ return FALSE;
+ }
+
+ DWORD64 FeatureMask = pfnGetEnabledXStateFeatures();
+ if ((FeatureMask & XSTATE_MASK_AVX512) == 0)
+ {
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
REDHAWK_PALEXPORT void* REDHAWK_PALAPI PalAddVectoredExceptionHandler(uint32_t firstHandler, _In_ PVECTORED_EXCEPTION_HANDLER vectoredHandler)
{
return AddVectoredExceptionHandler(firstHandler, vectoredHandler);
diff --git a/src/coreclr/nativeaot/Runtime/yieldprocessornormalized.cpp b/src/coreclr/nativeaot/Runtime/yieldprocessornormalized.cpp
index 83fd70bd49d..444d52b0114 100644
--- a/src/coreclr/nativeaot/Runtime/yieldprocessornormalized.cpp
+++ b/src/coreclr/nativeaot/Runtime/yieldprocessornormalized.cpp
@@ -47,20 +47,19 @@ static void InitializeYieldProcessorNormalized()
const int MeasureDurationMs = 10;
const int NsPerSecond = 1000 * 1000 * 1000;
- LARGE_INTEGER li;
- if (!PalQueryPerformanceFrequency(&li) || (ULONGLONG)li.QuadPart < 1000 / MeasureDurationMs)
+ ULONGLONG ticksPerSecond = PalQueryPerformanceFrequency();
+
+ if (ticksPerSecond < 1000 / MeasureDurationMs)
{
// High precision clock not available or clock resolution is too low, resort to defaults
s_isYieldProcessorNormalizedInitialized = true;
return;
}
- ULONGLONG ticksPerSecond = li.QuadPart;
// Measure the nanosecond delay per yield
ULONGLONG measureDurationTicks = ticksPerSecond / (1000 / MeasureDurationMs);
unsigned int yieldCount = 0;
- PalQueryPerformanceCounter(&li);
- ULONGLONG startTicks = li.QuadPart;
+ ULONGLONG startTicks = PalQueryPerformanceCounter();
ULONGLONG elapsedTicks;
do
{
@@ -73,8 +72,7 @@ static void InitializeYieldProcessorNormalized()
}
yieldCount += 1000;
- PalQueryPerformanceCounter(&li);
- ULONGLONG nowTicks = li.QuadPart;
+ ULONGLONG nowTicks = PalQueryPerformanceCounter();
elapsedTicks = nowTicks - startTicks;
} while (elapsedTicks < measureDurationTicks);
double nsPerYield = (double)elapsedTicks * NsPerSecond / ((double)yieldCount * ticksPerSecond);
diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerHelpers/RuntimeInteropData.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerHelpers/RuntimeInteropData.cs
index a4e0d74957a..ca0ff2c41de 100644
--- a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerHelpers/RuntimeInteropData.cs
+++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerHelpers/RuntimeInteropData.cs
@@ -44,7 +44,15 @@ namespace Internal.Runtime.CompilerHelpers
return structureTypeHandle.GetValueTypeSize();
}
- throw new NotSupportedException(SR.Format(SR.StructMarshalling_MissingInteropData, Type.GetTypeFromHandle(structureTypeHandle)));
+ // If the type is an interface or a generic type, the reason is likely that.
+ Type structureType = Type.GetTypeFromHandle(structureTypeHandle)!;
+ if (structureTypeHandle.IsInterface() || structureTypeHandle.IsGenericType())
+ {
+ throw new ArgumentException(SR.Format(SR.Arg_CannotMarshal, structureType));
+ }
+
+ // Otherwise assume we miss interop data for the type.
+ throw new NotSupportedException(SR.Format(SR.StructMarshalling_MissingInteropData, structureType));
}
public static IntPtr GetStructUnmarshalStub(RuntimeTypeHandle structureTypeHandle)
diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/MatchingRefApiCompatBaseline.txt b/src/coreclr/nativeaot/System.Private.CoreLib/src/MatchingRefApiCompatBaseline.txt
index 5a44b79d569..a00ad23f61f 100644
--- a/src/coreclr/nativeaot/System.Private.CoreLib/src/MatchingRefApiCompatBaseline.txt
+++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/MatchingRefApiCompatBaseline.txt
@@ -195,15 +195,8 @@ TypesMustExist : Type 'Internal.Runtime.CompilerServices.OpenMethodResolver' doe
TypesMustExist : Type 'Internal.Runtime.CompilerServices.RuntimeFieldHandleInfo' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'Internal.Runtime.CompilerServices.RuntimeMethodHandleInfo' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'Internal.Runtime.CompilerServices.RuntimeSignature' does not exist in the reference but it does exist in the implementation.
-TypesMustExist : Type 'Internal.Runtime.InteropServices.ComponentActivator' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'Internal.TypeSystem.ExceptionStringID' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'Internal.TypeSystem.LockFreeReaderHashtable<TKey, TValue>' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.add_FirstChanceException(System.EventHandler<System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs>)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.add_ProcessExit(System.EventHandler)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.add_UnhandledException(System.UnhandledExceptionEventHandler)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.remove_FirstChanceException(System.EventHandler<System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs>)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.remove_ProcessExit(System.EventHandler)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.remove_UnhandledException(System.UnhandledExceptionEventHandler)' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Array<T>' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.MDArray' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'public void System.ModuleHandle..ctor(System.Reflection.Module)' does not exist in the reference but it does exist in the implementation.
@@ -212,23 +205,13 @@ TypesMustExist : Type 'System.RuntimeType' does not exist in the reference but i
MembersMustExist : Member 'public System.Boolean System.TypedReference.IsNull.get()' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Diagnostics.DebugAnnotations' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Diagnostics.DebuggerGuidedStepThroughAttribute' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'protected void System.Diagnostics.Tracing.EventCounter.Flush()' does not exist in the reference but it does exist in the implementation.
-CannotMakeTypeAbstract : Type 'System.Diagnostics.Tracing.EventListener' is abstract in the reference but is not abstract in the implementation.
-CannotMakeMoreVisible : Visibility of member 'System.Diagnostics.Tracing.EventListener..ctor()' is 'protected' in the reference but 'public' in the implementation.
-CannotMakeMoreVisible : Visibility of member 'System.Diagnostics.Tracing.EventListener.EventSourceIndex(System.Diagnostics.Tracing.EventSource)' is 'protected' in the reference but 'public' in the implementation.
TypesMustExist : Type 'System.Diagnostics.Tracing.PropertyValue' does not exist in the reference but it does exist in the implementation.
-TypesMustExist : Type 'System.Diagnostics.Tracing.TraceLoggingEventTypes' does not exist in the reference but it does exist in the implementation.
-CannotMakeMemberAbstract : Member 'public System.Boolean System.IO.FileSystemInfo.Exists' is abstract in the reference but is not abstract in the implementation.
-CannotMakeMemberAbstract : Member 'public System.String System.IO.FileSystemInfo.Name' is abstract in the reference but is not abstract in the implementation.
-CannotMakeMemberAbstract : Member 'public System.Boolean System.IO.FileSystemInfo.Exists.get()' is abstract in the reference but is not abstract in the implementation.
-CannotMakeMemberAbstract : Member 'public System.String System.IO.FileSystemInfo.Name.get()' is abstract in the reference but is not abstract in the implementation.
TypesMustExist : Type 'System.Reflection.AssemblyRuntimeNameHelpers' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Reflection.BinderBundle' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Reflection.DynamicInvokeInfo' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Reflection.EnumInfo' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'public System.Reflection.ParameterInfo[] System.Reflection.MethodBase.GetParametersNoCopy()' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'public System.Reflection.MethodBase System.Reflection.MethodBase.MetadataDefinitionMethod.get()' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'protected System.ModuleHandle System.Reflection.Module.GetModuleHandleImpl()' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Reflection.RuntimeAssembly' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Reflection.RuntimeAssemblyName' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Reflection.Runtime.General.MetadataReaderExtensions' does not exist in the reference but it does exist in the implementation.
@@ -239,8 +222,8 @@ TypesMustExist : Type 'System.Reflection.Runtime.General.QMethodDefinition' does
TypesMustExist : Type 'System.Reflection.Runtime.General.QSignatureTypeHandle' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Reflection.Runtime.General.QTypeDefinition' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Reflection.Runtime.General.QTypeDefRefOrSpec' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'protected System.String System.String System.Resources.ResourceManager.BaseNameField' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'protected System.Resources.IResourceReader System.Resources.IResourceReader System.Resources.ResourceSet.Reader' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'protected System.String System.String System.Resources.ResourceManager.BaseNameField' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Resources.RuntimeResourceSet' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Runtime.ExceptionIDs' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Runtime.RhFailFastReason' does not exist in the reference but it does exist in the implementation.
@@ -257,12 +240,7 @@ TypesMustExist : Type 'System.Runtime.CompilerServices.StaticClassConstructionCo
TypesMustExist : Type 'System.Runtime.InteropServices.InteropExtensions' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Runtime.InteropServices.NativeFunctionPointerWrapper' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Runtime.InteropServices.PInvokeMarshal' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute..ctor()' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Runtime.InteropServices.UnsafeGCHandle' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public System.Boolean System.Runtime.Serialization.SerializationInfo.DeserializationInProgress.get()' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.Runtime.Serialization.SerializationInfo.ThrowIfDeserializationInProgress()' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.Runtime.Serialization.SerializationInfo.ThrowIfDeserializationInProgress(System.String, System.Int32)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.Runtime.Serialization.SerializationInfo.UpdateValue(System.String, System.Object, System.Type)' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Threading.Condition' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Threading.Lock' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Threading.LockHolder' does not exist in the reference but it does exist in the implementation. \ No newline at end of file
diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj b/src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj
index f876b6bcc0f..5c162d3070d 100644
--- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj
+++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj
@@ -247,8 +247,6 @@
<Compile Include="System\Runtime\RuntimeImportAttribute.cs" />
<Compile Include="System\Runtime\CompilerServices\ClassConstructorRunner.cs" />
<Compile Include="System\Runtime\CompilerServices\RuntimeHelpers.NativeAot.cs" />
- <Compile Include="System\WeakReference.NativeAot.cs" />
- <Compile Include="System\WeakReference.T.NativeAot.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetsWindows)'=='true'">
<Compile Include="$(CommonPath)\Interop\Windows\Kernel32\Interop.ExitProcess.cs">
diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/GC.NativeAot.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/GC.NativeAot.cs
index b6b9afc8281..8e0e523b029 100644
--- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/GC.NativeAot.cs
+++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/GC.NativeAot.cs
@@ -86,7 +86,7 @@ namespace System
{
// note - this throws an NRE if given a null weak reference. This isn't
// documented, but it's the behavior of Desktop and CoreCLR.
- object? obj = RuntimeImports.RhHandleGet(wo.m_handle);
+ object? obj = RuntimeImports.RhHandleGet(wo.Handle);
if (obj == null)
{
throw new ArgumentNullException(nameof(wo));
diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/EnumInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/EnumInfo.cs
index 761a38833bd..87509675a96 100644
--- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/EnumInfo.cs
+++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/EnumInfo.cs
@@ -65,6 +65,16 @@ namespace System.Reflection
Array.Copy(rawValues, ValuesAsUnderlyingType, numValues);
HasFlagsAttribute = isFlags;
+
+ ValuesAreSequentialFromZero = true;
+ for (int i = 0; i < values.Length; i++)
+ {
+ if (values[i] != (ulong)i)
+ {
+ ValuesAreSequentialFromZero = false;
+ break;
+ }
+ }
}
internal Type UnderlyingType { get; }
@@ -72,5 +82,6 @@ namespace System.Reflection
internal ulong[] Values { get; }
internal Array ValuesAsUnderlyingType { get; }
internal bool HasFlagsAttribute { get; }
+ internal bool ValuesAreSequentialFromZero { get; }
}
}
diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/Modules/RuntimeModule.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/Modules/RuntimeModule.cs
index c98f84cb4f6..83262811409 100644
--- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/Modules/RuntimeModule.cs
+++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/Modules/RuntimeModule.cs
@@ -93,6 +93,6 @@ namespace System.Reflection.Runtime.Modules
[RequiresUnreferencedCode("Trimming changes metadata tokens")]
public sealed override Type ResolveType(int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) { throw new PlatformNotSupportedException(); }
- protected sealed override ModuleHandle GetModuleHandleImpl() => new ModuleHandle(this);
+ private protected sealed override ModuleHandle GetModuleHandleImpl() => new ModuleHandle(this);
}
}
diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/GCHandle.NativeAot.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/GCHandle.NativeAot.cs
index 02ebc1dfaff..26f11c9a6e2 100644
--- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/GCHandle.NativeAot.cs
+++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/GCHandle.NativeAot.cs
@@ -5,12 +5,12 @@ namespace System.Runtime.InteropServices
{
public partial struct GCHandle
{
- private static IntPtr InternalAlloc(object value, GCHandleType type) => RuntimeImports.RhHandleAlloc(value, type);
+ internal static IntPtr InternalAlloc(object value, GCHandleType type) => RuntimeImports.RhHandleAlloc(value, type);
- private static void InternalFree(IntPtr handle) => RuntimeImports.RhHandleFree(handle);
+ internal static void InternalFree(IntPtr handle) => RuntimeImports.RhHandleFree(handle);
- private static object? InternalGet(IntPtr handle) => RuntimeImports.RhHandleGet(handle);
+ internal static object? InternalGet(IntPtr handle) => RuntimeImports.RhHandleGet(handle);
- private static void InternalSet(IntPtr handle, object? value) => RuntimeImports.RhHandleSet(handle, value);
+ internal static void InternalSet(IntPtr handle, object? value) => RuntimeImports.RhHandleSet(handle, value);
}
}
diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.NativeAot.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.NativeAot.cs
index 3036289d6b6..be773f9cd00 100644
--- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.NativeAot.cs
+++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.NativeAot.cs
@@ -18,6 +18,16 @@ namespace System.Runtime.InteropServices
internal static int SizeOfHelper(Type t, bool throwIfNotMarshalable)
{
Debug.Assert(throwIfNotMarshalable);
+
+ if (t is not RuntimeType)
+ throw new ArgumentException(SR.Argument_MustBeRuntimeType);
+
+ if (t.IsPointer /* or IsFunctionPointer */)
+ return IntPtr.Size;
+
+ if (t.IsByRef || t.IsArray || t.ContainsGenericParameters)
+ throw new ArgumentException(SR.Format(SR.Arg_CannotMarshal, t));
+
return RuntimeInteropData.GetStructUnsafeStructSize(t.TypeHandle);
}
@@ -30,6 +40,13 @@ namespace System.Runtime.InteropServices
if (string.IsNullOrEmpty(fieldName))
throw new ArgumentNullException(nameof(fieldName));
+ // COMPAT: CoreCLR would allow a non-runtime type as long as has a runtime field.
+ // We need a runtime type because we don't reflection-locate the field.
+ if (t is not RuntimeType)
+ {
+ throw new ArgumentException(SR.Argument_MustBeRuntimeFieldInfo, nameof(fieldName));
+ }
+
if (t.TypeHandle.IsGenericTypeDefinition())
throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(t));
@@ -46,7 +63,7 @@ namespace System.Runtime.InteropServices
if (!allowValueClasses && structure.GetEETypePtr().IsValueType)
{
- throw new ArgumentException(nameof(structure), SR.Argument_StructMustNotBeValueClass);
+ throw new ArgumentException(SR.Argument_StructMustNotBeValueClass, nameof(structure));
}
PtrToStructureImpl(ptr, structure);
@@ -96,12 +113,12 @@ namespace System.Runtime.InteropServices
throw new ArgumentNullException(nameof(ptr));
if (structuretype == null)
- throw new ArgumentNullException(nameof(structuretype));
+ throw new ArgumentNullException("structureType");
RuntimeTypeHandle structureTypeHandle = structuretype.TypeHandle;
if (structureTypeHandle.IsGenericType() || structureTypeHandle.IsGenericTypeDefinition())
- throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(structuretype));
+ throw new ArgumentException(SR.Argument_NeedNonGenericType, "structure");
if (structureTypeHandle.IsEnum() ||
structureTypeHandle.IsInterface() ||
diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/PInvokeMarshal.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/PInvokeMarshal.cs
index 3676a0348ef..d4fe3590513 100644
--- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/PInvokeMarshal.cs
+++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/PInvokeMarshal.cs
@@ -48,6 +48,9 @@ namespace System.Runtime.InteropServices
if (del == null)
return IntPtr.Zero;
+ if (del.GetEETypePtr().IsGeneric)
+ throw new ArgumentException(SR.Argument_NeedNonGenericType, "delegate");
+
NativeFunctionPointerWrapper? fpWrapper = del.Target as NativeFunctionPointerWrapper;
if (fpWrapper != null)
{
@@ -225,6 +228,9 @@ namespace System.Runtime.InteropServices
// We need to create the delegate that points to the invoke method of a
// NativeFunctionPointerWrapper derived class
//
+ if (delegateType.ToEETypePtr().BaseType != EETypePtr.EETypePtrOf<MulticastDelegate>())
+ throw new ArgumentException(SR.Arg_MustBeDelegate, "t");
+
IntPtr pDelegateCreationStub = RuntimeInteropData.GetForwardDelegateCreationStub(delegateType);
Debug.Assert(pDelegateCreationStub != IntPtr.Zero);
diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/WeakReference.NativeAot.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/WeakReference.NativeAot.cs
deleted file mode 100644
index a7b822813e8..00000000000
--- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/WeakReference.NativeAot.cs
+++ /dev/null
@@ -1,165 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.Runtime;
-using System.Runtime.InteropServices;
-using System.Threading;
-using System.Diagnostics;
-
-namespace System
-{
- public partial class WeakReference
- {
- // If you fix bugs here, please fix them in WeakReference<T> at the same time.
-
- // Most methods using m_handle should use GC.KeepAlive(this) to avoid potential handle recycling
- // attacks (i.e. if the WeakReference instance is finalized away underneath you when you're still
- // handling a cached value of the handle then the handle could be freed and reused).
-
- // the instance fields are effectively readonly
- internal IntPtr m_handle;
- private bool m_trackResurrection;
-
- private void Create(object? target, bool trackResurrection)
- {
- m_handle = RuntimeImports.RhHandleAlloc(target, trackResurrection ? GCHandleType.WeakTrackResurrection : GCHandleType.Weak);
- m_trackResurrection = trackResurrection;
-
- if (target != null)
- {
- // Set the conditional weak table if the target is a __ComObject.
- TrySetComTarget(target);
- }
- }
-
- //Determines whether or not this instance of WeakReference still refers to an object
- //that has not been collected.
- public virtual bool IsAlive
- {
- get
- {
- IntPtr h = m_handle;
-
- // In determining whether it is valid to use this object, we need to at least expose this
- // without throwing an exception.
- if (default(IntPtr) == h)
- return false;
-
- bool result = (RuntimeImports.RhHandleGet(h) != null || TryGetComTarget() != null);
-
- // must keep the instance alive as long as we use the handle.
- GC.KeepAlive(this);
-
- return result;
- }
- }
-
- //Gets the Object stored in the handle if it's accessible.
- // Or sets it.
- public virtual object? Target
- {
- get
- {
- IntPtr h = m_handle;
- // Should only happen for corner cases, like using a WeakReference from a finalizer.
- // GC can finalize the instance if it becomes F-Reachable.
- // That, however, cannot happen while we use the instance.
- //
- // A derived class will be finalized with an actual Finalize, but the finalizer queue is single threaded,
- // thus the default implementation will never access Target concurrently with finalizing.
- //
- // There is a possibility that a derived type overrides the default finalizer and arranges concurrent access.
- // There is nothing that we can do about that and a few other exotic ways to break this.
- //
- if (default(IntPtr) == h)
- return default;
-
- object? target = RuntimeImports.RhHandleGet(h) ?? TryGetComTarget();
-
- // must keep the instance alive as long as we use the handle.
- GC.KeepAlive(this);
-
- return target;
- }
-
- set
- {
- IntPtr h = m_handle;
- // Should only happen for corner cases, like using a WeakReference from a finalizer.
- // See the comment in the getter.
- if (default(IntPtr) == h)
- throw new InvalidOperationException(SR.InvalidOperation_HandleIsNotInitialized);
-
- // Update the conditionalweakTable in case the target is __ComObject.
- TrySetComTarget(value);
-
- RuntimeImports.RhHandleSet(h, value);
-
- // must keep the instance alive as long as we use the handle.
- GC.KeepAlive(this);
- }
- }
-
- /// <summary>
- /// This method checks whether the target to the weakreference is a native COMObject in which case the native object might still be alive although the RuntimeHandle could be null.
- /// Hence we check in the conditionalweaktable maintained by the System.private.Interop.dll that maps weakreferenceInstance->nativeComObject to check whether the native COMObject is alive or not.
- /// and gets\create a new RCW in case it is alive.
- /// </summary>
- private static object? TryGetComTarget()
- {
-#if ENABLE_WINRT
- WinRTInteropCallbacks callbacks = WinRTInterop.UnsafeCallbacks;
- if (callbacks != null)
- {
- return callbacks.GetCOMWeakReferenceTarget(this);
- }
- else
- {
- Debug.Fail("WinRTInteropCallback is null");
- }
-#endif // ENABLE_WINRT
- return null;
- }
-
- /// <summary>
- /// This method notifies the System.private.Interop.dll to update the conditionalweaktable for weakreferenceInstance->target in case the target is __ComObject. This ensures that we have a means to
- /// go from the managed weak reference to the actual native object even though the managed counterpart might have been collected.
- /// </summary>
- private static void TrySetComTarget(object? target)
- {
-#if ENABLE_WINRT
- WinRTInteropCallbacks callbacks = WinRTInterop.UnsafeCallbacks;
- if (callbacks != null)
- {
- callbacks.SetCOMWeakReferenceTarget(this, target);
- }
- else
- {
- Debug.Fail("WinRTInteropCallback is null");
- }
-#endif // ENABLE_WINRT
- }
-
- // Free all system resources associated with this reference.
- ~WeakReference()
- {
- // Note: While WeakReference is formally a finalizable type, the finalizer does not actually run.
- // Instead the instances are treated specially in GC when scanning for no longer strongly-reachable
- // finalizable objects.
- // Unlike WeakReference<T> case, it is possible that this finalizer runs for a derived type.
-
- Debug.Assert(this.GetType() != typeof(WeakReference));
-
- IntPtr handle = m_handle;
- if (handle != default(IntPtr))
- {
- ((GCHandle)handle).Free();
- m_handle = default(IntPtr);
- }
- }
-
- //Returns a boolean indicating whether or not we're tracking objects until they're collected (true)
- //or just until they're finalized (false).
- private bool IsTrackResurrection() => m_trackResurrection;
- }
-}
diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/WeakReference.T.NativeAot.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/WeakReference.T.NativeAot.cs
deleted file mode 100644
index 44804ee8a88..00000000000
--- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/WeakReference.T.NativeAot.cs
+++ /dev/null
@@ -1,122 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.Diagnostics;
-using System.Runtime;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-namespace System
-{
- public sealed partial class WeakReference<T>
- where T : class?
- {
- // If you fix bugs here, please fix them in WeakReference at the same time.
-
- // the instance fields are effectively readonly
- private IntPtr m_handle;
- private bool m_trackResurrection;
-
- //Creates a new WeakReference that keeps track of target.
- private void Create(T target, bool trackResurrection)
- {
- m_handle = RuntimeImports.RhHandleAlloc(target, trackResurrection ? GCHandleType.WeakTrackResurrection : GCHandleType.Weak);
- m_trackResurrection = trackResurrection;
-
- if (target != null)
- {
- // Set the conditional weak table if the target is a __ComObject.
- TrySetComTarget(target);
- }
- }
-
- public void SetTarget(T target)
- {
- IntPtr h = m_handle;
- // Should only happen for corner cases, like using a WeakReference from a finalizer.
- // GC can finalize the instance if it becomes F-Reachable.
- // That, however, cannot happen while we use the instance.
- if (default(IntPtr) == h)
- throw new InvalidOperationException(SR.InvalidOperation_HandleIsNotInitialized);
-
- // Update the conditionalweakTable in case the target is __ComObject.
- TrySetComTarget(target);
-
- RuntimeImports.RhHandleSet(h, target);
-
- // must keep the instance alive as long as we use the handle.
- GC.KeepAlive(this);
- }
-
- private T? Target
- {
- get
- {
- IntPtr h = m_handle;
- // Should only happen for corner cases, like using a WeakReference from a finalizer.
- // GC can finalize the instance if it becomes F-Reachable.
- // That, however, cannot happen while we use the instance.
- if (default(IntPtr) == h)
- return default;
-
- // unsafe cast is ok as the handle cannot be destroyed and recycled while we keep the instance alive
- T? target = Unsafe.As<T?>(RuntimeImports.RhHandleGet(h)) ?? TryGetComTarget() as T;
-
- // must keep the instance alive as long as we use the handle.
- GC.KeepAlive(this);
-
- return target;
- }
- }
-
- /// <summary>
- /// This method checks whether the target to the weakreference is a native COMObject in which case the native object might still be alive although the RuntimeHandle could be null.
- /// Hence we check in the conditionalweaktable maintained by the System.Private.Interop.dll that maps weakreferenceInstance->nativeComObject to check whether the native COMObject is alive or not.
- /// and gets\create a new RCW in case it is alive.
- /// </summary>
- private static object? TryGetComTarget()
- {
-#if ENABLE_WINRT
- WinRTInteropCallbacks callbacks = WinRTInterop.UnsafeCallbacks;
- if (callbacks != null)
- {
- return callbacks.GetCOMWeakReferenceTarget(this);
- }
- else
- {
- Debug.Fail("WinRTInteropCallback is null");
- }
-#endif // ENABLE_WINRT
- return null;
- }
-
- /// <summary>
- /// This method notifies the System.Private.Interop.dll to update the conditionalweaktable for weakreferenceInstance->target in case the target is __ComObject. This ensures that we have a means to
- /// go from the managed weak reference to the actual native object even though the managed counterpart might have been collected.
- /// </summary>
- private static void TrySetComTarget(object? target)
- {
-#if ENABLE_WINRT
- WinRTInteropCallbacks callbacks = WinRTInterop.UnsafeCallbacks;
- if (callbacks != null)
- callbacks.SetCOMWeakReferenceTarget(this, target);
- else
- {
- Debug.Fail("WinRTInteropCallback is null");
- }
-#endif // ENABLE_WINRT
- }
-
- // Note: While WeakReference<T> is formally a finalizable type, the finalizer does not actually run.
- // Instead the instances are treated specially in GC when scanning for no longer strongly-reachable
- // finalizable objects.
-#pragma warning disable CA1821 // Remove empty Finalizers
- ~WeakReference()
- {
- Debug.Assert(false, " WeakReference<T> finalizer should never run");
- }
-#pragma warning restore CA1821 // Remove empty Finalizers
-
- private bool IsTrackResurrection() => m_trackResurrection;
- }
-}
diff --git a/src/coreclr/pal/inc/pal.h b/src/coreclr/pal/inc/pal.h
index d16eac5cc3e..925ab18d4f0 100644
--- a/src/coreclr/pal/inc/pal.h
+++ b/src/coreclr/pal/inc/pal.h
@@ -2674,7 +2674,7 @@ PALIMPORT BOOL PALAPI PAL_GetUnwindInfoSize(SIZE_T baseAddress, ULONG64 ehFrameH
#if defined(__APPLE__) && defined(__i386__)
#define PAL_CS_NATIVE_DATA_SIZE 76
-#elif defined(__APPLE__) && defined(__x86_64__)
+#elif defined(__APPLE__) && defined(HOST_AMD64)
#define PAL_CS_NATIVE_DATA_SIZE 120
#elif defined(__APPLE__) && defined(HOST_ARM64)
#define PAL_CS_NATIVE_DATA_SIZE 120
@@ -4581,12 +4581,14 @@ void _mm_setcsr(unsigned int i);
#ifdef __cplusplus
+#if defined(HOST_ARM64) && defined(TARGET_ARM64)
class CORJIT_FLAGS;
PALIMPORT
VOID
PALAPI
PAL_GetJitCpuCapabilityFlags(CORJIT_FLAGS *flags);
+#endif // HOST_ARM64 && TARGET_ARM64
#endif
diff --git a/src/coreclr/pal/src/arch/amd64/processor.cpp b/src/coreclr/pal/src/arch/amd64/processor.cpp
index 1c9e026cfed..0fe9ff7c183 100644
--- a/src/coreclr/pal/src/arch/amd64/processor.cpp
+++ b/src/coreclr/pal/src/arch/amd64/processor.cpp
@@ -48,3 +48,32 @@ extern "C" unsigned int XmmYmmStateSupport()
// Check OS has enabled both XMM and YMM state support
return ((eax & 0x06) == 0x06) ? 1 : 0;
}
+
+/*++
+Function:
+Avx512StateSupport
+
+Check if OS has enabled XMM, YMM and ZMM state support
+
+Return value:
+1 if XMM, YMM and ZMM are enabled, 0 otherwise
+--*/
+extern "C" unsigned int Avx512StateSupport()
+{
+ unsigned int eax;
+ __asm(" mov $1, %%eax\n" \
+ " cpuid\n" \
+ " xor %%eax, %%eax\n" \
+ " and $0x18000000, %%ecx\n" /* check for xsave feature set and that it is enabled by the OS */ \
+ " cmp $0x18000000, %%ecx\n" \
+ " jne endz\n" \
+ " xor %%ecx, %%ecx\n" \
+ " xgetbv\n" \
+ "endz:\n" \
+ : "=a"(eax) /* output in eax */ \
+ : /* no inputs */ \
+ : "ebx", "ecx", "edx" /* registers that are clobbered */
+ );
+ // Check OS has enabled XMM, YMM and ZMM state support
+ return ((eax & 0x0E6) == 0x0E6) ? 1 : 0;
+}
diff --git a/src/coreclr/pal/src/exception/seh-unwind.cpp b/src/coreclr/pal/src/exception/seh-unwind.cpp
index a5f9f3345e9..e26a53b9935 100644
--- a/src/coreclr/pal/src/exception/seh-unwind.cpp
+++ b/src/coreclr/pal/src/exception/seh-unwind.cpp
@@ -54,7 +54,7 @@ Abstract:
#endif // HOST_UNIX
-#if defined(TARGET_OSX) && defined(TARGET_ARM64)
+#if defined(TARGET_OSX) && defined(HOST_ARM64)
// MacOS uses ARM64 instead of AARCH64 to describe these registers
// Create aliases to reuse more code
enum
@@ -96,7 +96,7 @@ enum
UNW_AARCH64_V30 = UNW_ARM64_D30,
UNW_AARCH64_V31 = UNW_ARM64_D31
};
-#endif // defined(TARGET_OSX) && defined(TARGET_ARM64)
+#endif // defined(TARGET_OSX) && defined(HOST_ARM64)
//----------------------------------------------------------------------
diff --git a/src/coreclr/pal/src/misc/jitsupport.cpp b/src/coreclr/pal/src/misc/jitsupport.cpp
index 209b3659083..f7ca5c36e71 100644
--- a/src/coreclr/pal/src/misc/jitsupport.cpp
+++ b/src/coreclr/pal/src/misc/jitsupport.cpp
@@ -148,6 +148,7 @@ static unsigned long GetCpuCapabilityFlagsFromCpuInfo()
}
#endif // defined(HOST_ARM64) && defined(__linux__)
+#if defined(HOST_ARM64) && defined(TARGET_ARM64)
PALIMPORT
VOID
PALAPI
@@ -155,7 +156,6 @@ PAL_GetJitCpuCapabilityFlags(CORJIT_FLAGS *flags)
{
_ASSERTE(flags);
-#if defined(HOST_ARM64)
#if HAVE_AUXV_HWCAP_H
unsigned long hwCap = getauxval(AT_HWCAP);
@@ -294,10 +294,5 @@ PAL_GetJitCpuCapabilityFlags(CORJIT_FLAGS *flags)
flags->Set(InstructionSet_AdvSimd);
// flags->Set(CORJIT_FLAGS::CORJIT_FLAG_HAS_ARM64_FP);
#endif // HAVE_AUXV_HWCAP_H
-#elif defined(TARGET_ARM64)
- // Enable ARM64 based flags by default so we always crossgen
- // ARM64 intrinsics for Linux
- flags->Set(InstructionSet_ArmBase);
- flags->Set(InstructionSet_AdvSimd);
-#endif // defined(HOST_ARM64)
}
+#endif // HOST_ARM64 && TARGET_ARM64
diff --git a/src/coreclr/pal/src/misc/sysinfo.cpp b/src/coreclr/pal/src/misc/sysinfo.cpp
index f5d81cef557..d9ddb02f521 100644
--- a/src/coreclr/pal/src/misc/sysinfo.cpp
+++ b/src/coreclr/pal/src/misc/sysinfo.cpp
@@ -636,10 +636,11 @@ PAL_GetLogicalProcessorCacheSizeFromOS()
int64_t cacheSizeFromSysctl = 0;
size_t sz = sizeof(cacheSizeFromSysctl);
const bool success = false
- // macOS-arm64: Since macOS 12.0, Apple added ".perflevelX." to determinate cache sizes for efficiency
+ // macOS: Since macOS 12.0, Apple added ".perflevelX." to determinate cache sizes for efficiency
// and performance cores separately. "perflevel0" stands for "performance"
+ || sysctlbyname("hw.perflevel0.l3cachesize", &cacheSizeFromSysctl, &sz, nullptr, 0) == 0
|| sysctlbyname("hw.perflevel0.l2cachesize", &cacheSizeFromSysctl, &sz, nullptr, 0) == 0
- // macOS-arm64: these report cache sizes for efficiency cores only:
+ // macOS: these report cache sizes for efficiency cores only:
|| sysctlbyname("hw.l3cachesize", &cacheSizeFromSysctl, &sz, nullptr, 0) == 0
|| sysctlbyname("hw.l2cachesize", &cacheSizeFromSysctl, &sz, nullptr, 0) == 0
|| sysctlbyname("hw.l1dcachesize", &cacheSizeFromSysctl, &sz, nullptr, 0) == 0;
diff --git a/src/coreclr/pal/src/synchmgr/synchmanager.cpp b/src/coreclr/pal/src/synchmgr/synchmanager.cpp
index 091e746a817..d8a4fcfe00b 100644
--- a/src/coreclr/pal/src/synchmgr/synchmanager.cpp
+++ b/src/coreclr/pal/src/synchmgr/synchmanager.cpp
@@ -1707,6 +1707,10 @@ namespace CorUnix
reinterpret_cast<CPalSynchronizationManager*>(pArg);
CPalThread * pthrWorker = InternalGetCurrentThread();
+ InternalSetThreadDescription(pthrWorker,
+ PAL_GetCurrentThread(),
+ W(".NET SynchManager"));
+
while (!fWorkerIsDone)
{
LONG lProcessCount;
diff --git a/src/coreclr/pal/src/synchobj/mutex.cpp b/src/coreclr/pal/src/synchobj/mutex.cpp
index 267176b1511..3fff2e7917f 100644
--- a/src/coreclr/pal/src/synchobj/mutex.cpp
+++ b/src/coreclr/pal/src/synchobj/mutex.cpp
@@ -216,6 +216,7 @@ CorUnix::InternalCreateMutex(
IPalObject *pobjRegisteredMutex = NULL;
ISynchStateController *pssc = NULL;
HANDLE hMutex = nullptr;
+ bool createdNamedMutex = false;
_ASSERTE(NULL != pthr);
_ASSERTE(NULL != phMutex);
@@ -280,6 +281,21 @@ CorUnix::InternalCreateMutex(
goto InternalCreateMutexExit;
}
}
+ else
+ {
+ SharedMemoryProcessDataHeader *processDataHeader;
+ try
+ {
+ processDataHeader = NamedMutexProcessData::CreateOrOpen(lpName, !!bInitialOwner, &createdNamedMutex);
+ }
+ catch (SharedMemoryException ex)
+ {
+ palError = ex.GetErrorCode();
+ goto InternalCreateMutexExit;
+ }
+
+ SharedMemoryProcessDataHeader::PalObject_SetProcessDataHeader(pobjMutex, processDataHeader);
+ }
palError = g_pObjectManager->RegisterObject(
pthr,
@@ -288,57 +304,39 @@ CorUnix::InternalCreateMutex(
&hMutex,
&pobjRegisteredMutex
);
+ _ASSERTE(palError != ERROR_ALREADY_EXISTS); // PAL's naming infrastructure is not used for named mutexes
+ _ASSERTE(palError != NO_ERROR || pobjRegisteredMutex == pobjMutex);
+ _ASSERTE((palError == NO_ERROR) == (hMutex != nullptr));
+
+ // When RegisterObject succeeds, the object would have an additional reference from the handle, and one reference is
+ // released below through pobjRegisteredMutex. When RegisterObject fails, it releases the initial reference to the object.
+ // Either way, pobjMutex is invalidated by the above call to RegisterObject.
+ pobjMutex = nullptr;
if (palError != NO_ERROR)
{
- _ASSERTE(palError != ERROR_ALREADY_EXISTS); // PAL's naming infrastructure is not used for named mutexes
- _ASSERTE(pobjRegisteredMutex == nullptr);
- _ASSERTE(hMutex == nullptr);
goto InternalCreateMutexExit;
}
- // Now that the object has been registered successfully, it would have a reference associated with the handle, so release
- // the initial reference. Any errors from now on need to revoke the handle.
- _ASSERTE(pobjRegisteredMutex == pobjMutex);
- _ASSERTE(hMutex != nullptr);
- pobjMutex->ReleaseReference(pthr);
+ pobjRegisteredMutex->ReleaseReference(pthr);
pobjRegisteredMutex = nullptr;
- if (lpName != nullptr)
- {
- SharedMemoryProcessDataHeader *processDataHeader;
- bool created = false;
- try
- {
- processDataHeader = NamedMutexProcessData::CreateOrOpen(lpName, !!bInitialOwner, &created);
- }
- catch (SharedMemoryException ex)
- {
- palError = ex.GetErrorCode();
- goto InternalCreateMutexExit;
- }
- SharedMemoryProcessDataHeader::PalObject_SetProcessDataHeader(pobjMutex, processDataHeader);
-
- if (!created)
- {
- // Indicate to the caller that an existing mutex was opened, and hence the caller will not have initial ownership
- // of the mutex if requested through bInitialOwner
- palError = ERROR_ALREADY_EXISTS;
- }
- }
-
*phMutex = hMutex;
hMutex = nullptr;
- pobjMutex = nullptr;
+
+ if (lpName != nullptr && !createdNamedMutex)
+ {
+ // Indicate to the caller that an existing mutex was opened, and hence the caller will not have initial ownership of the
+ // mutex if requested through bInitialOwner
+ palError = ERROR_ALREADY_EXISTS;
+ }
InternalCreateMutexExit:
_ASSERTE(pobjRegisteredMutex == nullptr);
- if (hMutex != nullptr)
- {
- g_pObjectManager->RevokeHandle(pthr, hMutex);
- }
- else if (NULL != pobjMutex)
+ _ASSERTE(hMutex == nullptr);
+
+ if (pobjMutex != nullptr)
{
pobjMutex->ReleaseReference(pthr);
}
@@ -643,29 +641,6 @@ CorUnix::InternalOpenMutex(
goto InternalOpenMutexExit;
}
- palError = g_pObjectManager->RegisterObject(
- pthr,
- pobjMutex,
- &aotNamedMutex,
- &hMutex,
- &pobjRegisteredMutex
- );
-
- if (palError != NO_ERROR)
- {
- _ASSERTE(palError != ERROR_ALREADY_EXISTS); // PAL's naming infrastructure is not used for named mutexes
- _ASSERTE(pobjRegisteredMutex == nullptr);
- _ASSERTE(hMutex == nullptr);
- goto InternalOpenMutexExit;
- }
-
- // Now that the object has been registered successfully, it would have a reference associated with the handle, so release
- // the initial reference. Any errors from now on need to revoke the handle.
- _ASSERTE(pobjRegisteredMutex == pobjMutex);
- _ASSERTE(hMutex != nullptr);
- pobjMutex->ReleaseReference(pthr);
- pobjRegisteredMutex = nullptr;
-
{
SharedMemoryProcessDataHeader *processDataHeader;
try
@@ -677,26 +652,49 @@ CorUnix::InternalOpenMutex(
palError = ex.GetErrorCode();
goto InternalOpenMutexExit;
}
+
if (processDataHeader == nullptr)
{
palError = ERROR_FILE_NOT_FOUND;
goto InternalOpenMutexExit;
}
+
SharedMemoryProcessDataHeader::PalObject_SetProcessDataHeader(pobjMutex, processDataHeader);
}
+ palError = g_pObjectManager->RegisterObject(
+ pthr,
+ pobjMutex,
+ &aotNamedMutex,
+ &hMutex,
+ &pobjRegisteredMutex
+ );
+ _ASSERTE(palError != ERROR_ALREADY_EXISTS); // PAL's naming infrastructure is not used for named mutexes
+ _ASSERTE(palError != NO_ERROR || pobjRegisteredMutex == pobjMutex);
+ _ASSERTE((palError == NO_ERROR) == (hMutex != nullptr));
+
+ // When RegisterObject succeeds, the object would have an additional reference from the handle, and one reference is
+ // released below through pobjRegisteredMutex. When RegisterObject fails, it releases the initial reference to the object.
+ // Either way, pobjMutex is invalidated by the above call to RegisterObject.
+ pobjMutex = nullptr;
+
+ if (palError != NO_ERROR)
+ {
+ goto InternalOpenMutexExit;
+ }
+
+ pobjRegisteredMutex->ReleaseReference(pthr);
+ pobjRegisteredMutex = nullptr;
+
*phMutex = hMutex;
hMutex = nullptr;
- pobjMutex = nullptr;
InternalOpenMutexExit:
_ASSERTE(pobjRegisteredMutex == nullptr);
- if (hMutex != nullptr)
- {
- g_pObjectManager->RevokeHandle(pthr, hMutex);
- }
- else if (NULL != pobjMutex)
+ _ASSERTE(hMutex == nullptr);
+
+ if (pobjMutex != nullptr)
{
pobjMutex->ReleaseReference(pthr);
}
diff --git a/src/coreclr/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/hpitinterlock.s b/src/coreclr/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/hpitinterlock.s
deleted file mode 100644
index 97d7c718ba7..00000000000
--- a/src/coreclr/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/hpitinterlock.s
+++ /dev/null
@@ -1,167 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-/*++
-
-
-
-Module Name:
-
- interlock.s
-
-Abstract:
-
- Implementation of Interlocked functions (32 and 64 bits) for the HPUX/Itanium
- platform. These functions are processor dependent.
- See the i386 implementations for more information.
-
---*/
- .file "interlock.s"
- .section .text, "ax", "progbits"
- .align 16
- .global InterlockedExchangeAdd#
- .proc InterlockedExchangeAdd#
-InterlockedExchangeAdd:
- .body
- ld4.nt1 r8 = [r32]
- ;;
-Iea10:
- mov ar.ccv = r8
- add r15 = r33, r8
- mov r14 = r8
- ;;
- cmpxchg4.acq r8 = [r32], r15, ar.ccv
- ;;
- cmp.ne p6,p7 = r8, r14 // check if the target changes?
-(p6)br.cond.spnt.few Iea10 // if yes, go back to do it again
-(p7)br.ret.sptk.clr b0
- ;;
- .endp InterlockedExchangeAdd#
-
- .align 16
- .global InterlockedIncrement#
- .proc InterlockedIncrement#
-InterlockedIncrement:
- .body
- fetchadd4.acq r8 = [r32], 1
- ;;
- adds r8 = 1, r8
- br.ret.sptk b0
- ;;
- .endp InterlockedIncrement#
-
- .align 16
- .global InterlockedIncrement64#
- .proc InterlockedIncrement64#
-InterlockedIncrement64:
- .body
- fetchadd8.acq r8 = [r32], 1
- ;;
- adds r8 = 1, r8
- br.ret.sptk b0
- ;;
- .endp InterlockedIncrement64#
-
- .align 16
- .global InterlockedDecrement#
- .proc InterlockedDecrement#
-InterlockedDecrement:
- .body
- fetchadd4.acq r8 = [r32], -1
- ;;
- adds r8 = -1, r8
- br.ret.sptk b0
- ;;
- .endp InterlockedDecrement#
-
- .align 16
- .global InterlockedDecrement64#
- .proc InterlockedDecrement64#
-InterlockedDecrement64:
- .body
- fetchadd8.acq r8 = [r32], -1
- ;;
- adds r8 = -1, r8
- br.ret.sptk b0
- ;;
- .endp InterlockedDecrement64#
-
- .align 16
- .global InterlockedExchange#
- .proc InterlockedExchange#
-InterlockedExchange:
- .body
- mf
- zxt4 r33 = r33 // sanitize the upper 32 bits
- ;;
- xchg4 r8 = [r32], r33
- br.ret.sptk b0
- ;;
- .endp InterlockedExchange#
-
- .align 16
- .global InterlockedExchange64#
- .proc InterlockedExchange64#
-InterlockedExchange64:
- .body
- mf
- xchg8 r8 = [r32], r33
- br.ret.sptk b0
- ;;
- .endp InterlockedExchange64#
-
- .align 16
- .global InterlockedCompareExchange#
- .proc InterlockedCompareExchange#
-InterlockedCompareExchange:
- .body
- mf
- zxt4 r33 = r33 // sanitize the upper 32 bits
- zxt4 r34 = r34 // sanitize the upper 32 bits
- ;;
- mov ar.ccv = r34
- ;;
- cmpxchg4.acq r8 = [r32], r33, ar.ccv
- br.ret.sptk.clr b0
- ;;
- .endp InterlockedCompareExchange#
-
- .align 16
- .global InterlockedCompareExchange64#
- .proc InterlockedCompareExchange64#
-InterlockedCompareExchange64:
- .body
- mf
- mov ar.ccv = r34
- ;;
- cmpxchg8.acq r8 = [r32], r33, ar.ccv
- br.ret.sptk.clr b0
- ;;
- .endp InterlockedCompareExchange64#
-
-/*++
- DBG_DebugBreak is extracted from DbgBreakPoint function
- in debugstb.s from win64.
---*/
- BREAKPOINT_STOP = 0x80016
- .align 16
- .global DBG_DebugBreak#
- .proc DBG_DebugBreak#
-DBG_DebugBreak:
- .body
- flushrs
- ;;
- break.i BREAKPOINT_STOP
- br.ret.sptk.clr b0
- ;;
- .endp DBG_DebugBreak#
-
- .align 16
- .global MemoryBarrier#
- .proc MemoryBarrier#
-MemoryBarrier:
- .body
- mf
- br.ret.sptk.clr b0
- ;;
- .endp MemoryBarrier#
diff --git a/src/coreclr/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/notes.txt b/src/coreclr/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/notes.txt
deleted file mode 100644
index 4882c3bd033..00000000000
--- a/src/coreclr/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/notes.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-gcc -O2 -finline-functions -D_DEBUG -g -DFULL_CSIMPL -o ./obj/sun4u/critsecttest.o -c critsecttest.cpp
-gcc -O2 -finline-functions -D_DEBUG -g -c -o ./obj/sun4u/cs.o cs.cpp
-gcc -x assembler-with-cpp -c -Wa,-Av9 -o ./obj/sun4u/sparcinterloc.o sparcinterloc.s
-gcc -lpthread -lrt -O2 -finline-functions -D_DEBUG -g -o ./obj/sun4u/critsecttest ./obj/sun4u/critsecttest.o ./obj/sun4u/cs.o ./obj/sun4u/sparcinterloc.o
-gcc -O2 -finline-functions -D_DEBUG -g -DCXNG_CSIMPL -o ./obj/sun4u/cxngtest.o -c critsecttest.cpp
-gcc -O2 -finline-functions -D_DEBUG -g -c -o ./obj/sun4u/cxng_critsect.o cxng_critsect.cpp
-gcc -lpthread -lrt -O2 -finline-functions -D_DEBUG -g -o ./obj/sun4u/cxngtest ./obj/sun4u/cxngtest.o ./obj/sun4u/cxng_critsect.o ./obj/sun4u/sparcinterloc.o
-gcc -O2 -finline-functions -D_DEBUG -g -DMTX_CSIMPL -o ./obj/sun4u/mtxtest.o -c critsecttest.cpp
-gcc -O2 -finline-functions -D_DEBUG -g -c -o ./obj/sun4u/mtx_critsect.o mtx_critsect.cpp
-gcc -lpthread -lrt -O2 -finline-functions -D_DEBUG -g -o ./obj/sun4u/mtxtest ./obj/sun4u/mtxtest.o ./obj/sun4u/mtx_critsect.o ./obj/sun4u/sparcinterloc.o
-gcc -O2 -finline-functions -D_DEBUG -g -DRECMTX_CSIMPL -o ./obj/sun4u/recmtxtest.o -c critsecttest.cpp
-gcc -O2 -finline-functions -D_DEBUG -g -c -o ./obj/sun4u/recmtx_critsect.o recmtx_critsect.cpp
-gcc -lpthread -lrt -O2 -finline-functions -D_DEBUG -g -o ./obj/sun4u/recmtxtest ./obj/sun4u/recmtxtest.o ./obj/sun4u/recmtx_critsect.o ./obj/sun4u/sparcinterloc.o
-gcc -O2 -finline-functions -D_DEBUG -g -DINLRECMTX_CSIMPL -o ./obj/sun4u/inlrecmtxtest.o -c critsecttest.cpp
-gcc -lpthread -lrt -O2 -finline-functions -D_DEBUG -g -o ./obj/sun4u/inlrecmtxtest ./obj/sun4u/inlrecmtxtest.o ./obj/sun4u/sparcinterloc.o
diff --git a/src/coreclr/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/readme.txt b/src/coreclr/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/readme.txt
deleted file mode 100644
index a407e9f8b58..00000000000
--- a/src/coreclr/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/readme.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-To compile:
-
-For FReeBSD Platform use the following to compile:
-gcc -pthread -lm -lgcc -lstdc++ -xc++ -Di386 pal_composite_native_cs.c
-
-
---------------------------------------------------------
-For Solaris Platform use the following to compile:
- gcc -lpthread -lm -lgcc -lstdc++ -xc++ -D__sparc__ -mimpure-text -shared -o critsect.so mtx_critsect.cpp interlock.s
-gcc -lpthread -lm -lgcc -lstdc++ -xc++ -D__sparc__ pal_composite_native_cs.c
-
-
-setenv LD_LIBRARY_PATH /usr/lib/lwp:/usr/local/lib:/usr/lib:/opt/sfw/lib:.
- gcc -lpthread -lm -lgcc -lstdc++ -lcritsect -xc++ -D__sparc__ pal_composite_native_cs.c
- gcc -lpthread -lm -lgcc -lstdc++ -xc++ -D__sparc__ -mimpure-text -shared -o critsect.so mtx_critsect.cpp
-
-(pts/2):{4}% ldd critsect.so
- libpthread.so.1 => /usr/lib/libpthread.so.1
- libm.so.1 => /usr/lib/libm.so.1
- libstdc++.so.2.10.0 => /usr/local/lib/libstdc++.so.2.10.0
- libc.so.1 => /usr/lib/libc.so.1
- libdl.so.1 => /usr/lib/libdl.so.1
- libthread.so.1 => /usr/lib/libthread.so.1
- /usr/platform/SUNW,Serverblade1/lib/libc_psr.so.1
-
-
---------------------------------------------------------
-For HPUX Platform use the following to compile:
-gcc -lpthread -mlp64 -lm -lgcc -lstdc++ -xc++ -D_HPUX_ -D__ia64__ pal_composite_native_cs.c
-
---------------------------------------------------------
-To execute:
-./a.out [PROCESS_COUNT] [THREAD_COUNT] [REPEAT_COUNT]
-
-
- ./a.out 1 32 1000000 4102406
-
-
-
diff --git a/src/coreclr/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/sparcinterloc.s b/src/coreclr/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/sparcinterloc.s
deleted file mode 100644
index 20647c77818..00000000000
--- a/src/coreclr/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/sparcinterloc.s
+++ /dev/null
@@ -1,72 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-/*++
-
-
-
- Module Name:
-
- interlock.s
-
-Abstract:
-
- Implementation of Interlocked functions for the SPARC
- platform. These functions are processor dependent.
- See the i386 implementations for more information.
-
- --*/
-
- // A handy macro for declaring a public function
- // The first argument is the function name.
- #define ASMFUNC(n,typename); \
- .align 4 ; \
- .global n ; \
- .type n,typename ; \
-n: ;
-
- .text
- ASMFUNC(InterlockedIncrement,#function)
- ld [%o0], %o1
-loopI:
- mov %o1, %o2
- add %o1, 1, %o1
- cas [%o0], %o2, %o1
- cmp %o2, %o1
- bne loopI
- nop
- retl
- add %o1, 1, %o0
-
-
- ASMFUNC(InterlockedDecrement,#function)
- ld [%o0], %o1
-loopD:
- mov %o1, %o2
- sub %o1, 1, %o1
- cas [%o0], %o2, %o1
- cmp %o2, %o1
- bne loopD
- nop
- retl
- sub %o1, 1, %o0
-
-
- ASMFUNC(InterlockedExchange,#function)
- swap [%o0], %o1
- retl
- mov %o1, %o0
-
- ASMFUNC(InterlockedCompareExchange,#function)
- cas [%o0], %o2, %o1
- retl
- mov %o1, %o0
-
- ASMFUNC(MemoryBarrier,#function)
- // ROTORTODO: SPARC
- retl
- nop
-
- ASMFUNC(YieldProcessor,#function)
- retl
- nop
diff --git a/src/coreclr/scripts/jitrollingbuild.py b/src/coreclr/scripts/jitrollingbuild.py
index 8653c78edad..dc40ba0f96c 100644
--- a/src/coreclr/scripts/jitrollingbuild.py
+++ b/src/coreclr/scripts/jitrollingbuild.py
@@ -121,7 +121,8 @@ download_parser.add_argument("--skip_cleanup", action="store_true", help=skip_cl
list_parser = subparsers.add_parser("list", description=list_description, parents=[common_parser])
list_parser.add_argument("-git_hash", help=git_hash_help)
-list_parser.add_argument("--all", action="store_true", help="Show all JITs, not just those for the specified (or default) git hash, OS, architecture, and flavor")
+list_parser.add_argument("--all", action="store_true", help="Show all JITs, not just those for the specified (or default) OS, architecture, and flavor")
+list_parser.add_argument("--global_all", action="store_true", help="Show all JITs in Azure Storage")
################################################################################
# Helper classes
@@ -192,30 +193,35 @@ def determine_jit_name(coreclr_args):
raise RuntimeError("Unknown OS.")
-def process_git_hash_arg(coreclr_args):
+def process_git_hash_arg(coreclr_args, return_first_hash=False):
""" Process the -git_hash argument.
If the argument is present, use that to download a JIT.
- If not present, try to find and download a JIT based on the current environment:
+ If not present, try to find a JIT based on the current environment:
1. Determine the current directory git hash using:
git rev-parse HEAD
- Call the result `current_git_hash`.
- 2. Determine the baseline: where does this hash meet `main` using:
- git merge-base `current_git_hash` main
- Call the result `base_git_hash`.
- 3. Figure out the latest hash, starting with `base_git_hash`, that contains any changes to
+ Call the result `current_hash`.
+ 2. Determine the baseline: where does this hash meet the newest `main` branch of any remote using:
+ git branch -r --sort=-committerdate -v --list "*/main"
+ Call the result `main_hash`.
+ 3. Determine the baseline: where does this hash meet `main_hash` using:
+ git merge-base `current_hash` main
+ Call the result `baseline_hash`.
+ 4. Figure out the latest hash, starting with `baseline_hash`, that contains any changes to
the src/coreclr/jit directory. (We do this because the JIT rolling build only includes
builds for changes to this directory. So, this logic needs to stay in sync with the logic
that determines what causes the JIT rolling build to run. E.g., it should also get
rebuilt if the JIT-EE interface GUID changes. Alternatively, we can take the entire list
of changes, and probe the rolling build drop for all of them.)
- 4. Starting with `base_git_hash`, and possibly walking to older changes, look for matching builds
+ 5. Starting with `baseline_hash`, and possibly walking to older changes, look for matching builds
in the JIT rolling build drops.
- 5. If a JIT directory in Azure Storage is found, set coreclr_args.git_hash to that git hash to use
+ 6. If a JIT directory in Azure Storage is found, set coreclr_args.git_hash to that git hash to use
for downloading.
Args:
coreclr_args (CoreclrArguments) : parsed args
+ return_first_hash (bool) : if true, return the first git_hash in `main` that has any JIT changes.
+ This is used by `list` to pick a reasonable default if a git hash wasn't specified.
Returns:
Nothing
@@ -234,31 +240,43 @@ def process_git_hash_arg(coreclr_args):
with ChangeDir(coreclr_args.runtime_repo_location):
command = [ "git", "rev-parse", "HEAD" ]
- logging.info("Invoking: {}".format(" ".join(command)))
+ logging.debug("Invoking: {}".format(" ".join(command)))
proc = subprocess.Popen(command, stdout=subprocess.PIPE)
stdout_git_rev_parse, _ = proc.communicate()
return_code = proc.returncode
if return_code == 0:
- current_git_hash = stdout_git_rev_parse.decode('utf-8').strip()
- logging.info("Current hash: {}".format(current_git_hash))
+ current_hash = stdout_git_rev_parse.decode('utf-8').strip()
+ logging.info("Current hash: {}".format(current_hash))
else:
raise RuntimeError("Couldn't determine current git hash")
# We've got the current hash; figure out the baseline hash.
- command = [ "git", "merge-base", current_git_hash, "origin/main" ]
- logging.info("Invoking: {}".format(" ".join(command)))
+ # First find the newest hash for any branch matching */main.
+ command = [ "git", "branch", "-r", "--sort=-committerdate", "-v", "--list", "*/main" ]
+ logging.debug("Invoking: %s", " ".join(command))
+ proc = subprocess.Popen(command, stdout=subprocess.PIPE)
+ stdout_git_main_branch, _ = proc.communicate()
+ return_code = proc.returncode
+ if return_code != 0:
+ raise RuntimeError("Couldn't determine newest 'main' git hash")
+
+ main_hash = stdout_git_main_branch.decode('utf-8').strip().split()[1]
+
+ # Get the merge-base between the newest main and our current rev
+ command = [ "git", "merge-base", current_hash, main_hash ]
+ logging.debug("Invoking: %s", " ".join(command))
proc = subprocess.Popen(command, stdout=subprocess.PIPE)
stdout_git_merge_base, _ = proc.communicate()
return_code = proc.returncode
- if return_code == 0:
- base_git_hash = stdout_git_merge_base.decode('utf-8').strip()
- logging.info("Baseline hash: {}".format(base_git_hash))
- else:
+ if return_code != 0:
raise RuntimeError("Couldn't determine baseline git hash")
+ baseline_hash = stdout_git_merge_base.decode('utf-8').strip()
+ logging.info("Baseline hash: %s", baseline_hash)
+
# Enumerate the last 20 changes, starting with the baseline, that included JIT changes.
- command = [ "git", "log", "--pretty=format:%H", base_git_hash, "-20", "--", "src/coreclr/jit/*" ]
- logging.info("Invoking: {}".format(" ".join(command)))
+ command = [ "git", "log", "--pretty=format:%H", baseline_hash, "-20", "--", "src/coreclr/jit/*" ]
+ logging.debug("Invoking: {}".format(" ".join(command)))
proc = subprocess.Popen(command, stdout=subprocess.PIPE)
stdout_change_list, _ = proc.communicate()
return_code = proc.returncode
@@ -282,10 +300,15 @@ def process_git_hash_arg(coreclr_args):
# then when we go to download, we do the same search again because we don't cache the result and pass it
# directly on to the downloader.
coreclr_args.git_hash = git_hash
- urls = get_jit_urls(coreclr_args, find_all=False)
+
+ if return_first_hash:
+ # Just use the first one
+ break
+
+ urls = get_jit_urls(coreclr_args)
if len(urls) > 1:
if hashnum > 1:
- logging.warn("Warning: the baseline found is not built with the first git hash with JIT code changes; there may be extraneous diffs")
+ logging.warning("Warning: the baseline found is not built with the first git hash with JIT code changes; there may be extraneous diffs")
return
# We didn't find a baseline; keep looking
@@ -399,7 +422,7 @@ def upload_command(coreclr_args):
try:
blob_client.get_blob_properties()
# If no exception, then the blob already exists. Delete it!
- logging.warn("Warning: replacing existing blob!")
+ logging.warning("Warning: replacing existing blob!")
blob_client.delete_blob()
except Exception:
# Blob doesn't exist already; that's good
@@ -489,7 +512,7 @@ def upload_command(coreclr_args):
change_list_hashes = stdout_change_list.decode('utf-8').strip().splitlines()
if len(change_list_hashes) == 0:
- logging.warn("Couldn't find any JIT changes! Just using the argument git_hash")
+ logging.warning("Couldn't find any JIT changes! Just using the argument git_hash")
else:
jit_git_hash = change_list_hashes[0]
logging.info("Using git_hash {}".format(jit_git_hash))
@@ -502,9 +525,9 @@ def upload_command(coreclr_args):
from azure.storage.blob import BlobServiceClient
except:
- logging.warn("Please install:")
- logging.warn(" pip install azure-storage-blob")
- logging.warn("See also https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-python")
+ logging.warning("Please install:")
+ logging.warning(" pip install azure-storage-blob")
+ logging.warning("See also https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-python")
raise RuntimeError("Missing azure storage package.")
blob_service_client = BlobServiceClient(account_url=az_blob_storage_account_uri, credential=coreclr_args.az_storage_key)
@@ -547,26 +570,30 @@ def upload_command(coreclr_args):
logging.info("Finished JIT upload")
-def get_jit_urls(coreclr_args, find_all=False):
+def get_jit_urls(coreclr_args, find_all=False, find_global_all=False):
""" Helper method: collect a list of URLs for all the JIT files to download or list.
Args:
coreclr_args (CoreclrArguments): parsed args
- find_all (bool): True to show all, or False to filter based on coreclr_args
+ find_all (bool): True to show all for a git hash, or False to filter based on coreclr_args
+ find_global_all (bool): True to show all on the server, or False to filter based on coreclr_args
"""
- blob_filter_string = "{}/{}/{}/{}".format(coreclr_args.git_hash, coreclr_args.host_os, coreclr_args.arch, coreclr_args.build_type)
+ if find_all:
+ blob_filter_string = "{}/".format(coreclr_args.git_hash)
+ else:
+ blob_filter_string = "{}/{}/{}/{}".format(coreclr_args.git_hash, coreclr_args.host_os, coreclr_args.arch, coreclr_args.build_type)
blob_prefix_filter = "{}/{}/{}".format(az_blob_storage_jitrollingbuild_container_uri, az_builds_root_folder, blob_filter_string).lower()
# Determine if a URL in Azure Storage should be allowed. The URL looks like:
# https://clrjit.blob.core.windows.net/jitrollingbuild/builds/git_hash/Linux/x64/Checked/clrjit.dll
# Filter to just the current git_hash, OS, architecture, and build_flavor.
- # If "find_all" is True, then no filtering happens: everything is returned.
+ # If "find_global_all" is True, then no filtering happens: everything is returned.
def filter_jits(url):
url = url.lower()
- return find_all or url.startswith(blob_prefix_filter)
+ return find_global_all or url.startswith(blob_prefix_filter)
- return list_az_jits(filter_jits, None if find_all else blob_filter_string)
+ return list_az_jits(filter_jits, None if find_global_all else blob_filter_string)
def download_command(coreclr_args):
@@ -576,9 +603,9 @@ def download_command(coreclr_args):
coreclr_args (CoreclrArguments): parsed args
"""
- urls = get_jit_urls(coreclr_args, find_all=False)
+ urls = get_jit_urls(coreclr_args)
if len(urls) == 0:
- logging.warn("Nothing to download")
+ logging.warning("Nothing to download")
return
if coreclr_args.target_dir is None:
@@ -600,25 +627,22 @@ def list_command(coreclr_args):
coreclr_args (CoreclrArguments) : parsed args
"""
- urls = get_jit_urls(coreclr_args, find_all=coreclr_args.all)
- if len(urls) == 0:
- logging.warn("No JITs found")
- return
-
+ urls = get_jit_urls(coreclr_args, find_all=coreclr_args.all, find_global_all=coreclr_args.global_all)
count = len(urls)
- if coreclr_args.all:
+ if coreclr_args.global_all:
logging.info("{} JIT files".format(count))
else:
- blob_filter_string = "{}/{}/{}/{}".format(coreclr_args.git_hash, coreclr_args.host_os, coreclr_args.arch, coreclr_args.build_type)
+ if coreclr_args.all:
+ blob_filter_string = "{}/".format(coreclr_args.git_hash)
+ else:
+ blob_filter_string = "{}/{}/{}/{}".format(coreclr_args.git_hash, coreclr_args.host_os, coreclr_args.arch, coreclr_args.build_type)
logging.info("{} JIT files for {}".format(count, blob_filter_string))
logging.info("")
for url in urls:
logging.info("{}".format(url))
- logging.info("")
-
def setup_args(args):
""" Setup the args for SuperPMI to use.
@@ -714,6 +738,22 @@ def setup_args(args):
lambda unused: True,
"Unable to set all")
+ coreclr_args.verify(args,
+ "global_all",
+ lambda unused: True,
+ "Unable to set global_all")
+
+ if coreclr_args.all and coreclr_args.global_all:
+ print("Only one of --all or --global_all can be specfied")
+ sys.exit(1)
+
+ if coreclr_args.global_all and coreclr_args.git_hash is not None:
+ print("If --global_all is specified, do not specify -git_hash")
+ sys.exit(1)
+
+ if not coreclr_args.global_all and coreclr_args.git_hash is None:
+ process_git_hash_arg(coreclr_args)
+
return coreclr_args
################################################################################
diff --git a/src/coreclr/scripts/superpmi.py b/src/coreclr/scripts/superpmi.py
index 627d71d7255..d4a386333a6 100644
--- a/src/coreclr/scripts/superpmi.py
+++ b/src/coreclr/scripts/superpmi.py
@@ -342,7 +342,6 @@ asm_diff_parser.add_argument("--gcinfo", action="store_true", help="Include GC i
asm_diff_parser.add_argument("--debuginfo", action="store_true", help="Include debug info after disassembly (sets COMPlus_JitDebugDump).")
asm_diff_parser.add_argument("-tag", help="Specify a word to add to the directory name where the asm diffs will be placed")
asm_diff_parser.add_argument("-metrics", action="append", help="Metrics option to pass to jit-analyze. Can be specified multiple times, or pass comma-separated values.")
-asm_diff_parser.add_argument("-retainOnlyTopFiles", action="store_true", help="Retain only top .dasm files with largest improvements or regressions and delete remaining files.")
asm_diff_parser.add_argument("--diff_with_release", action="store_true", help="Specify if this is asmdiff using release binaries.")
asm_diff_parser.add_argument("--git_diff", action="store_true", help="Produce a '.diff' file from 'base' and 'diff' folders if there were any differences.")
@@ -481,21 +480,30 @@ def create_artifacts_base_name(coreclr_args, mch_file):
def read_csv_metrics(path):
- """ Read a metrics summary file produced by superpmi, and return the single row containing the information as a dictionary.
+ """ Read a metrics summary file produced by superpmi and return the rows as a dictionary of dictionaries.
Args:
path (str) : path to .csv file
Returns:
- A dictionary with each metric
+ A dictionary of dictionaries. For example, dict["Overall"]["Successful
+ compiles"] will access the total number of successful compiles and
+ dict["MinOpts"]["Successful compiles"] will access the number of
+ minopts compilations.
"""
+ dict = {}
with open(path) as csv_file:
reader = csv.DictReader(csv_file)
for row in reader:
- return row
+ dict[row["Name"]] = row
- return None
+ return dict
+
+def read_csv_diffs(path):
+ with open(path) as csv_file:
+ reader = csv.DictReader(csv_file)
+ return list(reader)
def determine_clrjit_compiler_version(clrjit_path):
""" Obtain the version of the compiler that was used to compile the clrjit at the specified path.
@@ -1210,7 +1218,7 @@ def print_superpmi_result(return_code, coreclr_args, base_metrics, diff_metrics)
those return codes.
"""
if return_code == 0:
- logging.info("Clean SuperPMI {} ({} contexts processed)".format("replay" if diff_metrics is None else "diff", base_metrics["Successful compiles"]))
+ logging.info("Clean SuperPMI {} ({} contexts processed)".format("replay" if diff_metrics is None else "diff", base_metrics["Overall"]["Successful compiles"]))
elif return_code == -1 or return_code == 4294967295:
logging.error("General fatal error")
elif return_code == -2 or return_code == 4294967294:
@@ -1220,13 +1228,13 @@ def print_superpmi_result(return_code, coreclr_args, base_metrics, diff_metrics)
elif return_code == 2:
logging.warning("Asm diffs found")
elif return_code == 3:
- missing_base = int(base_metrics["Missing compiles"])
- total_contexts = int(base_metrics["Successful compiles"]) + int(base_metrics["Failing compiles"])
+ missing_base = int(base_metrics["Overall"]["Missing compiles"])
+ total_contexts = int(base_metrics["Overall"]["Successful compiles"]) + int(base_metrics["Overall"]["Failing compiles"])
if diff_metrics is None:
logging.warning("SuperPMI encountered missing data for {} out of {} contexts".format(missing_base, total_contexts))
else:
- missing_diff = int(diff_metrics["Missing compiles"])
+ missing_diff = int(diff_metrics["Overall"]["Missing compiles"])
logging.warning("SuperPMI encountered missing data. Missing with base JIT: {}. Missing with diff JIT: {}. Total contexts: {}.".format(missing_base, missing_diff, total_contexts))
elif return_code == 139 and coreclr_args.host_os != "windows":
@@ -1428,6 +1436,8 @@ class SuperPMIReplay:
# SuperPMI Replay/AsmDiffs
################################################################################
+def html_color(color, text):
+ return "<span style=\"color:{}\">{}</span>".format(color, text)
class SuperPMIReplayAsmDiffs:
""" SuperPMI Replay AsmDiffs class
@@ -1543,7 +1553,7 @@ class SuperPMIReplayAsmDiffs:
files_with_replay_failures = []
# List of all Markdown summary files
- all_md_summary_files = []
+ asm_diffs = []
with TempDir(None, self.coreclr_args.skip_cleanup) as temp_location:
logging.debug("")
@@ -1562,7 +1572,7 @@ class SuperPMIReplayAsmDiffs:
logging.info("Running asm diffs of %s", mch_file)
fail_mcl_file = os.path.join(temp_location, os.path.basename(mch_file) + "_fail.mcl")
- diff_mcl_file = os.path.join(temp_location, os.path.basename(mch_file) + "_diff.mcl")
+ diffs_info = os.path.join(temp_location, os.path.basename(mch_file) + "_diffs.csv")
base_metrics_summary_file = os.path.join(temp_location, os.path.basename(mch_file) + "_base_metrics.csv")
diff_metrics_summary_file = os.path.join(temp_location, os.path.basename(mch_file) + "_diff_metrics.csv")
@@ -1571,7 +1581,7 @@ class SuperPMIReplayAsmDiffs:
"-a", # Asm diffs
"-v", "ewmi", # display errors, warnings, missing, jit info
"-f", fail_mcl_file, # Failing mc List
- "-diffMCList", diff_mcl_file, # Create all of the diffs in an mcl file
+ "-diffsInfo", diffs_info, # Information about diffs
"-r", os.path.join(temp_location, "repro"), # Repro name, create .mc repro files
"-baseMetricsSummary", base_metrics_summary_file, # Create summary of metrics we can use to get total code size impact
"-diffMetricsSummary", diff_metrics_summary_file,
@@ -1598,6 +1608,13 @@ class SuperPMIReplayAsmDiffs:
if self.coreclr_args.error_limit is not None:
flags += ["-failureLimit", self.coreclr_args.error_limit]
+ if self.coreclr_args.diff_with_release:
+ # If one of the JITs is Release, ignore all the stored configuration variables.
+ # This isn't necessary if both are Release builds (and, in fact, it can clear variables
+ # that both Release compilers can interpret). However, we rarely or never compare
+ # two Release compilers, so this is safest.
+ flags += [ "-ignoreStoredConfig" ]
+
# Change the working directory to the Core_Root we will call SuperPMI from.
# This is done to allow libcoredistools to be loaded correctly on unix
# as the loadlibrary path will be relative to the current directory.
@@ -1627,25 +1644,24 @@ class SuperPMIReplayAsmDiffs:
repro_base_command_line = "{} {} {}".format(self.superpmi_path, " ".join(altjit_asm_diffs_flags), self.diff_jit_path)
save_repro_mc_files(temp_location, self.coreclr_args, artifacts_base_name, repro_base_command_line)
+ diffs = read_csv_diffs(diffs_info)
+
# This file had asm diffs; keep track of that.
- if is_nonzero_length_file(diff_mcl_file):
+ has_diffs = len(diffs) > 0
+ if has_diffs:
files_with_asm_diffs.append(mch_file)
# There were diffs. Go through each method that created diffs and
- # create a base/diff asm file with diffable asm. In addition, create
- # a standalone .mc for easy iteration.
- if is_nonzero_length_file(diff_mcl_file) and not self.coreclr_args.diff_with_release:
+ # create a base/diff asm file with diffable asm so we can analyze
+ # it. In addition, create a standalone .mc for easy iteration.
+ jit_analyze_summary_file = None
+
+ if has_diffs and not self.coreclr_args.diff_with_release:
# AsmDiffs. Save the contents of the fail.mcl file to dig into failures.
if return_code == 0:
logging.warning("Warning: SuperPMI returned a zero exit code, but generated a non-zero-sized mcl file")
- self.diff_mcl_contents = None
- with open(diff_mcl_file) as file_handle:
- mcl_lines = file_handle.readlines()
- mcl_lines = [item.strip() for item in mcl_lines]
- self.diff_mcl_contents = mcl_lines
-
asm_root_dir = create_unique_directory_name(self.coreclr_args.spmi_location, "asm.{}".format(artifacts_base_name))
base_asm_location = os.path.join(asm_root_dir, "base")
diff_asm_location = os.path.join(asm_root_dir, "diff")
@@ -1663,13 +1679,13 @@ class SuperPMIReplayAsmDiffs:
text_differences = queue.Queue()
jit_dump_differences = queue.Queue()
- async def create_replay_artifacts(print_prefix, item, self, mch_file, env, jit_differences_queue, base_location, diff_location, extension):
+ async def create_replay_artifacts(print_prefix, context_index, self, mch_file, env, jit_differences_queue, base_location, diff_location, extension):
""" Run superpmi over an MC to create JIT asm or JIT dumps for the method.
"""
# Setup flags to call SuperPMI for both the diff jit and the base jit
flags = [
- "-c", item,
+ "-c", str(context_index),
"-v", "q" # only log from the jit.
]
flags += altjit_replay_flags
@@ -1681,7 +1697,7 @@ class SuperPMIReplayAsmDiffs:
async def create_one_artifact(jit_path: str, location: str, flags) -> str:
command = [self.superpmi_path] + flags + [jit_path, mch_file]
- item_path = os.path.join(location, "{}{}".format(item, extension))
+ item_path = os.path.join(location, "{}{}".format(context_index, extension))
modified_env = env.copy()
modified_env['COMPlus_JitStdOutFile'] = item_path
logging.debug("%sGenerating %s", print_prefix, item_path)
@@ -1697,22 +1713,20 @@ class SuperPMIReplayAsmDiffs:
diff_txt = await create_one_artifact(self.diff_jit_path, diff_location, flags + diff_option_flags_for_diff_artifact)
if base_txt != diff_txt:
- jit_differences_queue.put_nowait(item)
+ jit_differences_queue.put_nowait(context_index)
################################################################################################ end of create_replay_artifacts()
- diff_items = []
- for item in self.diff_mcl_contents:
- diff_items.append(item)
-
logging.info("Creating dasm files: %s %s", base_asm_location, diff_asm_location)
- subproc_helper = AsyncSubprocessHelper(diff_items, verbose=True)
+ dasm_contexts = self.pick_contexts_to_disassemble(diffs)
+ subproc_helper = AsyncSubprocessHelper(dasm_contexts, verbose=True)
subproc_helper.run_to_completion(create_replay_artifacts, self, mch_file, asm_complus_vars_full_env, text_differences, base_asm_location, diff_asm_location, ".dasm")
if self.coreclr_args.diff_jit_dump:
logging.info("Creating JitDump files: %s %s", base_dump_location, diff_dump_location)
subproc_helper.run_to_completion(create_replay_artifacts, self, mch_file, jit_dump_complus_vars_full_env, jit_dump_differences, base_dump_location, diff_dump_location, ".txt")
- logging.info("Differences found. To replay SuperPMI use:")
+ logging.info("Differences found. To replay SuperPMI use:".format(len(diffs)))
+
logging.info("")
for var, value in asm_complus_vars.items():
print_platform_specific_environment_vars(logging.INFO, self.coreclr_args, var, value)
@@ -1727,14 +1741,15 @@ class SuperPMIReplayAsmDiffs:
logging.info("%s %s -c ### %s %s", self.superpmi_path, " ".join(altjit_replay_flags), self.diff_jit_path, mch_file)
logging.info("")
- logging.debug("Method numbers with binary differences:")
- for item in self.diff_mcl_contents:
- logging.debug(item)
+ smallest = sorted(diffs, key=lambda r: int(r["Context size"]))[:20]
+ logging.debug("Smallest {} contexts with binary differences:".format(len(smallest)))
+ for diff in smallest:
+ logging.debug(diff["Context"])
logging.debug("")
if base_metrics is not None and diff_metrics is not None:
- base_bytes = int(base_metrics["Diffed code bytes"])
- diff_bytes = int(diff_metrics["Diffed code bytes"])
+ base_bytes = int(base_metrics["Overall"]["Diffed code bytes"])
+ diff_bytes = int(diff_metrics["Overall"]["Diffed code bytes"])
logging.info("Total bytes of base: {}".format(base_bytes))
logging.info("Total bytes of diff: {}".format(diff_bytes))
delta_bytes = diff_bytes - base_bytes
@@ -1758,17 +1773,24 @@ class SuperPMIReplayAsmDiffs:
jit_analyze_path = find_file(jit_analyze_file, path_var.split(os.pathsep))
if jit_analyze_path is not None:
# It appears we have a built jit-analyze on the path, so try to run it.
- md_summary_file = os.path.join(asm_root_dir, "summary.md")
- summary_file_info = ( mch_file, md_summary_file )
- all_md_summary_files.append(summary_file_info)
- command = [ jit_analyze_path, "--md", md_summary_file, "-r", "--base", base_asm_location, "--diff", diff_asm_location ]
- if self.coreclr_args.retainOnlyTopFiles:
- command += [ "--retainOnlyTopFiles" ]
+ jit_analyze_summary_file = os.path.join(asm_root_dir, "summary.md")
+ command = [ jit_analyze_path, "--md", jit_analyze_summary_file, "-r", "--base", base_asm_location, "--diff", diff_asm_location ]
if self.coreclr_args.metrics:
command += [ "--metrics", ",".join(self.coreclr_args.metrics) ]
elif base_bytes is not None and diff_bytes is not None:
command += [ "--override-total-base-metric", str(base_bytes), "--override-total-diff-metric", str(diff_bytes) ]
+ if len(dasm_contexts) < len(diffs):
+ # Avoid producing analysis output that assumes these are all contexts
+ # with diffs. When no custom metrics are specified we pick only a subset
+ # of interesting contexts to disassemble, to avoid spending too long.
+ # See pick_contexts_to_disassemble.
+ command += [ "--is-subset-of-diffs" ]
+ else:
+ # Ask jit-analyze to avoid producing analysis output that assumes these are
+ # all contexts (we never produce .dasm files for contexts without diffs).
+ command += [ "--is-diffs-only" ]
+
run_and_log(command, logging.INFO)
ran_jit_analyze = True
@@ -1793,6 +1815,14 @@ class SuperPMIReplayAsmDiffs:
else:
logging.warning("No textual differences. Is this an issue with coredistools?")
+ # If we are not specifying custom metrics then print a summary here, otherwise leave the summarization up to jit-analyze.
+ if self.coreclr_args.metrics is None:
+ num_improvements = sum(1 for r in diffs if int(r["Diff size"]) < int(r["Base size"]))
+ num_regressions = sum(1 for r in diffs if int(r["Diff size"]) > int(r["Base size"]))
+ logging.info("{} contexts with differences found ({} improvements, {} regressions)".format(len(diffs), num_improvements, num_regressions))
+ logging.info("")
+ logging.info("")
+
if self.coreclr_args.diff_jit_dump:
try:
current_jit_dump_diff = jit_dump_differences.get_nowait()
@@ -1807,15 +1837,18 @@ class SuperPMIReplayAsmDiffs:
logging.warning("No textual differences found in generated JitDump. Is this an issue with coredistools?")
if base_metrics is not None and diff_metrics is not None:
- missing_base = int(base_metrics["Missing compiles"])
- missing_diff = int(diff_metrics["Missing compiles"])
- total_contexts = int(base_metrics["Successful compiles"]) + int(base_metrics["Failing compiles"])
+ missing_base = int(base_metrics["Overall"]["Missing compiles"])
+ missing_diff = int(diff_metrics["Overall"]["Missing compiles"])
+ total_contexts = int(base_metrics["Overall"]["Successful compiles"]) + int(base_metrics["Overall"]["Failing compiles"])
if missing_base > 0 or missing_diff > 0:
logging.warning("Warning: SuperPMI encountered missing data during the diff. The diff summary printed above may be misleading.")
logging.warning("Missing with base JIT: {}. Missing with diff JIT: {}. Total contexts: {}.".format(missing_base, missing_diff, total_contexts))
- ################################################################################################ end of processing asm diffs (if is_nonzero_length_file(diff_mcl_file)...
+ ################################################################################################ end of processing asm diffs (if has_diffs...
+
+ mch_file_basename = os.path.basename(mch_file)
+ asm_diffs.append((mch_file_basename, base_metrics, diff_metrics, has_diffs, jit_analyze_summary_file))
if not self.coreclr_args.skip_cleanup:
if os.path.isfile(fail_mcl_file):
@@ -1838,7 +1871,7 @@ class SuperPMIReplayAsmDiffs:
# Construct an overall Markdown summary file.
- if len(all_md_summary_files) > 0 and not self.coreclr_args.diff_with_release:
+ if len(asm_diffs) > 0 and not self.coreclr_args.diff_with_release:
overall_md_summary_file = create_unique_file_name(self.coreclr_args.spmi_location, "diff_summary", "md")
if not os.path.isdir(self.coreclr_args.spmi_location):
os.makedirs(self.coreclr_args.spmi_location)
@@ -1846,13 +1879,124 @@ class SuperPMIReplayAsmDiffs:
os.remove(overall_md_summary_file)
with open(overall_md_summary_file, "w") as write_fh:
- for summary_file_info in all_md_summary_files:
- summary_mch = summary_file_info[0]
- summary_mch_filename = os.path.basename(summary_mch) # Display just the MCH filename, not the full path
- summary_file = summary_file_info[1]
- with open(summary_file, "r") as read_fh:
- write_fh.write("## " + summary_mch_filename + ":\n\n")
- shutil.copyfileobj(read_fh, write_fh)
+ def format_delta(base, diff):
+ plus_if_positive = "+" if diff >= base else ""
+ text = "{}{:,d}".format(plus_if_positive, diff - base)
+
+ if diff != base:
+ color = "red" if diff > base else "green"
+ return html_color(color, text)
+
+ return text
+
+ def sum_base(row, col):
+ return sum(int(base_metrics[row][col]) for (_, base_metrics, _, _, _) in asm_diffs)
+
+ def sum_diff(row, col):
+ return sum(int(diff_metrics[row][col]) for (_, _, diff_metrics, _, _) in asm_diffs)
+
+ diffed_contexts = sum_diff("Overall", "Successful compiles")
+ diffed_minopts_contexts = sum_diff("MinOpts", "Successful compiles")
+ diffed_opts_contexts = sum_diff("FullOpts", "Successful compiles")
+ missing_base_contexts = sum_base("Overall", "Missing compiles")
+ missing_diff_contexts = sum_diff("Overall", "Missing compiles")
+
+ num_contexts_color = "#1460aa"
+ write_fh.write("Diffs are based on {} contexts ({} MinOpts, {} FullOpts).\n\n".format(
+ html_color(num_contexts_color, "{:,d}".format(diffed_contexts)),
+ html_color(num_contexts_color, "{:,d}".format(diffed_minopts_contexts)),
+ html_color(num_contexts_color, "{:,d}".format(diffed_opts_contexts))))
+
+ if missing_base_contexts > 0 or missing_diff_contexts > 0:
+ missed_color = "#d35400"
+ base_color = missed_color if missing_base_contexts > 0 else "green"
+ diff_color = missed_color if missing_diff_contexts > 0 else "green"
+ write_fh.write("{} contexts: base: {}, diff: {}\n\n".format(
+ html_color(missed_color, "MISSED"),
+ html_color(base_color, "{:,d}".format(missing_base_contexts)),
+ html_color(diff_color, "{:,d}".format(missing_diff_contexts))))
+
+ def has_diffs(row):
+ return int(row["Contexts with diffs"]) > 0
+
+ # Exclude entire diffs section?
+ if any(has_diffs(diff_metrics["Overall"]) for (_, _, diff_metrics, _, _) in asm_diffs):
+ def write_pivot_section(row):
+ # Exclude this particular Overall/MinOpts/FullOpts table?
+ if not any(has_diffs(diff_metrics[row]) for (_, _, diff_metrics, _, _) in asm_diffs):
+ return
+
+ write_fh.write("\n<details>\n")
+ sum_base = sum(int(base_metrics[row]["Diffed code bytes"]) for (_, base_metrics, _, _, _) in asm_diffs)
+ sum_diff = sum(int(diff_metrics[row]["Diffed code bytes"]) for (_, _, diff_metrics, _, _) in asm_diffs)
+
+ write_fh.write("<summary>{} ({} bytes)</summary>\n\n".format(row, format_delta(sum_base, sum_diff)))
+ write_fh.write("|Collection|Base size (bytes)|Diff size (bytes)|\n")
+ write_fh.write("|---|--:|--:|\n")
+ for (mch_file, base_metrics, diff_metrics, _, _) in asm_diffs:
+ # Exclude this particular row?
+ if not has_diffs(diff_metrics[row]):
+ continue
+
+ write_fh.write("|{}|{:,d}|{}|\n".format(
+ mch_file,
+ int(base_metrics[row]["Diffed code bytes"]),
+ format_delta(
+ int(base_metrics[row]["Diffed code bytes"]),
+ int(diff_metrics[row]["Diffed code bytes"]))))
+
+ write_fh.write("\n\n</details>\n")
+
+ write_pivot_section("Overall")
+ write_pivot_section("MinOpts")
+ write_pivot_section("FullOpts")
+ else:
+ write_fh.write("No diffs found.\n")
+
+ # Next write a detailed section
+ write_fh.write("\n<details>\n")
+ write_fh.write("<summary>Details</summary>\n\n")
+
+ write_fh.write("|Collection|Diffed contexts|MinOpts|FullOpts|Contexts with diffs|Missed, base|Missed, diff|\n")
+ write_fh.write("|---|--:|--:|--:|--:|--:|--:|\n")
+ for (mch_file, base_metrics, diff_metrics, has_diffs, jit_analyze_summary_file) in asm_diffs:
+ write_fh.write("|{}|{:,d}|{:,d}|{:,d}|{:,d}|{:,d}|{:,d}|\n".format(
+ mch_file,
+ int(diff_metrics["Overall"]["Successful compiles"]),
+ int(diff_metrics["MinOpts"]["Successful compiles"]),
+ int(diff_metrics["FullOpts"]["Successful compiles"]),
+ int(diff_metrics["Overall"]["Contexts with diffs"]),
+ int(base_metrics["Overall"]["Missing compiles"]),
+ int(diff_metrics["Overall"]["Missing compiles"])))
+
+ write_fh.write("\n")
+
+ if any(has_diff for (_, _, _, has_diff, _) in asm_diffs):
+ write_fh.write("---\n\n")
+ write_fh.write("#### jit-analyze output\n")
+
+ for (mch_file, base_metrics, diff_metrics, has_diffs, jit_analyze_summary_file) in asm_diffs:
+ if not has_diffs or jit_analyze_summary_file is None:
+ continue
+
+ with open(jit_analyze_summary_file, "r") as read_fh:
+ write_fh.write("""\
+
+<details>
+
+<summary>{0}</summary>
+
+To reproduce these diffs on Windows {1}:
+```
+superpmi.py asmdiffs -target_os {2} -target_arch {3} -arch {1}
+```
+
+""".format(mch_file, self.coreclr_args.arch, self.coreclr_args.target_os, self.coreclr_args.target_arch))
+
+ shutil.copyfileobj(read_fh, write_fh)
+ write_fh.write("\n</details>\n")
+
+ write_fh.write("\n</details>\n")
logging.info(" Summary Markdown file: %s", overall_md_summary_file)
@@ -1873,6 +2017,49 @@ class SuperPMIReplayAsmDiffs:
return result
################################################################################################ end of replay_with_asm_diffs()
+ def pick_contexts_to_disassemble(self, diffs):
+ """ Given information about diffs, pick the context numbers to create .dasm files for
+
+ Returns:
+ List of method context numbers to create disassembly for.
+ """
+
+ # If there are non-default metrics then we need to disassemble
+ # everything so that jit-analyze can handle those.
+ if self.coreclr_args.metrics is not None:
+ contexts = diffs
+ else:
+ # In the default case we have size improvements/regressions
+ # available without needing to disassemble all, so pick a subset of
+ # interesting diffs to pass to jit-analyze.
+
+ # 20 smallest method contexts with diffs
+ smallest_contexts = sorted(diffs, key=lambda r: int(r["Context size"]))[:20]
+ # Order by byte-wise improvement, largest improvements first
+ by_diff_size = sorted(diffs, key=lambda r: int(r["Diff size"]) - int(r["Base size"]))
+ # 20 top improvements, byte-wise
+ top_improvements_bytes = by_diff_size[:20]
+ # 20 top regressions, byte-wise
+ top_regressions_bytes = by_diff_size[-20:]
+
+ # Order by percentage-wise size improvement, largest improvements first
+ def diff_pct(r):
+ base = int(r["Base size"])
+ if base == 0:
+ return 0
+ diff = int(r["Diff size"])
+ return (diff - base) / base
+
+ by_diff_size_pct = sorted(diffs, key=diff_pct)
+ top_improvements_pct = by_diff_size_pct[:20]
+ top_regressions_pct = by_diff_size_pct[-20:]
+
+ contexts = smallest_contexts + top_improvements_bytes + top_regressions_bytes + top_improvements_pct + top_regressions_pct
+
+ final_contexts_indices = list(set(int(r["Context"]) for r in contexts))
+ final_contexts_indices.sort()
+ return final_contexts_indices
+
################################################################################
# SuperPMI Replay/TP diff
################################################################################
@@ -1999,15 +2186,15 @@ class SuperPMIReplayThroughputDiff:
diff_metrics = read_csv_metrics(diff_metrics_summary_file)
if base_metrics is not None and diff_metrics is not None:
- base_instructions = int(base_metrics["Diff executed instructions"])
- diff_instructions = int(diff_metrics["Diff executed instructions"])
+ base_instructions = int(base_metrics["Overall"]["Diff executed instructions"])
+ diff_instructions = int(diff_metrics["Overall"]["Diff executed instructions"])
logging.info("Total instructions executed by base: {}".format(base_instructions))
logging.info("Total instructions executed by diff: {}".format(diff_instructions))
if base_instructions != 0 and diff_instructions != 0:
delta_instructions = diff_instructions - base_instructions
logging.info("Total instructions executed delta: {} ({:.2%} of base)".format(delta_instructions, delta_instructions / base_instructions))
- tp_diffs.append((os.path.basename(mch_file), base_instructions, diff_instructions))
+ tp_diffs.append((os.path.basename(mch_file), base_metrics, diff_metrics))
else:
logging.warning("One compilation failed to produce any results")
else:
@@ -2046,30 +2233,62 @@ class SuperPMIReplayThroughputDiff:
# We write two tables, an overview one with just significantly
# impacted collections and a detailed one that includes raw
# instruction count and all collections.
- def is_significant(base, diff):
+ def is_significant_pct(base, diff):
return round((diff - base) / base * 100, 2) != 0
+ def is_significant(row, base, diff):
+ return is_significant_pct(int(base[row]["Diff executed instructions"]), int(diff[row]["Diff executed instructions"]))
+ def format_pct(base_instructions, diff_instructions):
+ plus_if_positive = "+" if diff_instructions > base_instructions else ""
+ text = "{}{:.2f}%".format(plus_if_positive, (diff_instructions - base_instructions) / base_instructions * 100)
+ if diff_instructions != base_instructions:
+ color = "red" if diff_instructions > base_instructions else "green"
+ return html_color(color, text)
+
+ return text
+
+ if any(is_significant(row, base, diff) for row in ["Overall", "MinOpts", "FullOpts"] for (_, base, diff) in tp_diffs):
+ def write_pivot_section(row):
+ if not any(is_significant(row, base, diff) for (_, base, diff) in tp_diffs):
+ return
+
+ write_fh.write("\n<details>\n")
+ sum_base = sum(int(base_metrics[row]["Diff executed instructions"]) for (_, base_metrics, _) in tp_diffs)
+ sum_diff = sum(int(diff_metrics[row]["Diff executed instructions"]) for (_, _, diff_metrics) in tp_diffs)
+
+ write_fh.write("<summary>{} ({})</summary>\n\n".format(row, format_pct(sum_base, sum_diff)))
+ write_fh.write("|Collection|PDIFF|\n")
+ write_fh.write("|---|--:|\n")
+ for mch_file, base, diff in tp_diffs:
+ base_instructions = int(base[row]["Diff executed instructions"])
+ diff_instructions = int(diff[row]["Diff executed instructions"])
+
+ if is_significant(row, base, diff):
+ write_fh.write("|{}|{}|\n".format(
+ mch_file,
+ format_pct(base_instructions, diff_instructions)))
+
+ write_fh.write("\n\n</details>\n")
+
+ write_pivot_section("Overall")
+ write_pivot_section("MinOpts")
+ write_pivot_section("FullOpts")
- if any(is_significant(base, diff) for (_, base, diff) in tp_diffs):
- write_fh.write("|Collection|PDIFF|\n")
- write_fh.write("|---|---|\n")
- for mch_file, base_instructions, diff_instructions in tp_diffs:
- if is_significant(base_instructions, diff_instructions):
- write_fh.write("|{}|{}{:.2f}%|\n".format(
- mch_file,
- "+" if diff_instructions > base_instructions else "",
- (diff_instructions - base_instructions) / base_instructions * 100))
else:
write_fh.write("No significant throughput differences found\n")
write_fh.write("\n<details>\n")
write_fh.write("<summary>Details</summary>\n\n")
- write_fh.write("|Collection|Base # instructions|Diff # instructions|PDIFF|\n")
- write_fh.write("|---|---|---|---|\n")
- for mch_file, base_instructions, diff_instructions in tp_diffs:
- write_fh.write("|{}|{:,d}|{:,d}|{}{:.2f}%|\n".format(
- mch_file, base_instructions, diff_instructions,
- "+" if diff_instructions > base_instructions else "",
- (diff_instructions - base_instructions) / base_instructions * 100))
+ for (disp, row) in [("All", "Overall"), ("MinOpts", "MinOpts"), ("FullOpts", "FullOpts")]:
+ write_fh.write("{} contexts:\n\n".format(disp))
+ write_fh.write("|Collection|Base # instructions|Diff # instructions|PDIFF|\n")
+ write_fh.write("|---|--:|--:|--:|\n")
+ for mch_file, base, diff in tp_diffs:
+ base_instructions = int(base[row]["Diff executed instructions"])
+ diff_instructions = int(diff[row]["Diff executed instructions"])
+ write_fh.write("|{}|{:,d}|{:,d}|{}|\n".format(
+ mch_file, base_instructions, diff_instructions,
+ format_pct(base_instructions, diff_instructions)))
+ write_fh.write("\n")
write_fh.write("\n</details>\n")
logging.info(" Summary Markdown file: %s", overall_md_summary_file)
@@ -3756,11 +3975,6 @@ def setup_args(args):
"Unable to set metrics.")
coreclr_args.verify(args,
- "retainOnlyTopFiles",
- lambda unused: True,
- "Unable to set retainOnlyTopFiles.")
-
- coreclr_args.verify(args,
"diff_with_release",
lambda unused: True,
"Unable to set diff_with_release.")
diff --git a/src/coreclr/scripts/superpmi_collect_setup.py b/src/coreclr/scripts/superpmi_collect_setup.py
index 815041c9768..41f84ab76e9 100644
--- a/src/coreclr/scripts/superpmi_collect_setup.py
+++ b/src/coreclr/scripts/superpmi_collect_setup.py
@@ -37,6 +37,7 @@
import argparse
import os
+import shutil
import stat
from coreclr_arguments import *
@@ -61,6 +62,10 @@ is_windows = platform.system() == "Windows"
legal_collection_types = [ "crossgen2", "pmi", "run" ]
+directories_to_ignore = [
+ "runtimes", # This appears to be the result of a nuget package that includes a bunch of native code
+]
+
native_binaries_to_ignore = [
"api-ms-win-core-console-l1-1-0.dll",
"api-ms-win-core-datetime-l1-1-0.dll",
@@ -105,6 +110,12 @@ native_binaries_to_ignore = [
"clretwrc.dll",
"clrgc.dll",
"clrjit.dll",
+ "clrjit_universal_arm_arm.dll",
+ "clrjit_universal_arm_arm64.dll",
+ "clrjit_universal_arm_x64.dll",
+ "clrjit_universal_arm_x86.dll",
+ "clrjit_universal_arm64_arm64.dll",
+ "clrjit_universal_arm64_x64.dll",
"clrjit_unix_arm_arm.dll",
"clrjit_unix_arm_arm64.dll",
"clrjit_unix_arm_x64.dll",
@@ -131,12 +142,6 @@ native_binaries_to_ignore = [
"clrjit_win_x86_arm64.dll",
"clrjit_win_x86_x64.dll",
"clrjit_win_x86_x86.dll",
- "clrjit_universal_arm_arm.dll",
- "clrjit_universal_arm_arm64.dll",
- "clrjit_universal_arm_x64.dll",
- "clrjit_universal_arm_x86.dll",
- "clrjit_universal_arm64_arm64.dll",
- "clrjit_universal_arm64_x64.dll",
"coreclr.dll",
"CoreConsole.exe",
"coredistools.dll",
@@ -146,6 +151,8 @@ native_binaries_to_ignore = [
"crossgen.exe",
"crossgen2.exe",
"dbgshim.dll",
+ "e_sqlite3.dll",
+ "FileCheck.exe",
"ilasm.exe",
"ildasm.exe",
"jitinterface_arm.dll",
@@ -154,6 +161,7 @@ native_binaries_to_ignore = [
"jitinterface_x86.dll",
"KernelTraceControl.dll",
"KernelTraceControl.Win61.dll",
+ "llvm-mca.exe",
"mcs.exe",
"Microsoft.DiaSymReader.Native.amd64.dll",
"Microsoft.DiaSymReader.Native.x86.dll",
@@ -163,17 +171,21 @@ native_binaries_to_ignore = [
"msdia140.dll",
"msquic.dll",
"msvcp140.dll",
- "vcruntime140.dll",
- "vcruntime140_1.dll",
+ "NativeLibrary.dll",
"R2RDump.exe",
"R2RTest.exe",
- "superpmi.exe",
+ "sni.dll",
+ "SuperFileCheck.exe",
"superpmi-shim-collector.dll",
"superpmi-shim-counter.dll",
"superpmi-shim-simple.dll",
+ "superpmi.exe",
"System.CommandLine.resources.dll", # Managed, but uninteresting
"System.IO.Compression.Native.dll",
"ucrtbase.dll",
+ "UnloadableAssembly.dll",
+ "vcruntime140.dll",
+ "vcruntime140_1.dll",
"xunit.console.exe",
]
@@ -376,6 +388,11 @@ def setup_microbenchmark(workitem_directory, arch):
run_command(
["git", "clone", "--quiet", "--depth", "1", "https://github.com/dotnet/performance", performance_directory])
+ try:
+ shutil.rmtree(os.path.join(performance_directory, ".git"))
+ except Exception as ex:
+ print("Warning: failed to remove directory \"%s\": %s", os.path.join(performance_directory, ".git"), ex)
+
with ChangeDir(performance_directory):
dotnet_directory = os.path.join(performance_directory, "tools", "dotnet", arch)
dotnet_install_script = os.path.join(performance_directory, "scripts", "dotnet.py")
@@ -384,8 +401,11 @@ def setup_microbenchmark(workitem_directory, arch):
print("Missing " + dotnet_install_script)
return
+ # Sometimes the dotnet version installed by the script is latest and expect certain versions of SDK that
+ # have not published yet. As a result, we hit errors of "dotnet restore". As a workaround, hard code the
+ # working version until we move to ".NET 8" in the script.
run_command(
- get_python_name() + [dotnet_install_script, "install", "--architecture", arch, "--install-dir",
+ get_python_name() + [dotnet_install_script, "install", "--dotnet-versions", "7.0.100-rc.2.22458.3", "--architecture", arch, "--install-dir",
dotnet_directory, "--verbose"])
@@ -547,8 +567,12 @@ def main(main_args):
# copy_directory(dotnet_src_directory, dotnet_dst_directory, verbose_output=False)
input_artifacts = os.path.join(workitem_payload_directory, "collectAssembliesDirectory", coreclr_args.collection_name)
- exclude_directory = ['Core_Root'] if coreclr_args.collection_name == "coreclr_tests" else []
- exclude_files = native_binaries_to_ignore
+
+ exclude_directories = list(directories_to_ignore)
+ if coreclr_args.collection_name == "coreclr_tests":
+ exclude_directories += ['Core_Root']
+
+ exclude_files = list(native_binaries_to_ignore)
if coreclr_args.collection_type == "crossgen2":
print('Adding exclusions for crossgen2')
# Currently, trying to crossgen2 R2RTest\Microsoft.Build.dll causes a pop-up failure, so exclude it.
@@ -560,7 +584,7 @@ def main(main_args):
exclude_files += [item for item in os.listdir(core_root_dir)
if os.path.isfile(os.path.join(core_root_dir, item)) and (item.endswith(".dll") or item.endswith(".exe"))]
- partition_files(coreclr_args.input_directory, input_artifacts, coreclr_args.max_size, exclude_directory,
+ partition_files(coreclr_args.input_directory, input_artifacts, coreclr_args.max_size, exclude_directories,
exclude_files)
# Set variables
diff --git a/src/coreclr/scripts/superpmi_diffs.py b/src/coreclr/scripts/superpmi_diffs.py
index 47243ad43d3..b7af1427fc4 100644
--- a/src/coreclr/scripts/superpmi_diffs.py
+++ b/src/coreclr/scripts/superpmi_diffs.py
@@ -216,8 +216,7 @@ def main(main_args):
"-spmi_location", spmi_location,
"-error_limit", "100",
"-log_level", "debug",
- "-log_file", log_file,
- "-retainOnlyTopFiles"])
+ "-log_file", log_file])
print("Running superpmi.py tpdiff")
diff --git a/src/coreclr/scripts/superpmi_diffs_summarize.py b/src/coreclr/scripts/superpmi_diffs_summarize.py
index 95f3a2cb389..4045e2e6bc4 100644
--- a/src/coreclr/scripts/superpmi_diffs_summarize.py
+++ b/src/coreclr/scripts/superpmi_diffs_summarize.py
@@ -89,39 +89,8 @@ def append_diff_file(f, arch, file_name, full_file_path, asmdiffs):
else:
diffs_found = True
f.write("## {} {}\n".format(diff_os, diff_arch))
-
- if asmdiffs:
- # Contents of asmdiffs are large so create a
- # <summary><details> ... </details> disclosure section around
- # the file and additionally provide some instructions.
- f.write("""\
-
-<details>
-
-<summary>{0} {1} details</summary>
-
-Summary file: `{2}`
-
-To reproduce these diffs on Windows {3}:
-```
-superpmi.py asmdiffs -target_os {0} -target_arch {1} -arch {3}
-```
-
-""".format(diff_os, diff_arch, file_name, arch))
-
- # Now write the contents
- f.write(contents)
-
- # Write the footer (close the <details> section)
- f.write("""\
-
-</details>
-
-""")
-
- else:
- f.write(contents)
- f.write("\n")
+ f.write(contents)
+ f.write("\n\n---\n\n")
return diffs_found
@@ -168,7 +137,7 @@ def main(main_args):
f.write("No diffs found\n")
f.write("\n\n#Throughput impact on Windows {}\n\n".format(arch))
- f.write("The following tables contain the impact on throughput " +
+ f.write("The following shows the impact on throughput " +
"in terms of number of instructions executed inside the JIT. " +
"Negative percentages/lower numbers are better.\n\n")
diff --git a/src/coreclr/tools/Common/CommandLineHelpers.cs b/src/coreclr/tools/Common/CommandLineHelpers.cs
new file mode 100644
index 00000000000..f7d4a46ebe7
--- /dev/null
+++ b/src/coreclr/tools/Common/CommandLineHelpers.cs
@@ -0,0 +1,344 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Collections.Generic;
+using System.CommandLine.Binding;
+using System.CommandLine.Parsing;
+using System.IO;
+using System.IO.Compression;
+using System.Runtime.InteropServices;
+
+using Internal.TypeSystem;
+
+namespace System.CommandLine
+{
+ internal sealed class CommandLineException : Exception
+ {
+ public CommandLineException(string message) : base(message) { }
+ }
+
+ //
+ // Helpers for command line processing
+ //
+ internal static class Helpers
+ {
+ public const string DefaultSystemModule = "System.Private.CoreLib";
+
+ public static Dictionary<string, string> BuildPathDictionay(IReadOnlyList<Token> tokens, bool strict)
+ {
+ Dictionary<string, string> dictionary = new(StringComparer.OrdinalIgnoreCase);
+
+ foreach (Token token in tokens)
+ {
+ AppendExpandedPaths(dictionary, token.Value, strict);
+ }
+
+ return dictionary;
+ }
+
+ public static TargetOS GetTargetOS(string token)
+ {
+ if(string.IsNullOrEmpty(token))
+ {
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+ return TargetOS.Windows;
+ else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
+ return TargetOS.Linux;
+ else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
+ return TargetOS.OSX;
+ else if (RuntimeInformation.IsOSPlatform(OSPlatform.FreeBSD))
+ return TargetOS.FreeBSD;
+
+ throw new NotImplementedException();
+ }
+
+ if (token.Equals("windows", StringComparison.OrdinalIgnoreCase))
+ return TargetOS.Windows;
+ else if (token.Equals("linux", StringComparison.OrdinalIgnoreCase))
+ return TargetOS.Linux;
+ else if (token.Equals("osx", StringComparison.OrdinalIgnoreCase))
+ return TargetOS.OSX;
+
+ throw new CommandLineException($"Target OS '{token}' is not supported");
+ }
+
+ public static TargetArchitecture GetTargetArchitecture(string token)
+ {
+ if(string.IsNullOrEmpty(token))
+ {
+ return RuntimeInformation.ProcessArchitecture switch
+ {
+ Architecture.X86 => TargetArchitecture.X86,
+ Architecture.X64 => TargetArchitecture.X64,
+ Architecture.Arm => TargetArchitecture.ARM,
+ Architecture.Arm64 => TargetArchitecture.ARM64,
+ Architecture.LoongArch64 => TargetArchitecture.LoongArch64,
+ _ => throw new NotImplementedException()
+ };
+ }
+
+ if (token.Equals("x86", StringComparison.OrdinalIgnoreCase))
+ return TargetArchitecture.X86;
+ else if (token.Equals("x64", StringComparison.OrdinalIgnoreCase))
+ return TargetArchitecture.X64;
+ else if (token.Equals("arm", StringComparison.OrdinalIgnoreCase))
+ return TargetArchitecture.ARM;
+ else if (token.Equals("arm64", StringComparison.OrdinalIgnoreCase))
+ return TargetArchitecture.ARM64;
+ else if (token.Equals("loongarch64", StringComparison.OrdinalIgnoreCase))
+ return TargetArchitecture.LoongArch64;
+
+ throw new CommandLineException($"Target architecture '{token}' is not supported");
+ }
+
+ public static void MakeReproPackage(string makeReproPath, string outputFilePath, string[] args, ParseResult res, IEnumerable<string> inputOptions)
+ {
+ Directory.CreateDirectory(makeReproPath);
+
+ List<string> details = new List<string>();
+ details.Add("Tool version");
+ try
+ {
+ details.Add(Environment.GetCommandLineArgs()[0]);
+ }
+ catch { }
+ try
+ {
+ details.Add(System.Diagnostics.FileVersionInfo.GetVersionInfo(Environment.GetCommandLineArgs()[0]).ToString());
+ }
+ catch { }
+
+ details.Add("------------------------");
+ details.Add("Actual Command Line Args");
+ details.Add("------------------------");
+ details.AddRange(args);
+ foreach (string arg in args)
+ {
+ if (arg.StartsWith('@'))
+ {
+ string rspFileName = arg.Substring(1);
+ details.Add("------------------------");
+ details.Add(rspFileName);
+ details.Add("------------------------");
+ try
+ {
+ details.AddRange(File.ReadAllLines(rspFileName));
+ }
+ catch { }
+ }
+ }
+
+ HashCode hashCodeOfArgs = default;
+ foreach (string s in details)
+ hashCodeOfArgs.Add(s);
+
+ string zipFileName = ((uint)hashCodeOfArgs.ToHashCode()).ToString();
+
+ if (outputFilePath != null)
+ zipFileName = zipFileName + "_" + Path.GetFileName(outputFilePath);
+
+ zipFileName = Path.Combine(makeReproPath, Path.ChangeExtension(zipFileName, ".zip"));
+
+ Console.WriteLine($"Creating {zipFileName}");
+ using (var archive = ZipFile.Open(zipFileName, ZipArchiveMode.Create))
+ {
+ ZipArchiveEntry commandEntry = archive.CreateEntry("command.txt");
+ using (StreamWriter writer = new StreamWriter(commandEntry.Open()))
+ {
+ foreach (string s in details)
+ writer.WriteLine(s);
+ }
+
+ HashSet<string> inputOptionNames = new HashSet<string>(inputOptions);
+ Dictionary<string, string> inputToReproPackageFileName = new();
+
+ List<string> rspFile = new List<string>();
+ foreach (var option in res.CommandResult.Command.Options)
+ {
+ if (!res.HasOption(option) || option.Name == "make-repro-path")
+ {
+ continue;
+ }
+
+ IValueDescriptor descriptor = option;
+ object val = res.CommandResult.GetValueForOption(option);
+ if (val is not null && !(descriptor.HasDefaultValue && descriptor.GetDefaultValue().Equals(val)))
+ {
+ if (val is IEnumerable<string> values)
+ {
+ if (inputOptionNames.Contains(option.Name))
+ {
+ Dictionary<string, string> dictionary = new();
+ foreach (string optInList in values)
+ {
+ Helpers.AppendExpandedPaths(dictionary, optInList, false);
+ }
+ foreach (string inputFile in dictionary.Values)
+ {
+ rspFile.Add($"--{option.Name}:{ConvertFromInputPathToReproPackagePath(inputFile)}");
+ }
+ }
+ else
+ {
+ foreach (string optInList in values)
+ {
+ rspFile.Add($"--{option.Name}:{optInList}");
+ }
+ }
+ }
+ else
+ {
+ rspFile.Add($"--{option.Name}:{val}");
+ }
+ }
+ }
+
+ foreach (var argument in res.CommandResult.Command.Arguments)
+ {
+ object val = res.CommandResult.GetValueForArgument(argument);
+ if (val is IEnumerable<string> values)
+ {
+ foreach (string optInList in values)
+ {
+ rspFile.Add($"{ConvertFromInputPathToReproPackagePath((string)optInList)}");
+ }
+ }
+ else
+ {
+ rspFile.Add($"{ConvertFromInputPathToReproPackagePath((string)val)}");
+ }
+ }
+
+ ZipArchiveEntry rspEntry = archive.CreateEntry("repro.rsp");
+ using (StreamWriter writer = new StreamWriter(rspEntry.Open()))
+ {
+ foreach (string s in rspFile)
+ writer.WriteLine(s);
+ }
+
+ string ConvertFromInputPathToReproPackagePath(string inputPath)
+ {
+ if (inputToReproPackageFileName.TryGetValue(inputPath, out string reproPackagePath))
+ {
+ return reproPackagePath;
+ }
+
+ try
+ {
+ string inputFileDir = inputToReproPackageFileName.Count.ToString();
+ reproPackagePath = Path.Combine(inputFileDir, Path.GetFileName(inputPath));
+ archive.CreateEntryFromFile(inputPath, reproPackagePath);
+ inputToReproPackageFileName.Add(inputPath, reproPackagePath);
+
+ return reproPackagePath;
+ }
+ catch
+ {
+ return inputPath;
+ }
+ }
+ }
+ }
+
+ // Helper to create a collection of paths unique in their simple names.
+ private static void AppendExpandedPaths(Dictionary<string, string> dictionary, string pattern, bool strict)
+ {
+ bool empty = true;
+ string directoryName = Path.GetDirectoryName(pattern);
+ string searchPattern = Path.GetFileName(pattern);
+
+ if (directoryName == "")
+ directoryName = ".";
+
+ if (Directory.Exists(directoryName))
+ {
+ foreach (string fileName in Directory.EnumerateFiles(directoryName, searchPattern))
+ {
+ string fullFileName = Path.GetFullPath(fileName);
+
+ string simpleName = Path.GetFileNameWithoutExtension(fileName);
+
+ if (dictionary.ContainsKey(simpleName))
+ {
+ if (strict)
+ {
+ throw new CommandLineException("Multiple input files matching same simple name " +
+ fullFileName + " " + dictionary[simpleName]);
+ }
+ }
+ else
+ {
+ dictionary.Add(simpleName, fullFileName);
+ }
+
+ empty = false;
+ }
+ }
+
+ if (empty)
+ {
+ if (strict)
+ {
+ throw new CommandLineException("No files matching " + pattern);
+ }
+ else
+ {
+ Console.WriteLine("Warning: No files matching " + pattern);
+ }
+ }
+ }
+
+ /// <summary>
+ /// Read the response file line by line and treat each line as a single token.
+ /// Skip the comment lines that start with `#`.
+ /// A return value indicates whether the operation succeeded.
+ /// </summary>
+ /// <remarks>
+ /// This method does not support:
+ /// * referencing another response file.
+ /// * inline `#` comments.
+ /// </remarks>
+ public static bool TryReadResponseFile(string filePath, out IReadOnlyList<string> newTokens, out string error)
+ {
+ try
+ {
+ var tokens = new List<string>();
+ foreach (string line in File.ReadAllLines(filePath))
+ {
+ string token = line.Trim();
+ if (token.Length > 0 && token[0] != '#')
+ {
+ if (token.EndsWith('"'))
+ {
+ int firstQuotePosition = token.IndexOf('"');
+
+ // strip leading and trailing quotes from value.
+ if (firstQuotePosition >= 0 && firstQuotePosition < token.Length - 1 &&
+ (firstQuotePosition == 0 || token[firstQuotePosition - 1] != '\\'))
+ {
+ token = token[..firstQuotePosition] + token[(firstQuotePosition + 1)..^1];
+ }
+ }
+
+ tokens.Add(token);
+ }
+ }
+
+ newTokens = tokens;
+ error = null;
+ return true;
+ }
+ catch (FileNotFoundException)
+ {
+ error = $"Response file not found: '{filePath}'";
+ }
+ catch (IOException e)
+ {
+ error = $"Error reading response file '{filePath}': {e}";
+ }
+
+ newTokens = null;
+ return false;
+ }
+ }
+}
diff --git a/src/coreclr/tools/Common/Compiler/DisplayNameHelpers.cs b/src/coreclr/tools/Common/Compiler/DisplayNameHelpers.cs
index 341c361253d..fde8c756edf 100644
--- a/src/coreclr/tools/Common/Compiler/DisplayNameHelpers.cs
+++ b/src/coreclr/tools/Common/Compiler/DisplayNameHelpers.cs
@@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
using System;
+using System.Diagnostics;
using System.Text;
using Internal.TypeSystem;
@@ -40,24 +41,31 @@ namespace ILCompiler
#if !READYTORUN
else if (method.GetPropertyForAccessor() is PropertyPseudoDesc property)
{
+ MethodDesc typicalMethod = method.GetTypicalMethodDefinition();
sb.Append(property.Name);
sb.Append('.');
- sb.Append(property.GetMethod == method ? "get" : "set");
+ sb.Append(property.GetMethod == typicalMethod ? "get" : "set");
return sb.ToString();
}
else if (method.GetEventForAccessor() is EventPseudoDesc @event)
{
+ MethodDesc typicalMethod = method.GetTypicalMethodDefinition();
sb.Append(@event.Name);
sb.Append('.');
string accessor;
- if (method.Name == @event.AddMethod.Name)
+ if (typicalMethod == @event.AddMethod)
+ {
accessor = "add";
- else if (method.Name == @event.RemoveMethod.Name)
+ }
+ else if (typicalMethod == @event.RemoveMethod)
+ {
accessor = "remove";
- else if (method.Name == @event.RaiseMethod.Name)
- accessor = "raise";
+ }
else
- throw new NotSupportedException();
+ {
+ Debug.Assert(typicalMethod == @event.RaiseMethod);
+ accessor = "raise";
+ }
sb.Append(accessor);
}
#endif
diff --git a/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSet.cs b/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSet.cs
index f7e1bb55a9b..183c307c12b 100644
--- a/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSet.cs
+++ b/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSet.cs
@@ -40,6 +40,14 @@ namespace Internal.ReadyToRunConstants
Rcpc=26,
Movbe=27,
X86Serialize=28,
+ Avx512F=29,
+ Avx512F_VL=30,
+ Avx512BW=31,
+ Avx512BW_VL=32,
+ Avx512CD=33,
+ Avx512CD_VL=34,
+ Avx512DQ=35,
+ Avx512DQ_VL=36,
}
}
diff --git a/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSetHelper.cs b/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSetHelper.cs
index bde3aac7b41..326ae38a5e7 100644
--- a/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSetHelper.cs
+++ b/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSetHelper.cs
@@ -93,6 +93,22 @@ namespace Internal.ReadyToRunConstants
case InstructionSet.X64_MOVBE_X64: return ReadyToRunInstructionSet.Movbe;
case InstructionSet.X64_X86Serialize: return ReadyToRunInstructionSet.X86Serialize;
case InstructionSet.X64_X86Serialize_X64: return ReadyToRunInstructionSet.X86Serialize;
+ case InstructionSet.X64_AVX512F: return ReadyToRunInstructionSet.Avx512F;
+ case InstructionSet.X64_AVX512F_X64: return ReadyToRunInstructionSet.Avx512F;
+ case InstructionSet.X64_AVX512F_VL: return ReadyToRunInstructionSet.Avx512F_VL;
+ case InstructionSet.X64_AVX512F_VL_X64: return ReadyToRunInstructionSet.Avx512F_VL;
+ case InstructionSet.X64_AVX512BW: return ReadyToRunInstructionSet.Avx512BW;
+ case InstructionSet.X64_AVX512BW_X64: return ReadyToRunInstructionSet.Avx512BW;
+ case InstructionSet.X64_AVX512BW_VL: return ReadyToRunInstructionSet.Avx512BW_VL;
+ case InstructionSet.X64_AVX512BW_VL_X64: return ReadyToRunInstructionSet.Avx512BW_VL;
+ case InstructionSet.X64_AVX512CD: return ReadyToRunInstructionSet.Avx512CD;
+ case InstructionSet.X64_AVX512CD_X64: return ReadyToRunInstructionSet.Avx512CD;
+ case InstructionSet.X64_AVX512CD_VL: return ReadyToRunInstructionSet.Avx512CD_VL;
+ case InstructionSet.X64_AVX512CD_VL_X64: return ReadyToRunInstructionSet.Avx512CD_VL;
+ case InstructionSet.X64_AVX512DQ: return ReadyToRunInstructionSet.Avx512DQ;
+ case InstructionSet.X64_AVX512DQ_X64: return ReadyToRunInstructionSet.Avx512DQ;
+ case InstructionSet.X64_AVX512DQ_VL: return ReadyToRunInstructionSet.Avx512DQ_VL;
+ case InstructionSet.X64_AVX512DQ_VL_X64: return ReadyToRunInstructionSet.Avx512DQ_VL;
default: throw new Exception("Unknown instruction set");
}
@@ -142,6 +158,22 @@ namespace Internal.ReadyToRunConstants
case InstructionSet.X86_MOVBE_X64: return null;
case InstructionSet.X86_X86Serialize: return ReadyToRunInstructionSet.X86Serialize;
case InstructionSet.X86_X86Serialize_X64: return null;
+ case InstructionSet.X86_AVX512F: return ReadyToRunInstructionSet.Avx512F;
+ case InstructionSet.X86_AVX512F_X64: return null;
+ case InstructionSet.X86_AVX512F_VL: return ReadyToRunInstructionSet.Avx512F_VL;
+ case InstructionSet.X86_AVX512F_VL_X64: return null;
+ case InstructionSet.X86_AVX512BW: return ReadyToRunInstructionSet.Avx512BW;
+ case InstructionSet.X86_AVX512BW_X64: return null;
+ case InstructionSet.X86_AVX512BW_VL: return ReadyToRunInstructionSet.Avx512BW_VL;
+ case InstructionSet.X86_AVX512BW_VL_X64: return null;
+ case InstructionSet.X86_AVX512CD: return ReadyToRunInstructionSet.Avx512CD;
+ case InstructionSet.X86_AVX512CD_X64: return null;
+ case InstructionSet.X86_AVX512CD_VL: return ReadyToRunInstructionSet.Avx512CD_VL;
+ case InstructionSet.X86_AVX512CD_VL_X64: return null;
+ case InstructionSet.X86_AVX512DQ: return ReadyToRunInstructionSet.Avx512DQ;
+ case InstructionSet.X86_AVX512DQ_X64: return null;
+ case InstructionSet.X86_AVX512DQ_VL: return ReadyToRunInstructionSet.Avx512DQ_VL;
+ case InstructionSet.X86_AVX512DQ_VL_X64: return null;
default: throw new Exception("Unknown instruction set");
}
diff --git a/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs b/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs
index 14846a61a08..05ca31588c1 100644
--- a/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs
+++ b/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs
@@ -221,7 +221,9 @@ namespace Internal.JitInterface
Dictionary<object, IntPtr> objectToHandle = new Dictionary<object, IntPtr>();
Dictionary<IntPtr, object> handleToObject = new Dictionary<IntPtr, object>();
- ComputeJitPgoInstrumentationSchema(LocalObjectToHandle, pgoData, out var nativeSchema, out var instrumentationData);
+ MemoryStream memoryStreamInstrumentationData = new MemoryStream();
+ ComputeJitPgoInstrumentationSchema(LocalObjectToHandle, pgoData, out var nativeSchema, memoryStreamInstrumentationData);
+ var instrumentationData = memoryStreamInstrumentationData.ToArray();
for (int i = 0; i < pgoData.Length; i++)
{
@@ -653,7 +655,7 @@ namespace Internal.JitInterface
_pgoResults.Clear();
}
- private Dictionary<object, IntPtr> _objectToHandle = new Dictionary<object, IntPtr>();
+ private Dictionary<object, IntPtr> _objectToHandle = new Dictionary<object, IntPtr>(new JitObjectComparer());
private List<object> _handleToObject = new List<object>();
private const int handleMultiplier = 8;
@@ -989,7 +991,24 @@ namespace Internal.JitInterface
if (method.IsIntrinsic)
result |= CorInfoFlag.CORINFO_FLG_INTRINSIC;
if (method.IsVirtual)
+ {
result |= CorInfoFlag.CORINFO_FLG_VIRTUAL;
+
+ // The JIT only cares about the sealed flag if the method is virtual, or if
+ // it is a delegate.
+
+ // method or class might have the final bit
+ if (method.IsUnboxingThunk())
+ {
+ if (_compilation.IsEffectivelySealed(method.GetUnboxedMethod()))
+ result |= CorInfoFlag.CORINFO_FLG_FINAL;
+ }
+ else
+ {
+ if (_compilation.IsEffectivelySealed(method))
+ result |= CorInfoFlag.CORINFO_FLG_FINAL;
+ }
+ }
if (method.IsAbstract)
result |= CorInfoFlag.CORINFO_FLG_ABSTRACT;
if (method.IsConstructor || method.IsStaticConstructor)
@@ -1000,10 +1019,6 @@ namespace Internal.JitInterface
// method body.
//
- // method or class might have the final bit
- if (_compilation.IsEffectivelySealed(method))
- result |= CorInfoFlag.CORINFO_FLG_FINAL;
-
if (method.IsSharedByGenericInstantiations)
result |= CorInfoFlag.CORINFO_FLG_SHAREDINST;
@@ -2237,18 +2252,26 @@ namespace Internal.JitInterface
return result;
}
+ private Dictionary<TypeDesc, uint> _classNumInstanceFields = new();
+
private uint getClassNumInstanceFields(CORINFO_CLASS_STRUCT_* cls)
{
TypeDesc type = HandleToObject(cls);
- uint result = 0;
+ var lookupType = type.GetTypeDefinition(); // The number of fields on an instantiation is the same as on the generic definition
+
+ if (_classNumInstanceFields.TryGetValue(lookupType, out uint numInstanceFields))
+ return numInstanceFields;
+
+ numInstanceFields = 0;
foreach (var field in type.GetFields())
{
if (!field.IsStatic)
- result++;
+ numInstanceFields++;
}
- return result;
+ _classNumInstanceFields.Add(lookupType, numInstanceFields);
+ return numInstanceFields;
}
private CORINFO_FIELD_STRUCT_* getFieldInClass(CORINFO_CLASS_STRUCT_* clsHnd, int num)
@@ -3799,11 +3822,13 @@ namespace Internal.JitInterface
return _compilation.ProfileData[method]?.SchemaData;
}
- public static void ComputeJitPgoInstrumentationSchema(Func<object, IntPtr> objectToHandle, PgoSchemaElem[] pgoResultsSchemas, out PgoInstrumentationSchema[] nativeSchemas, out byte[] instrumentationData, Func<TypeDesc, bool> typeFilter = null)
+ private MemoryStream _cachedMemoryStream = new MemoryStream();
+
+ public static void ComputeJitPgoInstrumentationSchema(Func<object, IntPtr> objectToHandle, PgoSchemaElem[] pgoResultsSchemas, out PgoInstrumentationSchema[] nativeSchemas, MemoryStream instrumentationData, Func<TypeDesc, bool> typeFilter = null)
{
nativeSchemas = new PgoInstrumentationSchema[pgoResultsSchemas.Length];
- MemoryStream msInstrumentationData = new MemoryStream();
- BinaryWriter bwInstrumentationData = new BinaryWriter(msInstrumentationData);
+ instrumentationData.SetLength(0);
+ BinaryWriter bwInstrumentationData = new BinaryWriter(instrumentationData);
for (int i = 0; i < nativeSchemas.Length; i++)
{
if ((bwInstrumentationData.BaseStream.Position % 8) == 4)
@@ -3865,8 +3890,6 @@ namespace Internal.JitInterface
}
bwInstrumentationData.Flush();
-
- instrumentationData = msInstrumentationData.ToArray();
}
private HRESULT getPgoInstrumentationResults(CORINFO_METHOD_STRUCT_* ftnHnd, ref PgoInstrumentationSchema* pSchema, ref uint countSchemaItems, byte** pInstrumentationData,
@@ -3884,13 +3907,14 @@ namespace Internal.JitInterface
else
{
#pragma warning disable SA1001, SA1113, SA1115 // Commas should be spaced correctly
- ComputeJitPgoInstrumentationSchema(ObjectToHandle, pgoResultsSchemas, out var nativeSchemas, out var instrumentationData
+ ComputeJitPgoInstrumentationSchema(ObjectToHandle, pgoResultsSchemas, out var nativeSchemas, _cachedMemoryStream
#if !READYTORUN
, _compilation.CanConstructType
#endif
);
#pragma warning restore SA1001, SA1113, SA1115 // Commas should be spaced correctly
+ var instrumentationData = _cachedMemoryStream.ToArray();
pgoResults.pInstrumentationData = (byte*)GetPin(instrumentationData);
pgoResults.countSchemaItems = (uint)nativeSchemas.Length;
pgoResults.pSchema = (PgoInstrumentationSchema*)GetPin(nativeSchemas);
@@ -3924,8 +3948,11 @@ namespace Internal.JitInterface
else
{
// By policy we code review all changes into corelib, such that failing to use an instruction
- // set is not a reason to not support usage of it.
- if (!isMethodDefinedInCoreLib())
+ // set is not a reason to not support usage of it. Except for functions which check if a given
+ // feature is supported or hardware accelerated.
+ if (!isMethodDefinedInCoreLib() ||
+ MethodBeingCompiled.Name == "get_IsSupported" ||
+ MethodBeingCompiled.Name == "get_IsHardwareAccelerated")
{
_actualInstructionSetUnsupported.AddInstructionSet(instructionSet);
}
diff --git a/src/coreclr/tools/Common/JitInterface/CorInfoInstructionSet.cs b/src/coreclr/tools/Common/JitInterface/CorInfoInstructionSet.cs
index 78eec3e1297..22d96d02fd5 100644
--- a/src/coreclr/tools/Common/JitInterface/CorInfoInstructionSet.cs
+++ b/src/coreclr/tools/Common/JitInterface/CorInfoInstructionSet.cs
@@ -58,6 +58,14 @@ namespace Internal.JitInterface
X64_AVXVNNI = InstructionSet_X64.AVXVNNI,
X64_MOVBE = InstructionSet_X64.MOVBE,
X64_X86Serialize = InstructionSet_X64.X86Serialize,
+ X64_AVX512F = InstructionSet_X64.AVX512F,
+ X64_AVX512F_VL = InstructionSet_X64.AVX512F_VL,
+ X64_AVX512BW = InstructionSet_X64.AVX512BW,
+ X64_AVX512BW_VL = InstructionSet_X64.AVX512BW_VL,
+ X64_AVX512CD = InstructionSet_X64.AVX512CD,
+ X64_AVX512CD_VL = InstructionSet_X64.AVX512CD_VL,
+ X64_AVX512DQ = InstructionSet_X64.AVX512DQ,
+ X64_AVX512DQ_VL = InstructionSet_X64.AVX512DQ_VL,
X64_X86Base_X64 = InstructionSet_X64.X86Base_X64,
X64_SSE_X64 = InstructionSet_X64.SSE_X64,
X64_SSE2_X64 = InstructionSet_X64.SSE2_X64,
@@ -77,6 +85,14 @@ namespace Internal.JitInterface
X64_AVXVNNI_X64 = InstructionSet_X64.AVXVNNI_X64,
X64_MOVBE_X64 = InstructionSet_X64.MOVBE_X64,
X64_X86Serialize_X64 = InstructionSet_X64.X86Serialize_X64,
+ X64_AVX512F_X64 = InstructionSet_X64.AVX512F_X64,
+ X64_AVX512F_VL_X64 = InstructionSet_X64.AVX512F_VL_X64,
+ X64_AVX512BW_X64 = InstructionSet_X64.AVX512BW_X64,
+ X64_AVX512BW_VL_X64 = InstructionSet_X64.AVX512BW_VL_X64,
+ X64_AVX512CD_X64 = InstructionSet_X64.AVX512CD_X64,
+ X64_AVX512CD_VL_X64 = InstructionSet_X64.AVX512CD_VL_X64,
+ X64_AVX512DQ_X64 = InstructionSet_X64.AVX512DQ_X64,
+ X64_AVX512DQ_VL_X64 = InstructionSet_X64.AVX512DQ_VL_X64,
X86_X86Base = InstructionSet_X86.X86Base,
X86_SSE = InstructionSet_X86.SSE,
X86_SSE2 = InstructionSet_X86.SSE2,
@@ -98,6 +114,14 @@ namespace Internal.JitInterface
X86_AVXVNNI = InstructionSet_X86.AVXVNNI,
X86_MOVBE = InstructionSet_X86.MOVBE,
X86_X86Serialize = InstructionSet_X86.X86Serialize,
+ X86_AVX512F = InstructionSet_X86.AVX512F,
+ X86_AVX512F_VL = InstructionSet_X86.AVX512F_VL,
+ X86_AVX512BW = InstructionSet_X86.AVX512BW,
+ X86_AVX512BW_VL = InstructionSet_X86.AVX512BW_VL,
+ X86_AVX512CD = InstructionSet_X86.AVX512CD,
+ X86_AVX512CD_VL = InstructionSet_X86.AVX512CD_VL,
+ X86_AVX512DQ = InstructionSet_X86.AVX512DQ,
+ X86_AVX512DQ_VL = InstructionSet_X86.AVX512DQ_VL,
X86_X86Base_X64 = InstructionSet_X86.X86Base_X64,
X86_SSE_X64 = InstructionSet_X86.SSE_X64,
X86_SSE2_X64 = InstructionSet_X86.SSE2_X64,
@@ -117,6 +141,14 @@ namespace Internal.JitInterface
X86_AVXVNNI_X64 = InstructionSet_X86.AVXVNNI_X64,
X86_MOVBE_X64 = InstructionSet_X86.MOVBE_X64,
X86_X86Serialize_X64 = InstructionSet_X86.X86Serialize_X64,
+ X86_AVX512F_X64 = InstructionSet_X86.AVX512F_X64,
+ X86_AVX512F_VL_X64 = InstructionSet_X86.AVX512F_VL_X64,
+ X86_AVX512BW_X64 = InstructionSet_X86.AVX512BW_X64,
+ X86_AVX512BW_VL_X64 = InstructionSet_X86.AVX512BW_VL_X64,
+ X86_AVX512CD_X64 = InstructionSet_X86.AVX512CD_X64,
+ X86_AVX512CD_VL_X64 = InstructionSet_X86.AVX512CD_VL_X64,
+ X86_AVX512DQ_X64 = InstructionSet_X86.AVX512DQ_X64,
+ X86_AVX512DQ_VL_X64 = InstructionSet_X86.AVX512DQ_VL_X64,
}
public enum InstructionSet_ARM64
{
@@ -170,25 +202,41 @@ namespace Internal.JitInterface
AVXVNNI = 19,
MOVBE = 20,
X86Serialize = 21,
- X86Base_X64 = 22,
- SSE_X64 = 23,
- SSE2_X64 = 24,
- SSE3_X64 = 25,
- SSSE3_X64 = 26,
- SSE41_X64 = 27,
- SSE42_X64 = 28,
- AVX_X64 = 29,
- AVX2_X64 = 30,
- AES_X64 = 31,
- BMI1_X64 = 32,
- BMI2_X64 = 33,
- FMA_X64 = 34,
- LZCNT_X64 = 35,
- PCLMULQDQ_X64 = 36,
- POPCNT_X64 = 37,
- AVXVNNI_X64 = 38,
- MOVBE_X64 = 39,
- X86Serialize_X64 = 40,
+ AVX512F = 22,
+ AVX512F_VL = 23,
+ AVX512BW = 24,
+ AVX512BW_VL = 25,
+ AVX512CD = 26,
+ AVX512CD_VL = 27,
+ AVX512DQ = 28,
+ AVX512DQ_VL = 29,
+ X86Base_X64 = 30,
+ SSE_X64 = 31,
+ SSE2_X64 = 32,
+ SSE3_X64 = 33,
+ SSSE3_X64 = 34,
+ SSE41_X64 = 35,
+ SSE42_X64 = 36,
+ AVX_X64 = 37,
+ AVX2_X64 = 38,
+ AES_X64 = 39,
+ BMI1_X64 = 40,
+ BMI2_X64 = 41,
+ FMA_X64 = 42,
+ LZCNT_X64 = 43,
+ PCLMULQDQ_X64 = 44,
+ POPCNT_X64 = 45,
+ AVXVNNI_X64 = 46,
+ MOVBE_X64 = 47,
+ X86Serialize_X64 = 48,
+ AVX512F_X64 = 49,
+ AVX512F_VL_X64 = 50,
+ AVX512BW_X64 = 51,
+ AVX512BW_VL_X64 = 52,
+ AVX512CD_X64 = 53,
+ AVX512CD_VL_X64 = 54,
+ AVX512DQ_X64 = 55,
+ AVX512DQ_VL_X64 = 56,
}
public enum InstructionSet_X86
@@ -216,25 +264,41 @@ namespace Internal.JitInterface
AVXVNNI = 19,
MOVBE = 20,
X86Serialize = 21,
- X86Base_X64 = 22,
- SSE_X64 = 23,
- SSE2_X64 = 24,
- SSE3_X64 = 25,
- SSSE3_X64 = 26,
- SSE41_X64 = 27,
- SSE42_X64 = 28,
- AVX_X64 = 29,
- AVX2_X64 = 30,
- AES_X64 = 31,
- BMI1_X64 = 32,
- BMI2_X64 = 33,
- FMA_X64 = 34,
- LZCNT_X64 = 35,
- PCLMULQDQ_X64 = 36,
- POPCNT_X64 = 37,
- AVXVNNI_X64 = 38,
- MOVBE_X64 = 39,
- X86Serialize_X64 = 40,
+ AVX512F = 22,
+ AVX512F_VL = 23,
+ AVX512BW = 24,
+ AVX512BW_VL = 25,
+ AVX512CD = 26,
+ AVX512CD_VL = 27,
+ AVX512DQ = 28,
+ AVX512DQ_VL = 29,
+ X86Base_X64 = 30,
+ SSE_X64 = 31,
+ SSE2_X64 = 32,
+ SSE3_X64 = 33,
+ SSSE3_X64 = 34,
+ SSE41_X64 = 35,
+ SSE42_X64 = 36,
+ AVX_X64 = 37,
+ AVX2_X64 = 38,
+ AES_X64 = 39,
+ BMI1_X64 = 40,
+ BMI2_X64 = 41,
+ FMA_X64 = 42,
+ LZCNT_X64 = 43,
+ PCLMULQDQ_X64 = 44,
+ POPCNT_X64 = 45,
+ AVXVNNI_X64 = 46,
+ MOVBE_X64 = 47,
+ X86Serialize_X64 = 48,
+ AVX512F_X64 = 49,
+ AVX512F_VL_X64 = 50,
+ AVX512BW_X64 = 51,
+ AVX512BW_VL_X64 = 52,
+ AVX512CD_X64 = 53,
+ AVX512CD_VL_X64 = 54,
+ AVX512DQ_X64 = 55,
+ AVX512DQ_VL_X64 = 56,
}
public unsafe struct InstructionSetFlags : IEnumerable<InstructionSet>
@@ -520,6 +584,38 @@ namespace Internal.JitInterface
resultflags.AddInstructionSet(InstructionSet.X64_X86Serialize_X64);
if (resultflags.HasInstructionSet(InstructionSet.X64_X86Serialize_X64))
resultflags.AddInstructionSet(InstructionSet.X64_X86Serialize);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512F))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512F_X64);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512F_X64))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512F);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512F_VL))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512F_VL_X64);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512F_VL_X64))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512F_VL);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512BW))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512BW_X64);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512BW_X64))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512BW);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512BW_VL))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512BW_VL_X64);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512BW_VL_X64))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512BW_VL);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512CD))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512CD_X64);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512CD_X64))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512CD);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512CD_VL))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512CD_VL_X64);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512CD_VL_X64))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512CD_VL);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512DQ))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512DQ_X64);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512DQ_X64))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512DQ);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512DQ_VL))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512DQ_VL_X64);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512DQ_VL_X64))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512DQ_VL);
if (resultflags.HasInstructionSet(InstructionSet.X64_SSE))
resultflags.AddInstructionSet(InstructionSet.X64_X86Base);
if (resultflags.HasInstructionSet(InstructionSet.X64_SSE2))
@@ -560,6 +656,22 @@ namespace Internal.JitInterface
resultflags.AddInstructionSet(InstructionSet.X64_SSE42);
if (resultflags.HasInstructionSet(InstructionSet.X64_X86Serialize))
resultflags.AddInstructionSet(InstructionSet.X64_X86Base);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512F))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX2);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512F_VL))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512F);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512CD))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512F);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512CD_VL))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512F_VL);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512BW))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512F);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512BW_VL))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512F_VL);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512DQ))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512F);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512DQ_VL))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512F_VL);
break;
case TargetArchitecture.X86:
@@ -603,6 +715,22 @@ namespace Internal.JitInterface
resultflags.AddInstructionSet(InstructionSet.X86_SSE42);
if (resultflags.HasInstructionSet(InstructionSet.X86_X86Serialize))
resultflags.AddInstructionSet(InstructionSet.X86_X86Base);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512F))
+ resultflags.AddInstructionSet(InstructionSet.X86_AVX2);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512F_VL))
+ resultflags.AddInstructionSet(InstructionSet.X86_AVX512F);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512CD))
+ resultflags.AddInstructionSet(InstructionSet.X86_AVX512F);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512CD_VL))
+ resultflags.AddInstructionSet(InstructionSet.X86_AVX512F_VL);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512BW))
+ resultflags.AddInstructionSet(InstructionSet.X86_AVX512F);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512BW_VL))
+ resultflags.AddInstructionSet(InstructionSet.X86_AVX512F_VL);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512DQ))
+ resultflags.AddInstructionSet(InstructionSet.X86_AVX512F);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512DQ_VL))
+ resultflags.AddInstructionSet(InstructionSet.X86_AVX512F_VL);
break;
}
} while (!oldflags.Equals(resultflags));
@@ -701,6 +829,22 @@ namespace Internal.JitInterface
resultflags.AddInstructionSet(InstructionSet.X64_MOVBE);
if (resultflags.HasInstructionSet(InstructionSet.X64_X86Serialize_X64))
resultflags.AddInstructionSet(InstructionSet.X64_X86Serialize);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512F_X64))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512F);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512F_VL_X64))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512F_VL);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512BW_X64))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512BW);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512BW_VL_X64))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512BW_VL);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512CD_X64))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512CD);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512CD_VL_X64))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512CD_VL);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512DQ_X64))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512DQ);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512DQ_VL_X64))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512DQ_VL);
if (resultflags.HasInstructionSet(InstructionSet.X64_X86Base))
resultflags.AddInstructionSet(InstructionSet.X64_SSE);
if (resultflags.HasInstructionSet(InstructionSet.X64_SSE))
@@ -741,6 +885,22 @@ namespace Internal.JitInterface
resultflags.AddInstructionSet(InstructionSet.X64_MOVBE);
if (resultflags.HasInstructionSet(InstructionSet.X64_X86Base))
resultflags.AddInstructionSet(InstructionSet.X64_X86Serialize);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX2))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512F);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512F))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512F_VL);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512F))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512CD);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512F_VL))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512CD_VL);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512F))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512BW);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512F_VL))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512BW_VL);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512F))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512DQ);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512F_VL))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512DQ_VL);
break;
case TargetArchitecture.X86:
@@ -784,6 +944,22 @@ namespace Internal.JitInterface
resultflags.AddInstructionSet(InstructionSet.X86_MOVBE);
if (resultflags.HasInstructionSet(InstructionSet.X86_X86Base))
resultflags.AddInstructionSet(InstructionSet.X86_X86Serialize);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_AVX2))
+ resultflags.AddInstructionSet(InstructionSet.X86_AVX512F);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512F))
+ resultflags.AddInstructionSet(InstructionSet.X86_AVX512F_VL);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512F))
+ resultflags.AddInstructionSet(InstructionSet.X86_AVX512CD);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512F_VL))
+ resultflags.AddInstructionSet(InstructionSet.X86_AVX512CD_VL);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512F))
+ resultflags.AddInstructionSet(InstructionSet.X86_AVX512BW);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512F_VL))
+ resultflags.AddInstructionSet(InstructionSet.X86_AVX512BW_VL);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512F))
+ resultflags.AddInstructionSet(InstructionSet.X86_AVX512DQ);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512F_VL))
+ resultflags.AddInstructionSet(InstructionSet.X86_AVX512DQ_VL);
break;
}
} while (!oldflags.Equals(resultflags));
@@ -801,6 +977,8 @@ namespace Internal.JitInterface
{ ("x86-x64-v3", TargetArchitecture.X86), "x86-x64-v2 avx2 bmi bmi2 lzcnt movbe fma" },
{ ("skylake", TargetArchitecture.X64), "x86-x64-v3" },
{ ("skylake", TargetArchitecture.X86), "x86-x64-v3" },
+ { ("x86-x64-v4", TargetArchitecture.X64), "x86-x64-v3 avx512f avx512f_vl avx512bw avx512bw_vl avx512cd avx512cd_vl" },
+ { ("x86-x64-v4", TargetArchitecture.X86), "x86-x64-v3 avx512f avx512f_vl avx512bw avx512bw_vl avx512cd avx512cd_vl" },
{ ("armv8-a", TargetArchitecture.ARM64), "neon" },
{ ("armv8.1-a", TargetArchitecture.ARM64), "armv8-a lse crc rdma" },
{ ("armv8.2-a", TargetArchitecture.ARM64), "armv8.1-a" },
@@ -876,6 +1054,14 @@ namespace Internal.JitInterface
yield return new InstructionSetInfo("avxvnni", "AvxVnni", InstructionSet.X64_AVXVNNI, true);
yield return new InstructionSetInfo("movbe", "Movbe", InstructionSet.X64_MOVBE, true);
yield return new InstructionSetInfo("serialize", "X86Serialize", InstructionSet.X64_X86Serialize, true);
+ yield return new InstructionSetInfo("avx512f", "Avx512F", InstructionSet.X64_AVX512F, true);
+ yield return new InstructionSetInfo("avx512f_vl", "Avx512F_VL", InstructionSet.X64_AVX512F_VL, true);
+ yield return new InstructionSetInfo("avx512bw", "Avx512BW", InstructionSet.X64_AVX512BW, true);
+ yield return new InstructionSetInfo("avx512bw_vl", "Avx512BW_VL", InstructionSet.X64_AVX512BW_VL, true);
+ yield return new InstructionSetInfo("avx512cd", "Avx512CD", InstructionSet.X64_AVX512CD, true);
+ yield return new InstructionSetInfo("avx512cd_vl", "Avx512CD_VL", InstructionSet.X64_AVX512CD_VL, true);
+ yield return new InstructionSetInfo("avx512dq", "Avx512DQ", InstructionSet.X64_AVX512DQ, true);
+ yield return new InstructionSetInfo("avx512dq_vl", "Avx512DQ_VL", InstructionSet.X64_AVX512DQ_VL, true);
break;
case TargetArchitecture.X86:
@@ -900,6 +1086,14 @@ namespace Internal.JitInterface
yield return new InstructionSetInfo("avxvnni", "AvxVnni", InstructionSet.X86_AVXVNNI, true);
yield return new InstructionSetInfo("movbe", "Movbe", InstructionSet.X86_MOVBE, true);
yield return new InstructionSetInfo("serialize", "X86Serialize", InstructionSet.X86_X86Serialize, true);
+ yield return new InstructionSetInfo("avx512f", "Avx512F", InstructionSet.X86_AVX512F, true);
+ yield return new InstructionSetInfo("avx512f_vl", "Avx512F_VL", InstructionSet.X86_AVX512F_VL, true);
+ yield return new InstructionSetInfo("avx512bw", "Avx512BW", InstructionSet.X86_AVX512BW, true);
+ yield return new InstructionSetInfo("avx512bw_vl", "Avx512BW_VL", InstructionSet.X86_AVX512BW_VL, true);
+ yield return new InstructionSetInfo("avx512cd", "Avx512CD", InstructionSet.X86_AVX512CD, true);
+ yield return new InstructionSetInfo("avx512cd_vl", "Avx512CD_VL", InstructionSet.X86_AVX512CD_VL, true);
+ yield return new InstructionSetInfo("avx512dq", "Avx512DQ", InstructionSet.X86_AVX512DQ, true);
+ yield return new InstructionSetInfo("avx512dq_vl", "Avx512DQ_VL", InstructionSet.X86_AVX512DQ_VL, true);
break;
}
}
@@ -967,6 +1161,22 @@ namespace Internal.JitInterface
AddInstructionSet(InstructionSet.X64_MOVBE_X64);
if (HasInstructionSet(InstructionSet.X64_X86Serialize))
AddInstructionSet(InstructionSet.X64_X86Serialize_X64);
+ if (HasInstructionSet(InstructionSet.X64_AVX512F))
+ AddInstructionSet(InstructionSet.X64_AVX512F_X64);
+ if (HasInstructionSet(InstructionSet.X64_AVX512F_VL))
+ AddInstructionSet(InstructionSet.X64_AVX512F_VL_X64);
+ if (HasInstructionSet(InstructionSet.X64_AVX512BW))
+ AddInstructionSet(InstructionSet.X64_AVX512BW_X64);
+ if (HasInstructionSet(InstructionSet.X64_AVX512BW_VL))
+ AddInstructionSet(InstructionSet.X64_AVX512BW_VL_X64);
+ if (HasInstructionSet(InstructionSet.X64_AVX512CD))
+ AddInstructionSet(InstructionSet.X64_AVX512CD_X64);
+ if (HasInstructionSet(InstructionSet.X64_AVX512CD_VL))
+ AddInstructionSet(InstructionSet.X64_AVX512CD_VL_X64);
+ if (HasInstructionSet(InstructionSet.X64_AVX512DQ))
+ AddInstructionSet(InstructionSet.X64_AVX512DQ_X64);
+ if (HasInstructionSet(InstructionSet.X64_AVX512DQ_VL))
+ AddInstructionSet(InstructionSet.X64_AVX512DQ_VL_X64);
break;
case TargetArchitecture.X86:
@@ -1010,6 +1220,14 @@ namespace Internal.JitInterface
AddInstructionSet(InstructionSet.X64_AVXVNNI_X64);
AddInstructionSet(InstructionSet.X64_MOVBE_X64);
AddInstructionSet(InstructionSet.X64_X86Serialize_X64);
+ AddInstructionSet(InstructionSet.X64_AVX512F_X64);
+ AddInstructionSet(InstructionSet.X64_AVX512F_VL_X64);
+ AddInstructionSet(InstructionSet.X64_AVX512BW_X64);
+ AddInstructionSet(InstructionSet.X64_AVX512BW_VL_X64);
+ AddInstructionSet(InstructionSet.X64_AVX512CD_X64);
+ AddInstructionSet(InstructionSet.X64_AVX512CD_VL_X64);
+ AddInstructionSet(InstructionSet.X64_AVX512DQ_X64);
+ AddInstructionSet(InstructionSet.X64_AVX512DQ_VL_X64);
break;
case TargetArchitecture.X86:
@@ -1032,6 +1250,14 @@ namespace Internal.JitInterface
AddInstructionSet(InstructionSet.X86_AVXVNNI_X64);
AddInstructionSet(InstructionSet.X86_MOVBE_X64);
AddInstructionSet(InstructionSet.X86_X86Serialize_X64);
+ AddInstructionSet(InstructionSet.X86_AVX512F_X64);
+ AddInstructionSet(InstructionSet.X86_AVX512F_VL_X64);
+ AddInstructionSet(InstructionSet.X86_AVX512BW_X64);
+ AddInstructionSet(InstructionSet.X86_AVX512BW_VL_X64);
+ AddInstructionSet(InstructionSet.X86_AVX512CD_X64);
+ AddInstructionSet(InstructionSet.X86_AVX512CD_VL_X64);
+ AddInstructionSet(InstructionSet.X86_AVX512DQ_X64);
+ AddInstructionSet(InstructionSet.X86_AVX512DQ_VL_X64);
break;
}
}
diff --git a/src/coreclr/tools/Common/JitInterface/IJitHashableOnly.cs b/src/coreclr/tools/Common/JitInterface/IJitHashableOnly.cs
new file mode 100644
index 00000000000..65a9a34f034
--- /dev/null
+++ b/src/coreclr/tools/Common/JitInterface/IJitHashableOnly.cs
@@ -0,0 +1,45 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System;
+using System.Collections.Generic;
+using Internal.TypeSystem;
+
+namespace Internal.JitInterface
+{
+ public class JitObjectComparer : IEqualityComparer<object>
+ {
+ public new bool Equals(object x, object y) => x == y;
+ public int GetHashCode(object obj)
+ {
+ if (obj is IJitHashableOnly jitHashable)
+ return jitHashable.GetJitVisibleHashCode();
+ return obj.GetHashCode();
+ }
+ }
+
+ public class JitObjectComparer<T> : IEqualityComparer<T> where T:class
+ {
+ public bool Equals(T x, T y) => x == y;
+ public int GetHashCode(T obj)
+ {
+ if (obj is IJitHashableOnly jitHashable)
+ return jitHashable.GetJitVisibleHashCode();
+ return obj.GetHashCode();
+ }
+ }
+
+ // Mark a type system object with this interface to indicate that it
+ // can be hashed, but only by using the IJitHashableOnly interface.
+ // Implementors of this should throw an exception in their implementation of
+ // ComputeHashCode so that the normal GetHashCode function does not work.
+ // This is used to prevent putting these objects into long lived storage.
+ //
+ // The goal here is to make it difficult to accidentally store a type into
+ // another hashtable that isn't associated with the JIT itself, but still
+ // allow the jit side code use standard collections.
+ public interface IJitHashableOnly
+ {
+ int GetJitVisibleHashCode();
+ }
+}
diff --git a/src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt b/src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt
index 59321364c42..adb3c17f2bb 100644
--- a/src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt
+++ b/src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt
@@ -46,6 +46,14 @@ instructionset ,X86 , , , ,Vector256,
instructionset ,X86 ,AvxVnni , ,25 ,AVXVNNI ,avxvnni
instructionset ,X86 ,Movbe , ,27 ,MOVBE ,movbe
instructionset ,X86 ,X86Serialize , ,28 ,X86Serialize ,serialize
+instructionset ,X86 ,Avx512F , ,29 ,AVX512F ,avx512f
+instructionset ,X86 ,Avx512F_VL, ,30 ,AVX512F_VL ,avx512f_vl
+instructionset ,X86 ,Avx512BW , ,31 ,AVX512BW ,avx512bw
+instructionset ,X86 ,Avx512BW_VL, ,32 ,AVX512BW_VL ,avx512bw_vl
+instructionset ,X86 ,Avx512CD , ,33 ,AVX512CD ,avx512cd
+instructionset ,X86 ,Avx512CD_VL, ,34 ,AVX512CD_VL ,avx512cd_vl
+instructionset ,X86 ,Avx512DQ , ,35 ,AVX512DQ ,avx512dq
+instructionset ,X86 ,Avx512DQ_VL, ,36 ,AVX512DQ_VL ,avx512dq_vl
instructionset64bit,X86 ,X86Base
instructionset64bit,X86 ,SSE
@@ -66,6 +74,14 @@ instructionset64bit,X86 ,POPCNT
instructionset64bit,X86 ,AVXVNNI
instructionset64bit,X86 ,MOVBE
instructionset64bit,X86 ,X86Serialize
+instructionset64bit,X86 ,AVX512F
+instructionset64bit,X86 ,AVX512F_VL
+instructionset64bit,X86 ,AVX512BW
+instructionset64bit,X86 ,AVX512BW_VL
+instructionset64bit,X86 ,AVX512CD
+instructionset64bit,X86 ,AVX512CD_VL
+instructionset64bit,X86 ,AVX512DQ
+instructionset64bit,X86 ,AVX512DQ_VL
vectorinstructionset,X86 ,Vector128
vectorinstructionset,X86 ,Vector256
@@ -91,6 +107,15 @@ implication ,X86 ,AVXVNNI ,AVX2
implication ,X86 ,MOVBE ,SSE42
implication ,X86 ,X86Serialize, X86Base
+implication ,X86 ,AVX512F, AVX2
+implication ,X86 ,AVX512F_VL,AVX512F
+implication ,X86 ,AVX512CD, AVX512F
+implication ,X86 ,AVX512CD_VL, AVX512F_VL
+implication ,X86 ,AVX512BW, AVX512F
+implication ,X86 ,AVX512BW_VL, AVX512F_VL
+implication ,X86 ,AVX512DQ, AVX512F
+implication ,X86 ,AVX512DQ_VL, AVX512F_VL
+
; Definition of X64 instruction sets
definearch ,X64 ,64Bit ,X64
@@ -142,6 +167,7 @@ instructionsetgroup ,x86-x64 ,X64 X86 ,sse2
instructionsetgroup ,x86-x64-v2 ,X64 X86 ,sse4.2 popcnt
instructionsetgroup ,x86-x64-v3 ,X64 X86 ,x86-x64-v2 avx2 bmi bmi2 lzcnt movbe fma
instructionsetgroup ,skylake ,X64 X86 ,x86-x64-v3
+instructionsetgroup ,x86-x64-v4 ,X64 X86 ,x86-x64-v3 avx512f avx512f_vl avx512bw avx512bw_vl avx512cd avx512cd_vl
instructionsetgroup ,armv8-a ,ARM64 ,neon
instructionsetgroup ,armv8.1-a ,ARM64 ,armv8-a lse crc rdma
diff --git a/src/coreclr/tools/Common/JitInterface/UnboxingMethodDesc.cs b/src/coreclr/tools/Common/JitInterface/UnboxingMethodDesc.cs
index e21794718c8..eb1ba8a9d3b 100644
--- a/src/coreclr/tools/Common/JitInterface/UnboxingMethodDesc.cs
+++ b/src/coreclr/tools/Common/JitInterface/UnboxingMethodDesc.cs
@@ -12,9 +12,10 @@ namespace Internal.JitInterface
/// This class is for internal purposes within the JitInterface. It's not expected
/// for it to escape the JitInterface.
/// </summary>
- internal sealed class UnboxingMethodDesc : MethodDelegator
+ internal sealed class UnboxingMethodDesc : MethodDelegator, IJitHashableOnly
{
private readonly UnboxingMethodDescFactory _factory;
+ private readonly int _jitVisibleHashCode;
public MethodDesc Target => _wrappedMethod;
@@ -24,6 +25,7 @@ namespace Internal.JitInterface
Debug.Assert(wrappedMethod.OwningType.IsValueType);
Debug.Assert(!wrappedMethod.Signature.IsStatic);
_factory = factory;
+ _jitVisibleHashCode = HashCode.Combine(wrappedMethod.GetHashCode(), 401752602);
}
public override MethodDesc GetCanonMethodTarget(CanonicalFormKind kind)
@@ -74,6 +76,13 @@ namespace Internal.JitInterface
{
throw new NotImplementedException();
}
+
+ protected override int ComputeHashCode()
+ {
+ throw new NotSupportedException("This method may not be stored as it is expected to only be used transiently in the JIT");
+ }
+
+ int IJitHashableOnly.GetJitVisibleHashCode() => _jitVisibleHashCode;
#endif
}
diff --git a/src/coreclr/tools/Common/TypeSystem/Common/InstantiatedType.cs b/src/coreclr/tools/Common/TypeSystem/Common/InstantiatedType.cs
index 2b9e2774324..038b3c00c1a 100644
--- a/src/coreclr/tools/Common/TypeSystem/Common/InstantiatedType.cs
+++ b/src/coreclr/tools/Common/TypeSystem/Common/InstantiatedType.cs
@@ -368,5 +368,16 @@ namespace Internal.TypeSystem
// Return the result from the typical type definition.
return _typeDef.GetNestedTypes();
}
+
+ public override TypeDesc UnderlyingType
+ {
+ get
+ {
+ if (!IsEnum)
+ return this;
+ else
+ return _typeDef.UnderlyingType;
+ }
+ }
}
}
diff --git a/src/coreclr/tools/Common/TypeSystem/Common/TypeDesc.cs b/src/coreclr/tools/Common/TypeSystem/Common/TypeDesc.cs
index b85c803cec0..ae83551e2bd 100644
--- a/src/coreclr/tools/Common/TypeSystem/Common/TypeDesc.cs
+++ b/src/coreclr/tools/Common/TypeSystem/Common/TypeDesc.cs
@@ -472,7 +472,6 @@ namespace Internal.TypeSystem
if (!this.IsEnum)
return this;
- // TODO: Cache the result?
foreach (var field in this.GetFields())
{
if (!field.IsStatic)
diff --git a/src/coreclr/tools/Common/TypeSystem/Ecma/EcmaType.cs b/src/coreclr/tools/Common/TypeSystem/Ecma/EcmaType.cs
index 245c51458a4..9e7eaa0325f 100644
--- a/src/coreclr/tools/Common/TypeSystem/Ecma/EcmaType.cs
+++ b/src/coreclr/tools/Common/TypeSystem/Ecma/EcmaType.cs
@@ -429,6 +429,24 @@ namespace Internal.TypeSystem.Ecma
}
}
+ public override TypeDesc UnderlyingType
+ {
+ get
+ {
+ if (!IsEnum)
+ return this;
+
+ foreach (var handle in _typeDefinition.GetFields())
+ {
+ var field = (EcmaField)_module.GetObject(handle);
+ if (!field.IsStatic)
+ return field.FieldType;
+ }
+
+ return base.UnderlyingType; // Use the base implementation to get consistent error behavior
+ }
+ }
+
public override FieldDesc GetField(string name)
{
var metadataReader = this.MetadataReader;
diff --git a/src/coreclr/tools/Common/TypeSystem/IL/ILImporter.cs b/src/coreclr/tools/Common/TypeSystem/IL/ILImporter.cs
index 1ac634591cd..6c9befb3a9a 100644
--- a/src/coreclr/tools/Common/TypeSystem/IL/ILImporter.cs
+++ b/src/coreclr/tools/Common/TypeSystem/IL/ILImporter.cs
@@ -576,7 +576,7 @@ namespace Internal.IL
ImportConvert(WellKnownType.Double, false, false);
break;
case ILOpcode.conv_u4:
- ImportConvert(WellKnownType.UInt32, false, false);
+ ImportConvert(WellKnownType.UInt32, false, true);
break;
case ILOpcode.conv_u8:
ImportConvert(WellKnownType.UInt64, false, true);
@@ -820,7 +820,7 @@ namespace Internal.IL
ImportStoreIndirect(WellKnownType.IntPtr);
break;
case ILOpcode.conv_u:
- ImportConvert(WellKnownType.UIntPtr, false, false);
+ ImportConvert(WellKnownType.UIntPtr, false, true);
break;
case ILOpcode.prefix1:
opCode = (ILOpcode)(0x100 + ReadILByte());
diff --git a/src/coreclr/tools/Common/TypeSystem/IL/Stubs/ComparerIntrinsics.cs b/src/coreclr/tools/Common/TypeSystem/IL/Stubs/ComparerIntrinsics.cs
index 8f6cd67f9a6..d7c4d73c75d 100644
--- a/src/coreclr/tools/Common/TypeSystem/IL/Stubs/ComparerIntrinsics.cs
+++ b/src/coreclr/tools/Common/TypeSystem/IL/Stubs/ComparerIntrinsics.cs
@@ -234,5 +234,118 @@ namespace Internal.IL.Stubs
return false;
}
+
+ public static bool CanCompareValueTypeBits(MetadataType type, MethodDesc objectEqualsMethod)
+ {
+ Debug.Assert(type.IsValueType);
+
+ if (type.ContainsGCPointers)
+ return false;
+
+ if (type.IsGenericDefinition)
+ return false;
+
+ OverlappingFieldTracker overlappingFieldTracker = new OverlappingFieldTracker(type);
+
+ bool result = true;
+ foreach (var field in type.GetFields())
+ {
+ if (field.IsStatic)
+ continue;
+
+ if (!overlappingFieldTracker.TrackField(field))
+ {
+ // This field overlaps with another field - can't compare memory
+ result = false;
+ break;
+ }
+
+ TypeDesc fieldType = field.FieldType;
+ if (fieldType.IsPrimitive || fieldType.IsEnum || fieldType.IsPointer || fieldType.IsFunctionPointer)
+ {
+ TypeFlags category = fieldType.UnderlyingType.Category;
+ if (category == TypeFlags.Single || category == TypeFlags.Double)
+ {
+ // Double/Single have weird behaviors around negative/positive zero
+ result = false;
+ break;
+ }
+ }
+ else
+ {
+ // Would be a suprise if this wasn't a valuetype. We checked ContainsGCPointers above.
+ Debug.Assert(fieldType.IsValueType);
+
+ // If the field overrides Equals, we can't use the fast helper because we need to call the method.
+ if (fieldType.FindVirtualFunctionTargetMethodOnObjectType(objectEqualsMethod).OwningType == fieldType)
+ {
+ result = false;
+ break;
+ }
+
+ if (!CanCompareValueTypeBits((MetadataType)fieldType, objectEqualsMethod))
+ {
+ result = false;
+ break;
+ }
+ }
+ }
+
+ // If there are gaps, we can't memcompare
+ if (result && overlappingFieldTracker.HasGaps)
+ result = false;
+
+ return result;
+ }
+
+ private struct OverlappingFieldTracker
+ {
+ private bool[] _usedBytes;
+
+ public OverlappingFieldTracker(MetadataType type)
+ {
+ _usedBytes = new bool[type.InstanceFieldSize.AsInt];
+ }
+
+ public bool TrackField(FieldDesc field)
+ {
+ int fieldBegin = field.Offset.AsInt;
+
+ TypeDesc fieldType = field.FieldType;
+
+ int fieldEnd;
+ if (fieldType.IsPointer || fieldType.IsFunctionPointer)
+ {
+ fieldEnd = fieldBegin + field.Context.Target.PointerSize;
+ }
+ else
+ {
+ Debug.Assert(fieldType.IsValueType);
+ fieldEnd = fieldBegin + ((DefType)fieldType).InstanceFieldSize.AsInt;
+ }
+
+ for (int i = fieldBegin; i < fieldEnd; i++)
+ {
+ if (_usedBytes[i])
+ return false;
+ _usedBytes[i] = true;
+ }
+
+ return true;
+ }
+
+ public bool HasGaps
+ {
+ get
+ {
+ for (int i = 0; i < _usedBytes.Length; i++)
+ if (!_usedBytes[i])
+ return true;
+
+ return false;
+ }
+ }
+ }
+
}
}
diff --git a/src/coreclr/tools/Common/TypeSystem/IL/Stubs/RuntimeHelpersIntrinsics.cs b/src/coreclr/tools/Common/TypeSystem/IL/Stubs/RuntimeHelpersIntrinsics.cs
index b8e1a23ca21..3f444001613 100644
--- a/src/coreclr/tools/Common/TypeSystem/IL/Stubs/RuntimeHelpersIntrinsics.cs
+++ b/src/coreclr/tools/Common/TypeSystem/IL/Stubs/RuntimeHelpersIntrinsics.cs
@@ -75,13 +75,24 @@ namespace Internal.IL.Stubs
result = true;
break;
default:
- var mdType = elementType as MetadataType;
- if (mdType != null && mdType.Name == "Rune" && mdType.Namespace == "System.Text")
- result = true;
- else if (mdType != null && mdType.Name == "Char8" && mdType.Namespace == "System")
- result = true;
- else
- result = false;
+ result = false;
+ if (elementType is MetadataType mdType)
+ {
+ if (mdType.Module == mdType.Context.SystemModule &&
+ mdType.Namespace == "System.Text" &&
+ mdType.Name == "Rune")
+ {
+ result = true;
+ }
+ else if (mdType.IsValueType && !ComparerIntrinsics.ImplementsIEquatable(mdType.GetTypeDefinition()))
+ {
+ // Value type that can use memcmp and that doesn't override object.Equals or implement IEquatable<T>.Equals.
+ MethodDesc objectEquals = mdType.Context.GetWellKnownType(WellKnownType.Object).GetMethod("Equals", null);
+ result =
+ mdType.FindVirtualFunctionTargetMethodOnObjectType(objectEquals).OwningType != mdType &&
+ ComparerIntrinsics.CanCompareValueTypeBits(mdType, objectEquals);
+ }
+ }
break;
}
}
diff --git a/src/coreclr/tools/SuperFileCheck/Program.cs b/src/coreclr/tools/SuperFileCheck/Program.cs
new file mode 100644
index 00000000000..79b5d1548b1
--- /dev/null
+++ b/src/coreclr/tools/SuperFileCheck/Program.cs
@@ -0,0 +1,760 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Text;
+using System.Diagnostics;
+using System.Runtime.InteropServices;
+using Microsoft.CodeAnalysis;
+using Microsoft.CodeAnalysis.Text;
+using Microsoft.CodeAnalysis.CSharp;
+using Microsoft.CodeAnalysis.CSharp.Syntax;
+
+namespace SuperFileCheck
+{
+ internal readonly record struct MethodDeclarationInfo(MethodDeclarationSyntax Syntax, string FullyQualifiedName);
+
+ internal readonly record struct FileCheckResult(int ExitCode, string StandardOutput, string StandardError);
+
+ internal class SuperFileCheckException : Exception
+ {
+ public SuperFileCheckException(string message): base(message) { }
+ }
+
+ internal class Program
+ {
+ const string CommandLineArgumentCSharp = "--csharp";
+ const string CommandLineArgumentCSharpListMethodNames = "--csharp-list-method-names";
+ const string CommandLineCheckPrefixes = "--check-prefixes";
+ const string CommandLineCheckPrefixesEqual = "--check-prefixes=";
+ const string CommandLineInputFile = "--input-file";
+ const string SyntaxDirectiveFullLine = "-FULL-LINE:";
+ const string SyntaxDirectiveFullLineNext = "-FULL-LINE-NEXT:";
+
+ static string FileCheckPath;
+
+ static Program()
+ {
+ // Determine the location of LLVM FileCheck.
+ // We first look through the "runtimes" directory relative to
+ // the location of SuperFileCheck to find FileCheck.
+ // If it cannot find it, then we assume FileCheck
+ // is in the same directory as SuperFileCheck.
+ var superFileCheckPath = typeof(Program).Assembly.Location;
+ if (String.IsNullOrEmpty(superFileCheckPath))
+ {
+ throw new SuperFileCheckException("Invalid SuperFileCheck path.");
+ }
+ var superFileCheckDir = Path.GetDirectoryName(superFileCheckPath);
+ if (superFileCheckDir != null)
+ {
+ var fileCheckPath =
+ Directory.EnumerateFiles(Path.Combine(superFileCheckDir, "runtimes/"), "FileCheck*", SearchOption.AllDirectories)
+ .FirstOrDefault();
+ if (fileCheckPath != null)
+ {
+ FileCheckPath = fileCheckPath;
+ }
+ else
+ {
+ FileCheckPath = Path.Combine(superFileCheckDir, "FileCheck");
+ }
+ }
+ else
+ {
+ FileCheckPath = "FileCheck";
+ }
+ }
+
+ /// <summary>
+ /// Checks if the given string contains LLVM "<prefix>" directives, such as "<prefix>:", "<prefix>-LABEL:", etc..
+ /// </summary>
+ static bool ContainsCheckPrefixes(string str, string[] checkPrefixes)
+ {
+ // LABEL, NOT, SAME, etc. are from LLVM FileCheck https://llvm.org/docs/CommandGuide/FileCheck.html
+
+ // FULL-LINE and FULL-LINE-NEXT are not part of LLVM FileCheck - they are new syntax directives for SuperFileCheck to be able to
+ // match a single full-line, similar to that of LLVM FileCheck's --match-full-lines option.
+
+ var pattern = $"({String.Join('|', checkPrefixes)})+?({{LITERAL}})?(:|-LABEL:|-NEXT:|-NOT:|-SAME:|-EMPTY:|-COUNT:|-DAG:|{SyntaxDirectiveFullLine}|{SyntaxDirectiveFullLineNext})";
+ var regex = new System.Text.RegularExpressions.Regex(pattern);
+ return regex.Count(str) > 0;
+ }
+
+ /// <summary>
+ /// Runs LLVM's FileCheck executable.
+ /// Will always redirect standard error and output.
+ /// </summary>
+ static async Task<FileCheckResult> RunLLVMFileCheckAsync(string[] args)
+ {
+ var startInfo = new ProcessStartInfo();
+ startInfo.FileName = FileCheckPath;
+ startInfo.Arguments = String.Join(' ', args);
+ startInfo.CreateNoWindow = true;
+ startInfo.WindowStyle = ProcessWindowStyle.Hidden;
+ startInfo.RedirectStandardOutput = true;
+ startInfo.RedirectStandardError = true;
+
+ try
+ {
+ using (AutoResetEvent outputWaitHandle = new AutoResetEvent(false))
+ using (AutoResetEvent errorWaitHandle = new AutoResetEvent(false))
+ using (var proc = Process.Start(startInfo))
+ {
+ if (proc == null)
+ {
+ return new FileCheckResult(1, String.Empty, String.Empty);
+ }
+
+ var stdOut = new StringBuilder();
+ var stdErr = new StringBuilder();
+
+ proc.OutputDataReceived += (_, e) =>
+ {
+ if (e.Data == null)
+ {
+ outputWaitHandle.Set();
+ }
+ else
+ {
+ stdOut.AppendLine(e.Data);
+ }
+ };
+
+ proc.ErrorDataReceived += (_, e) =>
+ {
+ if (e.Data == null)
+ {
+ errorWaitHandle.Set();
+ }
+ else
+ {
+ stdErr.AppendLine(e.Data);
+ }
+ };
+
+ proc.BeginOutputReadLine();
+ proc.BeginErrorReadLine();
+
+ await proc.WaitForExitAsync();
+ outputWaitHandle.WaitOne();
+ errorWaitHandle.WaitOne();
+
+ var exitCode = proc.ExitCode;
+ return new FileCheckResult(exitCode, stdOut.ToString(), stdErr.ToString());
+ }
+ }
+ catch (Exception ex)
+ {
+ return new FileCheckResult(1, String.Empty, ex.Message);
+ }
+ }
+
+ /// <summary>
+ /// Get the method name from the method declaration.
+ /// </summary>
+ static string GetMethodName(MethodDeclarationSyntax methodDecl)
+ {
+ var methodName = methodDecl.Identifier.ValueText;
+
+ var typeArity = methodDecl.TypeParameterList?.ChildNodes().Count();
+ if (typeArity > 0)
+ {
+ methodName = $"{methodName}[*]";
+ }
+
+ return $"{methodName}(*)";
+ }
+
+ /// <summary>
+ /// Get the enclosing type declaration syntax of the given node.
+ /// Errors if it cannot find one.
+ /// </summary>
+ static TypeDeclarationSyntax GetEnclosingTypeDeclaration(SyntaxNode node)
+ {
+ var typeDecl = node.Ancestors().OfType<TypeDeclarationSyntax>().FirstOrDefault();
+ if (typeDecl == null)
+ {
+ throw new SuperFileCheckException($"Unable to find enclosing type declaration on: {node.Span}");
+ }
+ return typeDecl;
+ }
+
+ /// <summary>
+ /// Get all the acestoral enclosing type declaration syntaxes of the given node.
+ /// </summary>
+ static TypeDeclarationSyntax[] GetEnclosingTypeDeclarations(SyntaxNode node)
+ {
+ return node.Ancestors().OfType<TypeDeclarationSyntax>().ToArray();
+ }
+
+ /// <summary>
+ /// Try to get an enclosing type name from the given syntax node.
+ /// </summary>
+ static string GetTypeName(TypeDeclarationSyntax typeDecl)
+ {
+ var typeName = typeDecl.Identifier.ValueText;
+
+ var typeArity = typeDecl.TypeParameterList?.ChildNodes().Count();
+ if (typeArity > 0)
+ {
+ typeName = $"{typeName}`{typeArity}[*]";
+ }
+
+ return typeName;
+ }
+
+ /// <summary>
+ /// Get the method's fully qualified enclosing namespace and type name.
+ /// </summary>
+ static string GetFullyQualifiedEnclosingTypeName(MethodDeclarationSyntax methodDecl)
+ {
+ var qualifiedTypeName = String.Empty;
+
+ var typeDecl = GetEnclosingTypeDeclaration(methodDecl);
+ qualifiedTypeName = GetTypeName(typeDecl);
+
+ var typeDecls = GetEnclosingTypeDeclarations(typeDecl);
+ for (var i = 0; i < typeDecls.Length; i++)
+ {
+ typeDecl = typeDecls[i];
+ qualifiedTypeName = $"{GetTypeName(typeDecl)}+{qualifiedTypeName}";
+ }
+
+ var namespaceDecl = typeDecl.Ancestors().OfType<NamespaceDeclarationSyntax>().FirstOrDefault();
+ if (namespaceDecl != null)
+ {
+ var identifiers =
+ namespaceDecl.DescendantTokens().Where(x => x.IsKind(SyntaxKind.IdentifierToken)).Select(x => x.ValueText);
+ return $"{String.Join(".", identifiers)}.{qualifiedTypeName}";
+ }
+
+ return qualifiedTypeName;
+ }
+
+ /// <summary>
+ /// Get all the descendant single line comment trivia items.
+ /// </summary>
+ static IEnumerable<SyntaxTrivia> GetDescendantSingleLineCommentTrivia(SyntaxNode node)
+ {
+ return
+ node
+ .DescendantTrivia()
+ .Where(x => x.IsKind(SyntaxKind.SingleLineCommentTrivia));
+ }
+
+ /// <summary>
+ /// Gather all syntactical method declarations whose body contains
+ /// FileCheck syntax.
+ /// </summary>
+ static MethodDeclarationInfo[] FindMethodsByFile(string filePath, string[] checkPrefixes)
+ {
+ var syntaxTree = CSharpSyntaxTree.ParseText(SourceText.From(File.ReadAllText(filePath)));
+ var root = syntaxTree.GetRoot();
+
+ var trivia =
+ GetDescendantSingleLineCommentTrivia(root)
+ .Where(x =>
+ {
+ if (x.Token.Parent == null)
+ {
+ return true;
+ }
+
+ // A comment before the method declaration is considered a child of the method
+ // declaration. In this example:
+ //
+ // // trivia1
+ // public void M()
+ // {
+ // // trivia2
+ // }
+ //
+ // Both // trivia1 and // trivia2 are descendants of MethodDeclarationSyntax.
+ //
+ // We are only allowing checks to occur in 'trivia2'. The 'Contains' check is
+ // used to find 'trivia1'.
+ return !x.Token.Parent.Ancestors().Any(p => p.IsKind(SyntaxKind.MethodDeclaration) && p.Span.Contains(x.Span));
+ })
+ .Where(x => ContainsCheckPrefixes(x.ToString(), checkPrefixes))
+ .ToArray();
+
+ if (trivia.Length > 0)
+ {
+ throw new SuperFileCheckException("FileCheck syntax not allowed outside of a method.");
+ }
+
+ return
+ root
+ .DescendantNodes()
+ .OfType<MethodDeclarationSyntax>()
+ .Where(x => ContainsCheckPrefixes(x.ToString(), checkPrefixes))
+ .Select(x => new MethodDeclarationInfo(x, $"{GetFullyQualifiedEnclosingTypeName(x)}:{GetMethodName(x)}"))
+ .ToArray();
+ }
+
+ /// <summary>
+ /// Helper to expand FileCheck syntax.
+ /// </summary>
+ static string? TryTransformDirective(string lineStr, string[] checkPrefixes, string syntaxDirective, string transformSuffix)
+ {
+ var index = lineStr.IndexOf(syntaxDirective);
+ if (index == -1)
+ {
+ return null;
+ }
+
+ var prefix = lineStr.Substring(0, index);
+
+ // Do not transform if the prefix is not part of --check-prefixes.
+ if (!checkPrefixes.Any(x => prefix.EndsWith(x)))
+ {
+ return null;
+ }
+
+ return lineStr.Substring(0, index) + $"{transformSuffix}: {{{{^ *}}}}" + lineStr.Substring(index + syntaxDirective.Length) + "{{$}}";
+ }
+
+ /// <summary>
+ /// Will try to transform a line containing custom SuperFileCheck syntax, e.g. "CHECK-FULL-LINE:"
+ /// to the appropriate FileCheck syntax.
+ /// </summary>
+ static string TransformLine(TextLine line, string[] checkPrefixes)
+ {
+ var text = line.Text;
+ if (text == null)
+ {
+ throw new InvalidOperationException("SourceText is null.");
+ }
+
+ var lineStr = text.ToString(line.Span);
+
+ var result = TryTransformDirective(lineStr, checkPrefixes, SyntaxDirectiveFullLine, String.Empty);
+ if (result != null)
+ {
+ return result;
+ }
+
+ result = TryTransformDirective(lineStr, checkPrefixes, SyntaxDirectiveFullLineNext, "-NEXT");
+
+ return result ?? lineStr;
+ }
+
+ /// <summary>
+ /// Will try to transform a method containing custom SuperFileCheck syntax, e.g. "CHECK-FULL-LINE:"
+ /// to the appropriate FileCheck syntax.
+ /// </summary>
+ static string TransformMethod(MethodDeclarationSyntax methodDecl, string[] checkPrefixes)
+ {
+ return String.Join(Environment.NewLine, methodDecl.GetText().Lines.Select(x => TransformLine(x, checkPrefixes)));
+ }
+
+ /// <summary>
+ /// Gets the starting line number of the method declaration.
+ /// </summary>
+ static int GetMethodStartingLineNumber(MethodDeclarationSyntax methodDecl)
+ {
+ var leadingTrivia = methodDecl.GetLeadingTrivia();
+ if (leadingTrivia.Count == 0)
+ {
+ return methodDecl.GetLocation().GetLineSpan().StartLinePosition.Line;
+ }
+ else
+ {
+ return leadingTrivia[0].GetLocation().GetLineSpan().StartLinePosition.Line;
+ }
+ }
+
+ /// <summary>
+ /// Returns only the method declaration text along with any SuperFileCheck transformations.
+ /// </summary>
+ static string PreProcessMethod(MethodDeclarationInfo methodDeclInfo, string[] checkPrefixes)
+ {
+ var methodDecl = methodDeclInfo.Syntax;
+ var methodName = methodDeclInfo.FullyQualifiedName.Replace("*", "{{.*}}"); // Change wild-card to FileCheck wild-card syntax.
+
+ // Create anchors from the first prefix.
+ var startAnchorText = $"// {checkPrefixes[0]}-LABEL: {methodName}";
+ var endAnchorText = $"// {checkPrefixes[0]}: {methodName}";
+
+ // Create temp source file based on the source text of the method.
+ // Newlines are added to pad the text so FileCheck's error messages will correspond
+ // to the correct line and column of the original source file.
+ // This is not perfect but will work for most cases.
+ var lineNumber = GetMethodStartingLineNumber(methodDecl);
+ var tmpSrc = new StringBuilder();
+ for (var i = 1; i < lineNumber; i++)
+ {
+ tmpSrc.AppendLine(String.Empty);
+ }
+ tmpSrc.AppendLine(startAnchorText);
+ tmpSrc.AppendLine(TransformMethod(methodDecl, checkPrefixes));
+ tmpSrc.AppendLine(endAnchorText);
+
+ return tmpSrc.ToString();
+ }
+
+ /// <summary>
+ /// Runs SuperFileCheck logic.
+ /// </summary>
+
+ static async Task<FileCheckResult> RunSuperFileCheckAsync(MethodDeclarationInfo methodDeclInfo, string[] args, string[] checkPrefixes, string tmpFilePath)
+ {
+ File.WriteAllText(tmpFilePath, PreProcessMethod(methodDeclInfo, checkPrefixes));
+
+ try
+ {
+ args[0] = tmpFilePath;
+ return await RunLLVMFileCheckAsync(args);
+ }
+ finally
+ {
+ try { File.Delete(tmpFilePath); } catch { }
+ }
+ }
+
+ /// <summary>
+ /// Checks if the argument is --csharp.
+ /// </summary>
+ static bool IsArgumentCSharp(string arg)
+ {
+ return arg.Equals(CommandLineArgumentCSharp);
+ }
+
+ /// <summary>
+ /// Checks if the argument is --csharp-list-method-names.
+ /// </summary>
+ static bool IsArgumentCSharpListMethodNames(string arg)
+ {
+ return arg.Equals(CommandLineArgumentCSharpListMethodNames);
+ }
+
+ /// <summary>
+ /// Checks if the argument contains -h.
+ /// </summary>
+ static bool ArgumentsContainHelp(string[] args)
+ {
+ return args.Any(x => x.Contains("-h"));
+ }
+
+ /// <summary>
+ /// From the given arguments, find the first --check-prefixes argument and parse its value
+ /// in the form of an array.
+ /// </summary>
+ static string[] ParseCheckPrefixes(string[] args)
+ {
+ var checkPrefixesArg = args.FirstOrDefault(x => x.StartsWith(CommandLineCheckPrefixesEqual));
+ if (checkPrefixesArg == null)
+ {
+ return new string[] { };
+ }
+
+ return
+ checkPrefixesArg
+ .Replace(CommandLineCheckPrefixesEqual, "")
+ .Split(",")
+ .Where(x => !String.IsNullOrWhiteSpace(x))
+ .ToArray();
+ }
+
+ /// <summary>
+ /// Will always return one or more prefixes.
+ /// </summary>
+ static string[] DetermineCheckPrefixes(string[] args)
+ {
+ var checkPrefixes = ParseCheckPrefixes(args);
+ if (checkPrefixes.Length == 0)
+ {
+ // FileCheck's default.
+ return new string[] { "CHECK" };
+ }
+
+ return checkPrefixes;
+ }
+
+ /// <summary>
+ /// Prints error expecting a CSharp file.
+ /// </summary>
+ static void PrintErrorExpectedCSharpFile()
+ {
+ Console.ForegroundColor = ConsoleColor.Red;
+ Console.Error.WriteLine("Expected C# file.");
+ Console.ResetColor();
+ }
+
+ /// <summary>
+ /// Prints error indicating a duplicate method name was found.
+ /// </summary>
+ static void PrintErrorDuplicateMethodName(string methodName)
+ {
+ Console.ForegroundColor = ConsoleColor.Red;
+ Console.Error.WriteLine($"Duplicate method name found: {methodName}");
+ Console.ResetColor();
+ }
+
+ /// <summary>
+ /// Prints error indicating the method was not marked with attribute 'MethodImpl(MethodImplOptions.NoInlining)'.
+ /// </summary>
+ static void PrintErrorMethodNoInlining(string methodName)
+ {
+ Console.ForegroundColor = ConsoleColor.Red;
+ Console.Error.WriteLine($"'{methodName}' is not marked with attribute 'MethodImpl(MethodImplOptions.NoInlining)'.");
+ Console.ResetColor();
+ }
+
+ /// <summary>
+ /// Prints error indicating that no methods were found to have any FileCheck syntax
+ /// of the given --check-prefixes.
+ /// </summary>
+ static void PrintErrorNoMethodsFound(string[] checkPrefixes)
+ {
+ Console.ForegroundColor = ConsoleColor.Red;
+ Console.Error.WriteLine("No methods were found. Check if any method bodies are using one or more of the following FileCheck prefixes:");
+ foreach (var prefix in checkPrefixes)
+ {
+ Console.Error.WriteLine($" {prefix}");
+ }
+ Console.ResetColor();
+ }
+
+ /// <summary>
+ /// Prints error indicating that a --input-file was not found.
+ /// </summary>
+ static void PrintErrorNoInputFileFound()
+ {
+ Console.ForegroundColor = ConsoleColor.Red;
+ Console.Error.WriteLine($"{CommandLineInputFile} is required.");
+ Console.ResetColor();
+ }
+
+ /// <summary>
+ /// Prints command line help.
+ /// </summary>
+ static void PrintHelp()
+ {
+ Console.Write(Environment.NewLine);
+ Console.WriteLine("USAGE: SuperFileCheck [options] <check-file>");
+ Console.WriteLine("USAGE: SuperFileCheck <super-option> <check-file> [options]");
+ Console.Write(Environment.NewLine);
+ Console.WriteLine("SUPER OPTIONS:");
+ Console.Write(Environment.NewLine);
+ Console.WriteLine($" --csharp - A {CommandLineInputFile} is required.");
+ Console.WriteLine($" <check-file> must be a C# source file.");
+ Console.WriteLine($" Methods must not have duplicate names.");
+ Console.WriteLine($" Methods must be marked as not inlining.");
+ Console.WriteLine($" One or more methods are required.");
+ Console.WriteLine($" Prefixes are determined by {CommandLineCheckPrefixes}.");
+ Console.WriteLine($" --csharp-list-method-names - Print a space-delimited list of method names to be");
+ Console.WriteLine($" supplied to environment variable DOTNET_JitDisasm.");
+ Console.WriteLine($" <check-file> must be a C# source file.");
+ Console.WriteLine($" Methods must not have duplicate names.");
+ Console.WriteLine($" Methods must be marked as not inlining.");
+ Console.WriteLine($" Prints nothing if no methods are found.");
+ Console.WriteLine($" Prefixes are determined by {CommandLineCheckPrefixes}.");
+ }
+
+ /// <summary>
+ /// Try to find the first duplicate method name of the given method declarations.
+ /// </summary>
+ static string? TryFindDuplicateMethodName(MethodDeclarationInfo[] methodDeclInfos)
+ {
+ var set = new HashSet<string>();
+
+ var duplicateMethodDeclInfo =
+ methodDeclInfos.FirstOrDefault(x => !set.Add(x.FullyQualifiedName));
+
+ return duplicateMethodDeclInfo.FullyQualifiedName;
+ }
+
+ /// <summary>
+ /// Is the method marked with MethodImpl(MethodImplOptions.NoInlining)?
+ /// </summary>
+ static bool MethodHasNoInlining(MethodDeclarationSyntax methodDecl)
+ {
+ return methodDecl.AttributeLists.ToString().Contains("MethodImplOptions.NoInlining");
+ }
+
+ /// <summary>
+ /// Will print an error if any duplicate method names are found.
+ /// </summary>
+ static bool CheckDuplicateMethodNames(MethodDeclarationInfo[] methodDeclInfos)
+ {
+ var duplicateMethodName = TryFindDuplicateMethodName(methodDeclInfos);
+ if (duplicateMethodName != null)
+ {
+ PrintErrorDuplicateMethodName(duplicateMethodName);
+ return false;
+ }
+
+ return true;
+ }
+
+ /// <summary>
+ /// Will print an error if the methods containing FileCheck syntax
+ /// is not marked with the attribute 'MethodImpl(MethodImplOptions.NoInlining)'.
+ /// </summary>
+ static bool CheckMethodsHaveNoInlining(MethodDeclarationInfo[] methodDeclInfos)
+ {
+ return
+ methodDeclInfos
+ .All(methodDeclInfo =>
+ {
+ if (!MethodHasNoInlining(methodDeclInfo.Syntax))
+ {
+ PrintErrorMethodNoInlining(methodDeclInfo.FullyQualifiedName);
+ return false;
+ }
+
+ return true;
+ });
+ }
+
+ /// <summary>
+ /// The goal of SuperFileCheck is to make writing LLVM FileCheck tests against the
+ /// NET Core Runtime easier in C#.
+ /// </summary>
+ static async Task<int> Main(string[] args)
+ {
+ if (args.Length >= 1)
+ {
+ if (IsArgumentCSharpListMethodNames(args[0]))
+ {
+ if (args.Length == 1)
+ {
+ PrintErrorExpectedCSharpFile();
+ return 1;
+ }
+
+ var checkPrefixes = DetermineCheckPrefixes(args);
+ try
+ {
+ var methodDeclInfos = FindMethodsByFile(args[1], checkPrefixes);
+
+ if (methodDeclInfos.Length == 0)
+ {
+ return 0;
+ }
+
+ if (!CheckDuplicateMethodNames(methodDeclInfos))
+ {
+ return 1;
+ }
+
+ Console.Write(String.Join(' ', methodDeclInfos.Select(x => x.FullyQualifiedName)));
+ return 0;
+ }
+ catch(Exception ex)
+ {
+ Console.ForegroundColor = ConsoleColor.Red;
+ Console.WriteLine(ex.Message);
+ Console.ResetColor();
+ return 1;
+ }
+ }
+
+ if (IsArgumentCSharp(args[0]))
+ {
+ if (args.Length == 1)
+ {
+ PrintErrorExpectedCSharpFile();
+ return 1;
+ }
+
+ var checkFilePath = args[1];
+ var checkFileNameNoExt = Path.GetFileNameWithoutExtension(checkFilePath);
+
+ var hasInputFile = args.Any(x => x.Equals(CommandLineInputFile));
+ if (!hasInputFile)
+ {
+ PrintErrorNoInputFileFound();
+ return 1;
+ }
+
+ var checkPrefixes = DetermineCheckPrefixes(args);
+ try
+ {
+ var methodDeclInfos = FindMethodsByFile(checkFilePath, checkPrefixes);
+
+ if (!CheckDuplicateMethodNames(methodDeclInfos))
+ {
+ return 1;
+ }
+
+ if (!CheckMethodsHaveNoInlining(methodDeclInfos))
+ {
+ return 1;
+ }
+
+ if (methodDeclInfos.Length > 0)
+ {
+ var didSucceed = true;
+
+ var tasks = new Task<FileCheckResult>[methodDeclInfos.Length];
+
+ // Remove the first 'csharp' argument so we can pass the rest of the args
+ // to LLVM FileCheck.
+ var argsToCopy = args.AsSpan(1).ToArray();
+
+ for (int i = 0; i < methodDeclInfos.Length; i++)
+ {
+ var index = i;
+ var tmpFileName = $"__tmp{index}_{checkFileNameNoExt}.cs";
+ var tmpDirName = Path.GetDirectoryName(checkFilePath);
+ string tmpFilePath;
+ if (String.IsNullOrWhiteSpace(tmpDirName))
+ {
+ tmpFilePath = tmpFileName;
+ }
+ else
+ {
+ tmpFilePath = Path.Combine(tmpDirName, tmpFileName);
+ }
+ tasks[i] = Task.Run(() => RunSuperFileCheckAsync(methodDeclInfos[index], argsToCopy.ToArray(), checkPrefixes, tmpFilePath));
+ }
+
+ await Task.WhenAll(tasks);
+
+ foreach (var x in tasks)
+ {
+ if (x.Result.ExitCode != 0)
+ {
+ didSucceed = false;
+ }
+ Console.Write(x.Result.StandardOutput);
+ Console.ForegroundColor = ConsoleColor.Red;
+ Console.Error.Write(x.Result.StandardError);
+ Console.ResetColor();
+ }
+
+ return didSucceed ? 0 : 1;
+ }
+ else
+ {
+ PrintErrorNoMethodsFound(checkPrefixes);
+ return 1;
+ }
+ }
+ catch (Exception ex)
+ {
+ Console.ForegroundColor = ConsoleColor.Red;
+ Console.WriteLine(ex.Message);
+ Console.ResetColor();
+ return 1;
+ }
+ }
+ }
+
+ var result = await RunLLVMFileCheckAsync(args);
+ Console.Write(result.StandardOutput);
+
+ if (ArgumentsContainHelp(args))
+ {
+ PrintHelp();
+ }
+
+ Console.ForegroundColor = ConsoleColor.Red;
+ Console.Error.Write(result.StandardError);
+ Console.ResetColor();
+ return result.ExitCode;
+ }
+ }
+}
diff --git a/src/coreclr/tools/SuperFileCheck/SuperFileCheck.csproj b/src/coreclr/tools/SuperFileCheck/SuperFileCheck.csproj
new file mode 100644
index 00000000000..f4825414cee
--- /dev/null
+++ b/src/coreclr/tools/SuperFileCheck/SuperFileCheck.csproj
@@ -0,0 +1,51 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyName>SuperFileCheck</AssemblyName>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
+ <AppendTargetFrameworkToOutputPath Condition="'$(BuildingInsideVisualStudio)' == 'true'">true</AppendTargetFrameworkToOutputPath>
+ <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
+ <EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
+ <ImplicitUsings>enable</ImplicitUsings>
+ <Nullable>enable</Nullable>
+ <OutputPath>$(RuntimeBinDir)\SuperFileCheck</OutputPath>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <!-- Massage the OutputRid into an JITTools package RID that we can download -->
+ <_jitToolsRidPlatformIndex>$(OutputRid.LastIndexOf('-'))</_jitToolsRidPlatformIndex>
+ <JITToolsRidWithoutPlatform>$(OutputRid.Substring(0, $(_jitToolsRidPlatformIndex)))</JITToolsRidWithoutPlatform>
+ <JITToolsRidPlatform>$(OutputRid.Substring($(_jitToolsRidPlatformIndex)).TrimStart('-'))</JITToolsRidPlatform>
+
+ <!-- If it's not win/osx/linux-musl, it's a non-portable Linux. Treat as Linux. -->
+ <JITToolsRidWithoutPlatform Condition="'$(JITToolsRidWithoutPlatform)' != 'win' and '$(JITToolsRidWithoutPlatform)' != 'osx' and '$(JITToolsRidWithoutPlatform)' != 'linux-musl'">linux</JITToolsRidWithoutPlatform>
+
+ <!-- OSX builds have a version -->
+ <JITToolsRidWithoutPlatform Condition="'$(JITToolsRidWithoutPlatform)' == 'osx' and '$(JITToolsRidPlatform)' == 'x64'">osx.10.12</JITToolsRidWithoutPlatform>
+ <JITToolsRidWithoutPlatform Condition="'$(JITToolsRidWithoutPlatform)' == 'osx' and '$(JITToolsRidPlatform)' == 'arm64'">osx.11.0</JITToolsRidWithoutPlatform>
+
+ <!-- There are no x86 packages, so use x64 -->
+ <JITToolsRidPlatform Condition="'$(JITToolsRidPlatform)' == 'x86'">x64</JITToolsRidPlatform>
+ <JITToolsRidPlatform Condition="'$(JITToolsRidPlatform)' == 'arm' and '$(JITToolsRidWithoutPlatform)' == 'win'">arm64</JITToolsRidPlatform>
+ <JITToolsRid Condition="'$(JITToolsRid)' == ''">$(JITToolsRidWithoutPlatform)-$(JITToolsRidPlatform)</JITToolsRid>
+
+ <JITToolsVersion Condition="'$(JITToolsVersion)' == '' and '$(JITToolsRid)' == 'linux-arm64'">$(runtimelinuxarm64MicrosoftNETCoreRuntimeJITToolsVersion)</JITToolsVersion>
+ <JITToolsVersion Condition="'$(JITToolsVersion)' == '' and '$(JITToolsRid)' == 'linux-x64'">$(runtimelinuxx64MicrosoftNETCoreRuntimeJITToolsVersion)</JITToolsVersion>
+ <JITToolsVersion Condition="'$(JITToolsVersion)' == '' and '$(JITToolsRid)' == 'linux-musl-arm64'">$(runtimelinuxmuslarm64MicrosoftNETCoreRuntimeJITToolsVersion)</JITToolsVersion>
+ <JITToolsVersion Condition="'$(JITToolsVersion)' == '' and '$(JITToolsRid)' == 'linux-musl-x64'">$(runtimelinuxmuslx64MicrosoftNETCoreRuntimeJITToolsVersion)</JITToolsVersion>
+ <JITToolsVersion Condition="'$(JITToolsVersion)' == '' and '$(JITToolsRid)' == 'win-arm64'">$(runtimewinarm64MicrosoftNETCoreRuntimeJITToolsVersion)</JITToolsVersion>
+ <JITToolsVersion Condition="'$(JITToolsVersion)' == '' and '$(JITToolsRid)' == 'win-x64'">$(runtimewinx64MicrosoftNETCoreRuntimeJITToolsVersion)</JITToolsVersion>
+ <JITToolsVersion Condition="'$(JITToolsVersion)' == '' and '$(JITToolsRid)' == 'osx.11.0-arm64'">$(runtimeosx110arm64MicrosoftNETCoreRuntimeJITToolsVersion)</JITToolsVersion>
+ <JITToolsVersion Condition="'$(JITToolsVersion)' == '' and '$(JITToolsRid)' == 'osx.10.12-x64'">$(runtimeosx1012x64MicrosoftNETCoreRuntimeJITToolsVersion)</JITToolsVersion>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="$(MicrosoftCodeAnalysisCSharpVersion)" />
+ <PackageReference Include="runtime.$(JITToolsRid).Microsoft.NETCore.Runtime.JIT.Tools">
+ <Version>$(JITToolsVersion)</Version>
+ </PackageReference>
+ </ItemGroup>
+
+</Project>
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler.Tests/DependencyGraphTests.cs b/src/coreclr/tools/aot/ILCompiler.Compiler.Tests/DependencyGraphTests.cs
index 5d7a4ab2eac..b382e3babb8 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler.Tests/DependencyGraphTests.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler.Tests/DependencyGraphTests.cs
@@ -73,7 +73,7 @@ namespace ILCompiler.Compiler.Tests
new FullyBlockedMetadataBlockingPolicy(), new FullyBlockedManifestResourceBlockingPolicy(),
null, new NoStackTraceEmissionPolicy(), new NoDynamicInvokeThunkGenerationPolicy(),
new ILLink.Shared.TrimAnalysis.FlowAnnotations(Logger.Null, ilProvider, compilerGeneratedState), UsageBasedMetadataGenerationOptions.None,
- Logger.Null, Array.Empty<KeyValuePair<string, bool>>(), Array.Empty<string>(), Array.Empty<string>());
+ Logger.Null, Array.Empty<KeyValuePair<string, bool>>(), Array.Empty<string>(), Array.Empty<string>(), Array.Empty<string>());
CompilationBuilder builder = new RyuJitCompilationBuilder(context, compilationGroup)
.UseILProvider(ilProvider);
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilerTypeSystemContext.ValueTypeMethods.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilerTypeSystemContext.ValueTypeMethods.cs
index e4ffab14cd7..1e664b81abb 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilerTypeSystemContext.ValueTypeMethods.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilerTypeSystemContext.ValueTypeMethods.cs
@@ -97,7 +97,8 @@ namespace ILCompiler
if ((flags & Flags.CanCompareValueTypeBitsComputed) == 0)
{
Debug.Assert(Type.IsValueType);
- if (ComputeCanCompareValueTypeBits((MetadataType)Type))
+ MetadataType mdType = (MetadataType)Type;
+ if (ComparerIntrinsics.CanCompareValueTypeBits(mdType, ((CompilerTypeSystemContext)mdType.Context)._objectEqualsMethod))
flags |= Flags.CanCompareValueTypeBits;
flags |= Flags.CanCompareValueTypeBitsComputed;
@@ -112,71 +113,6 @@ namespace ILCompiler
Type = type;
_hashtable = hashtable;
}
-
- private bool ComputeCanCompareValueTypeBits(MetadataType type)
- {
- Debug.Assert(type.IsValueType);
-
- if (type.ContainsGCPointers)
- return false;
-
- if (type.IsGenericDefinition)
- return false;
-
- OverlappingFieldTracker overlappingFieldTracker = new OverlappingFieldTracker(type);
-
- bool result = true;
- foreach (var field in type.GetFields())
- {
- if (field.IsStatic)
- continue;
-
- if (!overlappingFieldTracker.TrackField(field))
- {
- // This field overlaps with another field - can't compare memory
- result = false;
- break;
- }
-
- TypeDesc fieldType = field.FieldType;
- if (fieldType.IsPrimitive || fieldType.IsEnum || fieldType.IsPointer || fieldType.IsFunctionPointer)
- {
- TypeFlags category = fieldType.UnderlyingType.Category;
- if (category == TypeFlags.Single || category == TypeFlags.Double)
- {
- // Double/Single have weird behaviors around negative/positive zero
- result = false;
- break;
- }
- }
- else
- {
- // Would be a suprise if this wasn't a valuetype. We checked ContainsGCPointers above.
- Debug.Assert(fieldType.IsValueType);
-
- MethodDesc objectEqualsMethod = ((CompilerTypeSystemContext)fieldType.Context)._objectEqualsMethod;
-
- // If the field overrides Equals, we can't use the fast helper because we need to call the method.
- if (fieldType.FindVirtualFunctionTargetMethodOnObjectType(objectEqualsMethod).OwningType == fieldType)
- {
- result = false;
- break;
- }
-
- if (!_hashtable.GetOrCreateValue((MetadataType)fieldType).CanCompareValueTypeBits)
- {
- result = false;
- break;
- }
- }
- }
-
- // If there are gaps, we can't memcompare
- if (result && overlappingFieldTracker.HasGaps)
- result = false;
-
- return result;
- }
}
private sealed class TypeStateHashtable : LockFreeReaderHashtable<TypeDesc, TypeState>
@@ -192,54 +128,5 @@ namespace ILCompiler
}
}
private TypeStateHashtable _typeStateHashtable = new TypeStateHashtable();
-
- private struct OverlappingFieldTracker
- {
- private bool[] _usedBytes;
-
- public OverlappingFieldTracker(MetadataType type)
- {
- _usedBytes = new bool[type.InstanceFieldSize.AsInt];
- }
-
- public bool TrackField(FieldDesc field)
- {
- int fieldBegin = field.Offset.AsInt;
-
- TypeDesc fieldType = field.FieldType;
-
- int fieldEnd;
- if (fieldType.IsPointer || fieldType.IsFunctionPointer)
- {
- fieldEnd = fieldBegin + field.Context.Target.PointerSize;
- }
- else
- {
- Debug.Assert(fieldType.IsValueType);
- fieldEnd = fieldBegin + ((DefType)fieldType).InstanceFieldSize.AsInt;
- }
-
- for (int i = fieldBegin; i < fieldEnd; i++)
- {
- if (_usedBytes[i])
- return false;
- _usedBytes[i] = true;
- }
-
- return true;
- }
-
- public bool HasGaps
- {
- get
- {
- for (int i = 0; i < _usedBytes.Length; i++)
- if (!_usedBytes[i])
- return true;
-
- return false;
- }
- }
- }
}
}
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ConstructedEETypeNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ConstructedEETypeNode.cs
index 01205d68e86..6d734d92ee6 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ConstructedEETypeNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ConstructedEETypeNode.cs
@@ -38,7 +38,8 @@ namespace ILCompiler.DependencyAnalysis
if (MightHaveInterfaceDispatchMap(factory))
{
- dependencyList.Add(factory.InterfaceDispatchMap(_type), "Interface dispatch map");
+ TypeDesc canonType = _type.ConvertToCanonForm(CanonicalFormKind.Specific);
+ dependencyList.Add(factory.InterfaceDispatchMap(canonType), "Interface dispatch map");
}
if (_type.IsArray)
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/EETypeNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/EETypeNode.cs
index aaad8059bbb..e159318beca 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/EETypeNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/EETypeNode.cs
@@ -128,7 +128,10 @@ namespace ILCompiler.DependencyAnalysis
}
}
- public int MinimumObjectSize => _type.Context.Target.PointerSize * 3;
+ public int MinimumObjectSize => GetMinimumObjectSize(_type.Context);
+
+ public static int GetMinimumObjectSize(TypeSystemContext typeSystemContext)
+ => typeSystemContext.Target.PointerSize * 3;
protected virtual bool EmitVirtualSlotsAndInterfaces => false;
@@ -1053,7 +1056,8 @@ namespace ILCompiler.DependencyAnalysis
{
if (!relocsOnly && MightHaveInterfaceDispatchMap(factory))
{
- _optionalFieldsBuilder.SetFieldValue(EETypeOptionalFieldTag.DispatchMap, checked((uint)factory.InterfaceDispatchMapIndirection(Type).IndexFromBeginningOfArray));
+ TypeDesc canonType = _type.ConvertToCanonForm(CanonicalFormKind.Specific);
+ _optionalFieldsBuilder.SetFieldValue(EETypeOptionalFieldTag.DispatchMap, checked((uint)factory.InterfaceDispatchMapIndirection(canonType).IndexFromBeginningOfArray));
}
ComputeRareFlags(factory, relocsOnly);
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/FrozenObjectNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/FrozenObjectNode.cs
index 7e036c8692c..7a1cf593a6a 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/FrozenObjectNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/FrozenObjectNode.cs
@@ -48,11 +48,20 @@ namespace ILCompiler.DependencyAnalysis
public override void EncodeData(ref ObjectDataBuilder dataBuilder, NodeFactory factory, bool relocsOnly)
{
+ int initialOffset = dataBuilder.CountBytes;
+
// Sync Block
dataBuilder.EmitZeroPointer();
// byte contents
_data.WriteContent(ref dataBuilder, this, factory);
+
+ int objectSize = dataBuilder.CountBytes - initialOffset;
+ int minimumObjectSize = EETypeNode.GetMinimumObjectSize(factory.TypeSystemContext);
+ if (objectSize < minimumObjectSize)
+ {
+ dataBuilder.EmitZeros(minimumObjectSize - objectSize);
+ }
}
protected override string GetName(NodeFactory factory) => this.GetMangledName(factory.NameMangler);
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/FrozenStringNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/FrozenStringNode.cs
index 40765b9b17b..d1978383f23 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/FrozenStringNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/FrozenStringNode.cs
@@ -59,6 +59,8 @@ namespace ILCompiler.DependencyAnalysis
public override void EncodeData(ref ObjectDataBuilder dataBuilder, NodeFactory factory, bool relocsOnly)
{
+ int initialOffset = dataBuilder.CountBytes;
+
dataBuilder.EmitZeroPointer(); // Sync block
dataBuilder.EmitPointerReloc(GetEETypeNode(factory));
@@ -73,6 +75,12 @@ namespace ILCompiler.DependencyAnalysis
// Null-terminate for friendliness with interop
dataBuilder.EmitShort(0);
+ int objectSize = dataBuilder.CountBytes - initialOffset;
+ int minimumObjectSize = EETypeNode.GetMinimumObjectSize(factory.TypeSystemContext);
+ if (objectSize < minimumObjectSize)
+ {
+ dataBuilder.EmitZeros(minimumObjectSize - objectSize);
+ }
}
protected override string GetName(NodeFactory factory) => this.GetMangledName(factory.NameMangler);
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/InterfaceDispatchMapNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/InterfaceDispatchMapNode.cs
index 4390f46cfa9..08fc5523091 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/InterfaceDispatchMapNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/InterfaceDispatchMapNode.cs
@@ -22,6 +22,7 @@ namespace ILCompiler.DependencyAnalysis
// Pointer arrays also follow the same path
Debug.Assert(!type.IsArrayTypeWithoutGenericInterfaces());
Debug.Assert(MightHaveInterfaceDispatchMap(type, factory));
+ Debug.Assert(type.ConvertToCanonForm(CanonicalFormKind.Specific) == type);
_type = type;
}
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/NativeLayoutVertexNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/NativeLayoutVertexNode.cs
index d4afc43b132..b1a50857ce8 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/NativeLayoutVertexNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/NativeLayoutVertexNode.cs
@@ -950,7 +950,8 @@ namespace ILCompiler.DependencyAnalysis
private ISymbolNode GetStaticsNode(NodeFactory context, out BagElementKind staticsBagKind)
{
- ISymbolNode symbol = context.GCStaticEEType(GCPointerMap.FromStaticLayout(_type.GetClosestDefType()));
+ DefType closestCanonDefType = (DefType)_type.GetClosestDefType().ConvertToCanonForm(CanonicalFormKind.Specific);
+ ISymbolNode symbol = context.GCStaticEEType(GCPointerMap.FromStaticLayout(closestCanonDefType));
staticsBagKind = BagElementKind.GcStaticDesc;
return symbol;
@@ -958,7 +959,8 @@ namespace ILCompiler.DependencyAnalysis
private ISymbolNode GetThreadStaticsNode(NodeFactory context, out BagElementKind staticsBagKind)
{
- ISymbolNode symbol = context.GCStaticEEType(GCPointerMap.FromThreadStaticLayout(_type.GetClosestDefType()));
+ DefType closestCanonDefType = (DefType)_type.GetClosestDefType().ConvertToCanonForm(CanonicalFormKind.Specific);
+ ISymbolNode symbol = context.GCStaticEEType(GCPointerMap.FromThreadStaticLayout(closestCanonDefType));
staticsBagKind = BagElementKind.ThreadStaticDesc;
return symbol;
@@ -994,13 +996,14 @@ namespace ILCompiler.DependencyAnalysis
if (!_isUniversalCanon)
{
- if (_type.GetClosestDefType().GCStaticFieldSize.AsInt > 0)
+ DefType closestCanonDefType = (DefType)_type.GetClosestDefType().ConvertToCanonForm(CanonicalFormKind.Specific);
+ if (closestCanonDefType.GCStaticFieldSize.AsInt > 0)
{
BagElementKind ignored;
yield return new DependencyListEntry(GetStaticsNode(context, out ignored), "type gc static info");
}
- if (_type.GetClosestDefType().ThreadGcStaticFieldSize.AsInt > 0)
+ if (closestCanonDefType.ThreadGcStaticFieldSize.AsInt > 0)
{
BagElementKind ignored;
yield return new DependencyListEntry(GetThreadStaticsNode(context, out ignored), "type thread static info");
@@ -1200,24 +1203,24 @@ namespace ILCompiler.DependencyAnalysis
if (!_isUniversalCanon)
{
- DefType closestDefType = _type.GetClosestDefType();
- if (closestDefType.NonGCStaticFieldSize.AsInt != 0)
+ DefType closestCanonDefType = (DefType)_type.GetClosestDefType().ConvertToCanonForm(CanonicalFormKind.Specific);
+ if (closestCanonDefType.NonGCStaticFieldSize.AsInt != 0)
{
- layoutInfo.AppendUnsigned(BagElementKind.NonGcStaticDataSize, checked((uint)closestDefType.NonGCStaticFieldSize.AsInt));
+ layoutInfo.AppendUnsigned(BagElementKind.NonGcStaticDataSize, checked((uint)closestCanonDefType.NonGCStaticFieldSize.AsInt));
}
- if (closestDefType.GCStaticFieldSize.AsInt != 0)
+ if (closestCanonDefType.GCStaticFieldSize.AsInt != 0)
{
- layoutInfo.AppendUnsigned(BagElementKind.GcStaticDataSize, checked((uint)closestDefType.GCStaticFieldSize.AsInt));
+ layoutInfo.AppendUnsigned(BagElementKind.GcStaticDataSize, checked((uint)closestCanonDefType.GCStaticFieldSize.AsInt));
BagElementKind staticDescBagType;
ISymbolNode staticsDescSymbol = GetStaticsNode(factory, out staticDescBagType);
uint gcStaticsSymbolIndex = factory.MetadataManager.NativeLayoutInfo.StaticsReferences.GetIndex(staticsDescSymbol);
layoutInfo.AppendUnsigned(staticDescBagType, gcStaticsSymbolIndex);
}
- if (closestDefType.ThreadGcStaticFieldSize.AsInt != 0)
+ if (closestCanonDefType.ThreadGcStaticFieldSize.AsInt != 0)
{
- layoutInfo.AppendUnsigned(BagElementKind.ThreadStaticDataSize, checked((uint)closestDefType.ThreadGcStaticFieldSize.AsInt));
+ layoutInfo.AppendUnsigned(BagElementKind.ThreadStaticDataSize, checked((uint)closestCanonDefType.ThreadGcStaticFieldSize.AsInt));
BagElementKind threadStaticDescBagType;
ISymbolNode threadStaticsDescSymbol = GetThreadStaticsNode(factory, out threadStaticDescBagType);
uint threadStaticsSymbolIndex = factory.MetadataManager.NativeLayoutInfo.StaticsReferences.GetIndex(threadStaticsDescSymbol);
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ObjectWriter.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ObjectWriter.cs
index fb1f38266fb..c18dc5f39b5 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ObjectWriter.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ObjectWriter.cs
@@ -713,6 +713,18 @@ namespace ILCompiler.DependencyAnalysis
// Internal compiler error
Debug.Assert(false);
}
+
+ if (_targetPlatform.OperatingSystem == TargetOS.OSX)
+ {
+ // Emit a symbol for beginning of the frame. This is workaround for ld64
+ // linker bug which would produce DWARF with incorrect pcStart offsets for
+ // exception handling blocks if there is no symbol present for them.
+ //
+ // To make things simple we just reuse blobSymbolName and change `_lsda`
+ // prefix to `_fram`.
+ "_fram"u8.CopyTo(blobSymbolName);
+ EmitSymbolDef(blobSymbolName);
+ }
}
// Emit individual cfi blob for the given offset
@@ -1272,7 +1284,7 @@ namespace ILCompiler.DependencyAnalysis
break;
case TargetOS.OSX:
vendor = "apple";
- sys = "darwin";
+ sys = "darwin16";
abi = "macho";
break;
case TargetOS.WebAssembly:
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/HardwareIntrinsicHelpers.Aot.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/HardwareIntrinsicHelpers.Aot.cs
index 7105c956162..0bfcca959c2 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/HardwareIntrinsicHelpers.Aot.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/HardwareIntrinsicHelpers.Aot.cs
@@ -101,6 +101,14 @@ namespace ILCompiler
public const int Lzcnt = 0x1000;
public const int AvxVnni = 0x2000;
public const int Movbe = 0x4000;
+ public const int Avx512f = 0x8000;
+ public const int Avx512f_vl = 0x10000;
+ public const int Avx512bw = 0x20000;
+ public const int Avx512bw_vl = 0x40000;
+ public const int Avx512cd = 0x80000;
+ public const int Avx512cd_vl = 0x100000;
+ public const int Avx512dq = 0x200000;
+ public const int Avx512dq_vl = 0x400000;
public static int FromInstructionSet(InstructionSet instructionSet)
{
@@ -140,6 +148,22 @@ namespace ILCompiler
InstructionSet.X64_AVXVNNI_X64 => AvxVnni,
InstructionSet.X64_MOVBE => Movbe,
InstructionSet.X64_MOVBE_X64 => Movbe,
+ InstructionSet.X64_AVX512F => Avx512f,
+ InstructionSet.X64_AVX512F_X64 => Avx512f,
+ InstructionSet.X64_AVX512F_VL => Avx512f_vl,
+ InstructionSet.X64_AVX512F_VL_X64 => Avx512f_vl,
+ InstructionSet.X64_AVX512BW => Avx512bw,
+ InstructionSet.X64_AVX512BW_X64 => Avx512bw,
+ InstructionSet.X64_AVX512BW_VL => Avx512bw_vl,
+ InstructionSet.X64_AVX512BW_VL_X64 => Avx512bw_vl,
+ InstructionSet.X64_AVX512CD => Avx512cd,
+ InstructionSet.X64_AVX512CD_X64 => Avx512cd,
+ InstructionSet.X64_AVX512CD_VL => Avx512cd_vl,
+ InstructionSet.X64_AVX512CD_VL_X64 => Avx512cd_vl,
+ InstructionSet.X64_AVX512DQ => Avx512dq,
+ InstructionSet.X64_AVX512DQ_X64 => Avx512dq,
+ InstructionSet.X64_AVX512DQ_VL => Avx512dq_vl,
+ InstructionSet.X64_AVX512DQ_VL_X64 => Avx512dq_vl,
// SSE and SSE2 are baseline ISAs - they're always available
InstructionSet.X64_SSE => 0,
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/UsageBasedMetadataManager.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/UsageBasedMetadataManager.cs
index b194f265944..f5e9126850d 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/UsageBasedMetadataManager.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/UsageBasedMetadataManager.cs
@@ -79,6 +79,7 @@ namespace ILCompiler
Logger logger,
IEnumerable<KeyValuePair<string, bool>> featureSwitchValues,
IEnumerable<string> rootEntireAssembliesModules,
+ IEnumerable<string> additionalRootedAssemblies,
IEnumerable<string> trimmedAssemblies)
: base(typeSystemContext, blockingPolicy, resourceBlockingPolicy, logFile, stackTracePolicy, invokeThunkGenerationPolicy)
{
@@ -92,6 +93,7 @@ namespace ILCompiler
FeatureSwitches = new Dictionary<string, bool>(featureSwitchValues);
_rootEntireAssembliesModules = new HashSet<string>(rootEntireAssembliesModules);
+ _rootEntireAssembliesModules.UnionWith(additionalRootedAssemblies);
_trimmedAssemblies = new HashSet<string>(trimmedAssemblies);
}
diff --git a/src/coreclr/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyAnalyzer.cs b/src/coreclr/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyAnalyzer.cs
index 78d4a640245..e7f7503bb7d 100644
--- a/src/coreclr/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyAnalyzer.cs
+++ b/src/coreclr/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyAnalyzer.cs
@@ -25,7 +25,7 @@ namespace ILCompiler.DependencyAnalysisFramework
public sealed class DependencyAnalyzer<MarkStrategy, DependencyContextType> : DependencyAnalyzerBase<DependencyContextType> where MarkStrategy : struct, IDependencyAnalysisMarkStrategy<DependencyContextType>
{
#pragma warning disable SA1129 // Do not use default value type constructor
- private readonly MarkStrategy _marker = new MarkStrategy();
+ private MarkStrategy _marker = new MarkStrategy();
#pragma warning restore SA1129 // Do not use default value type constructor
private DependencyContextType _dependencyContext;
private IComparer<DependencyNodeCore<DependencyContextType>> _resultSorter;
diff --git a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ModuleTokenResolver.cs b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ModuleTokenResolver.cs
index e9ec9f6e039..0547680ab7b 100644
--- a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ModuleTokenResolver.cs
+++ b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ModuleTokenResolver.cs
@@ -130,22 +130,108 @@ namespace ILCompiler.DependencyAnalysis.ReadyToRun
if (token.TokenType == CorTokenType.mdtMethodSpec)
{
MethodSpecification methodSpec = token.MetadataReader.GetMethodSpecification((MethodSpecificationHandle)token.Handle);
- methodSpec.DecodeSignature<DummyTypeInfo, ModuleTokenResolver>(new TokenResolverProvider(this, token.Module), this);
+ DecodeMethodSpecificationSignatureToDiscoverUsedTypeTokens(methodSpec.Signature, token);
token = new ModuleToken(token.Module, methodSpec.Method);
}
+
if (token.TokenType == CorTokenType.mdtMemberRef)
{
MemberReference memberRef = token.MetadataReader.GetMemberReference((MemberReferenceHandle)token.Handle);
EntityHandle owningTypeHandle = memberRef.Parent;
TypeDesc owningType = (TypeDesc)token.Module.GetObject(owningTypeHandle, NotFoundBehavior.Throw);
AddModuleTokenForType(owningType, new ModuleToken(token.Module, owningTypeHandle));
- memberRef.DecodeMethodSignature<DummyTypeInfo, ModuleTokenResolver>(new TokenResolverProvider(this, token.Module), this);
+ DecodeMethodSignatureToDiscoverUsedTypeTokens(memberRef.Signature, token);
}
if (token.TokenType == CorTokenType.mdtMethodDef)
{
MethodDefinition methodDef = token.MetadataReader.GetMethodDefinition((MethodDefinitionHandle)token.Handle);
- methodDef.DecodeSignature<DummyTypeInfo, ModuleTokenResolver>(new TokenResolverProvider(this, token.Module), this);
+ TokenResolverProvider rentedProvider = TokenResolverProvider.Rent(this, token.Module);
+ DecodeMethodSignatureToDiscoverUsedTypeTokens(methodDef.Signature, token);
+ }
+ }
+
+ private void DecodeMethodSpecificationSignatureToDiscoverUsedTypeTokens(BlobHandle signatureHandle, ModuleToken token)
+ {
+ MetadataReader metadataReader = token.MetadataReader;
+ TokenResolverProvider rentedProvider = TokenResolverProvider.Rent(this, token.Module);
+ SignatureDecoder<DummyTypeInfo, ModuleTokenResolver> sigDecoder = new(rentedProvider, metadataReader, this);
+
+ BlobReader signature = metadataReader.GetBlobReader(signatureHandle);
+
+ SignatureHeader header = signature.ReadSignatureHeader();
+ SignatureKind kind = header.Kind;
+ if (kind != SignatureKind.MethodSpecification)
+ {
+ throw new BadImageFormatException();
+ }
+
+ int count = signature.ReadCompressedInteger();
+ for (int i = 0; i < count; i++)
+ {
+ sigDecoder.DecodeType(ref signature);
}
+ TokenResolverProvider.ReturnRental(rentedProvider);
+ }
+
+ private void DecodeMethodSignatureToDiscoverUsedTypeTokens(BlobHandle signatureHandle, ModuleToken token)
+ {
+ MetadataReader metadataReader = token.MetadataReader;
+ TokenResolverProvider rentedProvider = TokenResolverProvider.Rent(this, token.Module);
+ SignatureDecoder<DummyTypeInfo, ModuleTokenResolver> sigDecoder = new (rentedProvider, metadataReader, this);
+ BlobReader signature = metadataReader.GetBlobReader(signatureHandle);
+
+ SignatureHeader header = signature.ReadSignatureHeader();
+ SignatureKind kind = header.Kind;
+ if (kind != SignatureKind.Method && kind != SignatureKind.Property)
+ {
+ throw new BadImageFormatException();
+ }
+
+ int genericParameterCount = 0;
+ if (header.IsGeneric)
+ {
+ genericParameterCount = signature.ReadCompressedInteger();
+ }
+
+ int parameterCount = signature.ReadCompressedInteger();
+ sigDecoder.DecodeType(ref signature);
+
+ if (parameterCount != 0)
+ {
+ int parameterIndex;
+
+ for (parameterIndex = 0; parameterIndex < parameterCount; parameterIndex++)
+ {
+ BlobReader sentinelReader = signature;
+ int typeCode = sentinelReader.ReadCompressedInteger();
+ if (typeCode == (int)SignatureTypeCode.Sentinel)
+ {
+ signature = sentinelReader;
+ }
+ sigDecoder.DecodeType(ref signature, allowTypeSpecifications: false);
+ }
+ }
+
+ TokenResolverProvider.ReturnRental(rentedProvider);
+ }
+
+ private void DecodeFieldSignatureToDiscoverUsedTypeTokens(BlobHandle signatureHandle, ModuleToken token)
+ {
+ MetadataReader metadataReader = token.MetadataReader;
+ TokenResolverProvider rentedProvider = TokenResolverProvider.Rent(this, token.Module);
+ SignatureDecoder<DummyTypeInfo, ModuleTokenResolver> sigDecoder = new(rentedProvider, metadataReader, this);
+
+ BlobReader signature = metadataReader.GetBlobReader(signatureHandle);
+
+ SignatureHeader header = signature.ReadSignatureHeader();
+ SignatureKind kind = header.Kind;
+ if (kind != SignatureKind.Field)
+ {
+ throw new BadImageFormatException();
+ }
+
+ sigDecoder.DecodeType(ref signature);
+ TokenResolverProvider.ReturnRental(rentedProvider);
}
private void AddModuleTokenForFieldReference(TypeDesc owningType, ModuleToken token)
@@ -153,7 +239,7 @@ namespace ILCompiler.DependencyAnalysis.ReadyToRun
MemberReference memberRef = token.MetadataReader.GetMemberReference((MemberReferenceHandle)token.Handle);
EntityHandle owningTypeHandle = memberRef.Parent;
AddModuleTokenForType(owningType, new ModuleToken(token.Module, owningTypeHandle));
- memberRef.DecodeFieldSignature<DummyTypeInfo, ModuleTokenResolver>(new TokenResolverProvider(this, token.Module), this);
+ DecodeFieldSignatureToDiscoverUsedTypeTokens(memberRef.Signature, token);
}
// Add TypeSystemEntity -> ModuleToken mapping to a ConcurrentDictionary. Using CompareTo sort the token used, so it will
@@ -182,7 +268,9 @@ namespace ILCompiler.DependencyAnalysis.ReadyToRun
if (token.TokenType == CorTokenType.mdtTypeSpec)
{
TypeSpecification typeSpec = token.MetadataReader.GetTypeSpecification((TypeSpecificationHandle)token.Handle);
- typeSpec.DecodeSignature(new TokenResolverProvider(this, token.Module), this);
+ TokenResolverProvider rentedProvider = TokenResolverProvider.Rent(this, token.Module);
+ typeSpec.DecodeSignature(rentedProvider, this);
+ TokenResolverProvider.ReturnRental(rentedProvider);
specialTypeFound = true;
}
@@ -229,12 +317,35 @@ namespace ILCompiler.DependencyAnalysis.ReadyToRun
IEcmaModule _contextModule;
+ [ThreadStatic]
+ private static TokenResolverProvider _rentalObject;
+
public TokenResolverProvider(ModuleTokenResolver resolver, IEcmaModule contextModule)
{
_resolver = resolver;
_contextModule = contextModule;
}
+ public static TokenResolverProvider Rent(ModuleTokenResolver resolver, IEcmaModule contextModule)
+ {
+ if (_rentalObject != null)
+ {
+ TokenResolverProvider result = _rentalObject;
+ _rentalObject = null;
+ result._resolver = resolver;
+ result._contextModule = contextModule;
+ return result;
+ }
+ return new TokenResolverProvider(resolver, contextModule);
+ }
+
+ public static void ReturnRental(TokenResolverProvider rental)
+ {
+ rental._resolver = null;
+ rental._contextModule = null;
+ _rentalObject = rental;
+ }
+
public DummyTypeInfo GetArrayType(DummyTypeInfo elementType, ArrayShape shape)
{
return DummyTypeInfo.Instance;
diff --git a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCodegenCompilation.cs b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCodegenCompilation.cs
index 99f98dbb14e..8869b86f6a8 100644
--- a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCodegenCompilation.cs
+++ b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCodegenCompilation.cs
@@ -228,12 +228,6 @@ namespace ILCompiler
public sealed class ReadyToRunCodegenCompilation : Compilation
{
/// <summary>
- /// We only need one CorInfoImpl per thread, and we don't want to unnecessarily construct them
- /// because their construction takes a significant amount of time.
- /// </summary>
- private readonly ConditionalWeakTable<Thread, CorInfoImpl> _corInfoImpls;
-
- /// <summary>
/// Input MSIL file names.
/// </summary>
private readonly IEnumerable<string> _inputFiles;
@@ -243,6 +237,7 @@ namespace ILCompiler
private readonly bool _resilient;
private readonly int _parallelism;
+ private readonly CorInfoImpl[] _corInfoImpls;
private readonly bool _generateMapFile;
private readonly bool _generateMapCsvFile;
@@ -269,6 +264,7 @@ namespace ILCompiler
/// for the same type during compilation so preserve the computed value.
/// </summary>
private ConcurrentDictionary<TypeDesc, bool> _computedFixedLayoutTypes = new ConcurrentDictionary<TypeDesc, bool>();
+ private Func<TypeDesc, bool> _computedFixedLayoutTypesUncached;
internal ReadyToRunCodegenCompilation(
DependencyAnalyzerBase<NodeFactory> dependencyGraph,
@@ -306,8 +302,10 @@ namespace ILCompiler
logger,
instructionSetSupport)
{
+ _computedFixedLayoutTypesUncached = IsLayoutFixedInCurrentVersionBubbleInternal;
_resilient = resilient;
_parallelism = parallelism;
+ _corInfoImpls = new CorInfoImpl[_parallelism];
_generateMapFile = generateMapFile;
_generateMapCsvFile = generateMapCsvFile;
_generatePdbFile = generatePdbFile;
@@ -322,7 +320,6 @@ namespace ILCompiler
nodeFactory.InstrumentationDataTable.Initialize(SymbolNodeFactory);
if (nodeFactory.CrossModuleInlningInfo != null)
nodeFactory.CrossModuleInlningInfo.Initialize(SymbolNodeFactory);
- _corInfoImpls = new ConditionalWeakTable<Thread, CorInfoImpl>();
_inputFiles = inputFiles;
_compositeRootPath = compositeRootPath;
_printReproInstructions = printReproInstructions;
@@ -344,6 +341,11 @@ namespace ILCompiler
public override void Compile(string outputFile)
{
_dependencyGraph.ComputeMarkedNodes();
+
+ _doneAllCompiling = true;
+ Array.Clear(_corInfoImpls);
+ _compilationThreadSemaphore.Release(_parallelism);
+
var nodes = _dependencyGraph.MarkedNodeList;
nodes = _fileLayoutOptimizer.ApplyProfilerGuidedMethodSort(nodes);
@@ -507,7 +509,7 @@ namespace ILCompiler
}
public bool IsLayoutFixedInCurrentVersionBubble(TypeDesc type) =>
- _computedFixedLayoutTypes.GetOrAdd(type, (t) => IsLayoutFixedInCurrentVersionBubbleInternal(t));
+ _computedFixedLayoutTypes.GetOrAdd(type, _computedFixedLayoutTypesUncached);
public bool IsInheritanceChainLayoutFixedInCurrentVersionBubble(TypeDesc type)
{
@@ -556,11 +558,22 @@ namespace ILCompiler
lock (_methodsToRecompile)
{
_methodsToRecompile.Add(methodToBeRecompiled);
- foreach (var method in methodsThatNeedILBodies)
- _methodsWhichNeedMutableILBodies.Add(method);
+ if (methodsThatNeedILBodies != null)
+ foreach (var method in methodsThatNeedILBodies)
+ _methodsWhichNeedMutableILBodies.Add(method);
}
}
+ [ThreadStatic]
+ private static int s_methodsCompiledPerThread = 0;
+
+ private SemaphoreSlim _compilationThreadSemaphore = new(0);
+ private volatile IEnumerator<DependencyNodeCore<NodeFactory>> _currentCompilationMethodList;
+ private volatile bool _doneAllCompiling;
+ private int _finishedThreadCount;
+ private ManualResetEventSlim _compilationSessionComplete = new ManualResetEventSlim();
+ private bool _hasCreatedCompilationThreads = false;
+
protected override void ComputeDependencyNodeDependencies(List<DependencyNodeCore<NodeFactory>> obj)
{
@@ -695,23 +708,69 @@ namespace ILCompiler
if (_parallelism == 1)
{
foreach (var dependency in methodList)
- CompileOneMethod(dependency);
+ CompileOneMethod(dependency, 0);
}
else
{
- ParallelOptions options = new ParallelOptions
+ _currentCompilationMethodList = methodList.GetEnumerator();
+ _finishedThreadCount = 0;
+ _compilationSessionComplete.Reset();
+
+ if (!_hasCreatedCompilationThreads)
{
- MaxDegreeOfParallelism = _parallelism
- };
+ for (int compilationThreadId = 1; compilationThreadId < _parallelism; compilationThreadId++)
+ {
+ new Thread(CompilationThread).Start((object)compilationThreadId);
+ }
+ _hasCreatedCompilationThreads = true;
+ }
- Parallel.ForEach(methodList, options, CompileOneMethod);
+ _compilationThreadSemaphore.Release(_parallelism - 1);
+ CompileOnThread(0);
+ _compilationSessionComplete.Wait();
}
// Re-enable generation of new tokens after the multi-threaded compile
NodeFactory.ManifestMetadataTable._mutableModule.DisableNewTokens = false;
}
- void CompileOneMethod(DependencyNodeCore<NodeFactory> dependency)
+ void CompilationThread(object objThreadId)
+ {
+ while(true)
+ {
+ _compilationThreadSemaphore.Wait();
+ lock(this)
+ {
+ if (_doneAllCompiling)
+ return;
+ }
+ CompileOnThread((int)objThreadId);
+ }
+ }
+
+ void CompileOnThread(int compilationThreadId)
+ {
+ var compilationMethodList = _currentCompilationMethodList;
+ while (true)
+ {
+ DependencyNodeCore<NodeFactory> dependency;
+ lock (compilationMethodList)
+ {
+ if (!compilationMethodList.MoveNext())
+ {
+ if (Interlocked.Increment(ref _finishedThreadCount) == _parallelism)
+ _compilationSessionComplete.Set();
+
+ return;
+ }
+ dependency = compilationMethodList.Current;
+ }
+
+ CompileOneMethod(dependency, compilationThreadId);
+ }
+ }
+
+ void CompileOneMethod(DependencyNodeCore<NodeFactory> dependency, int compileThreadId)
{
MethodWithGCInfo methodCodeNodeNeedingCode = dependency as MethodWithGCInfo;
if (methodCodeNodeNeedingCode == null)
@@ -744,9 +803,35 @@ namespace ILCompiler
{
using (PerfEventSource.StartStopEvents.JitMethodEvents())
{
- // Create only 1 CorInfoImpl per thread.
- // This allows SuperPMI to rely on non-reuse of handles in ObjectToHandle
- CorInfoImpl corInfoImpl = _corInfoImpls.GetValue(Thread.CurrentThread, thread => new CorInfoImpl(this));
+ s_methodsCompiledPerThread++;
+ bool createNewCorInfoImpl = false;
+
+ if (_corInfoImpls[compileThreadId] == null)
+ createNewCorInfoImpl = true;
+ else
+ {
+ if (_parallelism == 1)
+ {
+ // Create only 1 CorInfoImpl if not using parallelism
+ // This allows SuperPMI to rely on non-reuse of handles in ObjectToHandle
+ }
+ else
+ {
+ // Periodically create a new CorInfoImpl to clear out stale caches
+ // This is done as the CorInfoImpl holds a cache of data structures visible to the JIT
+ // Those data structures include both structures which will last for the lifetime of the compilation
+ // process, as well as various temporary structures that would really be better off with thread lifetime.
+ if ((s_methodsCompiledPerThread % 3000) == 0)
+ {
+ createNewCorInfoImpl = true;
+ }
+ }
+ }
+
+ if (createNewCorInfoImpl)
+ _corInfoImpls[compileThreadId] = new CorInfoImpl(this);
+
+ CorInfoImpl corInfoImpl = _corInfoImpls[compileThreadId];
corInfoImpl.CompileMethod(methodCodeNodeNeedingCode, Logger);
}
}
@@ -782,7 +867,7 @@ namespace ILCompiler
public override void Dispose()
{
- _corInfoImpls?.Clear();
+ Array.Clear(_corInfoImpls);
}
}
}
diff --git a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCompilationModuleGroupBase.cs b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCompilationModuleGroupBase.cs
index 9b8ab3d6d6d..cb4532ac167 100644
--- a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCompilationModuleGroupBase.cs
+++ b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCompilationModuleGroupBase.cs
@@ -44,17 +44,25 @@ namespace ILCompiler
private readonly bool _crossModuleInlining;
private readonly bool _crossModuleGenericCompilation;
private readonly ConcurrentDictionary<TypeDesc, CompilationUnitSet> _layoutCompilationUnits = new ConcurrentDictionary<TypeDesc, CompilationUnitSet>();
+ private readonly Func<TypeDesc, CompilationUnitSet> _layoutCompilationUnitsUncached;
private readonly ConcurrentDictionary<TypeDesc, bool> _versionsWithTypeCache = new ConcurrentDictionary<TypeDesc, bool>();
+ private readonly Func<TypeDesc, bool> _versionsWithTypeUncached;
private readonly ConcurrentDictionary<TypeDesc, bool> _versionsWithTypeReferenceCache = new ConcurrentDictionary<TypeDesc, bool>();
+ private readonly Func<TypeDesc, bool> _versionsWithTypeReferenceUncached;
private readonly ConcurrentDictionary<MethodDesc, bool> _versionsWithMethodCache = new ConcurrentDictionary<MethodDesc, bool>();
+ private readonly Func<MethodDesc, bool> _versionsWithMethodUncached;
private readonly ConcurrentDictionary<MethodDesc, bool> _crossModuleInlineableCache = new ConcurrentDictionary<MethodDesc, bool>();
+ private readonly Func<MethodDesc, bool> _crossModuleInlineableCacheUncached;
private readonly ConcurrentDictionary<TypeDesc, bool> _crossModuleInlineableTypeCache = new ConcurrentDictionary<TypeDesc, bool>();
+ private readonly Func<TypeDesc, bool> _crossModuleInlineableTypeCacheUncached;
private readonly ConcurrentDictionary<MethodDesc, bool> _crossModuleCompilableCache = new ConcurrentDictionary<MethodDesc, bool>();
+ private readonly Func<MethodDesc, bool> _crossModuleCompilableCacheUncached;
private readonly Dictionary<ModuleDesc, CompilationUnitIndex> _moduleCompilationUnits = new Dictionary<ModuleDesc, CompilationUnitIndex>();
private ProfileDataManager _profileData;
private CompilationUnitIndex _nextCompilationUnit = CompilationUnitIndex.FirstDynamicallyAssigned;
private ModuleTokenResolver _tokenResolver = null;
private ConcurrentDictionary<EcmaMethod, bool> _tokenTranslationFreeNonVersionable = new ConcurrentDictionary<EcmaMethod, bool>();
+ private readonly Func<EcmaMethod, bool> _tokenTranslationFreeNonVersionableUncached;
private bool CompileAllPossibleCrossModuleCode = false;
public ReadyToRunCompilationModuleGroupBase(ReadyToRunCompilationModuleGroupConfig config)
@@ -77,6 +85,15 @@ namespace ILCompiler
_compileGenericDependenciesFromVersionBubbleModuleSet = config.CompileGenericDependenciesFromVersionBubbleModuleSet;
_tokenResolver = new ModuleTokenResolver(this, config.Context);
+
+ _layoutCompilationUnitsUncached = TypeLayoutCompilationUnitsUncached;
+ _versionsWithTypeUncached = ComputeTypeVersionsWithCode;
+ _versionsWithTypeReferenceUncached = ComputeTypeReferenceVersionsWithCode;
+ _versionsWithMethodUncached = VersionsWithMethodUncached;
+ _crossModuleInlineableCacheUncached = CrossModuleInlineableUncached;
+ _crossModuleInlineableTypeCacheUncached = ComputeCrossModuleInlineableType;
+ _crossModuleCompilableCacheUncached = CrossModuleCompileableUncached;
+ _tokenTranslationFreeNonVersionableUncached = IsNonVersionableWithILTokensThatDoNotNeedTranslationUncached;
}
public ModuleTokenResolver Resolver => _tokenResolver;
@@ -113,7 +130,7 @@ namespace ILCompiler
public CompilationUnitSet TypeLayoutCompilationUnits(TypeDesc type)
{
- return _layoutCompilationUnits.GetOrAdd(type, TypeLayoutCompilationUnitsUncached);
+ return _layoutCompilationUnits.GetOrAdd(type, _layoutCompilationUnitsUncached);
}
public override ReadyToRunFlags GetReadyToRunFlags()
@@ -343,7 +360,7 @@ namespace ILCompiler
public sealed override bool VersionsWithType(TypeDesc typeDesc)
{
return typeDesc.GetTypeDefinition() is EcmaType ecmaType &&
- _versionsWithTypeCache.GetOrAdd(typeDesc, ComputeTypeVersionsWithCode);
+ _versionsWithTypeCache.GetOrAdd(typeDesc, _versionsWithTypeUncached);
}
public bool CrossModuleInlineableModule(ModuleDesc module)
@@ -354,18 +371,18 @@ namespace ILCompiler
public bool CrossModuleInlineableType(TypeDesc typeDesc)
{
return typeDesc.GetTypeDefinition() is EcmaType ecmaType &&
- _crossModuleInlineableTypeCache.GetOrAdd(typeDesc, ComputeCrossModuleInlineableType);
+ _crossModuleInlineableTypeCache.GetOrAdd(typeDesc, _crossModuleInlineableTypeCacheUncached);
}
public sealed override bool VersionsWithTypeReference(TypeDesc typeDesc)
{
- return _versionsWithTypeReferenceCache.GetOrAdd(typeDesc, ComputeTypeReferenceVersionsWithCode);
+ return _versionsWithTypeReferenceCache.GetOrAdd(typeDesc, _versionsWithTypeReferenceUncached);
}
public sealed override bool VersionsWithMethodBody(MethodDesc method)
{
- return _versionsWithMethodCache.GetOrAdd(method, VersionsWithMethodUncached);
+ return _versionsWithMethodCache.GetOrAdd(method, _versionsWithMethodUncached);
}
private bool VersionsWithMethodUncached(MethodDesc method)
@@ -400,7 +417,7 @@ namespace ILCompiler
if (!method.IsNonVersionable())
return false;
- return _tokenTranslationFreeNonVersionable.GetOrAdd((EcmaMethod)method.GetTypicalMethodDefinition(), IsNonVersionableWithILTokensThatDoNotNeedTranslationUncached);
+ return _tokenTranslationFreeNonVersionable.GetOrAdd((EcmaMethod)method.GetTypicalMethodDefinition(), _tokenTranslationFreeNonVersionableUncached);
}
public override bool CrossModuleCompileable(MethodDesc method)
@@ -408,7 +425,7 @@ namespace ILCompiler
if (!_crossModuleGenericCompilation)
return false;
- return _crossModuleCompilableCache.GetOrAdd(method, CrossModuleCompileableUncached);
+ return _crossModuleCompilableCache.GetOrAdd(method, _crossModuleCompilableCacheUncached);
}
private bool CrossModuleCompileableUncached(MethodDesc method)
@@ -489,7 +506,7 @@ namespace ILCompiler
// Internal predicate so that the switches controlling cross module inlining and compilation are independent
private bool CrossModuleInlineableInternal(MethodDesc method)
{
- return _crossModuleInlineableCache.GetOrAdd(method, CrossModuleInlineableUncached);
+ return _crossModuleInlineableCache.GetOrAdd(method, _crossModuleInlineableCacheUncached);
}
private bool CrossModuleInlineableUncached(MethodDesc method)
diff --git a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/IL/Stubs/PInvokeILEmitter.cs b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/IL/Stubs/PInvokeILEmitter.cs
index e34694b5019..b083e3ecc2d 100644
--- a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/IL/Stubs/PInvokeILEmitter.cs
+++ b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/IL/Stubs/PInvokeILEmitter.cs
@@ -5,6 +5,7 @@ using System;
using System.Net;
using System.Collections.Concurrent;
using System.Collections.Generic;
+using System.Runtime.CompilerServices;
using ILCompiler;
using Internal.TypeSystem;
@@ -23,6 +24,7 @@ namespace Internal.IL.Stubs
private readonly MethodDesc _targetMethod;
private readonly Marshaller[] _marshallers;
private readonly PInvokeMetadata _importMetadata;
+ private static readonly ConditionalWeakTable<TypeSystemContext, ConcurrentDictionary<MethodDesc, PInvokeTargetNativeMethod>> s_contexts = new ();
private PInvokeILEmitter(MethodDesc targetMethod)
{
@@ -50,9 +52,19 @@ namespace Internal.IL.Stubs
_targetMethod.Signature.Flags, 0, nativeReturnType,
nativeParameterTypes);
- var rawTargetMethod = new PInvokeTargetNativeMethod(_targetMethod, nativeSig);
+ var rawTargetMethod = AllocateTargetNativeMethod(_targetMethod, nativeSig);
callsiteSetupCodeStream.Emit(ILOpcode.call, emitter.NewToken(rawTargetMethod));
+
+ static PInvokeTargetNativeMethod AllocateTargetNativeMethod(MethodDesc targetMethod, MethodSignature nativeSigArg)
+ {
+ var contextMethods = s_contexts.GetOrCreateValue(targetMethod.Context);
+ if (contextMethods.TryGetValue(targetMethod, out var pinvokeTargetMethod))
+ {
+ return pinvokeTargetMethod;
+ }
+ return contextMethods.GetOrAdd(targetMethod, new PInvokeTargetNativeMethod(targetMethod, nativeSigArg));
+ }
}
private MethodIL EmitIL()
diff --git a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/ILCompiler.ReadyToRun.csproj b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/ILCompiler.ReadyToRun.csproj
index 7957233a37e..4b8361f944f 100644
--- a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/ILCompiler.ReadyToRun.csproj
+++ b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/ILCompiler.ReadyToRun.csproj
@@ -280,6 +280,9 @@
<Compile Include="..\..\Common\JitInterface\CorInfoInstructionSet.cs">
<Link>JitInterface\CorInfoInstructionSet.cs</Link>
</Compile>
+ <Compile Include="..\..\Common\JitInterface\IJitHashableOnly.cs">
+ <Link>JitInterface\IJitHashableOnly.cs</Link>
+ </Compile>
<Compile Include="..\..\Common\JitInterface\JitConfigProvider.cs">
<Link>JitInterface\JitConfigProvider.cs</Link>
</Compile>
diff --git a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs
index 906d6761ec7..7b89e36006e 100644
--- a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs
+++ b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs
@@ -27,6 +27,15 @@ using System.Text;
namespace Internal.JitInterface
{
+ class InfiniteCompileStress
+ {
+ public static bool Enabled;
+ static InfiniteCompileStress()
+ {
+ Enabled = JitConfigProvider.Instance.GetIntConfigValue("InfiniteCompileStress", 0) != 0;
+ }
+ }
+
internal class RequiresRuntimeJitIfUsedSymbol
{
public RequiresRuntimeJitIfUsedSymbol(string message)
@@ -441,6 +450,7 @@ namespace Internal.JitInterface
private UnboxingMethodDescFactory _unboxingThunkFactory = new UnboxingMethodDescFactory();
private List<ISymbolNode> _precodeFixups;
private List<EcmaMethod> _ilBodiesNeeded;
+ private Dictionary<TypeDesc, bool> _preInitedTypes = new Dictionary<TypeDesc, bool>();
public CorInfoImpl(ReadyToRunCodegenCompilation compilation)
: this()
@@ -543,7 +553,7 @@ namespace Internal.JitInterface
partial void DetermineIfCompilationShouldBeRetried(ref CompilationResult result)
{
// If any il bodies need to be recomputed, force recompilation
- if (_ilBodiesNeeded != null)
+ if ((_ilBodiesNeeded != null) || InfiniteCompileStress.Enabled)
{
_compilation.PrepareForCompilationRetry(_methodCodeNode, _ilBodiesNeeded);
result = CompilationResult.CompilationRetryRequested;
@@ -1357,57 +1367,64 @@ namespace Internal.JitInterface
return CorInfoHelpFunc.CORINFO_HELP_NEWARR_1_DIRECT;
}
- private static bool IsClassPreInited(TypeDesc type)
+ private bool IsClassPreInited(TypeDesc type)
{
if (type.IsGenericDefinition)
{
return true;
}
- if (type.HasStaticConstructor)
- {
- return false;
- }
- if (HasBoxedRegularStatics(type))
- {
- return false;
- }
- if (IsDynamicStatics(type))
+
+ var uninstantiatedType = type.GetTypeDefinition();
+
+ if (_preInitedTypes.TryGetValue(uninstantiatedType, out bool preInited))
{
- return false;
+ return preInited;
}
- return true;
- }
- private static bool HasBoxedRegularStatics(TypeDesc type)
- {
- foreach (FieldDesc field in type.GetFields())
+ preInited = ComputeIsClassPreInited(type);
+ _preInitedTypes.Add(uninstantiatedType, preInited);
+ return preInited;
+
+ static bool ComputeIsClassPreInited(TypeDesc type)
{
- if (field.IsStatic &&
- !field.IsLiteral &&
- !field.HasRva &&
- !field.IsThreadStatic &&
- field.FieldType.IsValueType &&
- !field.FieldType.UnderlyingType.IsPrimitive)
+ if (type.IsGenericDefinition)
{
return true;
}
+
+ if (type.HasStaticConstructor)
+ {
+ return false;
+ }
+ if (IsDynamicStaticsOrHasBoxedRegularStatics(type))
+ {
+ return false;
+ }
+ return true;
}
- return false;
- }
- private static bool IsDynamicStatics(TypeDesc type)
- {
- if (type.HasInstantiation)
+ static bool IsDynamicStaticsOrHasBoxedRegularStatics(TypeDesc type)
{
+ bool typeHasInstantiation = type.HasInstantiation;
foreach (FieldDesc field in type.GetFields())
{
- if (field.IsStatic && !field.IsLiteral)
+ if (!field.IsStatic || field.IsLiteral)
+ continue;
+
+ if (typeHasInstantiation)
+ return true; // Dynamic statics
+
+ if (!field.HasRva &&
+ !field.IsThreadStatic &&
+ field.FieldType.IsValueType &&
+ !field.FieldType.UnderlyingType.IsPrimitive)
{
- return true;
+ return true; // HasBoxedRegularStatics
}
}
+
+ return false;
}
- return false;
}
private bool IsGenericTooDeeplyNested(Instantiation instantiation, int nestingLevel)
@@ -2729,9 +2746,9 @@ namespace Internal.JitInterface
private void getAddressOfPInvokeTarget(CORINFO_METHOD_STRUCT_* method, ref CORINFO_CONST_LOOKUP pLookup)
{
MethodDesc methodDesc = HandleToObject(method);
- Debug.Assert(_compilation.CompilationModuleGroup.VersionsWithMethodBody(methodDesc));
if (methodDesc is IL.Stubs.PInvokeTargetNativeMethod rawPInvoke)
methodDesc = rawPInvoke.Target;
+ Debug.Assert(_compilation.CompilationModuleGroup.VersionsWithMethodBody(methodDesc));
EcmaMethod ecmaMethod = (EcmaMethod)methodDesc;
ModuleToken moduleToken = new ModuleToken(ecmaMethod.Module, ecmaMethod.Handle);
MethodWithToken methodWithToken = new MethodWithToken(ecmaMethod, moduleToken, constrainedType: null, unboxing: false, context: null);
diff --git a/src/coreclr/tools/aot/ILCompiler.RyuJit/ILCompiler.RyuJit.csproj b/src/coreclr/tools/aot/ILCompiler.RyuJit/ILCompiler.RyuJit.csproj
index a54ce2ac188..921059e06a0 100644
--- a/src/coreclr/tools/aot/ILCompiler.RyuJit/ILCompiler.RyuJit.csproj
+++ b/src/coreclr/tools/aot/ILCompiler.RyuJit/ILCompiler.RyuJit.csproj
@@ -59,6 +59,9 @@
<Compile Include="..\..\Common\TypeSystem\IL\Stubs\TypeSystemThrowingILEmitter.cs">
<Link>IL\Stubs\TypeSystemThrowingILEmitter.cs</Link>
</Compile>
+ <Compile Include="..\..\Common\JitInterface\IJitHashableOnly.cs">
+ <Link>JitInterface\IJitHashableOnly.cs</Link>
+ </Compile>
<Compile Include="..\..\Common\JitInterface\JitConfigProvider.cs">
<Link>JitInterface\JitConfigProvider.cs</Link>
</Compile>
diff --git a/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj b/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj
index 6dfd4edfebb..1614166ff4f 100644
--- a/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj
+++ b/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputPath>$(RuntimeBinDir)ilc/</OutputPath>
- <RuntimeIdentifier>$(OutputRid)</RuntimeIdentifier>
+ <RuntimeIdentifier>$(PackageRID)</RuntimeIdentifier>
<RunAnalyzers>true</RunAnalyzers>
</PropertyGroup>
diff --git a/src/coreclr/tools/aot/ILCompiler/ILCompiler.props b/src/coreclr/tools/aot/ILCompiler/ILCompiler.props
index 8c4fce52390..51569f7d1b4 100644
--- a/src/coreclr/tools/aot/ILCompiler/ILCompiler.props
+++ b/src/coreclr/tools/aot/ILCompiler/ILCompiler.props
@@ -82,28 +82,11 @@
</ItemGroup>
<ItemGroup>
- <Compile Include="..\..\Common\CommandLine\Argument.cs" />
- <Compile Include="..\..\Common\CommandLine\Argument_1.cs" />
- <Compile Include="..\..\Common\CommandLine\ArgumentCommand.cs" />
- <Compile Include="..\..\Common\CommandLine\ArgumentCommand_1.cs" />
- <Compile Include="..\..\Common\CommandLine\ArgumentLexer.cs" />
- <Compile Include="..\..\Common\CommandLine\ArgumentList_1.cs" />
- <Compile Include="..\..\Common\CommandLine\ArgumentParser.cs" />
- <Compile Include="..\..\Common\CommandLine\ArgumentSyntax.cs" />
- <Compile Include="..\..\Common\CommandLine\ArgumentSyntax_Definers.cs" />
- <Compile Include="..\..\Common\CommandLine\ArgumentSyntaxException.cs" />
- <Compile Include="..\..\Common\CommandLine\ArgumentToken.cs" />
- <Compile Include="..\..\Common\CommandLine\CommandLineException.cs" />
- <Compile Include="..\..\Common\CommandLine\CommandLineHelpers.cs" />
- <Compile Include="..\..\Common\CommandLine\Enumerable.cs" />
- <Compile Include="..\..\Common\CommandLine\HelpTextGenerator.cs" />
+ <Compile Include="..\..\Common\CommandLineHelpers.cs" />
</ItemGroup>
<ItemGroup>
- <EmbeddedResource Include="..\..\Common\CommandLine\Resources\Strings.resx">
- <GenerateSource>true</GenerateSource>
- <ClassName>Internal.CommandLine.Strings</ClassName>
- </EmbeddedResource>
+ <PackageReference Include="System.CommandLine" Version="$(SystemCommandLineVersion)" />
</ItemGroup>
<ItemGroup>
diff --git a/src/coreclr/tools/aot/ILCompiler/ILCompilerRootCommand.cs b/src/coreclr/tools/aot/ILCompiler/ILCompilerRootCommand.cs
new file mode 100644
index 00000000000..9f9346089b2
--- /dev/null
+++ b/src/coreclr/tools/aot/ILCompiler/ILCompilerRootCommand.cs
@@ -0,0 +1,390 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System;
+using System.Collections.Generic;
+using System.CommandLine;
+using System.CommandLine.Help;
+using System.CommandLine.Parsing;
+using System.IO;
+using System.Runtime.InteropServices;
+
+using Internal.TypeSystem;
+
+namespace ILCompiler
+{
+ internal sealed class ILCompilerRootCommand : RootCommand
+ {
+ public Argument<Dictionary<string, string>> InputFilePaths { get; } =
+ new("input-file-path", result => Helpers.BuildPathDictionay(result.Tokens, true), false, "Input file(s)") { Arity = ArgumentArity.OneOrMore };
+ public Option<Dictionary<string, string>> ReferenceFiles { get; } =
+ new(new[] { "--reference", "-r" }, result => Helpers.BuildPathDictionay(result.Tokens, false), true, "Reference file(s) for compilation");
+ public Option<string> OutputFilePath { get; } =
+ new(new[] { "--out", "-o" }, "Output file path");
+ public Option<bool> Optimize { get; } =
+ new(new[] { "--optimize", "-O" }, "Enable optimizations");
+ public Option<bool> OptimizeSpace { get; } =
+ new(new[] { "--optimize-space", "-Os" }, "Enable optimizations, favor code space");
+ public Option<bool> OptimizeTime { get; } =
+ new(new[] { "--optimize-time", "-Ot" }, "Enable optimizations, favor code speed");
+ public Option<string[]> MibcFilePaths { get; } =
+ new(new[] { "--mibc", "-m" }, Array.Empty<string>, "Mibc file(s) for profile guided optimization");
+ public Option<bool> EnableDebugInfo { get; } =
+ new(new[] { "--debug", "-g" }, "Emit debugging information");
+ public Option<bool> UseDwarf5 { get; } =
+ new(new[] { "--gdwarf-5" }, "Generate source-level debug information with dwarf version 5");
+ public Option<bool> NativeLib { get; } =
+ new(new[] { "--nativelib" }, "Compile as static or shared library");
+ public Option<string> ExportsFile { get; } =
+ new(new[] { "--exportsfile" }, "File to write exported method definitions");
+ public Option<string> DgmlLogFileName { get; } =
+ new(new[] { "--dgmllog" }, "Save result of dependency analysis as DGML");
+ public Option<bool> GenerateFullDgmlLog { get; } =
+ new(new[] { "--fulllog" }, "Save detailed log of dependency analysis");
+ public Option<string> ScanDgmlLogFileName { get; } =
+ new(new[] { "--scandgmllog" }, "Save result of scanner dependency analysis as DGML");
+ public Option<bool> GenerateFullScanDgmlLog { get; } =
+ new(new[] { "--scanfulllog" }, "Save detailed log of scanner dependency analysis");
+ public Option<bool> IsVerbose { get; } =
+ new(new[] { "--verbose" }, "Enable verbose logging");
+ public Option<string> SystemModuleName { get; } =
+ new(new[] { "--systemmodule" }, () => Helpers.DefaultSystemModule, "System module name (default: System.Private.CoreLib)");
+ public Option<bool> MultiFile { get; } =
+ new(new[] { "--multifile" }, "Compile only input files (do not compile referenced assemblies)");
+ public Option<bool> WaitForDebugger { get; } =
+ new(new[] { "--waitfordebugger" }, "Pause to give opportunity to attach debugger");
+ public Option<bool> Resilient { get; } =
+ new(new[] { "--resilient" }, "Ignore unresolved types, methods, and assemblies. Defaults to false");
+ public Option<string[]> CodegenOptions { get; } =
+ new(new[] { "--codegenopt" }, Array.Empty<string>, "Define a codegen option");
+ public Option<string[]> RdXmlFilePaths { get; } =
+ new(new[] { "--rdxml" }, Array.Empty<string>, "RD.XML file(s) for compilation");
+ public Option<string[]> LinkTrimFilePaths { get; } =
+ new(new[] { "--descriptor" }, Array.Empty<string>, "ILLinkTrim.Descriptor file(s) for compilation");
+ public Option<string> MapFileName { get; } =
+ new(new[] { "--map" }, "Generate a map file");
+ public Option<string> MstatFileName { get; } =
+ new(new[] { "--mstat" }, "Generate an mstat file");
+ public Option<string> MetadataLogFileName { get; } =
+ new(new[] { "--metadatalog" }, "Generate a metadata log file");
+ public Option<bool> NoMetadataBlocking { get; } =
+ new(new[] { "--nometadatablocking" }, "Ignore metadata blocking for internal implementation details");
+ public Option<bool> CompleteTypesMetadata { get; } =
+ new(new[] { "--completetypemetadata" }, "Generate complete metadata for types");
+ public Option<string> ReflectionData { get; } =
+ new(new[] { "--reflectiondata" }, "Reflection data to generate (one of: all, none)");
+ public Option<bool> ScanReflection { get; } =
+ new(new[] { "--scanreflection" }, "Scan IL for reflection patterns");
+ public Option<bool> UseScanner { get; } =
+ new(new[] { "--scan" }, "Use IL scanner to generate optimized code (implied by -O)");
+ public Option<bool> NoScanner { get; } =
+ new(new[] { "--noscan" }, "Do not use IL scanner to generate optimized code");
+ public Option<string> IlDump { get; } =
+ new(new[] { "--ildump" }, "Dump IL assembly listing for compiler-generated IL");
+ public Option<bool> EmitStackTraceData { get; } =
+ new(new[] { "--stacktracedata" }, "Emit data to support generating stack trace strings at runtime");
+ public Option<bool> MethodBodyFolding { get; } =
+ new(new[] { "--methodbodyfolding" }, "Fold identical method bodies");
+ public Option<string[]> InitAssemblies { get; } =
+ new(new[] { "--initassembly" }, Array.Empty<string>, "Assembly(ies) with a library initializer");
+ public Option<string[]> AppContextSwitches { get; } =
+ new(new[] { "--appcontextswitch" }, Array.Empty<string>, "System.AppContext switches to set (format: 'Key=Value')");
+ public Option<string[]> FeatureSwitches { get; } =
+ new(new[] { "--feature" }, Array.Empty<string>, "Feature switches to apply (format: 'Namespace.Name=[true|false]'");
+ public Option<string[]> RuntimeOptions { get; } =
+ new(new[] { "--runtimeopt" }, Array.Empty<string>, "Runtime options to set");
+ public Option<int> Parallelism { get; } =
+ new(new[] { "--parallelism" }, result =>
+ {
+ if (result.Tokens.Count > 0)
+ return int.Parse(result.Tokens[0].Value);
+
+ // Limit parallelism to 24 wide at most by default, more parallelism is unlikely to improve compilation speed
+ // as many portions of the process are single threaded, and is known to use excessive memory.
+ var parallelism = Math.Min(24, Environment.ProcessorCount);
+
+ // On 32bit platforms restrict it more, as virtual address space is quite limited
+ if (!Environment.Is64BitProcess)
+ parallelism = Math.Min(4, parallelism);
+
+ return parallelism;
+ }, true, "Maximum number of threads to use during compilation");
+ public Option<string> InstructionSet { get; } =
+ new(new[] { "--instruction-set" }, "Instruction set to allow or disallow");
+ public Option<string> Guard { get; } =
+ new(new[] { "--guard" }, "Enable mitigations. Options: 'cf': CFG (Control Flow Guard, Windows only)");
+ public Option<bool> PreinitStatics { get; } =
+ new(new[] { "--preinitstatics" }, "Interpret static constructors at compile time if possible (implied by -O)");
+ public Option<bool> NoPreinitStatics { get; } =
+ new(new[] { "--nopreinitstatics" }, "Do not interpret static constructors at compile time");
+ public Option<string[]> SuppressedWarnings { get; } =
+ new(new[] { "--nowarn" }, Array.Empty<string>, "Disable specific warning messages");
+ public Option<bool> SingleWarn { get; } =
+ new(new[] { "--singlewarn" }, "Generate single AOT/trimming warning per assembly");
+ public Option<bool> NoTrimWarn { get; } =
+ new(new[] { "--notrimwarn" }, "Disable warnings related to trimming");
+ public Option<bool> NoAotWarn { get; } =
+ new(new[] { "--noaotwarn" }, "Disable warnings related to AOT");
+ public Option<string[]> SingleWarnEnabledAssemblies { get; } =
+ new(new[] { "--singlewarnassembly" }, Array.Empty<string>, "Generate single AOT/trimming warning for given assembly");
+ public Option<string[]> SingleWarnDisabledAssemblies { get; } =
+ new(new[] { "--nosinglewarnassembly" }, Array.Empty<string>, "Expand AOT/trimming warnings for given assembly");
+ public Option<string[]> DirectPInvokes { get; } =
+ new(new[] { "--directpinvoke" }, Array.Empty<string>, "PInvoke to call directly");
+ public Option<string[]> DirectPInvokeLists { get; } =
+ new(new[] { "--directpinvokelist" }, Array.Empty<string>, "File with list of PInvokes to call directly");
+ public Option<int> MaxGenericCycle { get; } =
+ new(new[] { "--maxgenericcycle" }, () => CompilerTypeSystemContext.DefaultGenericCycleCutoffPoint, "Max depth of generic cycle");
+ public Option<string[]> RootedAssemblies { get; } =
+ new(new[] { "--root" }, Array.Empty<string>, "Fully generate given assembly");
+ public Option<IEnumerable<string>> ConditionallyRootedAssemblies { get; } =
+ new(new[] { "--conditionalroot" }, result => ILLinkify(result.Tokens, true), true, "Fully generate given assembly if it's used");
+ public Option<IEnumerable<string>> TrimmedAssemblies { get; } =
+ new(new[] { "--trim" }, result => ILLinkify(result.Tokens, true), true, "Trim the specified assembly");
+ public Option<bool> RootDefaultAssemblies { get; } =
+ new(new[] { "--defaultrooting" }, "Root assemblies that are not marked [IsTrimmable]");
+ public Option<TargetArchitecture> TargetArchitecture { get; } =
+ new(new[] { "--targetarch" }, result => Helpers.GetTargetArchitecture(result.Tokens.Count > 0 ? result.Tokens[0].Value : null), true, "Target architecture for cross compilation");
+ public Option<TargetOS> TargetOS { get; } =
+ new(new[] { "--targetos" }, result => Helpers.GetTargetOS(result.Tokens.Count > 0 ? result.Tokens[0].Value : null), true, "Target OS for cross compilation");
+ public Option<string> JitPath { get; } =
+ new(new[] { "--jitpath" }, "Path to JIT compiler library");
+ public Option<string> SingleMethodTypeName { get; } =
+ new(new[] { "--singlemethodtypename" }, "Single method compilation: assembly-qualified name of the owning type");
+ public Option<string> SingleMethodName { get; } =
+ new(new[] { "--singlemethodname" }, "Single method compilation: name of the method");
+ public Option<string[]> SingleMethodGenericArgs { get; } =
+ new(new[] { "--singlemethodgenericarg" }, "Single method compilation: generic arguments to the method");
+ public Option<string> MakeReproPath { get; } =
+ new(new[] { "--make-repro-path" }, "Path where to place a repro package");
+
+ public OptimizationMode OptimizationMode { get; private set; }
+ public ParseResult Result;
+
+ public ILCompilerRootCommand(string[] args) : base(".NET Native IL Compiler")
+ {
+ AddArgument(InputFilePaths);
+ AddOption(ReferenceFiles);
+ AddOption(OutputFilePath);
+ AddOption(Optimize);
+ AddOption(OptimizeSpace);
+ AddOption(OptimizeTime);
+ AddOption(MibcFilePaths);
+ AddOption(EnableDebugInfo);
+ AddOption(UseDwarf5);
+ AddOption(NativeLib);
+ AddOption(ExportsFile);
+ AddOption(DgmlLogFileName);
+ AddOption(GenerateFullDgmlLog);
+ AddOption(ScanDgmlLogFileName);
+ AddOption(GenerateFullScanDgmlLog);
+ AddOption(IsVerbose);
+ AddOption(SystemModuleName);
+ AddOption(MultiFile);
+ AddOption(WaitForDebugger);
+ AddOption(Resilient);
+ AddOption(CodegenOptions);
+ AddOption(RdXmlFilePaths);
+ AddOption(LinkTrimFilePaths);
+ AddOption(MapFileName);
+ AddOption(MstatFileName);
+ AddOption(MetadataLogFileName);
+ AddOption(NoMetadataBlocking);
+ AddOption(CompleteTypesMetadata);
+ AddOption(ReflectionData);
+ AddOption(ScanReflection);
+ AddOption(UseScanner);
+ AddOption(NoScanner);
+ AddOption(IlDump);
+ AddOption(EmitStackTraceData);
+ AddOption(MethodBodyFolding);
+ AddOption(InitAssemblies);
+ AddOption(AppContextSwitches);
+ AddOption(FeatureSwitches);
+ AddOption(RuntimeOptions);
+ AddOption(Parallelism);
+ AddOption(InstructionSet);
+ AddOption(Guard);
+ AddOption(PreinitStatics);
+ AddOption(NoPreinitStatics);
+ AddOption(SuppressedWarnings);
+ AddOption(SingleWarn);
+ AddOption(NoTrimWarn);
+ AddOption(NoAotWarn);
+ AddOption(SingleWarnEnabledAssemblies);
+ AddOption(SingleWarnDisabledAssemblies);
+ AddOption(DirectPInvokes);
+ AddOption(DirectPInvokeLists);
+ AddOption(MaxGenericCycle);
+ AddOption(RootedAssemblies);
+ AddOption(ConditionallyRootedAssemblies);
+ AddOption(TrimmedAssemblies);
+ AddOption(RootDefaultAssemblies);
+ AddOption(TargetArchitecture);
+ AddOption(TargetOS);
+ AddOption(JitPath);
+ AddOption(SingleMethodTypeName);
+ AddOption(SingleMethodName);
+ AddOption(SingleMethodGenericArgs);
+ AddOption(MakeReproPath);
+
+ this.SetHandler(context =>
+ {
+ Result = context.ParseResult;
+
+ if (context.ParseResult.GetValueForOption(OptimizeSpace))
+ {
+ OptimizationMode = OptimizationMode.PreferSize;
+ }
+ else if (context.ParseResult.GetValueForOption(OptimizeTime))
+ {
+ OptimizationMode = OptimizationMode.PreferSpeed;
+ }
+ else if (context.ParseResult.GetValueForOption(Optimize))
+ {
+ OptimizationMode = OptimizationMode.Blended;
+ }
+ else
+ {
+ OptimizationMode = OptimizationMode.None;
+ }
+
+ try
+ {
+ string makeReproPath = context.ParseResult.GetValueForOption(MakeReproPath);
+ if (makeReproPath != null)
+ {
+ // Create a repro package in the specified path
+ // This package will have the set of input files needed for compilation
+ // + the original command line arguments
+ // + a rsp file that should work to directly run out of the zip file
+
+ Helpers.MakeReproPackage(makeReproPath, context.ParseResult.GetValueForOption(OutputFilePath), args,
+ context.ParseResult, new[] { "r", "reference", "m", "mibc", "rdxml", "directpinvokelist", "descriptor" });
+ }
+
+ context.ExitCode = new Program(this).Run();
+ }
+#if DEBUG
+ catch (CodeGenerationFailedException ex) when (DumpReproArguments(ex))
+ {
+ throw new NotSupportedException(); // Unreachable
+ }
+#else
+ catch (Exception e)
+ {
+ Console.ResetColor();
+ Console.ForegroundColor = ConsoleColor.Red;
+
+ Console.Error.WriteLine("Error: " + e.Message);
+ Console.Error.WriteLine(e.ToString());
+
+ Console.ResetColor();
+
+ context.ExitCode = 1;
+ }
+#endif
+ });
+ }
+
+ public static IEnumerable<HelpSectionDelegate> GetExtendedHelp(HelpContext _)
+ {
+ foreach (HelpSectionDelegate sectionDelegate in HelpBuilder.Default.GetLayout())
+ yield return sectionDelegate;
+
+ yield return _ =>
+ {
+ Console.WriteLine("Options may be passed on the command line, or via response file. On the command line switch values may be specified by passing " +
+ "the option followed by a space followed by the value of the option, or by specifying a : between option and switch value. A response file " +
+ "is specified by passing the @ symbol before the response file name. In a response file all options must be specified on their own lines, and " +
+ "only the : syntax for switches is supported.\n");
+
+ Console.WriteLine("Use the '--' option to disambiguate between input files that have begin with -- and options. After a '--' option, all arguments are " +
+ "considered to be input files. If no input files begin with '--' then this option is not necessary.\n");
+
+ string[] ValidArchitectures = new string[] { "arm", "arm64", "x86", "x64" };
+ string[] ValidOS = new string[] { "windows", "linux", "osx" };
+
+ Console.WriteLine("Valid switches for {0} are: '{1}'. The default value is '{2}'\n", "--targetos", string.Join("', '", ValidOS), Helpers.GetTargetOS(null).ToString().ToLowerInvariant());
+
+ Console.WriteLine(string.Format("Valid switches for {0} are: '{1}'. The default value is '{2}'\n", "--targetarch", string.Join("', '", ValidArchitectures), Helpers.GetTargetArchitecture(null).ToString().ToLowerInvariant()));
+
+ Console.WriteLine("The allowable values for the --instruction-set option are described in the table below. Each architecture has a different set of valid " +
+ "instruction sets, and multiple instruction sets may be specified by separating the instructions sets by a ','. For example 'avx2,bmi,lzcnt'");
+
+ foreach (string arch in ValidArchitectures)
+ {
+ Console.Write(arch);
+ Console.Write(": ");
+
+ TargetArchitecture targetArch = Helpers.GetTargetArchitecture(arch);
+ bool first = true;
+ foreach (var instructionSet in Internal.JitInterface.InstructionSetFlags.ArchitectureToValidInstructionSets(targetArch))
+ {
+ // Only instruction sets with are specifiable should be printed to the help text
+ if (instructionSet.Specifiable)
+ {
+ if (first)
+ {
+ first = false;
+ }
+ else
+ {
+ Console.Write(", ");
+ }
+ Console.Write(instructionSet.Name);
+ }
+
+ Console.WriteLine();
+ }
+ }
+
+ Console.WriteLine();
+ Console.WriteLine("The following CPU names are predefined groups of instruction sets and can be used in --instruction-set too:");
+ Console.WriteLine(string.Join(", ", Internal.JitInterface.InstructionSetFlags.AllCpuNames));
+ };
+ }
+
+ private static IEnumerable<string> ILLinkify(IReadOnlyList<Token> tokens, bool setDefaultToEmpty)
+ {
+ if (tokens.Count == 0)
+ {
+ yield return string.Empty;
+ yield break;
+ }
+
+ foreach(Token token in tokens)
+ {
+ string rootedAssembly = token.Value;
+
+ // For compatibility with IL Linker, the parameter could be a file name or an assembly name.
+ // This is the logic IL Linker uses to decide how to interpret the string. Really.
+ string simpleName;
+ if (File.Exists(rootedAssembly))
+ simpleName = Path.GetFileNameWithoutExtension(rootedAssembly);
+ else
+ simpleName = rootedAssembly;
+ yield return simpleName;
+ }
+ }
+
+#if DEBUG
+ private static bool DumpReproArguments(CodeGenerationFailedException ex)
+ {
+ Console.WriteLine("To repro, add following arguments to the command line:");
+
+ MethodDesc failingMethod = ex.Method;
+
+ var formatter = new CustomAttributeTypeNameFormatter((IAssemblyDesc)failingMethod.Context.SystemModule);
+
+ Console.Write($"--singlemethodtypename \"{formatter.FormatName(failingMethod.OwningType, true)}\"");
+ Console.Write($" --singlemethodname {failingMethod.Name}");
+
+ for (int i = 0; i < failingMethod.Instantiation.Length; i++)
+ Console.Write($" --singlemethodgenericarg \"{formatter.FormatName(failingMethod.Instantiation[i], true)}\"");
+
+ return false;
+ }
+#endif
+ }
+}
diff --git a/src/coreclr/tools/aot/ILCompiler/Program.cs b/src/coreclr/tools/aot/ILCompiler/Program.cs
index 7adb06231ed..a3b268fa418 100644
--- a/src/coreclr/tools/aot/ILCompiler/Program.cs
+++ b/src/coreclr/tools/aot/ILCompiler/Program.cs
@@ -3,6 +3,9 @@
using System;
using System.Collections.Generic;
+using System.CommandLine;
+using System.CommandLine.Help;
+using System.CommandLine.Parsing;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
@@ -13,8 +16,6 @@ using Internal.IL;
using Internal.TypeSystem;
using Internal.TypeSystem.Ecma;
-using Internal.CommandLine;
-
using ILCompiler.Dataflow;
using ILLink.Shared;
@@ -25,346 +26,17 @@ namespace ILCompiler
{
internal sealed class Program
{
- private const string DefaultSystemModule = "System.Private.CoreLib";
-
- private Dictionary<string, string> _inputFilePaths = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
- private Dictionary<string, string> _referenceFilePaths = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
-
- private string _outputFilePath;
- private bool _isVerbose;
-
- private string _dgmlLogFileName;
- private bool _generateFullDgmlLog;
- private string _scanDgmlLogFileName;
- private bool _generateFullScanDgmlLog;
-
- private TargetArchitecture _targetArchitecture;
- private string _targetArchitectureStr;
- private TargetOS _targetOS;
- private string _targetOSStr;
- private OptimizationMode _optimizationMode;
- private bool _enableDebugInfo;
- private string _ilDump;
- private string _systemModuleName = DefaultSystemModule;
- private bool _multiFile;
- private bool _nativeLib;
- private string _exportsFile;
- private bool _useScanner;
- private bool _noScanner;
- private bool _preinitStatics;
- private bool _noPreinitStatics;
- private bool _emitStackTraceData;
- private string _mapFileName;
- private string _mstatFileName;
- private string _metadataLogFileName;
- private bool _noMetadataBlocking;
- private string _reflectionData;
- private bool _completeTypesMetadata;
- private bool _scanReflection;
- private bool _methodBodyFolding;
- private int _parallelism = Environment.ProcessorCount;
- private string _instructionSet;
- private string _guard;
- private int _maxGenericCycle = CompilerTypeSystemContext.DefaultGenericCycleCutoffPoint;
- private bool _useDwarf5;
- private string _jitPath;
-
- private string _singleMethodTypeName;
- private string _singleMethodName;
- private IReadOnlyList<string> _singleMethodGenericArgs;
-
- private IReadOnlyList<string> _codegenOptions = Array.Empty<string>();
-
- private IReadOnlyList<string> _rdXmlFilePaths = Array.Empty<string>();
-
- private IReadOnlyList<string> _linkTrimFilePaths = Array.Empty<string>();
-
- private IReadOnlyList<string> _initAssemblies = Array.Empty<string>();
-
- private IReadOnlyList<string> _appContextSwitches = Array.Empty<string>();
-
- private IReadOnlyList<string> _runtimeOptions = Array.Empty<string>();
-
- private IReadOnlyList<string> _featureSwitches = Array.Empty<string>();
-
- private IReadOnlyList<string> _suppressedWarnings = Array.Empty<string>();
-
- private IReadOnlyList<string> _directPInvokes = Array.Empty<string>();
-
- private IReadOnlyList<string> _directPInvokeLists = Array.Empty<string>();
-
- private bool _resilient;
+ private readonly ILCompilerRootCommand _command;
- private IReadOnlyList<string> _rootedAssemblies = Array.Empty<string>();
- private IReadOnlyList<string> _conditionallyRootedAssemblies = Array.Empty<string>();
- private IReadOnlyList<string> _trimmedAssemblies = Array.Empty<string>();
- private bool _rootDefaultAssemblies;
-
- public IReadOnlyList<string> _mibcFilePaths = Array.Empty<string>();
-
- private IReadOnlyList<string> _singleWarnEnabledAssemblies = Array.Empty<string>();
- private IReadOnlyList<string> _singleWarnDisabledAssemblies = Array.Empty<string>();
- private bool _singleWarn;
- private bool _noTrimWarn;
- private bool _noAotWarn;
-
- private string _makeReproPath;
-
- private bool _help;
-
- private Program()
+ public Program(ILCompilerRootCommand command)
{
- }
-
- private static void Help(string helpText)
- {
- Console.WriteLine();
- Console.Write(".NET Native IL Compiler");
- Console.Write(" ");
- Console.Write(typeof(Program).GetTypeInfo().Assembly.GetName().Version);
- Console.WriteLine();
- Console.WriteLine();
- Console.WriteLine(helpText);
- }
+ _command = command;
- public static void ComputeDefaultOptions(out TargetOS os, out TargetArchitecture arch)
- {
- if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
- os = TargetOS.Windows;
- else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
- os = TargetOS.Linux;
- else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
- os = TargetOS.OSX;
- else if (RuntimeInformation.IsOSPlatform(OSPlatform.FreeBSD))
- os = TargetOS.FreeBSD;
- else
- throw new NotImplementedException();
-
- switch (RuntimeInformation.ProcessArchitecture)
- {
- case Architecture.X86:
- arch = TargetArchitecture.X86;
- break;
- case Architecture.X64:
- arch = TargetArchitecture.X64;
- break;
- case Architecture.Arm:
- arch = TargetArchitecture.ARM;
- break;
- case Architecture.Arm64:
- arch = TargetArchitecture.ARM64;
- break;
- default:
- throw new NotImplementedException();
- }
-
- }
-
- private void InitializeDefaultOptions()
- {
- ComputeDefaultOptions(out _targetOS, out _targetArchitecture);
- }
-
- private ArgumentSyntax ParseCommandLine(string[] args)
- {
- var validReflectionDataOptions = new string[] { "all", "none" };
-
- IReadOnlyList<string> inputFiles = Array.Empty<string>();
- IReadOnlyList<string> referenceFiles = Array.Empty<string>();
-
- bool optimize = false;
- bool optimizeSpace = false;
- bool optimizeTime = false;
-
- bool waitForDebugger = false;
- AssemblyName name = typeof(Program).GetTypeInfo().Assembly.GetName();
- ArgumentSyntax argSyntax = ArgumentSyntax.Parse(args, syntax =>
- {
- syntax.ApplicationName = name.Name.ToString();
-
- // HandleHelp writes to error, fails fast with crash dialog and lacks custom formatting.
- syntax.HandleHelp = false;
- syntax.HandleErrors = true;
-
- syntax.DefineOption("h|help", ref _help, "Help message for ILC");
- syntax.DefineOptionList("r|reference", ref referenceFiles, "Reference file(s) for compilation");
- syntax.DefineOption("o|out", ref _outputFilePath, "Output file path");
- syntax.DefineOption("O", ref optimize, "Enable optimizations");
- syntax.DefineOption("Os", ref optimizeSpace, "Enable optimizations, favor code space");
- syntax.DefineOption("Ot", ref optimizeTime, "Enable optimizations, favor code speed");
- syntax.DefineOptionList("m|mibc", ref _mibcFilePaths, "Mibc file(s) for profile guided optimization"); ;
- syntax.DefineOption("g", ref _enableDebugInfo, "Emit debugging information");
- syntax.DefineOption("gdwarf-5", ref _useDwarf5, "Generate source-level debug information with dwarf version 5");
- syntax.DefineOption("nativelib", ref _nativeLib, "Compile as static or shared library");
- syntax.DefineOption("exportsfile", ref _exportsFile, "File to write exported method definitions");
- syntax.DefineOption("dgmllog", ref _dgmlLogFileName, "Save result of dependency analysis as DGML");
- syntax.DefineOption("fulllog", ref _generateFullDgmlLog, "Save detailed log of dependency analysis");
- syntax.DefineOption("scandgmllog", ref _scanDgmlLogFileName, "Save result of scanner dependency analysis as DGML");
- syntax.DefineOption("scanfulllog", ref _generateFullScanDgmlLog, "Save detailed log of scanner dependency analysis");
- syntax.DefineOption("verbose", ref _isVerbose, "Enable verbose logging");
- syntax.DefineOption("systemmodule", ref _systemModuleName, "System module name (default: System.Private.CoreLib)");
- syntax.DefineOption("multifile", ref _multiFile, "Compile only input files (do not compile referenced assemblies)");
- syntax.DefineOption("waitfordebugger", ref waitForDebugger, "Pause to give opportunity to attach debugger");
- syntax.DefineOption("resilient", ref _resilient, "Ignore unresolved types, methods, and assemblies. Defaults to false");
- syntax.DefineOptionList("codegenopt", ref _codegenOptions, "Define a codegen option");
- syntax.DefineOptionList("rdxml", ref _rdXmlFilePaths, "RD.XML file(s) for compilation");
- syntax.DefineOptionList("descriptor", ref _linkTrimFilePaths, "ILLinkTrim.Descriptor file(s) for compilation");
- syntax.DefineOption("map", ref _mapFileName, "Generate a map file");
- syntax.DefineOption("mstat", ref _mstatFileName, "Generate an mstat file");
- syntax.DefineOption("metadatalog", ref _metadataLogFileName, "Generate a metadata log file");
- syntax.DefineOption("nometadatablocking", ref _noMetadataBlocking, "Ignore metadata blocking for internal implementation details");
- syntax.DefineOption("completetypemetadata", ref _completeTypesMetadata, "Generate complete metadata for types");
- syntax.DefineOption("reflectiondata", ref _reflectionData, $"Reflection data to generate (one of: {string.Join(", ", validReflectionDataOptions)})");
- syntax.DefineOption("scanreflection", ref _scanReflection, "Scan IL for reflection patterns");
- syntax.DefineOption("scan", ref _useScanner, "Use IL scanner to generate optimized code (implied by -O)");
- syntax.DefineOption("noscan", ref _noScanner, "Do not use IL scanner to generate optimized code");
- syntax.DefineOption("ildump", ref _ilDump, "Dump IL assembly listing for compiler-generated IL");
- syntax.DefineOption("stacktracedata", ref _emitStackTraceData, "Emit data to support generating stack trace strings at runtime");
- syntax.DefineOption("methodbodyfolding", ref _methodBodyFolding, "Fold identical method bodies");
- syntax.DefineOptionList("initassembly", ref _initAssemblies, "Assembly(ies) with a library initializer");
- syntax.DefineOptionList("appcontextswitch", ref _appContextSwitches, "System.AppContext switches to set (format: 'Key=Value')");
- syntax.DefineOptionList("feature", ref _featureSwitches, "Feature switches to apply (format: 'Namespace.Name=[true|false]'");
- syntax.DefineOptionList("runtimeopt", ref _runtimeOptions, "Runtime options to set");
- syntax.DefineOption("parallelism", ref _parallelism, "Maximum number of threads to use during compilation");
- syntax.DefineOption("instruction-set", ref _instructionSet, "Instruction set to allow or disallow");
- syntax.DefineOption("guard", ref _guard, "Enable mitigations. Options: 'cf': CFG (Control Flow Guard, Windows only)");
- syntax.DefineOption("preinitstatics", ref _preinitStatics, "Interpret static constructors at compile time if possible (implied by -O)");
- syntax.DefineOption("nopreinitstatics", ref _noPreinitStatics, "Do not interpret static constructors at compile time");
- syntax.DefineOptionList("nowarn", ref _suppressedWarnings, "Disable specific warning messages");
- syntax.DefineOption("singlewarn", ref _singleWarn, "Generate single AOT/trimming warning per assembly");
- syntax.DefineOption("notrimwarn", ref _noTrimWarn, "Disable warnings related to trimming");
- syntax.DefineOption("noaotwarn", ref _noAotWarn, "Disable warnings related to AOT");
- syntax.DefineOptionList("singlewarnassembly", ref _singleWarnEnabledAssemblies, "Generate single AOT/trimming warning for given assembly");
- syntax.DefineOptionList("nosinglewarnassembly", ref _singleWarnDisabledAssemblies, "Expand AOT/trimming warnings for given assembly");
- syntax.DefineOptionList("directpinvoke", ref _directPInvokes, "PInvoke to call directly");
- syntax.DefineOptionList("directpinvokelist", ref _directPInvokeLists, "File with list of PInvokes to call directly");
- syntax.DefineOption("maxgenericcycle", ref _maxGenericCycle, "Max depth of generic cycle");
- syntax.DefineOptionList("root", ref _rootedAssemblies, "Fully generate given assembly");
- syntax.DefineOptionList("conditionalroot", ref _conditionallyRootedAssemblies, "Fully generate given assembly if it's used");
- syntax.DefineOptionList("trim", ref _trimmedAssemblies, "Trim the specified assembly");
- syntax.DefineOption("defaultrooting", ref _rootDefaultAssemblies, "Root assemblies that are not marked [IsTrimmable]");
-
- syntax.DefineOption("targetarch", ref _targetArchitectureStr, "Target architecture for cross compilation");
- syntax.DefineOption("targetos", ref _targetOSStr, "Target OS for cross compilation");
- syntax.DefineOption("jitpath", ref _jitPath, "Path to JIT compiler library");
-
- syntax.DefineOption("singlemethodtypename", ref _singleMethodTypeName, "Single method compilation: assembly-qualified name of the owning type");
- syntax.DefineOption("singlemethodname", ref _singleMethodName, "Single method compilation: name of the method");
- syntax.DefineOptionList("singlemethodgenericarg", ref _singleMethodGenericArgs, "Single method compilation: generic arguments to the method");
-
- syntax.DefineOption("make-repro-path", ref _makeReproPath, "Path where to place a repro package");
-
- syntax.DefineParameterList("in", ref inputFiles, "Input file(s) to compile");
- });
-
- if (_help)
- {
- List<string> extraHelp = new List<string>();
-
- extraHelp.Add("Options may be passed on the command line, or via response file. On the command line switch values may be specified by passing " +
- "the option followed by a space followed by the value of the option, or by specifying a : between option and switch value. A response file " +
- "is specified by passing the @ symbol before the response file name. In a response file all options must be specified on their own lines, and " +
- "only the : syntax for switches is supported.");
-
- extraHelp.Add("");
-
- extraHelp.Add("Use the '--' option to disambiguate between input files that have begin with -- and options. After a '--' option, all arguments are " +
- "considered to be input files. If no input files begin with '--' then this option is not necessary.");
-
- extraHelp.Add("");
-
- string[] ValidArchitectures = new string[] { "arm", "arm64", "x86", "x64" };
- string[] ValidOS = new string[] { "windows", "linux", "osx" };
-
- ComputeDefaultOptions(out TargetOS defaultOs, out TargetArchitecture defaultArch);
-
- extraHelp.Add(string.Format("Valid switches for {0} are: '{1}'. The default value is '{2}'", "--targetos", string.Join("', '", ValidOS), defaultOs.ToString().ToLowerInvariant()));
-
- extraHelp.Add("");
-
- extraHelp.Add(string.Format("Valid switches for {0} are: '{1}'. The default value is '{2}'", "--targetarch", string.Join("', '", ValidArchitectures), defaultArch.ToString().ToLowerInvariant()));
-
- extraHelp.Add("");
-
- extraHelp.Add("The allowable values for the --instruction-set option are described in the table below. Each architecture has a different set of valid " +
- "instruction sets, and multiple instruction sets may be specified by separating the instructions sets by a ','. For example 'avx2,bmi,lzcnt'");
-
- foreach (string arch in ValidArchitectures)
- {
- StringBuilder archString = new StringBuilder();
-
- archString.Append(arch);
- archString.Append(": ");
-
- TargetArchitecture targetArch = GetTargetArchitectureFromArg(arch);
- bool first = true;
- foreach (var instructionSet in Internal.JitInterface.InstructionSetFlags.ArchitectureToValidInstructionSets(targetArch))
- {
- // Only instruction sets with are specifiable should be printed to the help text
- if (instructionSet.Specifiable)
- {
- if (first)
- {
- first = false;
- }
- else
- {
- archString.Append(", ");
- }
- archString.Append(instructionSet.Name);
- }
- }
-
- extraHelp.Add(archString.ToString());
- }
-
- extraHelp.Add("");
- extraHelp.Add("The following CPU names are predefined groups of instruction sets and can be used in --instruction-set too:");
- extraHelp.Add(string.Join(", ", Internal.JitInterface.InstructionSetFlags.AllCpuNames));
-
- argSyntax.ExtraHelpParagraphs = extraHelp;
- }
-
- if (waitForDebugger)
+ if (command.Result.GetValueForOption(command.WaitForDebugger))
{
Console.WriteLine("Waiting for debugger to attach. Press ENTER to continue");
Console.ReadLine();
}
-
- _optimizationMode = OptimizationMode.None;
- if (optimizeSpace)
- {
- if (optimizeTime)
- Console.WriteLine("Warning: overriding -Ot with -Os");
- _optimizationMode = OptimizationMode.PreferSize;
- }
- else if (optimizeTime)
- _optimizationMode = OptimizationMode.PreferSpeed;
- else if (optimize)
- _optimizationMode = OptimizationMode.Blended;
-
- foreach (var input in inputFiles)
- Helpers.AppendExpandedPaths(_inputFilePaths, input, true);
-
- foreach (var reference in referenceFiles)
- Helpers.AppendExpandedPaths(_referenceFilePaths, reference, false);
-
- if (_makeReproPath != null)
- {
- // Create a repro package in the specified path
- // This package will have the set of input files needed for compilation
- // + the original command line arguments
- // + a rsp file that should work to directly run out of the zip file
-
- Helpers.MakeReproPackage(_makeReproPath, _outputFilePath, args, argSyntax, new[] { "-r", "-m", "--rdxml", "--directpinvokelist", "--descriptor" });
- }
-
- if (_reflectionData != null && Array.IndexOf(validReflectionDataOptions, _reflectionData) < 0)
- {
- Console.WriteLine($"Warning: option '{_reflectionData}' not recognized");
- }
-
- return argSyntax;
}
private IReadOnlyCollection<MethodDesc> CreateInitializerList(CompilerTypeSystemContext context)
@@ -373,7 +45,7 @@ namespace ILCompiler
// Build a list of assemblies that have an initializer that needs to run before
// any user code runs.
- foreach (string initAssemblyName in _initAssemblies)
+ foreach (string initAssemblyName in Get(_command.InitAssemblies))
{
ModuleDesc assembly = context.ResolveAssembly(new AssemblyName(initAssemblyName), throwIfNotFound: true);
assembliesWithInitializers.Add(assembly);
@@ -384,78 +56,35 @@ namespace ILCompiler
List<MethodDesc> initializerList = new List<MethodDesc>(libraryInitializers.LibraryInitializerMethods);
// If there are any AppContext switches the user wishes to enable, generate code that sets them.
- if (_appContextSwitches.Count > 0)
+ string[] appContextSwitches = Get(_command.AppContextSwitches);
+ if (appContextSwitches.Length > 0)
{
MethodDesc appContextInitMethod = new Internal.IL.Stubs.StartupCode.AppContextInitializerMethod(
- context.GeneratedAssembly.GetGlobalModuleType(), _appContextSwitches);
+ context.GeneratedAssembly.GetGlobalModuleType(), appContextSwitches);
initializerList.Add(appContextInitMethod);
}
return initializerList;
}
- private static TargetArchitecture GetTargetArchitectureFromArg(string archArg)
+ public int Run()
{
- if (archArg.Equals("x86", StringComparison.OrdinalIgnoreCase))
- return TargetArchitecture.X86;
- else if (archArg.Equals("x64", StringComparison.OrdinalIgnoreCase))
- return TargetArchitecture.X64;
- else if (archArg.Equals("arm", StringComparison.OrdinalIgnoreCase))
- return TargetArchitecture.ARM;
- else if (archArg.Equals("arm64", StringComparison.OrdinalIgnoreCase))
- return TargetArchitecture.ARM64;
- else
- throw new CommandLineException("Target architecture is not supported");
- }
-
- private static TargetOS GetTargetOSFromArg(string osArg)
- {
- if (osArg.Equals("windows", StringComparison.OrdinalIgnoreCase))
- return TargetOS.Windows;
- else if (osArg.Equals("linux", StringComparison.OrdinalIgnoreCase))
- return TargetOS.Linux;
- else if (osArg.Equals("osx", StringComparison.OrdinalIgnoreCase))
- return TargetOS.OSX;
- else
- throw new CommandLineException("Target OS is not supported");
- }
-
- private int Run(string[] args)
- {
- InitializeDefaultOptions();
-
- ArgumentSyntax syntax = ParseCommandLine(args);
- if (_help)
- {
- Help(syntax.GetHelpText());
- return 1;
- }
-
- if (_outputFilePath == null)
+ string outputFilePath = Get(_command.OutputFilePath);
+ if (outputFilePath == null)
throw new CommandLineException("Output filename must be specified (/out <file>)");
- //
- // Set target Architecture and OS
- //
- if (_targetArchitectureStr != null)
- {
- _targetArchitecture = GetTargetArchitectureFromArg(_targetArchitectureStr);
- }
- if (_targetOSStr != null)
- {
- _targetOS = GetTargetOSFromArg(_targetOSStr);
- }
-
- InstructionSetSupportBuilder instructionSetSupportBuilder = new InstructionSetSupportBuilder(_targetArchitecture);
+ TargetArchitecture targetArchitecture = Get(_command.TargetArchitecture);
+ InstructionSetSupportBuilder instructionSetSupportBuilder = new InstructionSetSupportBuilder(targetArchitecture);
+ TargetOS targetOS = Get(_command.TargetOS);
// The runtime expects certain baselines that the codegen can assume as well.
- if ((_targetArchitecture == TargetArchitecture.X86) || (_targetArchitecture == TargetArchitecture.X64))
+ if ((targetArchitecture == TargetArchitecture.X86) || (targetArchitecture == TargetArchitecture.X64))
{
instructionSetSupportBuilder.AddSupportedInstructionSet("sse2"); // Lower baselines included by implication
}
- else if (_targetArchitecture == TargetArchitecture.ARM64)
+ else if (targetArchitecture == TargetArchitecture.ARM64)
{
- if (_targetOS == TargetOS.OSX)
+ if (targetOS == TargetOS.OSX)
{
// For osx-arm64 we know that apple-m1 is a baseline
instructionSetSupportBuilder.AddSupportedInstructionSet("apple-m1");
@@ -466,12 +95,13 @@ namespace ILCompiler
}
}
- if (_instructionSet != null)
+ string instructionSetArg = Get(_command.InstructionSet);
+ if (instructionSetArg != null)
{
- List<string> instructionSetParams = new List<string>();
+ var instructionSetParams = new List<string>();
// Normalize instruction set format to include implied +.
- string[] instructionSetParamsInput = _instructionSet.Split(',');
+ string[] instructionSetParamsInput = instructionSetArg.Split(',');
for (int i = 0; i < instructionSetParamsInput.Length; i++)
{
string instructionSet = instructionSetParamsInput[i];
@@ -510,10 +140,10 @@ namespace ILCompiler
(string specifiedInstructionSet, string impliedInstructionSet) =>
throw new CommandLineException(string.Format("Unsupported combination of instruction sets: {0}/{1}", specifiedInstructionSet, impliedInstructionSet)));
- InstructionSetSupportBuilder optimisticInstructionSetSupportBuilder = new InstructionSetSupportBuilder(_targetArchitecture);
+ InstructionSetSupportBuilder optimisticInstructionSetSupportBuilder = new InstructionSetSupportBuilder(targetArchitecture);
// Optimistically assume some instruction sets are present.
- if ((_targetArchitecture == TargetArchitecture.X86) || (_targetArchitecture == TargetArchitecture.X64))
+ if (targetArchitecture == TargetArchitecture.X86 || targetArchitecture == TargetArchitecture.X64)
{
// We set these hardware features as opportunistically enabled as most of hardware in the wild supports them.
// Note that we do not indicate support for AVX, or any other instruction set which uses the VEX encodings as
@@ -536,7 +166,7 @@ namespace ILCompiler
optimisticInstructionSetSupportBuilder.AddSupportedInstructionSet("avxvnni");
}
}
- else if (_targetArchitecture == TargetArchitecture.ARM64)
+ else if (targetArchitecture == TargetArchitecture.ARM64)
{
optimisticInstructionSetSupportBuilder.AddSupportedInstructionSet("aes");
optimisticInstructionSetSupportBuilder.AddSupportedInstructionSet("crc");
@@ -552,12 +182,14 @@ namespace ILCompiler
optimisticInstructionSet.Add(supportedInstructionSet);
var instructionSetSupport = new InstructionSetSupport(supportedInstructionSet,
- unsupportedInstructionSet,
- optimisticInstructionSet,
- InstructionSetSupportBuilder.GetNonSpecifiableInstructionSetsForArch(_targetArchitecture),
- _targetArchitecture);
+ unsupportedInstructionSet,
+ optimisticInstructionSet,
+ InstructionSetSupportBuilder.GetNonSpecifiableInstructionSetsForArch(targetArchitecture),
+ targetArchitecture);
- bool supportsReflection = _reflectionData != "none" && _systemModuleName == DefaultSystemModule;
+ string systemModuleName = Get(_command.SystemModuleName);
+ string reflectionData = Get(_command.ReflectionData);
+ bool supportsReflection = reflectionData != "none" && systemModuleName == Helpers.DefaultSystemModule;
//
// Initialize type system context
@@ -567,9 +199,9 @@ namespace ILCompiler
var simdVectorLength = instructionSetSupport.GetVectorTSimdVector();
var targetAbi = TargetAbi.NativeAot;
- var targetDetails = new TargetDetails(_targetArchitecture, _targetOS, targetAbi, simdVectorLength);
+ var targetDetails = new TargetDetails(targetArchitecture, targetOS, targetAbi, simdVectorLength);
CompilerTypeSystemContext typeSystemContext =
- new CompilerTypeSystemContext(targetDetails, genericsMode, supportsReflection ? DelegateFeature.All : 0, _maxGenericCycle);
+ new CompilerTypeSystemContext(targetDetails, genericsMode, supportsReflection ? DelegateFeature.All : 0, Get(_command.MaxGenericCycle));
//
// TODO: To support our pre-compiled test tree, allow input files that aren't managed assemblies since
@@ -578,10 +210,10 @@ namespace ILCompiler
// See: https://github.com/dotnet/corert/issues/2785
//
// When we undo this hack, replace the foreach with
- // typeSystemContext.InputFilePaths = _inputFilePaths;
+ // typeSystemContext.InputFilePaths = _command.Result.GetValueForArgument(inputFilePaths);
//
Dictionary<string, string> inputFilePaths = new Dictionary<string, string>();
- foreach (var inputFile in _inputFilePaths)
+ foreach (var inputFile in _command.Result.GetValueForArgument(_command.InputFilePaths))
{
try
{
@@ -595,29 +227,30 @@ namespace ILCompiler
}
typeSystemContext.InputFilePaths = inputFilePaths;
- typeSystemContext.ReferenceFilePaths = _referenceFilePaths;
- if (!typeSystemContext.InputFilePaths.ContainsKey(_systemModuleName)
- && !typeSystemContext.ReferenceFilePaths.ContainsKey(_systemModuleName))
- throw new CommandLineException($"System module {_systemModuleName} does not exists. Make sure that you specify --systemmodule");
+ typeSystemContext.ReferenceFilePaths = Get(_command.ReferenceFiles);
+ if (!typeSystemContext.InputFilePaths.ContainsKey(systemModuleName)
+ && !typeSystemContext.ReferenceFilePaths.ContainsKey(systemModuleName))
+ throw new CommandLineException($"System module {systemModuleName} does not exists. Make sure that you specify --systemmodule");
- typeSystemContext.SetSystemModule(typeSystemContext.GetModuleForSimpleName(_systemModuleName));
+ typeSystemContext.SetSystemModule(typeSystemContext.GetModuleForSimpleName(systemModuleName));
if (typeSystemContext.InputFilePaths.Count == 0)
throw new CommandLineException("No input files specified");
SecurityMitigationOptions securityMitigationOptions = 0;
- if (StringComparer.OrdinalIgnoreCase.Equals(_guard, "cf"))
+ string guard = Get(_command.Guard);
+ if (StringComparer.OrdinalIgnoreCase.Equals(guard, "cf"))
{
- if (_targetOS != TargetOS.Windows)
+ if (targetOS != TargetOS.Windows)
{
throw new CommandLineException($"Control flow guard only available on Windows");
}
securityMitigationOptions = SecurityMitigationOptions.ControlFlowGuardAnnotations;
}
- else if (!string.IsNullOrEmpty(_guard))
+ else if (!string.IsNullOrEmpty(guard))
{
- throw new CommandLineException($"Unrecognized mitigation option '{_guard}'");
+ throw new CommandLineException($"Unrecognized mitigation option '{guard}'");
}
//
@@ -629,6 +262,7 @@ namespace ILCompiler
CompilationModuleGroup compilationGroup;
List<ICompilationRootProvider> compilationRoots = new List<ICompilationRootProvider>();
+ bool multiFile = Get(_command.MultiFile);
if (singleMethod != null)
{
// Compiling just a single method
@@ -657,14 +291,16 @@ namespace ILCompiler
compilationRoots.Add(new ExportedMethodsRootProvider(module));
}
+ string[] runtimeOptions = Get(_command.RuntimeOptions);
if (entrypointModule != null)
{
compilationRoots.Add(new MainMethodRootProvider(entrypointModule, CreateInitializerList(typeSystemContext)));
- compilationRoots.Add(new RuntimeConfigurationRootProvider(_runtimeOptions));
+ compilationRoots.Add(new RuntimeConfigurationRootProvider(runtimeOptions));
compilationRoots.Add(new ExpectedIsaFeaturesRootProvider(instructionSetSupport));
}
- if (_multiFile)
+ bool nativeLib = Get(_command.NativeLib);
+ if (multiFile)
{
List<EcmaModule> inputModules = new List<EcmaModule>();
@@ -684,7 +320,7 @@ namespace ILCompiler
}
else
{
- if (entrypointModule == null && !_nativeLib)
+ if (entrypointModule == null && !nativeLib)
throw new Exception("No entrypoint module");
if (!systemModuleIsInputModule)
@@ -692,21 +328,21 @@ namespace ILCompiler
compilationGroup = new SingleFileCompilationModuleGroup();
}
- if (_nativeLib)
+ if (nativeLib)
{
// Set owning module of generated native library startup method to compiler generated module,
// to ensure the startup method is included in the object file during multimodule mode build
compilationRoots.Add(new NativeLibraryInitializerRootProvider(typeSystemContext.GeneratedAssembly, CreateInitializerList(typeSystemContext)));
- compilationRoots.Add(new RuntimeConfigurationRootProvider(_runtimeOptions));
+ compilationRoots.Add(new RuntimeConfigurationRootProvider(runtimeOptions));
compilationRoots.Add(new ExpectedIsaFeaturesRootProvider(instructionSetSupport));
}
- foreach (var rdXmlFilePath in _rdXmlFilePaths)
+ foreach (var rdXmlFilePath in Get(_command.RdXmlFilePaths))
{
compilationRoots.Add(new RdXmlRootProvider(typeSystemContext, rdXmlFilePath));
}
- foreach (var linkTrimFilePath in _linkTrimFilePaths)
+ foreach (var linkTrimFilePath in Get(_command.LinkTrimFilePaths))
{
if (!File.Exists(linkTrimFilePath))
throw new CommandLineException($"'{linkTrimFilePath}' doesn't exist");
@@ -714,23 +350,9 @@ namespace ILCompiler
}
}
- _conditionallyRootedAssemblies = new List<string>(_conditionallyRootedAssemblies.Select(ILLinkify));
- _trimmedAssemblies = new List<string>(_trimmedAssemblies.Select(ILLinkify));
-
- static string ILLinkify(string rootedAssembly)
- {
- // For compatibility with IL Linker, the parameter could be a file name or an assembly name.
- // This is the logic IL Linker uses to decide how to interpret the string. Really.
- string simpleName;
- if (File.Exists(rootedAssembly))
- simpleName = Path.GetFileNameWithoutExtension(rootedAssembly);
- else
- simpleName = rootedAssembly;
- return simpleName;
- }
-
// Root whatever assemblies were specified on the command line
- foreach (var rootedAssembly in _rootedAssemblies)
+ string[] rootedAssemblies = Get(_command.RootedAssemblies);
+ foreach (var rootedAssembly in rootedAssemblies)
{
// For compatibility with IL Linker, the parameter could be a file name or an assembly name.
// This is the logic IL Linker uses to decide how to interpret the string. Really.
@@ -738,7 +360,7 @@ namespace ILCompiler
? typeSystemContext.GetModuleFromPath(rootedAssembly)
: typeSystemContext.GetModuleForSimpleName(rootedAssembly);
- // We only root the module type. The rest will fall out because we treat _rootedAssemblies
+ // We only root the module type. The rest will fall out because we treat rootedAssemblies
// same as conditionally rooted ones and here we're fulfilling the condition ("something is used").
compilationRoots.Add(
new GenericRootProvider<ModuleDesc>(module,
@@ -751,20 +373,24 @@ namespace ILCompiler
CompilationBuilder builder = new RyuJitCompilationBuilder(typeSystemContext, compilationGroup);
- string compilationUnitPrefix = _multiFile ? Path.GetFileNameWithoutExtension(_outputFilePath) : "";
+ string compilationUnitPrefix = multiFile ? Path.GetFileNameWithoutExtension(outputFilePath) : "";
builder.UseCompilationUnitPrefix(compilationUnitPrefix);
- if (_mibcFilePaths.Count > 0)
- ((RyuJitCompilationBuilder)builder).UseProfileData(_mibcFilePaths);
- if (!string.IsNullOrEmpty(_jitPath))
- ((RyuJitCompilationBuilder)builder).UseJitPath(_jitPath);
+ string[] mibcFilePaths = Get(_command.MibcFilePaths);
+ if (mibcFilePaths.Length > 0)
+ ((RyuJitCompilationBuilder)builder).UseProfileData(mibcFilePaths);
- PInvokeILEmitterConfiguration pinvokePolicy = new ConfigurablePInvokePolicy(typeSystemContext.Target, _directPInvokes, _directPInvokeLists);
+ string jitPath = Get(_command.JitPath);
+ if (!string.IsNullOrEmpty(jitPath))
+ ((RyuJitCompilationBuilder)builder).UseJitPath(jitPath);
+
+ PInvokeILEmitterConfiguration pinvokePolicy = new ConfigurablePInvokePolicy(typeSystemContext.Target,
+ Get(_command.DirectPInvokes), Get(_command.DirectPInvokeLists));
ILProvider ilProvider = new NativeAotILProvider();
List<KeyValuePair<string, bool>> featureSwitches = new List<KeyValuePair<string, bool>>();
- foreach (var switchPair in _featureSwitches)
+ foreach (var switchPair in Get(_command.FeatureSwitches))
{
string[] switchAndValue = switchPair.Split('=');
if (switchAndValue.Length != 2
@@ -775,15 +401,16 @@ namespace ILCompiler
ilProvider = new FeatureSwitchManager(ilProvider, featureSwitches);
var suppressedWarningCategories = new List<string>();
- if (_noTrimWarn)
+ if (Get(_command.NoTrimWarn))
suppressedWarningCategories.Add(MessageSubCategory.TrimAnalysis);
- if (_noAotWarn)
+ if (Get(_command.NoAotWarn))
suppressedWarningCategories.Add(MessageSubCategory.AotAnalysis);
- var logger = new Logger(Console.Out, ilProvider, _isVerbose, ProcessWarningCodes(_suppressedWarnings), _singleWarn, _singleWarnEnabledAssemblies, _singleWarnDisabledAssemblies, suppressedWarningCategories);
+ var logger = new Logger(Console.Out, ilProvider, Get(_command.IsVerbose), ProcessWarningCodes(Get(_command.SuppressedWarnings)),
+ Get(_command.SingleWarn), Get(_command.SingleWarnEnabledAssemblies), Get(_command.SingleWarnDisabledAssemblies), suppressedWarningCategories);
CompilerGeneratedState compilerGeneratedState = new CompilerGeneratedState(ilProvider, logger);
- var stackTracePolicy = _emitStackTraceData ?
+ var stackTracePolicy = Get(_command.EmitStackTraceData) ?
(StackTraceEmissionPolicy)new EcmaMethodStackTraceEmissionPolicy() : new NoStackTraceEmissionPolicy();
MetadataBlockingPolicy mdBlockingPolicy;
@@ -791,20 +418,19 @@ namespace ILCompiler
UsageBasedMetadataGenerationOptions metadataGenerationOptions = default;
if (supportsReflection)
{
- mdBlockingPolicy = _noMetadataBlocking
- ? (MetadataBlockingPolicy)new NoMetadataBlockingPolicy()
- : new BlockedInternalsBlockingPolicy(typeSystemContext);
+ mdBlockingPolicy = Get(_command.NoMetadataBlocking) ?
+ new NoMetadataBlockingPolicy() : new BlockedInternalsBlockingPolicy(typeSystemContext);
resBlockingPolicy = new ManifestResourceBlockingPolicy(featureSwitches);
metadataGenerationOptions |= UsageBasedMetadataGenerationOptions.AnonymousTypeHeuristic;
- if (_completeTypesMetadata)
+ if (Get(_command.CompleteTypesMetadata))
metadataGenerationOptions |= UsageBasedMetadataGenerationOptions.CompleteTypesOnly;
- if (_scanReflection)
+ if (Get(_command.ScanReflection))
metadataGenerationOptions |= UsageBasedMetadataGenerationOptions.ReflectionILScanning;
- if (_reflectionData == "all")
+ if (reflectionData == "all")
metadataGenerationOptions |= UsageBasedMetadataGenerationOptions.CreateReflectableArtifacts;
- if (_rootDefaultAssemblies)
+ if (Get(_command.RootDefaultAssemblies))
metadataGenerationOptions |= UsageBasedMetadataGenerationOptions.RootDefaultAssemblies;
}
else
@@ -822,15 +448,16 @@ namespace ILCompiler
typeSystemContext,
mdBlockingPolicy,
resBlockingPolicy,
- _metadataLogFileName,
+ Get(_command.MetadataLogFileName),
stackTracePolicy,
invokeThunkGenerationPolicy,
flowAnnotations,
metadataGenerationOptions,
logger,
featureSwitches,
- _conditionallyRootedAssemblies.Concat(_rootedAssemblies),
- _trimmedAssemblies);
+ Get(_command.ConditionallyRootedAssemblies),
+ rootedAssemblies,
+ Get(_command.TrimmedAssemblies));
InteropStateManager interopStateManager = new InteropStateManager(typeSystemContext.GeneratedAssembly);
InteropStubManager interopStubManager = new UsageBasedInteropStubManager(interopStateManager, pinvokePolicy, logger);
@@ -839,15 +466,15 @@ namespace ILCompiler
// We also don't do this for multifile because scanner doesn't simulate inlining (this would be
// fixable by using a CompilationGroup for the scanner that has a bigger worldview, but
// let's cross that bridge when we get there).
- bool useScanner = _useScanner ||
- (_optimizationMode != OptimizationMode.None && !_multiFile);
+ bool useScanner = Get(_command.UseScanner) ||
+ (_command.OptimizationMode != OptimizationMode.None && !multiFile);
- useScanner &= !_noScanner;
+ useScanner &= !Get(_command.NoScanner);
// Enable static data preinitialization in optimized builds.
- bool preinitStatics = _preinitStatics ||
- (_optimizationMode != OptimizationMode.None && !_multiFile);
- preinitStatics &= !_noPreinitStatics;
+ bool preinitStatics = Get(_command.PreinitStatics) ||
+ (_command.OptimizationMode != OptimizationMode.None && !multiFile);
+ preinitStatics &= !Get(_command.NoPreinitStatics);
var preinitManager = new PreinitializationManager(typeSystemContext, compilationGroup, ilProvider, preinitStatics);
builder
@@ -859,6 +486,7 @@ namespace ILCompiler
List<MethodDesc> scannerCompiledMethods = null;
#endif
+ int parallelism = Get(_command.Parallelism);
if (useScanner)
{
// Run the scanner in a separate stack frame so that there's no dangling references to
@@ -872,12 +500,14 @@ namespace ILCompiler
ILScannerBuilder scannerBuilder = builder.GetILScannerBuilder()
.UseCompilationRoots(compilationRoots)
.UseMetadataManager(metadataManager)
- .UseParallelism(_parallelism)
+ .UseParallelism(parallelism)
.UseInteropStubManager(interopStubManager)
.UseLogger(logger);
- if (_scanDgmlLogFileName != null)
- scannerBuilder.UseDependencyTracking(_generateFullScanDgmlLog ? DependencyTrackingLevel.All : DependencyTrackingLevel.First);
+ string scanDgmlLogFileName = Get(_command.ScanDgmlLogFileName);
+ if (scanDgmlLogFileName != null)
+ scannerBuilder.UseDependencyTracking(Get(_command.GenerateFullScanDgmlLog) ?
+ DependencyTrackingLevel.All : DependencyTrackingLevel.First);
IILScanner scanner = scannerBuilder.ToILScanner();
@@ -888,8 +518,8 @@ namespace ILCompiler
scannerConstructedTypes = new List<TypeDesc>(scanResults.ConstructedEETypes);
#endif
- if (_scanDgmlLogFileName != null)
- scanResults.WriteDependencyLog(_scanDgmlLogFileName);
+ if (scanDgmlLogFileName != null)
+ scanResults.WriteDependencyLog(scanDgmlLogFileName);
metadataManager = ((UsageBasedMetadataManager)metadataManager).ToAnalysisBasedMetadataManager();
@@ -920,47 +550,54 @@ namespace ILCompiler
builder.UseMethodImportationErrorProvider(scanResults.GetMethodImportationErrorProvider());
}
- DebugInformationProvider debugInfoProvider = _enableDebugInfo ?
- (_ilDump == null ? new DebugInformationProvider() : new ILAssemblyGeneratingMethodDebugInfoProvider(_ilDump, new EcmaOnlyDebugInformationProvider())) :
+ string ilDump = Get(_command.IlDump);
+ DebugInformationProvider debugInfoProvider = Get(_command.EnableDebugInfo) ?
+ (ilDump == null ? new DebugInformationProvider() : new ILAssemblyGeneratingMethodDebugInfoProvider(ilDump, new EcmaOnlyDebugInformationProvider())) :
new NullDebugInformationProvider();
- DependencyTrackingLevel trackingLevel = _dgmlLogFileName == null ?
- DependencyTrackingLevel.None : (_generateFullDgmlLog ? DependencyTrackingLevel.All : DependencyTrackingLevel.First);
+ string dgmlLogFileName = Get(_command.DgmlLogFileName);
+ DependencyTrackingLevel trackingLevel = dgmlLogFileName == null ?
+ DependencyTrackingLevel.None : (Get(_command.GenerateFullDgmlLog) ?
+ DependencyTrackingLevel.All : DependencyTrackingLevel.First);
compilationRoots.Add(metadataManager);
compilationRoots.Add(interopStubManager);
builder
.UseInstructionSetSupport(instructionSetSupport)
- .UseBackendOptions(_codegenOptions)
- .UseMethodBodyFolding(enable: _methodBodyFolding)
- .UseParallelism(_parallelism)
+ .UseBackendOptions(Get(_command.CodegenOptions))
+ .UseMethodBodyFolding(enable: Get(_command.MethodBodyFolding))
+ .UseParallelism(parallelism)
.UseMetadataManager(metadataManager)
.UseInteropStubManager(interopStubManager)
.UseLogger(logger)
.UseDependencyTracking(trackingLevel)
.UseCompilationRoots(compilationRoots)
- .UseOptimizationMode(_optimizationMode)
+ .UseOptimizationMode(_command.OptimizationMode)
.UseSecurityMitigationOptions(securityMitigationOptions)
.UseDebugInfoProvider(debugInfoProvider)
- .UseDwarf5(_useDwarf5);
+ .UseDwarf5(Get(_command.UseDwarf5));
- builder.UseResilience(_resilient);
+ builder.UseResilience(Get(_command.Resilient));
ICompilation compilation = builder.ToCompilation();
+ string mapFileName = Get(_command.MapFileName);
+ string mstatFileName = Get(_command.MstatFileName);
+
List<ObjectDumper> dumpers = new List<ObjectDumper>();
- if (_mapFileName != null)
- dumpers.Add(new XmlObjectDumper(_mapFileName));
+ if (mapFileName != null)
+ dumpers.Add(new XmlObjectDumper(mapFileName));
- if (_mstatFileName != null)
- dumpers.Add(new MstatObjectDumper(_mstatFileName, typeSystemContext));
+ if (mstatFileName != null)
+ dumpers.Add(new MstatObjectDumper(mstatFileName, typeSystemContext));
- CompilationResults compilationResults = compilation.Compile(_outputFilePath, ObjectDumper.Compose(dumpers));
- if (_exportsFile != null)
+ CompilationResults compilationResults = compilation.Compile(outputFilePath, ObjectDumper.Compose(dumpers));
+ string exportsFile = Get(_command.ExportsFile);
+ if (exportsFile != null)
{
- ExportsFileWriter defFileWriter = new ExportsFileWriter(typeSystemContext, _exportsFile);
+ ExportsFileWriter defFileWriter = new ExportsFileWriter(typeSystemContext, exportsFile);
foreach (var compilationRoot in compilationRoots)
{
if (compilationRoot is ExportedMethodsRootProvider provider)
@@ -972,8 +609,8 @@ namespace ILCompiler
typeSystemContext.LogWarnings(logger);
- if (_dgmlLogFileName != null)
- compilationResults.WriteDependencyLog(_dgmlLogFileName);
+ if (dgmlLogFileName != null)
+ compilationResults.WriteDependencyLog(dgmlLogFileName);
#if DEBUG
if (scannerConstructedTypes != null)
@@ -1002,7 +639,7 @@ namespace ILCompiler
// If optimizations are enabled, the results will for sure not match in the other direction due to inlining, etc.
// But there's at least some value in checking the scanner doesn't expand the universe too much in debug.
- if (_optimizationMode == OptimizationMode.None)
+ if (_command.OptimizationMode == OptimizationMode.None)
{
// Check that methods and types scanned are a subset of methods and types compiled
@@ -1070,30 +707,34 @@ namespace ILCompiler
private MethodDesc CheckAndParseSingleMethodModeArguments(CompilerTypeSystemContext context)
{
- if (_singleMethodName == null && _singleMethodTypeName == null && _singleMethodGenericArgs == null)
+ string singleMethodName = Get(_command.SingleMethodName);
+ string singleMethodTypeName = Get(_command.SingleMethodTypeName);
+ string[] singleMethodGenericArgs = Get(_command.SingleMethodGenericArgs);
+
+ if (singleMethodName == null && singleMethodTypeName == null && singleMethodGenericArgs.Length == 0)
return null;
- if (_singleMethodName == null || _singleMethodTypeName == null)
+ if (singleMethodName == null || singleMethodTypeName == null)
throw new CommandLineException("Both method name and type name are required parameters for single method mode");
- TypeDesc owningType = FindType(context, _singleMethodTypeName);
+ TypeDesc owningType = FindType(context, singleMethodTypeName);
// TODO: allow specifying signature to distinguish overloads
- MethodDesc method = owningType.GetMethod(_singleMethodName, null);
+ MethodDesc method = owningType.GetMethod(singleMethodName, null);
if (method == null)
- throw new CommandLineException($"Method '{_singleMethodName}' not found in '{_singleMethodTypeName}'");
+ throw new CommandLineException($"Method '{singleMethodName}' not found in '{singleMethodTypeName}'");
- if (method.HasInstantiation != (_singleMethodGenericArgs != null) ||
- (method.HasInstantiation && (method.Instantiation.Length != _singleMethodGenericArgs.Count)))
+ if (method.HasInstantiation != (singleMethodGenericArgs != null) ||
+ (method.HasInstantiation && (method.Instantiation.Length != singleMethodGenericArgs.Length)))
{
throw new CommandLineException(
- $"Expected {method.Instantiation.Length} generic arguments for method '{_singleMethodName}' on type '{_singleMethodTypeName}'");
+ $"Expected {method.Instantiation.Length} generic arguments for method '{singleMethodName}' on type '{singleMethodTypeName}'");
}
if (method.HasInstantiation)
{
List<TypeDesc> genericArguments = new List<TypeDesc>();
- foreach (var argString in _singleMethodGenericArgs)
+ foreach (var argString in singleMethodGenericArgs)
genericArguments.Add(FindType(context, argString));
method = method.MakeInstantiatedMethod(genericArguments.ToArray());
}
@@ -1101,23 +742,6 @@ namespace ILCompiler
return method;
}
- private static bool DumpReproArguments(CodeGenerationFailedException ex)
- {
- Console.WriteLine("To repro, add following arguments to the command line:");
-
- MethodDesc failingMethod = ex.Method;
-
- var formatter = new CustomAttributeTypeNameFormatter((IAssemblyDesc)failingMethod.Context.SystemModule);
-
- Console.Write($"--singlemethodtypename \"{formatter.FormatName(failingMethod.OwningType, true)}\"");
- Console.Write($" --singlemethodname {failingMethod.Name}");
-
- for (int i = 0; i < failingMethod.Instantiation.Length; i++)
- Console.Write($" --singlemethodgenericarg \"{formatter.FormatName(failingMethod.Instantiation[i], true)}\"");
-
- return false;
- }
-
private static IEnumerable<int> ProcessWarningCodes(IEnumerable<string> warningCodes)
{
foreach (string value in warningCodes)
@@ -1133,29 +757,15 @@ namespace ILCompiler
}
}
- private static int Main(string[] args)
- {
-#if DEBUG
- try
- {
- return new Program().Run(args);
- }
- catch (CodeGenerationFailedException ex) when (DumpReproArguments(ex))
- {
- throw new NotSupportedException(); // Unreachable
- }
-#else
- try
- {
- return new Program().Run(args);
- }
- catch (Exception e)
- {
- Console.Error.WriteLine("Error: " + e.Message);
- Console.Error.WriteLine(e.ToString());
- return 1;
- }
-#endif
- }
+ private T Get<T>(Option<T> option) => _command.Result.GetValueForOption(option);
+
+ private static int Main(string[] args) =>
+ new CommandLineBuilder(new ILCompilerRootCommand(args))
+ .UseTokenReplacer(Helpers.TryReadResponseFile)
+ .UseVersionOption("-v")
+ .UseHelp(context => context.HelpBuilder.CustomizeLayout(ILCompilerRootCommand.GetExtendedHelp))
+ .UseParseErrorReporting()
+ .Build()
+ .Invoke(args);
}
}
diff --git a/src/coreclr/tools/aot/ILCompiler/repro/repro.csproj b/src/coreclr/tools/aot/ILCompiler/repro/repro.csproj
index c584a57cef4..e18578f349c 100644
--- a/src/coreclr/tools/aot/ILCompiler/repro/repro.csproj
+++ b/src/coreclr/tools/aot/ILCompiler/repro/repro.csproj
@@ -29,9 +29,11 @@
<ReproResponseLines Include="--initassembly:System.Private.Reflection.Execution" />
<ReproResponseLines Include="--directpinvokelist:$(RuntimeBinDir)build\WindowsAPIs.txt" />
<ReproResponseLines Include="--directpinvoke:System.Globalization.Native" />
+ <ReproResponseLines Include="--directpinvoke:System.IO.Compression.Native" />
<ReproResponseLines Include="--stacktracedata" />
<ReproResponseLines Include="--scanreflection" />
<ReproResponseLines Include="--feature:System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization=false" />
+ <ReproResponseLines Include="--feature:System.Diagnostics.Tracing.EventSource.IsSupported=false" />
<ReproResponseLines Include="--feature:System.Resources.ResourceManager.AllowCustomResourceTypes=false" />
<ReproResponseLines Include="--feature:System.Linq.Expressions.CanCompileToIL=false" />
<ReproResponseLines Include="--feature:System.Linq.Expressions.CanEmitObjectArrayDelegate=false" />
diff --git a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/ILCompilerDriver.cs b/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/ILCompilerDriver.cs
index 94389b716e2..b86d53165e5 100644
--- a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/ILCompilerDriver.cs
+++ b/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/ILCompilerDriver.cs
@@ -73,6 +73,7 @@ namespace Mono.Linker.Tests.TestCasesRunner
logger,
Array.Empty<KeyValuePair<string, bool>> (),
Array.Empty<string> (),
+ Array.Empty<string> (),
options.TrimAssemblies.ToArray ());
CompilationBuilder builder = new RyuJitCompilationBuilder (typeSystemContext, compilationGroup)
diff --git a/src/coreclr/tools/aot/crossgen2/CommandLineOptions.cs b/src/coreclr/tools/aot/crossgen2/CommandLineOptions.cs
deleted file mode 100644
index b7bf31cb652..00000000000
--- a/src/coreclr/tools/aot/crossgen2/CommandLineOptions.cs
+++ /dev/null
@@ -1,266 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-using Internal.CommandLine;
-using Internal.TypeSystem;
-
-namespace ILCompiler
-{
- internal class CommandLineOptions
- {
- public const int DefaultPerfMapFormatVersion = 0;
-
- public bool Help;
- public string HelpText;
- public bool Version;
-
- public IReadOnlyList<string> InputFilePaths;
- public IReadOnlyList<string> InputBubbleReferenceFilePaths;
- public IReadOnlyList<string> UnrootedInputFilePaths;
- public IReadOnlyList<string> ReferenceFilePaths;
- public IReadOnlyList<string> MibcFilePaths;
- public IReadOnlyList<string> CrossModuleInlining;
- public string InstructionSet;
- public string OutputFilePath;
-
- public string CompositeRootPath;
- public bool Optimize;
- public bool OptimizeDisabled;
- public bool OptimizeSpace;
- public bool OptimizeTime;
- public bool AsyncMethodOptimization;
- public string NonLocalGenericsModule;
- public bool InputBubble;
- public bool CompileBubbleGenerics;
- public bool Verbose;
- public bool Composite;
- public string CompositeKeyFile;
- public bool CompileNoMethods;
- public bool EmbedPgoData;
- public bool OutNearInput;
- public bool SingleFileCompilation;
-
- public string DgmlLogFileName;
- public bool GenerateFullDgmlLog;
-
- public string TargetArch;
- public string TargetOS;
- public string JitPath;
- public string SystemModule;
- public bool WaitForDebugger;
- public bool Partial;
- public bool Resilient;
- public bool Map;
- public bool MapCsv;
- public bool PrintReproInstructions;
- public bool Pdb;
- public bool SupportIbc;
- public string PdbPath;
- public bool PerfMap;
- public string PerfMapPath;
- public int PerfMapFormatVersion;
- public int Parallelism;
- public int CustomPESectionAlignment;
- public string MethodLayout;
- public string FileLayout;
- public bool VerifyTypeAndFieldLayout;
- public string CallChainProfileFile;
- public string ImageBase;
-
- public string SingleMethodTypeName;
- public string SingleMethodName;
- public int SingleMethodIndex;
- public IReadOnlyList<string> SingleMethodGenericArg;
-
- public IReadOnlyList<string> CodegenOptions;
-
- public string MakeReproPath;
-
- public bool CompositeOrInputBubble => Composite || InputBubble;
-
- public CommandLineOptions(string[] args)
- {
- InputFilePaths = Array.Empty<string>();
- InputBubbleReferenceFilePaths = Array.Empty<string>();
- UnrootedInputFilePaths = Array.Empty<string>();
- ReferenceFilePaths = Array.Empty<string>();
- MibcFilePaths = Array.Empty<string>();
- CodegenOptions = Array.Empty<string>();
- NonLocalGenericsModule = "";
-
- PerfMapFormatVersion = DefaultPerfMapFormatVersion;
- Parallelism = Environment.ProcessorCount;
- SingleMethodGenericArg = null;
-
- // These behaviors default to enabled
- AsyncMethodOptimization = true;
-
- bool forceHelp = false;
- if (args.Length == 0)
- {
- forceHelp = true;
- }
-
- foreach (string arg in args)
- {
- if (arg == "-?")
- forceHelp = true;
- }
-
- if (forceHelp)
- {
- args = new string[] {"--help"};
- }
-
- ArgumentSyntax argSyntax = ArgumentSyntax.Parse(args, syntax =>
- {
- syntax.ApplicationName = typeof(Program).Assembly.GetName().Name.ToString();
-
- // HandleHelp writes to error, fails fast with crash dialog and lacks custom formatting.
- syntax.HandleHelp = false;
- syntax.HandleErrors = true;
-
- syntax.DefineOptionList("u|unrooted-input-file-paths", ref UnrootedInputFilePaths, SR.UnrootedInputFilesToCompile);
- syntax.DefineOptionList("r|reference", ref ReferenceFilePaths, SR.ReferenceFiles);
- syntax.DefineOption("instruction-set", ref InstructionSet, SR.InstructionSets);
- syntax.DefineOptionList("m|mibc", ref MibcFilePaths, SR.MibcFiles);
- syntax.DefineOption("o|out|outputfilepath", ref OutputFilePath, SR.OutputFilePath);
- syntax.DefineOption("crp|compositerootpath", ref CompositeRootPath, SR.CompositeRootPath);
- syntax.DefineOption("O|optimize", ref Optimize, SR.EnableOptimizationsOption);
- syntax.DefineOption("Od|optimize-disabled", ref OptimizeDisabled, SR.DisableOptimizationsOption);
- syntax.DefineOption("Os|optimize-space", ref OptimizeSpace, SR.OptimizeSpaceOption);
- syntax.DefineOption("Ot|optimize-time", ref OptimizeTime, SR.OptimizeSpeedOption);
- syntax.DefineOption("inputbubble", ref InputBubble, SR.InputBubbleOption);
- syntax.DefineOptionList("inputbubbleref", ref InputBubbleReferenceFilePaths, SR.InputBubbleReferenceFiles);
- syntax.DefineOption("composite", ref Composite, SR.CompositeBuildMode);
- syntax.DefineOption("compositekeyfile", ref CompositeKeyFile, SR.CompositeKeyFile);
- syntax.DefineOption("compile-no-methods", ref CompileNoMethods, SR.CompileNoMethodsOption);
- syntax.DefineOption("out-near-input", ref OutNearInput, SR.OutNearInputOption);
- syntax.DefineOption("single-file-compilation", ref SingleFileCompilation, SR.SingleFileCompilationOption);
- syntax.DefineOption("partial", ref Partial, SR.PartialImageOption);
- syntax.DefineOption("compilebubblegenerics", ref CompileBubbleGenerics, SR.BubbleGenericsOption);
- syntax.DefineOption("embed-pgo-data", ref EmbedPgoData, SR.EmbedPgoDataOption);
- syntax.DefineOption("dgmllog|dgml-log-file-name", ref DgmlLogFileName, SR.SaveDependencyLogOption);
- syntax.DefineOption("fulllog|generate-full-dmgl-log", ref GenerateFullDgmlLog, SR.SaveDetailedLogOption);
- syntax.DefineOption("verbose", ref Verbose, SR.VerboseLoggingOption);
- syntax.DefineOption("systemmodule", ref SystemModule, SR.SystemModuleOverrideOption);
- syntax.DefineOption("waitfordebugger", ref WaitForDebugger, SR.WaitForDebuggerOption);
- syntax.DefineOptionList("codegenopt|codegen-options", ref CodegenOptions, SR.CodeGenOptions);
- syntax.DefineOption("support-ibc", ref SupportIbc, SR.SupportIbc);
- syntax.DefineOption("resilient", ref Resilient, SR.ResilientOption);
- syntax.DefineOption("imagebase", ref ImageBase, SR.ImageBase);
-
- syntax.DefineOption("targetarch", ref TargetArch, SR.TargetArchOption);
- syntax.DefineOption("targetos", ref TargetOS, SR.TargetOSOption);
- syntax.DefineOption("jitpath", ref JitPath, SR.JitPathOption);
-
- syntax.DefineOption("print-repro-instructions", ref PrintReproInstructions, SR.PrintReproInstructionsOption);
- syntax.DefineOption("singlemethodtypename", ref SingleMethodTypeName, SR.SingleMethodTypeName);
- syntax.DefineOption("singlemethodname", ref SingleMethodName, SR.SingleMethodMethodName);
- syntax.DefineOption("singlemethodindex", ref SingleMethodIndex, SR.SingleMethodIndex);
- syntax.DefineOptionList("singlemethodgenericarg", ref SingleMethodGenericArg, SR.SingleMethodGenericArgs);
-
- syntax.DefineOption("parallelism", ref Parallelism, SR.ParalellismOption);
- syntax.DefineOption("custom-pe-section-alignment", ref CustomPESectionAlignment, SR.CustomPESectionAlignmentOption);
- syntax.DefineOption("map", ref Map, SR.MapFileOption);
- syntax.DefineOption("mapcsv", ref MapCsv, SR.MapCsvFileOption);
- syntax.DefineOption("pdb", ref Pdb, SR.PdbFileOption);
- syntax.DefineOption("pdb-path", ref PdbPath, SR.PdbFilePathOption);
- syntax.DefineOption("perfmap", ref PerfMap, SR.PerfMapFileOption);
- syntax.DefineOption("perfmap-path", ref PerfMapPath, SR.PerfMapFilePathOption);
- syntax.DefineOption("perfmap-format-version", ref PerfMapFormatVersion, SR.PerfMapFormatVersionOption);
-
- syntax.DefineOptionList("opt-cross-module", ref this.CrossModuleInlining, SR.CrossModuleInlining);
- syntax.DefineOption("opt-async-methods", ref AsyncMethodOptimization, SR.AsyncModuleOptimization);
- syntax.DefineOption("non-local-generics-module", ref NonLocalGenericsModule, SR.NonLocalGenericsModule);
-
- syntax.DefineOption("method-layout", ref MethodLayout, SR.MethodLayoutOption);
- syntax.DefineOption("file-layout", ref FileLayout, SR.FileLayoutOption);
- syntax.DefineOption("verify-type-and-field-layout", ref VerifyTypeAndFieldLayout, SR.VerifyTypeAndFieldLayoutOption);
- syntax.DefineOption("callchain-profile", ref CallChainProfileFile, SR.CallChainProfileFile);
-
- syntax.DefineOption("make-repro-path", ref MakeReproPath, SR.MakeReproPathHelp);
-
- syntax.DefineOption("h|help", ref Help, SR.HelpOption);
- syntax.DefineOption("v|version", ref Version, SR.VersionOption);
-
- syntax.DefineParameterList("in", ref InputFilePaths, SR.InputFilesToCompile);
- });
-
- if (Help)
- {
- List<string> extraHelp = new List<string>();
- extraHelp.Add(SR.OptionPassingHelp);
- extraHelp.Add("");
- extraHelp.Add(SR.DashDashHelp);
- extraHelp.Add("");
-
- string[] ValidArchitectures = new string[] {"arm", "armel", "arm64", "x86", "x64"};
- string[] ValidOS = new string[] {"windows", "linux", "osx"};
- TargetOS defaultOs;
- TargetArchitecture defaultArch;
- Program.ComputeDefaultOptions(out defaultOs, out defaultArch);
-
- extraHelp.Add(String.Format(SR.SwitchWithDefaultHelp, "--targetos", String.Join("', '", ValidOS), defaultOs.ToString().ToLowerInvariant()));
-
- extraHelp.Add("");
-
- extraHelp.Add(String.Format(SR.SwitchWithDefaultHelp, "--targetarch", String.Join("', '", ValidArchitectures), defaultArch.ToString().ToLowerInvariant()));
-
- extraHelp.Add("");
-
- extraHelp.Add(SR.InstructionSetHelp);
- foreach (string arch in ValidArchitectures)
- {
- StringBuilder archString = new StringBuilder();
-
- archString.Append(arch);
- archString.Append(": ");
-
- TargetArchitecture targetArch = Program.GetTargetArchitectureFromArg(arch, out _);
- bool first = true;
- foreach (var instructionSet in Internal.JitInterface.InstructionSetFlags.ArchitectureToValidInstructionSets(targetArch))
- {
- // Only instruction sets with are specifiable should be printed to the help text
- if (instructionSet.Specifiable)
- {
- if (first)
- {
- first = false;
- }
- else
- {
- archString.Append(", ");
- }
- archString.Append(instructionSet.Name);
- }
- }
-
- extraHelp.Add(archString.ToString());
- }
-
- extraHelp.Add("");
- extraHelp.Add(SR.CpuFamilies);
- extraHelp.Add(string.Join(", ", Internal.JitInterface.InstructionSetFlags.AllCpuNames));
-
- argSyntax.ExtraHelpParagraphs = extraHelp;
-
- HelpText = argSyntax.GetHelpText();
- }
-
- if (MakeReproPath != null)
- {
- // Create a repro package in the specified path
- // This package will have the set of input files needed for compilation
- // + the original command line arguments
- // + a rsp file that should work to directly run out of the zip file
-
- Helpers.MakeReproPackage(MakeReproPath, OutputFilePath, args, argSyntax, new[] { "-r", "-u", "-m", "--inputbubbleref" });
- }
- }
- }
-}
diff --git a/src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.cs b/src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.cs
new file mode 100644
index 00000000000..8569f9fbf1c
--- /dev/null
+++ b/src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.cs
@@ -0,0 +1,376 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System;
+using System.Collections.Generic;
+using System.CommandLine;
+using System.CommandLine.Help;
+using System.CommandLine.Parsing;
+using System.IO;
+using System.Runtime.InteropServices;
+
+using Internal.TypeSystem;
+
+namespace ILCompiler
+{
+ internal class Crossgen2RootCommand : RootCommand
+ {
+ public Argument<Dictionary<string, string>> InputFilePaths { get; } =
+ new("input-file-path", result => Helpers.BuildPathDictionay(result.Tokens, true), false, "Input file(s)") { Arity = ArgumentArity.OneOrMore };
+ public Option<Dictionary<string, string>> UnrootedInputFilePaths { get; } =
+ new(new[] { "--unrooted-input-file-paths", "-u" }, result => Helpers.BuildPathDictionay(result.Tokens, true), true, SR.UnrootedInputFilesToCompile);
+ public Option<Dictionary<string, string>> ReferenceFilePaths { get; } =
+ new(new[] { "--reference", "-r" }, result => Helpers.BuildPathDictionay(result.Tokens, false), true, SR.ReferenceFiles);
+ public Option<string> InstructionSet { get; } =
+ new(new[] { "--instruction-set" }, SR.InstructionSets);
+ public Option<string[]> MibcFilePaths { get; } =
+ new(new[] { "--mibc", "-m" }, Array.Empty<string>, SR.MibcFiles);
+ public Option<string> OutputFilePath { get; } =
+ new(new[] { "--out", "-o" }, SR.OutputFilePath);
+ public Option<string> CompositeRootPath { get; } =
+ new(new[] { "--compositerootpath", "--crp" }, SR.CompositeRootPath);
+ public Option<bool> Optimize { get; } =
+ new(new[] { "--optimize", "-O" }, SR.EnableOptimizationsOption);
+ public Option<bool> OptimizeDisabled { get; } =
+ new(new[] { "--optimize-disabled", "-Od" }, SR.DisableOptimizationsOption);
+ public Option<bool> OptimizeSpace { get; } =
+ new(new[] { "--optimize-space", "-Os" }, SR.OptimizeSpaceOption);
+ public Option<bool> OptimizeTime { get; } =
+ new(new[] { "--optimize-time", "-Ot" }, SR.OptimizeSpeedOption);
+ public Option<bool> InputBubble { get; } =
+ new(new[] { "--inputbubble" }, SR.InputBubbleOption);
+ public Option<Dictionary<string, string>> InputBubbleReferenceFilePaths { get; } =
+ new(new[] { "--inputbubbleref" }, result => Helpers.BuildPathDictionay(result.Tokens, false), true, SR.InputBubbleReferenceFiles);
+ public Option<bool> Composite { get; } =
+ new(new[] { "--composite" }, SR.CompositeBuildMode);
+ public Option<string> CompositeKeyFile { get; } =
+ new(new[] { "--compositekeyfile" }, SR.CompositeKeyFile);
+ public Option<bool> CompileNoMethods { get; } =
+ new(new[] { "--compile-no-methods" }, SR.CompileNoMethodsOption);
+ public Option<bool> OutNearInput { get; } =
+ new(new[] { "--out-near-input" }, SR.OutNearInputOption);
+ public Option<bool> SingleFileCompilation { get; } =
+ new(new[] { "--single-file-compilation" }, SR.SingleFileCompilationOption);
+ public Option<bool> Partial { get; } =
+ new(new[] { "--partial" }, SR.PartialImageOption);
+ public Option<bool> CompileBubbleGenerics { get; } =
+ new(new[] { "--compilebubblegenerics" }, SR.BubbleGenericsOption);
+ public Option<bool> EmbedPgoData { get; } =
+ new(new[] { "--embed-pgo-data" }, SR.EmbedPgoDataOption);
+ public Option<string> DgmlLogFileName { get; } =
+ new(new[] { "--dgmllog" }, SR.SaveDependencyLogOption);
+ public Option<bool> GenerateFullDgmlLog { get; } =
+ new(new[] { "--fulllog" }, SR.SaveDetailedLogOption);
+ public Option<bool> IsVerbose { get; } =
+ new(new[] { "--verbose" }, SR.VerboseLoggingOption);
+ public Option<string> SystemModuleName { get; } =
+ new(new[] { "--systemmodule" }, () => Helpers.DefaultSystemModule, SR.SystemModuleOverrideOption);
+ public Option<bool> WaitForDebugger { get; } =
+ new(new[] { "--waitfordebugger" }, SR.WaitForDebuggerOption);
+ public Option<string[]> CodegenOptions { get; } =
+ new(new[] { "--codegenopt" }, Array.Empty<string>, SR.CodeGenOptions);
+ public Option<bool> SupportIbc { get; } =
+ new(new[] { "--support-ibc" }, SR.SupportIbc);
+ public Option<bool> Resilient { get; } =
+ new(new[] { "--resilient" }, SR.ResilientOption);
+ public Option<string> ImageBase { get; } =
+ new(new[] { "--imagebase" }, SR.ImageBase);
+ public Option<TargetArchitecture> TargetArchitecture { get; } =
+ new(new[] { "--targetarch" }, result =>
+ {
+ string firstToken = result.Tokens.Count > 0 ? result.Tokens[0].Value : null;
+ if (firstToken != null && firstToken.Equals("armel", StringComparison.OrdinalIgnoreCase))
+ {
+ IsArmel = true;
+ return Internal.TypeSystem.TargetArchitecture.ARM;
+ }
+
+ return Helpers.GetTargetArchitecture(firstToken);
+ }, true, SR.TargetArchOption) { Arity = ArgumentArity.OneOrMore };
+ public Option<TargetOS> TargetOS { get; } =
+ new(new[] { "--targetos" }, result => Helpers.GetTargetOS(result.Tokens.Count > 0 ? result.Tokens[0].Value : null), true, SR.TargetOSOption);
+ public Option<string> JitPath { get; } =
+ new(new[] { "--jitpath" }, SR.JitPathOption);
+ public Option<bool> PrintReproInstructions { get; } =
+ new(new[] { "--print-repro-instructions" }, SR.PrintReproInstructionsOption);
+ public Option<string> SingleMethodTypeName { get; } =
+ new(new[] { "--singlemethodtypename" }, SR.SingleMethodTypeName);
+ public Option<string> SingleMethodName { get; } =
+ new(new[] { "--singlemethodname" }, SR.SingleMethodMethodName);
+ public Option<int> SingleMethodIndex { get; } =
+ new(new[] { "--singlemethodindex" }, SR.SingleMethodIndex);
+ public Option<string[]> SingleMethodGenericArgs { get; } =
+ new(new[] { "--singlemethodgenericarg" }, SR.SingleMethodGenericArgs);
+ public Option<int> Parallelism { get; } =
+ new(new[] { "--parallelism" }, result =>
+ {
+ if (result.Tokens.Count > 0)
+ return int.Parse(result.Tokens[0].Value);
+
+ // Limit parallelism to 24 wide at most by default, more parallelism is unlikely to improve compilation speed
+ // as many portions of the process are single threaded, and is known to use excessive memory.
+ var parallelism = Math.Min(24, Environment.ProcessorCount);
+
+ // On 32bit platforms restrict it more, as virtual address space is quite limited
+ if (!Environment.Is64BitProcess)
+ parallelism = Math.Min(4, parallelism);
+
+ return parallelism;
+ }, true, SR.ParalellismOption);
+ public Option<int> CustomPESectionAlignment { get; } =
+ new(new[] { "--custom-pe-section-alignment" }, SR.CustomPESectionAlignmentOption);
+ public Option<bool> Map { get; } =
+ new(new[] { "--map" }, SR.MapFileOption);
+ public Option<bool> MapCsv { get; } =
+ new(new[] { "--mapcsv" }, SR.MapCsvFileOption);
+ public Option<bool> Pdb { get; } =
+ new(new[] { "--pdb" }, SR.PdbFileOption);
+ public Option<string> PdbPath { get; } =
+ new(new[] { "--pdb-path" }, SR.PdbFilePathOption);
+ public Option<bool> PerfMap { get; } =
+ new(new[] { "--perfmap" }, SR.PerfMapFileOption);
+ public Option<string> PerfMapPath { get; } =
+ new(new[] { "--perfmap-path" }, SR.PerfMapFilePathOption);
+ public Option<int> PerfMapFormatVersion { get; } =
+ new(new[] { "--perfmap-format-version" }, () => 0, SR.PerfMapFormatVersionOption);
+ public Option<string[]> CrossModuleInlining { get; } =
+ new(new[] { "--opt-cross-module" }, SR.CrossModuleInlining);
+ public Option<bool> AsyncMethodOptimization { get; } =
+ new(new[] { "--opt-async-methods" }, SR.AsyncModuleOptimization);
+ public Option<string> NonLocalGenericsModule { get; } =
+ new(new[] { "--non-local-generics-module" }, () => string.Empty, SR.NonLocalGenericsModule);
+ public Option<ReadyToRunMethodLayoutAlgorithm> MethodLayout { get; } =
+ new(new[] { "--method-layout" }, result =>
+ {
+ if (result.Tokens.Count == 0 )
+ return ReadyToRunMethodLayoutAlgorithm.DefaultSort;
+
+ return result.Tokens[0].Value.ToLowerInvariant() switch
+ {
+ "defaultsort" => ReadyToRunMethodLayoutAlgorithm.DefaultSort,
+ "exclusiveweight" => ReadyToRunMethodLayoutAlgorithm.ExclusiveWeight,
+ "hotcold" => ReadyToRunMethodLayoutAlgorithm.HotCold,
+ "hotwarmcold" => ReadyToRunMethodLayoutAlgorithm.HotWarmCold,
+ "callfrequency" => ReadyToRunMethodLayoutAlgorithm.CallFrequency,
+ "pettishansen" => ReadyToRunMethodLayoutAlgorithm.PettisHansen,
+ "random" => ReadyToRunMethodLayoutAlgorithm.Random,
+ _ => throw new CommandLineException(SR.InvalidMethodLayout)
+ };
+ }, true, SR.MethodLayoutOption);
+ public Option<ReadyToRunFileLayoutAlgorithm> FileLayout { get; } =
+ new(new[] { "--file-layout" }, result =>
+ {
+ if (result.Tokens.Count == 0 )
+ return ReadyToRunFileLayoutAlgorithm.DefaultSort;
+
+ return result.Tokens[0].Value.ToLowerInvariant() switch
+ {
+ "defaultsort" => ReadyToRunFileLayoutAlgorithm.DefaultSort,
+ "methodorder" => ReadyToRunFileLayoutAlgorithm.MethodOrder,
+ _ => throw new CommandLineException(SR.InvalidFileLayout)
+ };
+ }, true, SR.FileLayoutOption);
+ public Option<bool> VerifyTypeAndFieldLayout { get; } =
+ new(new[] { "--verify-type-and-field-layout" }, SR.VerifyTypeAndFieldLayoutOption);
+ public Option<string> CallChainProfileFile { get; } =
+ new(new[] { "--callchain-profile" }, SR.CallChainProfileFile);
+ public Option<string> MakeReproPath { get; } =
+ new(new[] { "--make-repro-path" }, "Path where to place a repro package");
+
+ public bool CompositeOrInputBubble { get; private set; }
+ public OptimizationMode OptimizationMode { get; private set; }
+ public ParseResult Result { get; private set; }
+
+ public static bool IsArmel { get; private set; }
+
+ public Crossgen2RootCommand(string[] args) : base(SR.Crossgen2BannerText)
+ {
+ AddArgument(InputFilePaths);
+ AddOption(UnrootedInputFilePaths);
+ AddOption(ReferenceFilePaths);
+ AddOption(InstructionSet);
+ AddOption(MibcFilePaths);
+ AddOption(OutputFilePath);
+ AddOption(CompositeRootPath);
+ AddOption(Optimize);
+ AddOption(OptimizeDisabled);
+ AddOption(OptimizeSpace);
+ AddOption(OptimizeTime);
+ AddOption(InputBubble);
+ AddOption(InputBubbleReferenceFilePaths);
+ AddOption(Composite);
+ AddOption(CompositeKeyFile);
+ AddOption(CompileNoMethods);
+ AddOption(OutNearInput);
+ AddOption(SingleFileCompilation);
+ AddOption(Partial);
+ AddOption(CompileBubbleGenerics);
+ AddOption(EmbedPgoData);
+ AddOption(DgmlLogFileName);
+ AddOption(GenerateFullDgmlLog);
+ AddOption(IsVerbose);
+ AddOption(SystemModuleName);
+ AddOption(WaitForDebugger);
+ AddOption(CodegenOptions);
+ AddOption(SupportIbc);
+ AddOption(Resilient);
+ AddOption(ImageBase);
+ AddOption(TargetArchitecture);
+ AddOption(TargetOS);
+ AddOption(JitPath);
+ AddOption(PrintReproInstructions);
+ AddOption(SingleMethodTypeName);
+ AddOption(SingleMethodName);
+ AddOption(SingleMethodIndex);
+ AddOption(SingleMethodGenericArgs);
+ AddOption(Parallelism);
+ AddOption(CustomPESectionAlignment);
+ AddOption(Map);
+ AddOption(MapCsv);
+ AddOption(Pdb);
+ AddOption(PdbPath);
+ AddOption(PerfMap);
+ AddOption(PerfMapPath);
+ AddOption(PerfMapFormatVersion);
+ AddOption(CrossModuleInlining);
+ AddOption(AsyncMethodOptimization);
+ AddOption(NonLocalGenericsModule);
+ AddOption(MethodLayout);
+ AddOption(FileLayout);
+ AddOption(VerifyTypeAndFieldLayout);
+ AddOption(CallChainProfileFile);
+ AddOption(MakeReproPath);
+
+ this.SetHandler(context =>
+ {
+ Result = context.ParseResult;
+ CompositeOrInputBubble = context.ParseResult.GetValueForOption(Composite) | context.ParseResult.GetValueForOption(InputBubble);
+ if (context.ParseResult.GetValueForOption(OptimizeSpace))
+ {
+ OptimizationMode = OptimizationMode.PreferSize;
+ }
+ else if (context.ParseResult.GetValueForOption(OptimizeTime))
+ {
+ OptimizationMode = OptimizationMode.PreferSpeed;
+ }
+ else if (context.ParseResult.GetValueForOption(Optimize))
+ {
+ OptimizationMode = OptimizationMode.Blended;
+ }
+ else
+ {
+ OptimizationMode = OptimizationMode.None;
+ }
+
+ try
+ {
+ int alignment = context.ParseResult.GetValueForOption(CustomPESectionAlignment);
+ if (alignment != 0)
+ {
+ // Must be a power of two and >= 4096
+ if (alignment < 4096 || (alignment & (alignment - 1)) != 0)
+ throw new CommandLineException(SR.InvalidCustomPESectionAlignment);
+ }
+
+ string makeReproPath = context.ParseResult.GetValueForOption(MakeReproPath);
+ if (makeReproPath != null)
+ {
+ // Create a repro package in the specified path
+ // This package will have the set of input files needed for compilation
+ // + the original command line arguments
+ // + a rsp file that should work to directly run out of the zip file
+
+ Helpers.MakeReproPackage(makeReproPath, context.ParseResult.GetValueForOption(OutputFilePath), args,
+ context.ParseResult, new[] { "r", "reference", "u", "unrooted-input-file-paths", "m", "mibc", "inputbubbleref" });
+ }
+
+ context.ExitCode = new Program(this).Run();
+ }
+#if DEBUG
+ catch (CodeGenerationFailedException ex) when (DumpReproArguments(ex))
+ {
+ throw new NotSupportedException(); // Unreachable
+ }
+#else
+ catch (Exception e)
+ {
+ Console.ResetColor();
+ Console.ForegroundColor = ConsoleColor.Red;
+
+ Console.Error.WriteLine("Error: " + e.Message);
+ Console.Error.WriteLine(e.ToString());
+
+ Console.ResetColor();
+
+ context.ExitCode = 1;
+ }
+#endif
+ });
+ }
+
+ public static IEnumerable<HelpSectionDelegate> GetExtendedHelp(HelpContext _)
+ {
+ foreach (HelpSectionDelegate sectionDelegate in HelpBuilder.Default.GetLayout())
+ yield return sectionDelegate;
+
+ yield return _ =>
+ {
+ Console.WriteLine(SR.OptionPassingHelp);
+ Console.WriteLine();
+ Console.WriteLine(SR.DashDashHelp);
+ Console.WriteLine();
+
+ string[] ValidArchitectures = new string[] {"arm", "armel", "arm64", "x86", "x64"};
+ string[] ValidOS = new string[] {"windows", "linux", "osx"};
+
+ Console.WriteLine(String.Format(SR.SwitchWithDefaultHelp, "--targetos", String.Join("', '", ValidOS), Helpers.GetTargetOS(null).ToString().ToLowerInvariant()));
+ Console.WriteLine();
+ Console.WriteLine(String.Format(SR.SwitchWithDefaultHelp, "--targetarch", String.Join("', '", ValidArchitectures), Helpers.GetTargetArchitecture(null).ToString().ToLowerInvariant()));
+ Console.WriteLine();
+
+ Console.WriteLine(SR.InstructionSetHelp);
+ foreach (string arch in ValidArchitectures)
+ {
+ Console.Write(arch);
+ Console.Write(": ");
+
+ TargetArchitecture targetArch = Helpers.GetTargetArchitecture(arch);
+ bool first = true;
+ foreach (var instructionSet in Internal.JitInterface.InstructionSetFlags.ArchitectureToValidInstructionSets(targetArch))
+ {
+ // Only instruction sets with are specifiable should be printed to the help text
+ if (instructionSet.Specifiable)
+ {
+ if (first)
+ {
+ first = false;
+ }
+ else
+ {
+ Console.Write(", ");
+ }
+ Console.Write(instructionSet.Name);
+ }
+ }
+
+ Console.WriteLine();
+ }
+
+ Console.WriteLine();
+ Console.WriteLine(SR.CpuFamilies);
+ Console.WriteLine(string.Join(", ", Internal.JitInterface.InstructionSetFlags.AllCpuNames));
+ };
+ }
+
+#if DEBUG
+ private static bool DumpReproArguments(CodeGenerationFailedException ex)
+ {
+ Console.WriteLine(SR.DumpReproInstructions);
+
+ MethodDesc failingMethod = ex.Method;
+ Console.WriteLine(Program.CreateReproArgumentString(failingMethod));
+ return false;
+ }
+#endif
+ }
+}
diff --git a/src/coreclr/tools/aot/crossgen2/Program.cs b/src/coreclr/tools/aot/crossgen2/Program.cs
index 7c07d757d50..72ef597a41d 100644
--- a/src/coreclr/tools/aot/crossgen2/Program.cs
+++ b/src/coreclr/tools/aot/crossgen2/Program.cs
@@ -3,6 +3,8 @@
using System;
using System.Buffers.Binary;
+using System.CommandLine;
+using System.CommandLine.Parsing;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.IO;
@@ -12,7 +14,6 @@ using System.Reflection.PortableExecutable;
using System.Runtime.InteropServices;
using System.Text;
-using Internal.CommandLine;
using Internal.IL;
using Internal.TypeSystem;
using Internal.TypeSystem.Ecma;
@@ -20,224 +21,42 @@ using Internal.TypeSystem.Ecma;
using ILCompiler.Reflection.ReadyToRun;
using ILCompiler.DependencyAnalysis;
using ILCompiler.IBC;
-using System.Diagnostics;
namespace ILCompiler
{
internal class Program
{
- private const string DefaultSystemModule = "System.Private.CoreLib";
-
- private CommandLineOptions _commandLineOptions;
- public TargetOS _targetOS;
- public TargetArchitecture _targetArchitecture;
- private bool _armelAbi = false;
- public OptimizationMode _optimizationMode;
- private ulong _imageBase;
-
- // File names as strings in args
- private Dictionary<string, string> _inputFilePaths = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
- private Dictionary<string, string> _unrootedInputFilePaths = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
- private Dictionary<string, string> _referenceFilePaths = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
+ private readonly Crossgen2RootCommand _command;
// Modules and their names after loading
- private Dictionary<string, string> _allInputFilePaths = new Dictionary<string, string>();
- private List<ModuleDesc> _referenceableModules = new List<ModuleDesc>();
-
- private Dictionary<string, string> _inputbubblereferenceFilePaths = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
-
- private CompilerTypeSystemContext _typeSystemContext;
- private ReadyToRunMethodLayoutAlgorithm _methodLayout;
- private ReadyToRunFileLayoutAlgorithm _fileLayout;
-
- private Program()
- {
- }
-
- public static void ComputeDefaultOptions(out TargetOS os, out TargetArchitecture arch)
- {
- if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
- os = TargetOS.Windows;
- else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
- os = TargetOS.Linux;
- else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
- os = TargetOS.OSX;
- else if (RuntimeInformation.IsOSPlatform(OSPlatform.FreeBSD))
- os = TargetOS.FreeBSD;
- else
- throw new NotImplementedException();
+ private Dictionary<string, string> _allInputFilePaths = new();
+ private List<ModuleDesc> _referenceableModules = new();
- switch (RuntimeInformation.ProcessArchitecture)
- {
- case Architecture.X86:
- arch = TargetArchitecture.X86;
- break;
- case Architecture.X64:
- arch = TargetArchitecture.X64;
- break;
- case Architecture.Arm:
- arch = TargetArchitecture.ARM;
- break;
- case Architecture.Arm64:
- arch = TargetArchitecture.ARM64;
- break;
- case Architecture.LoongArch64:
- arch = TargetArchitecture.LoongArch64;
- break;
- default:
- throw new NotImplementedException();
- }
-
- }
+ private ReadyToRunCompilerContext _typeSystemContext;
+ private ulong _imageBase;
- private void InitializeDefaultOptions()
- {
- ComputeDefaultOptions(out _targetOS, out _targetArchitecture);
- }
+ private readonly bool _inputBubble;
+ private readonly bool _singleFileCompilation;
+ private readonly bool _outNearInput;
+ private readonly string _outputFilePath;
+ private readonly TargetArchitecture _targetArchitecture;
+ private readonly TargetOS _targetOS;
- private void ProcessCommandLine(string[] args)
+ public Program(Crossgen2RootCommand command)
{
- PerfEventSource.StartStopEvents.CommandLineProcessingStart();
- _commandLineOptions = new CommandLineOptions(args);
- PerfEventSource.StartStopEvents.CommandLineProcessingStop();
+ _command = command;
+ _inputBubble = Get(command.InputBubble);
+ _singleFileCompilation = Get(command.SingleFileCompilation);
+ _outNearInput = Get(command.OutNearInput);
+ _outputFilePath = Get(command.OutputFilePath);
+ _targetOS = Get(command.TargetOS);
+ _targetArchitecture = Get(command.TargetArchitecture);
- if (_commandLineOptions.Help || _commandLineOptions.Version)
+ if (command.Result.GetValueForOption(command.WaitForDebugger))
{
- return;
- }
-
- if (_commandLineOptions.WaitForDebugger)
- {
- Console.WriteLine(SR.WaitingForDebuggerAttach);
+ Console.WriteLine("Waiting for debugger to attach. Press ENTER to continue");
Console.ReadLine();
}
-
- if (_commandLineOptions.CompileBubbleGenerics)
- {
- if (!_commandLineOptions.CompositeOrInputBubble)
- {
- Console.WriteLine(SR.WarningIgnoringBubbleGenerics);
- _commandLineOptions.CompileBubbleGenerics = false;
- }
- }
-
- _optimizationMode = OptimizationMode.None;
- if (_commandLineOptions.OptimizeDisabled)
- {
- if (_commandLineOptions.Optimize || _commandLineOptions.OptimizeSpace || _commandLineOptions.OptimizeTime)
- Console.WriteLine(SR.WarningOverridingOptimize);
- }
- else if (_commandLineOptions.OptimizeSpace)
- {
- if (_commandLineOptions.OptimizeTime)
- Console.WriteLine(SR.WarningOverridingOptimizeSpace);
- _optimizationMode = OptimizationMode.PreferSize;
- }
- else if (_commandLineOptions.OptimizeTime)
- _optimizationMode = OptimizationMode.PreferSpeed;
- else if (_commandLineOptions.Optimize)
- _optimizationMode = OptimizationMode.Blended;
-
- foreach (var input in _commandLineOptions.InputFilePaths)
- Helpers.AppendExpandedPaths(_inputFilePaths, input, true);
-
- foreach (var input in _commandLineOptions.UnrootedInputFilePaths)
- Helpers.AppendExpandedPaths(_unrootedInputFilePaths, input, true);
-
- foreach (var reference in _commandLineOptions.ReferenceFilePaths)
- Helpers.AppendExpandedPaths(_referenceFilePaths, reference, false);
-
- foreach (var reference in _commandLineOptions.InputBubbleReferenceFilePaths)
- Helpers.AppendExpandedPaths(_inputbubblereferenceFilePaths, reference, false);
-
-
- int alignment = _commandLineOptions.CustomPESectionAlignment;
- if (alignment != 0)
- {
- // Must be a power of two and >= 4096
- if (alignment < 4096 || (alignment & (alignment - 1)) != 0)
- throw new CommandLineException(SR.InvalidCustomPESectionAlignment);
- }
-
- if (_commandLineOptions.MethodLayout != null)
- {
- _methodLayout = _commandLineOptions.MethodLayout.ToLowerInvariant() switch
- {
- "defaultsort" => ReadyToRunMethodLayoutAlgorithm.DefaultSort,
- "exclusiveweight" => ReadyToRunMethodLayoutAlgorithm.ExclusiveWeight,
- "hotcold" => ReadyToRunMethodLayoutAlgorithm.HotCold,
- "hotwarmcold" => ReadyToRunMethodLayoutAlgorithm.HotWarmCold,
- "callfrequency" => ReadyToRunMethodLayoutAlgorithm.CallFrequency,
- "pettishansen" => ReadyToRunMethodLayoutAlgorithm.PettisHansen,
- "random" => ReadyToRunMethodLayoutAlgorithm.Random,
- _ => throw new CommandLineException(SR.InvalidMethodLayout)
- };
- }
-
- if (_commandLineOptions.FileLayout != null)
- {
- _fileLayout = _commandLineOptions.FileLayout.ToLowerInvariant() switch
- {
- "defaultsort" => ReadyToRunFileLayoutAlgorithm.DefaultSort,
- "methodorder" => ReadyToRunFileLayoutAlgorithm.MethodOrder,
- _ => throw new CommandLineException(SR.InvalidFileLayout)
- };
- }
-
- }
-
- private string GetCompilerVersion()
- {
- return Assembly
- .GetExecutingAssembly()
- .GetCustomAttribute<AssemblyInformationalVersionAttribute>()
- .InformationalVersion;
- }
-
- public static TargetArchitecture GetTargetArchitectureFromArg(string archArg, out bool armelAbi)
- {
- armelAbi = false;
- if (archArg.Equals("x86", StringComparison.OrdinalIgnoreCase))
- return TargetArchitecture.X86;
- else if (archArg.Equals("x64", StringComparison.OrdinalIgnoreCase))
- return TargetArchitecture.X64;
- else if (archArg.Equals("arm", StringComparison.OrdinalIgnoreCase))
- return TargetArchitecture.ARM;
- else if (archArg.Equals("armel", StringComparison.OrdinalIgnoreCase))
- {
- armelAbi = true;
- return TargetArchitecture.ARM;
- }
- else if (archArg.Equals("arm64", StringComparison.OrdinalIgnoreCase))
- return TargetArchitecture.ARM64;
- else if (archArg.Equals("loongarch64", StringComparison.OrdinalIgnoreCase))
- return TargetArchitecture.LoongArch64;
- else
- throw new CommandLineException(SR.TargetArchitectureUnsupported);
- }
-
- private void ConfigureTarget()
- {
- //
- // Set target Architecture and OS
- //
- if (_commandLineOptions.TargetArch != null)
- {
- _targetArchitecture = GetTargetArchitectureFromArg(_commandLineOptions.TargetArch, out _armelAbi);
- }
- if (_commandLineOptions.TargetOS != null)
- {
- if (_commandLineOptions.TargetOS.Equals("windows", StringComparison.OrdinalIgnoreCase))
- _targetOS = TargetOS.Windows;
- else if (_commandLineOptions.TargetOS.Equals("linux", StringComparison.OrdinalIgnoreCase))
- _targetOS = TargetOS.Linux;
- else if (_commandLineOptions.TargetOS.Equals("osx", StringComparison.OrdinalIgnoreCase))
- _targetOS = TargetOS.OSX;
- else if (_commandLineOptions.TargetOS.Equals("freebsd", StringComparison.OrdinalIgnoreCase))
- _targetOS = TargetOS.FreeBSD;
- else
- throw new CommandLineException(SR.TargetOSUnsupported);
- }
}
private InstructionSetSupport ConfigureInstructionSetSupport()
@@ -262,12 +81,13 @@ namespace ILCompiler
}
}
- if (_commandLineOptions.InstructionSet != null)
+ string instructionSetArg = Get(_command.InstructionSet);
+ if (instructionSetArg != null)
{
List<string> instructionSetParams = new List<string>();
// Normalize instruction set format to include implied +.
- string[] instructionSetParamsInput = _commandLineOptions.InstructionSet.Split(",");
+ string[] instructionSetParamsInput = instructionSetArg.Split(",");
for (int i = 0; i < instructionSetParamsInput.Length; i++)
{
string instructionSet = instructionSetParamsInput[i];
@@ -332,66 +152,52 @@ namespace ILCompiler
optimisticInstructionSet.Add(supportedInstructionSet);
return new InstructionSetSupport(supportedInstructionSet,
- unsupportedInstructionSet,
- optimisticInstructionSet,
- InstructionSetSupportBuilder.GetNonSpecifiableInstructionSetsForArch(_targetArchitecture),
- _targetArchitecture);
+ unsupportedInstructionSet,
+ optimisticInstructionSet,
+ InstructionSetSupportBuilder.GetNonSpecifiableInstructionSetsForArch(_targetArchitecture),
+ _targetArchitecture);
}
private void ConfigureImageBase(TargetDetails targetDetails)
{
bool is64BitTarget = targetDetails.PointerSize == sizeof(long);
- if (_commandLineOptions.ImageBase != null)
- _imageBase = is64BitTarget ? Convert.ToUInt64(_commandLineOptions.ImageBase, 16) : Convert.ToUInt32(_commandLineOptions.ImageBase, 16);
+ string imageBaseArg = Get(_command.ImageBase);
+ if (imageBaseArg != null)
+ _imageBase = is64BitTarget ? Convert.ToUInt64(imageBaseArg, 16) : Convert.ToUInt32(imageBaseArg, 16);
else
_imageBase = is64BitTarget ? PEWriter.PE64HeaderConstants.DllImageBase : PEWriter.PE32HeaderConstants.ImageBase;
}
- private int Run(string[] args)
+ public int Run()
{
- InitializeDefaultOptions();
-
- ProcessCommandLine(args);
-
- if (_commandLineOptions.Help)
- {
- Console.WriteLine(_commandLineOptions.HelpText);
- return 1;
- }
-
- if (_commandLineOptions.Version)
- {
- string version = GetCompilerVersion();
- Console.WriteLine(version);
- return 0;
- }
-
- if (_commandLineOptions.OutputFilePath == null && !_commandLineOptions.OutNearInput)
+ if (_outputFilePath == null && !_outNearInput)
throw new CommandLineException(SR.MissingOutputFile);
- if (_commandLineOptions.SingleFileCompilation && !_commandLineOptions.OutNearInput)
+ if (_singleFileCompilation && !_outNearInput)
throw new CommandLineException(SR.MissingOutNearInput);
- ConfigureTarget();
InstructionSetSupport instructionSetSupport = ConfigureInstructionSetSupport();
SharedGenericsMode genericsMode = SharedGenericsMode.CanonicalReferenceTypes;
- var targetDetails = new TargetDetails(_targetArchitecture, _targetOS, _armelAbi ? TargetAbi.NativeAotArmel : TargetAbi.NativeAot, instructionSetSupport.GetVectorTSimdVector());
+ var targetDetails = new TargetDetails(_targetArchitecture, _targetOS, Crossgen2RootCommand.IsArmel ? TargetAbi.NativeAotArmel : TargetAbi.NativeAot, instructionSetSupport.GetVectorTSimdVector());
ConfigureImageBase(targetDetails);
bool versionBubbleIncludesCoreLib = false;
- if (_commandLineOptions.InputBubble)
+ Dictionary<string, string> inputFilePathsArg = _command.Result.GetValueForArgument(_command.InputFilePaths);
+ Dictionary<string, string> unrootedInputFilePathsArg = Get(_command.UnrootedInputFilePaths);
+
+ if (_inputBubble)
{
versionBubbleIncludesCoreLib = true;
}
else
{
- if (!_commandLineOptions.SingleFileCompilation)
+ if (!_singleFileCompilation)
{
- foreach (var inputFile in _inputFilePaths)
+ foreach (var inputFile in inputFilePathsArg)
{
if (String.Compare(inputFile.Key, "System.Private.CoreLib", StringComparison.OrdinalIgnoreCase) == 0)
{
@@ -402,7 +208,7 @@ namespace ILCompiler
}
if (!versionBubbleIncludesCoreLib)
{
- foreach (var inputFile in _unrootedInputFilePaths)
+ foreach (var inputFile in unrootedInputFilePathsArg)
{
if (String.Compare(inputFile.Key, "System.Private.CoreLib", StringComparison.OrdinalIgnoreCase) == 0)
{
@@ -418,12 +224,13 @@ namespace ILCompiler
//
_typeSystemContext = new ReadyToRunCompilerContext(targetDetails, genericsMode, versionBubbleIncludesCoreLib);
- string compositeRootPath = _commandLineOptions.CompositeRootPath;
+ string compositeRootPath = Get(_command.CompositeRootPath);
// Collections for already loaded modules
Dictionary<string, string> inputFilePaths = new Dictionary<string, string>();
Dictionary<string, string> unrootedInputFilePaths = new Dictionary<string, string>();
HashSet<ModuleDesc> versionBubbleModulesHash = new HashSet<ModuleDesc>();
+ Dictionary<string, string> referenceFilePaths = Get(_command.ReferenceFilePaths);
using (PerfEventSource.StartStopEvents.LoadingEvents())
{
@@ -437,7 +244,7 @@ namespace ILCompiler
// typeSystemContext.InputFilePaths = inFilePaths;
//
- foreach (var inputFile in _inputFilePaths)
+ foreach (var inputFile in inputFilePathsArg)
{
try
{
@@ -462,7 +269,7 @@ namespace ILCompiler
}
}
- foreach (var unrootedInputFile in _unrootedInputFilePaths)
+ foreach (var unrootedInputFile in unrootedInputFilePathsArg)
{
try
{
@@ -487,11 +294,11 @@ namespace ILCompiler
CheckManagedCppInputFiles(_allInputFilePaths.Values);
_typeSystemContext.InputFilePaths = _allInputFilePaths;
- _typeSystemContext.ReferenceFilePaths = _referenceFilePaths;
+ _typeSystemContext.ReferenceFilePaths = referenceFilePaths;
if (_typeSystemContext.InputFilePaths.Count == 0)
{
- if (_commandLineOptions.InputFilePaths.Count > 0)
+ if (inputFilePathsArg.Count > 0)
{
Console.WriteLine(SR.InputWasNotLoadable);
return 2;
@@ -499,7 +306,8 @@ namespace ILCompiler
throw new CommandLineException(SR.NoInputFiles);
}
- foreach (var referenceFile in _referenceFilePaths.Values)
+ Dictionary<string, string> inputBubbleReferenceFilePaths = Get(_command.InputBubbleReferenceFilePaths);
+ foreach (var referenceFile in referenceFilePaths.Values)
{
try
{
@@ -508,7 +316,7 @@ namespace ILCompiler
continue;
_referenceableModules.Add(module);
- if (_commandLineOptions.InputBubble && _inputbubblereferenceFilePaths.Count == 0)
+ if (_inputBubble && inputBubbleReferenceFilePaths.Count == 0)
{
// In large version bubble mode add reference paths to the compilation group
// Consider bubble as large if no explicit bubble references were passed
@@ -518,9 +326,9 @@ namespace ILCompiler
catch { } // Ignore non-managed pe files
}
- if (_commandLineOptions.InputBubble)
+ if (_inputBubble)
{
- foreach (var referenceFile in _inputbubblereferenceFilePaths.Values)
+ foreach (var referenceFile in inputBubbleReferenceFilePaths.Values)
{
try
{
@@ -536,11 +344,11 @@ namespace ILCompiler
}
}
- string systemModuleName = _commandLineOptions.SystemModule ?? DefaultSystemModule;
+ string systemModuleName = Get(_command.SystemModuleName) ?? Helpers.DefaultSystemModule;
_typeSystemContext.SetSystemModule((EcmaModule)_typeSystemContext.GetModuleForSimpleName(systemModuleName));
CompilerTypeSystemContext typeSystemContext = _typeSystemContext;
- if (_commandLineOptions.SingleFileCompilation)
+ if (_singleFileCompilation)
{
var singleCompilationInputFilePaths = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
@@ -552,13 +360,13 @@ namespace ILCompiler
singleCompilationInputFilePaths.Add(inputFile.Key, inputFile.Value);
typeSystemContext.InputFilePaths = singleCompilationInputFilePaths;
- if (!_commandLineOptions.InputBubble)
+ if (!_inputBubble)
{
bool singleCompilationVersionBubbleIncludesCoreLib = versionBubbleIncludesCoreLib || (String.Compare(inputFile.Key, "System.Private.CoreLib", StringComparison.OrdinalIgnoreCase) == 0);
typeSystemContext = new ReadyToRunCompilerContext(targetDetails, genericsMode, singleCompilationVersionBubbleIncludesCoreLib, _typeSystemContext);
typeSystemContext.InputFilePaths = singleCompilationInputFilePaths;
- typeSystemContext.ReferenceFilePaths = _referenceFilePaths;
+ typeSystemContext.ReferenceFilePaths = referenceFilePaths;
typeSystemContext.SetSystemModule((EcmaModule)typeSystemContext.GetModuleForSimpleName(systemModuleName));
}
@@ -567,7 +375,7 @@ namespace ILCompiler
// In case of inputbubble ni.dll are created as ni.dll.tmp in order to not interfere with crossgen2, move them all to ni.dll
// See https://github.com/dotnet/runtime/issues/55663#issuecomment-898161751 for more details
- if (_commandLineOptions.InputBubble)
+ if (_inputBubble)
{
foreach (var inputFile in inputFilePaths)
{
@@ -591,21 +399,25 @@ namespace ILCompiler
//
// Initialize output filename
//
- string inFilePath = inFilePaths.First().Value;
+ var e = inFilePaths.GetEnumerator();
+ e.MoveNext();
+ string inFilePath = e.Current.Value;
string inputFileExtension = Path.GetExtension(inFilePath);
string nearOutFilePath = inputFileExtension switch
{
".dll" => Path.ChangeExtension(inFilePath,
- _commandLineOptions.SingleFileCompilation && _commandLineOptions.InputBubble
+ _singleFileCompilation&& _inputBubble
? ".ni.dll.tmp"
: ".ni.dll"),
".exe" => Path.ChangeExtension(inFilePath,
- _commandLineOptions.SingleFileCompilation && _commandLineOptions.InputBubble
+ _singleFileCompilation && _inputBubble
? ".ni.exe.tmp"
: ".ni.exe"),
_ => throw new CommandLineException(string.Format(SR.UnsupportedInputFileExtension, inputFileExtension))
};
- string outFile = _commandLineOptions.OutNearInput ? nearOutFilePath : _commandLineOptions.OutputFilePath;
+
+ string outFile = _outNearInput ? nearOutFilePath : _outputFilePath;
+ string dgmlLogFileName = Get(_command.DgmlLogFileName);
using (PerfEventSource.StartStopEvents.CompilationEvents())
{
@@ -624,7 +436,7 @@ namespace ILCompiler
versionBubbleModulesHash.Add(module);
- if (!_commandLineOptions.CompositeOrInputBubble)
+ if (!_command.CompositeOrInputBubble)
{
break;
}
@@ -637,16 +449,17 @@ namespace ILCompiler
versionBubbleModulesHash.Add(module);
}
- if (_commandLineOptions.CrossModuleInlining != null)
+ string[] crossModuleInlining = Get(_command.CrossModuleInlining);
+ if (crossModuleInlining.Length > 0)
{
- foreach (var crossModulePgoAssemblyName in _commandLineOptions.CrossModuleInlining)
+ foreach (var crossModulePgoAssemblyName in crossModuleInlining)
{
foreach (var module in _referenceableModules)
{
if (!versionBubbleModulesHash.Contains(module))
{
if (crossModulePgoAssemblyName == "*" ||
- (String.Compare(crossModulePgoAssemblyName, module.Assembly.GetName().Name, StringComparison.OrdinalIgnoreCase) == 0))
+ (String.Compare(crossModulePgoAssemblyName, module.Assembly.GetName().Name, StringComparison.OrdinalIgnoreCase) == 0))
{
crossModuleInlineableCode.Add((EcmaModule)module);
}
@@ -662,44 +475,45 @@ namespace ILCompiler
// Single method mode?
MethodDesc singleMethod = CheckAndParseSingleMethodModeArguments(typeSystemContext);
- var logger = new Logger(Console.Out, _commandLineOptions.Verbose);
+ var logger = new Logger(Console.Out, Get(_command.IsVerbose));
List<string> mibcFiles = new List<string>();
- foreach (var file in _commandLineOptions.MibcFilePaths)
+ foreach (var file in Get(_command.MibcFilePaths))
{
mibcFiles.Add(file);
}
List<ModuleDesc> versionBubbleModules = new List<ModuleDesc>(versionBubbleModulesHash);
-
- if (!_commandLineOptions.Composite && inputModules.Count != 1)
+ bool composite = Get(_command.Composite);
+ if (!composite && inputModules.Count != 1)
{
throw new Exception(string.Format(SR.ErrorMultipleInputFilesCompositeModeOnly, string.Join("; ", inputModules)));
}
-
+ bool compileBubbleGenerics = Get(_command.CompileBubbleGenerics);
ReadyToRunCompilationModuleGroupBase compilationGroup;
List<ICompilationRootProvider> compilationRoots = new List<ICompilationRootProvider>();
ReadyToRunCompilationModuleGroupConfig groupConfig = new ReadyToRunCompilationModuleGroupConfig();
groupConfig.Context = typeSystemContext;
- groupConfig.IsCompositeBuildMode = _commandLineOptions.Composite;
- groupConfig.IsInputBubble = _commandLineOptions.InputBubble;
+ groupConfig.IsCompositeBuildMode = composite;
+ groupConfig.IsInputBubble = _inputBubble;
groupConfig.CompilationModuleSet = inputModules;
groupConfig.VersionBubbleModuleSet = versionBubbleModules;
- groupConfig.CompileGenericDependenciesFromVersionBubbleModuleSet = _commandLineOptions.CompileBubbleGenerics;
+ groupConfig.CompileGenericDependenciesFromVersionBubbleModuleSet = compileBubbleGenerics;
groupConfig.CrossModuleGenericCompilation = crossModuleInlineableCode.Count > 0;
groupConfig.CrossModuleInlining = groupConfig.CrossModuleGenericCompilation; // Currently we set these flags to the same values
groupConfig.CrossModuleInlineable = crossModuleInlineableCode;
groupConfig.CompileAllPossibleCrossModuleCode = false;
// Handle non-local generics command line option
- ModuleDesc nonLocalGenericsHome = _commandLineOptions.CompileBubbleGenerics ? inputModules[0] : null;
- if (_commandLineOptions.NonLocalGenericsModule == "*")
+ ModuleDesc nonLocalGenericsHome = compileBubbleGenerics ? inputModules[0] : null;
+ string nonLocalGenericsModule = Get(_command.NonLocalGenericsModule);
+ if (nonLocalGenericsModule == "*")
{
groupConfig.CompileAllPossibleCrossModuleCode = true;
nonLocalGenericsHome = inputModules[0];
}
- else if (_commandLineOptions.NonLocalGenericsModule == "")
+ else if (nonLocalGenericsModule == "")
{
// Nothing was specified
}
@@ -708,11 +522,11 @@ namespace ILCompiler
bool matchFound = false;
// Allow module to be specified by assembly name or by filename
- if (_commandLineOptions.NonLocalGenericsModule.EndsWith(".dll", StringComparison.OrdinalIgnoreCase))
- _commandLineOptions.NonLocalGenericsModule = Path.GetFileNameWithoutExtension(_commandLineOptions.NonLocalGenericsModule);
+ if (nonLocalGenericsModule.EndsWith(".dll", StringComparison.OrdinalIgnoreCase))
+ nonLocalGenericsModule = Path.GetFileNameWithoutExtension(nonLocalGenericsModule);
foreach (var module in inputModules)
{
- if (String.Compare(module.Assembly.GetName().Name, _commandLineOptions.NonLocalGenericsModule, StringComparison.OrdinalIgnoreCase) == 0)
+ if (String.Compare(module.Assembly.GetName().Name, nonLocalGenericsModule, StringComparison.OrdinalIgnoreCase) == 0)
{
matchFound = true;
nonLocalGenericsHome = module;
@@ -725,7 +539,7 @@ namespace ILCompiler
{
foreach (var module in _referenceableModules)
{
- if (String.Compare(module.Assembly.GetName().Name, _commandLineOptions.NonLocalGenericsModule, StringComparison.OrdinalIgnoreCase) == 0)
+ if (String.Compare(module.Assembly.GetName().Name, nonLocalGenericsModule, StringComparison.OrdinalIgnoreCase) == 0)
{
matchFound = true;
break;
@@ -734,11 +548,12 @@ namespace ILCompiler
if (!matchFound)
{
- throw new CommandLineException(string.Format(SR.ErrorNonLocalGenericsModule, _commandLineOptions.NonLocalGenericsModule));
+ throw new CommandLineException(string.Format(SR.ErrorNonLocalGenericsModule, nonLocalGenericsModule));
}
}
}
+ bool compileNoMethods = Get(_command.CompileNoMethods);
if (singleMethod != null)
{
// Compiling just a single method
@@ -747,7 +562,7 @@ namespace ILCompiler
singleMethod);
compilationRoots.Add(new SingleMethodRootProvider(singleMethod));
}
- else if (_commandLineOptions.CompileNoMethods)
+ else if (compileNoMethods)
{
compilationGroup = new NoMethodsCompilationModuleGroup(groupConfig);
}
@@ -759,10 +574,10 @@ namespace ILCompiler
// Load any profiles generated by method call chain analyis
CallChainProfile jsonProfile = null;
-
- if (!string.IsNullOrEmpty(_commandLineOptions.CallChainProfileFile))
+ string callChainProfileFile = Get(_command.CallChainProfileFile);
+ if (!string.IsNullOrEmpty(callChainProfileFile))
{
- jsonProfile = new CallChainProfile(_commandLineOptions.CallChainProfileFile, typeSystemContext, _referenceableModules);
+ jsonProfile = new CallChainProfile(callChainProfileFile, typeSystemContext, _referenceableModules);
}
// Examine profile guided information as appropriate
@@ -788,13 +603,14 @@ namespace ILCompiler
jsonProfile,
typeSystemContext,
compilationGroup,
- _commandLineOptions.EmbedPgoData,
- _commandLineOptions.SupportIbc,
+ Get(_command.EmbedPgoData),
+ Get(_command.SupportIbc),
crossModuleInlineableCode.Count == 0 ? compilationGroup.VersionsWithMethodBody : compilationGroup.CrossModuleInlineable);
- compilationGroup.ApplyProfileGuidedOptimizationData(profileDataManager, _commandLineOptions.Partial);
+ bool partial = Get(_command.Partial);
+ compilationGroup.ApplyProfileGuidedOptimizationData(profileDataManager, partial);
- if ((singleMethod == null) && !_commandLineOptions.CompileNoMethods)
+ if ((singleMethod == null) && !compileNoMethods)
{
// For normal compilations add compilation roots.
foreach (var module in rootingModules)
@@ -802,9 +618,9 @@ namespace ILCompiler
compilationRoots.Add(new ReadyToRunRootProvider(
module,
profileDataManager,
- profileDrivenPartialNGen: _commandLineOptions.Partial));
+ profileDrivenPartialNGen: partial));
- if (!_commandLineOptions.CompositeOrInputBubble)
+ if (!_command.CompositeOrInputBubble)
{
break;
}
@@ -812,18 +628,18 @@ namespace ILCompiler
}
// In single-file compilation mode, use the assembly's DebuggableAttribute to determine whether to optimize
// or produce debuggable code if an explicit optimization level was not specified on the command line
- OptimizationMode optimizationMode = _optimizationMode;
- if (optimizationMode == OptimizationMode.None && !_commandLineOptions.OptimizeDisabled && !_commandLineOptions.Composite)
+ OptimizationMode optimizationMode = _command.OptimizationMode;
+ if (optimizationMode == OptimizationMode.None && !Get(_command.OptimizeDisabled) && !composite)
{
System.Diagnostics.Debug.Assert(inputModules.Count == 1);
optimizationMode = ((EcmaAssembly)inputModules[0].Assembly).HasOptimizationsDisabled() ? OptimizationMode.None : OptimizationMode.Blended;
}
CompositeImageSettings compositeImageSettings = new CompositeImageSettings();
-
- if (_commandLineOptions.CompositeKeyFile != null)
+ string compositeKeyFile = Get(_command.CompositeKeyFile);
+ if (compositeKeyFile != null)
{
- byte[] compositeStrongNameKey = File.ReadAllBytes(_commandLineOptions.CompositeKeyFile);
+ byte[] compositeStrongNameKey = File.ReadAllBytes(compositeKeyFile);
if (!IsValidPublicKey(compositeStrongNameKey))
{
throw new Exception(string.Format(SR.ErrorCompositeKeyFileNotPublicKey));
@@ -843,38 +659,38 @@ namespace ILCompiler
ILProvider ilProvider = new ReadyToRunILProvider(compilationGroup);
- DependencyTrackingLevel trackingLevel = _commandLineOptions.DgmlLogFileName == null ?
- DependencyTrackingLevel.None : (_commandLineOptions.GenerateFullDgmlLog ? DependencyTrackingLevel.All : DependencyTrackingLevel.First);
+ DependencyTrackingLevel trackingLevel = dgmlLogFileName == null ?
+ DependencyTrackingLevel.None : (Get(_command.GenerateFullDgmlLog) ? DependencyTrackingLevel.All : DependencyTrackingLevel.First);
NodeFactoryOptimizationFlags nodeFactoryFlags = new NodeFactoryOptimizationFlags();
- nodeFactoryFlags.OptimizeAsyncMethods = _commandLineOptions.AsyncMethodOptimization;
+ nodeFactoryFlags.OptimizeAsyncMethods = Get(_command.AsyncMethodOptimization);
builder
- .UseMapFile(_commandLineOptions.Map)
- .UseMapCsvFile(_commandLineOptions.MapCsv)
- .UsePdbFile(_commandLineOptions.Pdb, _commandLineOptions.PdbPath)
- .UsePerfMapFile(_commandLineOptions.PerfMap, _commandLineOptions.PerfMapPath, _commandLineOptions.PerfMapFormatVersion)
+ .UseMapFile(Get(_command.Map))
+ .UseMapCsvFile(Get(_command.MapCsv))
+ .UsePdbFile(Get(_command.Pdb), Get(_command.PdbPath))
+ .UsePerfMapFile(Get(_command.PerfMap), Get(_command.PerfMapPath), Get(_command.PerfMapFormatVersion))
.UseProfileFile(jsonProfile != null)
.UseProfileData(profileDataManager)
.UseNodeFactoryOptimizationFlags(nodeFactoryFlags)
- .FileLayoutAlgorithms(_methodLayout, _fileLayout)
+ .FileLayoutAlgorithms(Get(_command.MethodLayout), Get(_command.FileLayout))
.UseCompositeImageSettings(compositeImageSettings)
- .UseJitPath(_commandLineOptions.JitPath)
+ .UseJitPath(Get(_command.JitPath))
.UseInstructionSetSupport(instructionSetSupport)
- .UseCustomPESectionAlignment(_commandLineOptions.CustomPESectionAlignment)
- .UseVerifyTypeAndFieldLayout(_commandLineOptions.VerifyTypeAndFieldLayout)
+ .UseCustomPESectionAlignment(Get(_command.CustomPESectionAlignment))
+ .UseVerifyTypeAndFieldLayout(Get(_command.VerifyTypeAndFieldLayout))
.GenerateOutputFile(outFile)
.UseImageBase(_imageBase)
.UseILProvider(ilProvider)
- .UseBackendOptions(_commandLineOptions.CodegenOptions)
+ .UseBackendOptions(Get(_command.CodegenOptions))
.UseLogger(logger)
- .UseParallelism(_commandLineOptions.Parallelism)
- .UseResilience(_commandLineOptions.Resilient)
+ .UseParallelism(Get(_command.Parallelism))
+ .UseResilience(Get(_command.Resilient))
.UseDependencyTracking(trackingLevel)
.UseCompilationRoots(compilationRoots)
.UseOptimizationMode(optimizationMode);
- if (_commandLineOptions.PrintReproInstructions)
+ if (Get(_command.PrintReproInstructions))
builder.UsePrintReproInstructions(CreateReproArgumentString);
compilation = builder.ToCompilation();
@@ -882,8 +698,8 @@ namespace ILCompiler
}
compilation.Compile(outFile);
- if (_commandLineOptions.DgmlLogFileName != null)
- compilation.WriteDependencyLog(_commandLineOptions.DgmlLogFileName);
+ if (dgmlLogFileName != null)
+ compilation.WriteDependencyLog(dgmlLogFileName);
compilation.Dispose();
}
@@ -918,13 +734,16 @@ namespace ILCompiler
private MethodDesc CheckAndParseSingleMethodModeArguments(CompilerTypeSystemContext context)
{
- if (_commandLineOptions.SingleMethodName == null && _commandLineOptions.SingleMethodTypeName == null && _commandLineOptions.SingleMethodGenericArg == null)
+ string[] singleMethodGenericArgs = Get(_command.SingleMethodGenericArgs);
+ string singleMethodName = Get(_command.SingleMethodName);
+ string singleMethodTypeName = Get(_command.SingleMethodTypeName);
+ if (singleMethodName == null && singleMethodTypeName == null && singleMethodGenericArgs.Length == 0)
return null;
- if (_commandLineOptions.SingleMethodName == null || _commandLineOptions.SingleMethodTypeName == null)
+ if (singleMethodName == null || singleMethodTypeName == null)
throw new CommandLineException(SR.TypeAndMethodNameNeeded);
- TypeDesc owningType = FindType(context, _commandLineOptions.SingleMethodTypeName);
+ TypeDesc owningType = FindType(context, singleMethodTypeName);
// TODO: allow specifying signature to distinguish overloads
MethodDesc method = null;
@@ -932,13 +751,13 @@ namespace ILCompiler
int curIndex = 0;
foreach (var searchMethod in owningType.GetMethods())
{
- if (searchMethod.Name != _commandLineOptions.SingleMethodName)
+ if (searchMethod.Name != singleMethodName)
continue;
curIndex++;
- if (_commandLineOptions.SingleMethodIndex != 0)
+ if (Get(_command.SingleMethodIndex) != 0)
{
- if (curIndex == _commandLineOptions.SingleMethodIndex)
+ if (curIndex == Get(_command.SingleMethodIndex))
{
method = searchMethod;
break;
@@ -962,7 +781,7 @@ namespace ILCompiler
curIndex = 0;
foreach (var searchMethod in owningType.GetMethods())
{
- if (searchMethod.Name != _commandLineOptions.SingleMethodName)
+ if (searchMethod.Name != singleMethodName)
continue;
curIndex++;
@@ -972,19 +791,19 @@ namespace ILCompiler
}
if (method == null)
- throw new CommandLineException(string.Format(SR.MethodNotFoundOnType, _commandLineOptions.SingleMethodName, _commandLineOptions.SingleMethodTypeName));
+ throw new CommandLineException(string.Format(SR.MethodNotFoundOnType, singleMethodName, singleMethodTypeName));
- if (method.HasInstantiation != (_commandLineOptions.SingleMethodGenericArg != null) ||
- (method.HasInstantiation && (method.Instantiation.Length != _commandLineOptions.SingleMethodGenericArg.Count)))
+ if (method.HasInstantiation != (singleMethodGenericArgs != null) ||
+ (method.HasInstantiation && (method.Instantiation.Length != singleMethodGenericArgs.Length)))
{
throw new CommandLineException(
- string.Format(SR.GenericArgCountMismatch, method.Instantiation.Length, _commandLineOptions.SingleMethodName, _commandLineOptions.SingleMethodTypeName));
+ string.Format(SR.GenericArgCountMismatch, method.Instantiation.Length, singleMethodName, singleMethodTypeName));
}
if (method.HasInstantiation)
{
List<TypeDesc> genericArguments = new List<TypeDesc>();
- foreach (var argString in _commandLineOptions.SingleMethodGenericArg)
+ foreach (var argString in singleMethodGenericArgs)
genericArguments.Add(FindType(context, argString));
method = method.MakeInstantiatedMethod(genericArguments.ToArray());
}
@@ -992,7 +811,7 @@ namespace ILCompiler
return method;
}
- private static string CreateReproArgumentString(MethodDesc method)
+ internal static string CreateReproArgumentString(MethodDesc method)
{
StringBuilder sb = new StringBuilder();
@@ -1151,31 +970,15 @@ namespace ILCompiler
return true;
}
+ private T Get<T>(Option<T> option) => _command.Result.GetValueForOption(option);
- private static int Main(string[] args)
- {
-#if DEBUG
- try
- {
- return new Program().Run(args);
- }
- catch (CodeGenerationFailedException ex) when (DumpReproArguments(ex))
- {
- throw new NotSupportedException(); // Unreachable
- }
-#else
- try
- {
- return new Program().Run(args);
- }
- catch (Exception e)
- {
- Console.Error.WriteLine(string.Format(SR.ProgramError, e.Message));
- Console.Error.WriteLine(e.ToString());
- return 1;
- }
-#endif
-
- }
+ private static int Main(string[] args) =>
+ new CommandLineBuilder(new Crossgen2RootCommand(args))
+ .UseTokenReplacer(Helpers.TryReadResponseFile)
+ .UseVersionOption("-v")
+ .UseHelp(context => context.HelpBuilder.CustomizeLayout(Crossgen2RootCommand.GetExtendedHelp))
+ .UseParseErrorReporting()
+ .Build()
+ .Invoke(args);
}
}
diff --git a/src/coreclr/tools/aot/crossgen2/Properties/Resources.resx b/src/coreclr/tools/aot/crossgen2/Properties/Resources.resx
index b76655992d1..2a3ca764754 100644
--- a/src/coreclr/tools/aot/crossgen2/Properties/Resources.resx
+++ b/src/coreclr/tools/aot/crossgen2/Properties/Resources.resx
@@ -393,4 +393,7 @@
<data name="SupportIbc" xml:space="preserve">
<value>Enable processing of Ibc data embedded in the input assembly.</value>
</data>
-</root> \ No newline at end of file
+ <data name="Crossgen2BannerText" xml:space="preserve">
+ <value>.NET Crossgen2 Compiler</value>
+ </data>
+</root>
diff --git a/src/coreclr/tools/aot/crossgen2/crossgen2.csproj b/src/coreclr/tools/aot/crossgen2/crossgen2.csproj
index 8696352abc0..12864a2341e 100644
--- a/src/coreclr/tools/aot/crossgen2/crossgen2.csproj
+++ b/src/coreclr/tools/aot/crossgen2/crossgen2.csproj
@@ -32,7 +32,8 @@
<PropertyGroup Condition="'$(NativeAotSupported)' == 'true'">
<IlcToolsPath>$(CoreCLRILCompilerDir)</IlcToolsPath>
<IlcToolsPath Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)'">$(CoreCLRCrossILCompilerDir)</IlcToolsPath>
- <CppCompilerAndLinker Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)' and '$(HostOS)' != 'windows'">clang-9</CppCompilerAndLinker>
+ <CppCompilerAndLinker Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)' and '$(HostOS)' != 'windows' and '$(RuntimeIdentifier)' == 'linux-musl-arm64'">clang-15</CppCompilerAndLinker>
+ <CppCompilerAndLinker Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)' and '$(HostOS)' != 'windows' and '$(RuntimeIdentifier)' != 'linux-musl-arm64'">clang-9</CppCompilerAndLinker>
<SysRoot Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)' and '$(HostOS)' != 'windows'">$(ROOTFS_DIR)</SysRoot>
<IlcBuildTasksPath>$(CoreCLRILCompilerDir)netstandard/ILCompiler.Build.Tasks.dll</IlcBuildTasksPath>
<IlcSdkPath>$(CoreCLRAotSdkDir)</IlcSdkPath>
diff --git a/src/coreclr/tools/aot/crossgen2/crossgen2.props b/src/coreclr/tools/aot/crossgen2/crossgen2.props
index b7aa445890d..dee32ed5ba4 100644
--- a/src/coreclr/tools/aot/crossgen2/crossgen2.props
+++ b/src/coreclr/tools/aot/crossgen2/crossgen2.props
@@ -13,6 +13,7 @@
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
<Configurations>Debug;Release;Checked</Configurations>
<ServerGarbageCollection>true</ServerGarbageCollection>
+ <EventSourceSupport>true</EventSourceSupport>
</PropertyGroup>
<ItemGroup Label="Embedded Resources">
@@ -28,27 +29,17 @@
</ItemGroup>
<ItemGroup>
+ <PackageReference Include="System.CommandLine" Version="$(SystemCommandLineVersion)" />
+ </ItemGroup>
+
+ <ItemGroup>
<ProjectReference Include="..\ILCompiler.DependencyAnalysisFramework\ILCompiler.DependencyAnalysisFramework.csproj" />
<ProjectReference Include="..\ILCompiler.TypeSystem\ILCompiler.TypeSystem.csproj" />
<ProjectReference Include="..\ILCompiler.ReadyToRun\ILCompiler.ReadyToRun.csproj" />
</ItemGroup>
<ItemGroup>
- <Compile Include="..\..\Common\CommandLine\Argument.cs" />
- <Compile Include="..\..\Common\CommandLine\Argument_1.cs" />
- <Compile Include="..\..\Common\CommandLine\ArgumentCommand.cs" />
- <Compile Include="..\..\Common\CommandLine\ArgumentCommand_1.cs" />
- <Compile Include="..\..\Common\CommandLine\ArgumentLexer.cs" />
- <Compile Include="..\..\Common\CommandLine\ArgumentList_1.cs" />
- <Compile Include="..\..\Common\CommandLine\ArgumentParser.cs" />
- <Compile Include="..\..\Common\CommandLine\ArgumentSyntax.cs" />
- <Compile Include="..\..\Common\CommandLine\ArgumentSyntax_Definers.cs" />
- <Compile Include="..\..\Common\CommandLine\ArgumentSyntaxException.cs" />
- <Compile Include="..\..\Common\CommandLine\ArgumentToken.cs" />
- <Compile Include="..\..\Common\CommandLine\CommandLineException.cs" />
- <Compile Include="..\..\Common\CommandLine\CommandLineHelpers.cs" />
- <Compile Include="..\..\Common\CommandLine\Enumerable.cs" />
- <Compile Include="..\..\Common\CommandLine\HelpTextGenerator.cs" />
+ <Compile Include="..\..\Common\CommandLineHelpers.cs" />
</ItemGroup>
<PropertyGroup>
diff --git a/src/coreclr/tools/dotnet-pgo/dotnet-pgo.csproj b/src/coreclr/tools/dotnet-pgo/dotnet-pgo.csproj
index ab5cc92e424..14a99e98aad 100644
--- a/src/coreclr/tools/dotnet-pgo/dotnet-pgo.csproj
+++ b/src/coreclr/tools/dotnet-pgo/dotnet-pgo.csproj
@@ -21,9 +21,6 @@
<PackageReleaseNotes>$(Description)</PackageReleaseNotes>
<RootNamespace>Microsoft.Diagnostics.Tools.Pgo</RootNamespace>
<RollForward>Major</RollForward>
- <!-- TODO Remove the language version limitation when the reference assemblies
- are updated with the new scoped keyword. -->
- <LangVersion>10</LangVersion>
</PropertyGroup>
<ItemGroup>
diff --git a/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp b/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp
index 7bac6fdb365..2faea5a996e 100644
--- a/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp
+++ b/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp
@@ -30,6 +30,7 @@ MethodContext::MethodContext()
cr = new CompileResult();
index = -1;
+ ignoreStoredConfig = false;
isReadyToRunCompilation = ReadyToRunCompilation::Uninitialized;
}
@@ -1259,6 +1260,7 @@ DWORD MethodContext::repGetJitFlags(CORJIT_FLAGS* jitFlags, DWORD sizeInBytes)
DEBUG_REP(dmpGetJitFlags(0, value));
CORJIT_FLAGS* resultFlags = (CORJIT_FLAGS*)GetJitFlags->GetBuffer(value.A);
+ Assert(sizeInBytes >= value.B);
memcpy(jitFlags, resultFlags, value.B);
InitReadyToRunFlag(resultFlags);
return value.B;
@@ -6902,6 +6904,9 @@ void MethodContext::dmpGetIntConfigValue(const Agnostic_ConfigIntInfo& key, int
int MethodContext::repGetIntConfigValue(const WCHAR* name, int defaultValue)
{
+ if (ignoreStoredConfig)
+ return defaultValue;
+
if (GetIntConfigValue == nullptr)
return defaultValue;
@@ -6954,6 +6959,9 @@ void MethodContext::dmpGetStringConfigValue(DWORD nameIndex, DWORD resultIndex)
const WCHAR* MethodContext::repGetStringConfigValue(const WCHAR* name)
{
+ if (ignoreStoredConfig)
+ return nullptr;
+
if (GetStringConfigValue == nullptr)
return nullptr;
diff --git a/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.h b/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.h
index f9769119e20..354cdb82139 100644
--- a/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.h
+++ b/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.h
@@ -77,9 +77,6 @@ public:
MethodContext();
private:
- MethodContext(HANDLE hFile);
- MethodContext(unsigned char* buff, unsigned int totalLen);
-
void MethodInitHelper(unsigned char* buff, unsigned int totalLen);
void MethodInitHelperFile(HANDLE hFile);
@@ -94,6 +91,11 @@ public:
~MethodContext();
void Destroy();
+ void setIgnoreStoredConfig()
+ {
+ ignoreStoredConfig = true;
+ }
+
bool Equal(MethodContext* other);
unsigned int saveToFile(HANDLE hFile);
unsigned int calculateFileSize();
@@ -114,8 +116,6 @@ public:
void recGlobalContext(const MethodContext& other);
- void dmpEnvironment(DWORD key, const Agnostic_Environment& value);
-
void recCompileMethod(CORINFO_METHOD_INFO* info, unsigned flags, CORINFO_OS os);
void dmpCompileMethod(DWORD key, const Agnostic_CompileMethod& value);
void repCompileMethod(CORINFO_METHOD_INFO* info, unsigned* flags, CORINFO_OS* os);
@@ -879,6 +879,7 @@ public:
CompileResult* cr;
CompileResult* originalCR;
int index;
+ bool ignoreStoredConfig;
private:
bool IsEnvironmentHeaderEqual(const Environment& prevEnv);
diff --git a/src/coreclr/tools/superpmi/superpmi-shared/standardpch.h b/src/coreclr/tools/superpmi/superpmi-shared/standardpch.h
index af32198b1b7..e0e83c41d03 100644
--- a/src/coreclr/tools/superpmi/superpmi-shared/standardpch.h
+++ b/src/coreclr/tools/superpmi/superpmi-shared/standardpch.h
@@ -62,6 +62,7 @@
// Getting STL to work with PAL is difficult, so reimplement STL functionality to not require it.
#ifdef TARGET_UNIX
+#include "clr_std/utility"
#include "clr_std/string"
#include "clr_std/algorithm"
#include "clr_std/vector"
@@ -69,6 +70,7 @@
#ifndef USE_STL
#define USE_STL
#endif // USE_STL
+#include <utility>
#include <string>
#include <algorithm>
#include <vector>
@@ -116,4 +118,6 @@ static inline void __debugbreak()
}
#endif
+#include <minipal/utils.h>
+
#endif // STANDARDPCH_H
diff --git a/src/coreclr/tools/superpmi/superpmi/CMakeLists.txt b/src/coreclr/tools/superpmi/superpmi/CMakeLists.txt
index 63237450898..76ab73ffdab 100644
--- a/src/coreclr/tools/superpmi/superpmi/CMakeLists.txt
+++ b/src/coreclr/tools/superpmi/superpmi/CMakeLists.txt
@@ -26,6 +26,7 @@ set(SUPERPMI_SOURCES
neardiffer.cpp
parallelsuperpmi.cpp
superpmi.cpp
+ fileio.cpp
jithost.cpp
../superpmi-shared/callutils.cpp
../superpmi-shared/compileresult.cpp
diff --git a/src/coreclr/tools/superpmi/superpmi/commandline.cpp b/src/coreclr/tools/superpmi/superpmi/commandline.cpp
index f14df494a3d..e60a24a7a4f 100644
--- a/src/coreclr/tools/superpmi/superpmi/commandline.cpp
+++ b/src/coreclr/tools/superpmi/superpmi/commandline.cpp
@@ -39,6 +39,9 @@ void CommandLine::DumpHelp(const char* program)
printf(" -box\n");
printf(" Break on exception thrown, such as for missing data during replay\n");
printf("\n");
+ printf(" -ignoreStoredConfig\n");
+ printf(" On replay, ignore any stored configuration variables. Useful for Checked/Release asm diffs.\n");
+ printf("\n");
printf(" -v[erbosity] messagetypes\n");
printf(" Controls which types of messages SuperPMI logs. Specify a string of\n");
printf(" characters representing message categories to enable, where:\n");
@@ -83,10 +86,6 @@ void CommandLine::DumpHelp(const char* program)
printf("\n");
printf(" -metricsSummary <file name>, -baseMetricsSummary <file name.csv>\n");
printf(" Emit a summary of metrics to the specified file\n");
- printf(" Currently includes:\n");
- printf(" Total number of successful SPMI compiles\n");
- printf(" Total number of failing SPMI compiles\n");
- printf(" Total amount of ASM code in bytes\n");
printf("\n");
printf(" -diffMetricsSummary <file name>\n");
printf(" Same as above, but emit for the diff/second JIT");
@@ -322,7 +321,7 @@ bool CommandLine::Parse(int argc, char* argv[], /* OUT */ Options* o)
o->mclFilename = argv[i];
}
- else if ((_strnicmp(&argv[i][1], "diffMCList", 10) == 0))
+ else if ((_strnicmp(&argv[i][1], "diffsInfo", 9) == 0))
{
if (++i >= argc)
{
@@ -330,7 +329,7 @@ bool CommandLine::Parse(int argc, char* argv[], /* OUT */ Options* o)
return false;
}
- o->diffMCLFilename = argv[i];
+ o->diffsInfo = argv[i];
}
else if ((_strnicmp(&argv[i][1], "target", 6) == 0))
{
@@ -354,6 +353,10 @@ bool CommandLine::Parse(int argc, char* argv[], /* OUT */ Options* o)
{
o->breakOnException = true;
}
+ else if ((_strnicmp(&argv[i][1], "ignoreStoredConfig", 18) == 0))
+ {
+ o->ignoreStoredConfig = true;
+ }
else if ((_strnicmp(&argv[i][1], "verbosity", argLen) == 0))
{
if (++i >= argc)
@@ -645,9 +648,9 @@ bool CommandLine::Parse(int argc, char* argv[], /* OUT */ Options* o)
DumpHelp(argv[0]);
return false;
}
- if (o->diffMCLFilename != nullptr && !o->applyDiff)
+ if (o->diffsInfo != nullptr && !o->applyDiff)
{
- LogError("-diffMCList specified without -applyDiff.");
+ LogError("-diffsInfo specified without -applyDiff.");
DumpHelp(argv[0]);
return false;
}
diff --git a/src/coreclr/tools/superpmi/superpmi/commandline.h b/src/coreclr/tools/superpmi/superpmi/commandline.h
index 055adf00295..f0dc09bd161 100644
--- a/src/coreclr/tools/superpmi/superpmi/commandline.h
+++ b/src/coreclr/tools/superpmi/superpmi/commandline.h
@@ -22,6 +22,7 @@ public:
, breakOnError(false)
, breakOnAssert(false)
, breakOnException(false)
+ , ignoreStoredConfig(false)
, applyDiff(false)
, parallel(false)
#if !defined(USE_MSVCDIS) && defined(USE_COREDISTOOLS)
@@ -39,7 +40,7 @@ public:
, baseMetricsSummaryFile(nullptr)
, diffMetricsSummaryFile(nullptr)
, mclFilename(nullptr)
- , diffMCLFilename(nullptr)
+ , diffsInfo(nullptr)
, targetArchitecture(nullptr)
, compileList(nullptr)
, offset(-1)
@@ -59,6 +60,7 @@ public:
bool breakOnError;
bool breakOnAssert;
bool breakOnException;
+ bool ignoreStoredConfig;
bool applyDiff;
bool parallel; // User specified to use /parallel mode.
bool useCoreDisTools; // Use CoreDisTools library instead of Msvcdis
@@ -72,7 +74,7 @@ public:
char* baseMetricsSummaryFile;
char* diffMetricsSummaryFile;
char* mclFilename;
- char* diffMCLFilename;
+ char* diffsInfo;
char* targetArchitecture;
char* compileList;
int offset;
diff --git a/src/coreclr/tools/superpmi/superpmi/fileio.cpp b/src/coreclr/tools/superpmi/superpmi/fileio.cpp
new file mode 100644
index 00000000000..ed16485a038
--- /dev/null
+++ b/src/coreclr/tools/superpmi/superpmi/fileio.cpp
@@ -0,0 +1,115 @@
+#include "standardpch.h"
+#include "fileio.h"
+
+bool FileWriter::Printf(const char* fmt, ...)
+{
+ va_list args;
+ va_start(args, fmt);
+
+ char stackBuffer[512];
+ size_t bufferSize = sizeof(stackBuffer);
+ char* pBuffer = stackBuffer;
+ while (true)
+ {
+ va_list argsCopy;
+ va_copy(argsCopy, args);
+ int printed = _vsnprintf_s(pBuffer, bufferSize, _TRUNCATE, fmt, argsCopy);
+ va_end(argsCopy);
+
+ if (printed < 0)
+ {
+ // buffer too small
+ if (pBuffer != stackBuffer)
+ delete[] pBuffer;
+
+ bufferSize *= 2;
+ pBuffer = new char[bufferSize];
+ }
+ else
+ {
+ DWORD numWritten;
+ bool result =
+ WriteFile(m_file.Get(), pBuffer, static_cast<DWORD>(printed), &numWritten, nullptr) &&
+ (numWritten == static_cast<DWORD>(printed));
+
+ if (pBuffer != stackBuffer)
+ delete[] pBuffer;
+
+ va_end(args);
+ return result;
+ }
+ }
+}
+
+bool FileWriter::CreateNew(const char* path, FileWriter* fw)
+{
+ FileHandle handle(CreateFile(path, GENERIC_WRITE, 0, nullptr, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr));
+ if (!handle.IsValid())
+ {
+ return false;
+ }
+
+ *fw = FileWriter(std::move(handle));
+ return true;
+}
+
+bool FileLineReader::Open(const char* path, FileLineReader* fr)
+{
+ FileHandle file(CreateFile(path, GENERIC_READ, FILE_SHARE_READ, nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr));
+ if (!file.IsValid())
+ {
+ return false;
+ }
+
+ LARGE_INTEGER size;
+ if (!GetFileSizeEx(file.Get(), &size))
+ {
+ return false;
+ }
+
+ if (static_cast<ULONGLONG>(size.QuadPart) > SIZE_MAX)
+ {
+ return false;
+ }
+
+ FileMappingHandle mapping(CreateFileMapping(file.Get(), nullptr, PAGE_READONLY, size.u.HighPart, size.u.LowPart, nullptr));
+ if (!mapping.IsValid())
+ {
+ return false;
+ }
+
+ FileViewHandle view(MapViewOfFile(mapping.Get(), FILE_MAP_READ, 0, 0, 0));
+ if (!view.IsValid())
+ {
+ return false;
+ }
+
+ *fr = FileLineReader(std::move(file), std::move(mapping), std::move(view), static_cast<size_t>(size.QuadPart));
+ return true;
+}
+
+bool FileLineReader::AdvanceLine()
+{
+ if (m_cur >= m_end)
+ {
+ return false;
+ }
+
+ char* end = m_cur;
+ while (end < m_end && *end != '\r' && *end != '\n')
+ {
+ end++;
+ }
+
+ m_currentLine.resize(end - m_cur + 1);
+ memcpy(m_currentLine.data(), m_cur, end - m_cur);
+ m_currentLine[end - m_cur] = '\0';
+
+ m_cur = end;
+ if (m_cur < m_end && *m_cur == '\r')
+ m_cur++;
+ if (m_cur < m_end && *m_cur == '\n')
+ m_cur++;
+
+ return true;
+}
diff --git a/src/coreclr/tools/superpmi/superpmi/fileio.h b/src/coreclr/tools/superpmi/superpmi/fileio.h
new file mode 100644
index 00000000000..a88e74d6ee0
--- /dev/null
+++ b/src/coreclr/tools/superpmi/superpmi/fileio.h
@@ -0,0 +1,133 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#ifndef _FileIO
+#define _FileIO
+
+template<typename HandleSpec>
+struct HandleWrapper
+{
+ using HandleType = typename HandleSpec::Type;
+
+ HandleWrapper()
+ : m_handle(HandleSpec::Invalid())
+ {
+ }
+
+ explicit HandleWrapper(HandleType handle)
+ : m_handle(handle)
+ {
+ }
+
+ ~HandleWrapper()
+ {
+ if (m_handle != HandleSpec::Invalid())
+ {
+ HandleSpec::Close(m_handle);
+ m_handle = HandleSpec::Invalid();
+ }
+ }
+
+ HandleWrapper(const HandleWrapper&) = delete;
+ HandleWrapper& operator=(HandleWrapper&) = delete;
+
+ HandleWrapper(HandleWrapper&& hw) noexcept
+ : m_handle(hw.m_handle)
+ {
+ hw.m_handle = HandleSpec::Invalid();
+ }
+
+ HandleWrapper& operator=(HandleWrapper&& hw) noexcept
+ {
+ if (m_handle != HandleSpec::Invalid())
+ HandleSpec::Close(m_handle);
+
+ m_handle = hw.m_handle;
+ hw.m_handle = HandleSpec::Invalid();
+ return *this;
+ }
+
+ bool IsValid() { return m_handle != HandleSpec::Invalid(); }
+ HandleType Get() { return m_handle; }
+
+private:
+ HandleType m_handle;
+};
+
+struct FileHandleSpec
+{
+ using Type = HANDLE;
+ static HANDLE Invalid() { return INVALID_HANDLE_VALUE; }
+ static void Close(HANDLE h) { CloseHandle(h); }
+};
+
+struct FileMappingHandleSpec
+{
+ using Type = HANDLE;
+ static HANDLE Invalid() { return nullptr; }
+ static void Close(HANDLE h) { CloseHandle(h); }
+};
+
+struct FileViewHandleSpec
+{
+ using Type = LPVOID;
+ static LPVOID Invalid() { return nullptr; }
+ static void Close(LPVOID p) { UnmapViewOfFile(p); }
+};
+
+typedef HandleWrapper<FileHandleSpec> FileHandle;
+typedef HandleWrapper<FileMappingHandleSpec> FileMappingHandle;
+typedef HandleWrapper<FileViewHandleSpec> FileViewHandle;
+
+class FileWriter
+{
+ FileHandle m_file;
+
+ FileWriter(FileHandle file)
+ : m_file(std::move(file))
+ {
+ }
+
+public:
+ FileWriter()
+ {
+ }
+
+ bool Printf(const char* fmt, ...);
+
+ static bool CreateNew(const char* path, FileWriter* fw);
+};
+
+class FileLineReader
+{
+ FileHandle m_file;
+ FileMappingHandle m_fileMapping;
+ FileViewHandle m_view;
+
+ char* m_cur;
+ char* m_end;
+ std::vector<char> m_currentLine;
+
+ FileLineReader(FileHandle file, FileMappingHandle fileMapping, FileViewHandle view, size_t size)
+ : m_file(std::move(file))
+ , m_fileMapping(std::move(fileMapping))
+ , m_view(std::move(view))
+ , m_cur(static_cast<char*>(m_view.Get()))
+ , m_end(static_cast<char*>(m_view.Get()) + size)
+ {
+ }
+
+public:
+ FileLineReader()
+ : m_cur(nullptr)
+ , m_end(nullptr)
+ {
+ }
+
+ bool AdvanceLine();
+ const char* GetCurrentLine() { return m_currentLine.data(); }
+
+ static bool Open(const char* path, FileLineReader* fr);
+};
+
+#endif
diff --git a/src/coreclr/tools/superpmi/superpmi/jitinstance.cpp b/src/coreclr/tools/superpmi/superpmi/jitinstance.cpp
index da481413818..dcf1f8abfe2 100644
--- a/src/coreclr/tools/superpmi/superpmi/jitinstance.cpp
+++ b/src/coreclr/tools/superpmi/superpmi/jitinstance.cpp
@@ -298,7 +298,7 @@ extern "C" DLLEXPORT NOINLINE void Instrumentor_GetInsCount(UINT64* result)
}
}
-JitInstance::Result JitInstance::CompileMethod(MethodContext* MethodToCompile, int mcIndex, bool collectThroughput, MetricsSummary* metrics)
+JitInstance::Result JitInstance::CompileMethod(MethodContext* MethodToCompile, int mcIndex, bool collectThroughput, MetricsSummary* metrics, bool* isMinOpts)
{
struct Param : FilterSuperPMIExceptionsParam_CaptureException
{
@@ -309,6 +309,7 @@ JitInstance::Result JitInstance::CompileMethod(MethodContext* MethodToCompile, i
int mcIndex;
bool collectThroughput;
MetricsSummary* metrics;
+ bool* isMinOpts;
} param;
param.pThis = this;
param.result = RESULT_SUCCESS; // assume success
@@ -316,6 +317,9 @@ JitInstance::Result JitInstance::CompileMethod(MethodContext* MethodToCompile, i
param.mcIndex = mcIndex;
param.collectThroughput = collectThroughput;
param.metrics = metrics;
+ param.isMinOpts = isMinOpts;
+
+ *isMinOpts = false;
// store to instance field our raw values, so we can figure things out a bit later...
mc = MethodToCompile;
@@ -335,6 +339,14 @@ JitInstance::Result JitInstance::CompileMethod(MethodContext* MethodToCompile, i
CORINFO_OS os = CORINFO_WINNT;
pParam->pThis->mc->repCompileMethod(&pParam->info, &pParam->flags, &os);
+ CORJIT_FLAGS jitFlags;
+ pParam->pThis->mc->repGetJitFlags(&jitFlags, sizeof(jitFlags));
+
+ *pParam->isMinOpts =
+ jitFlags.IsSet(CORJIT_FLAGS::CORJIT_FLAG_DEBUG_CODE) ||
+ jitFlags.IsSet(CORJIT_FLAGS::CORJIT_FLAG_MIN_OPT) ||
+ jitFlags.IsSet(CORJIT_FLAGS::CORJIT_FLAG_TIER0);
+
if (pParam->collectThroughput)
{
pParam->pThis->lt.Start();
@@ -347,6 +359,17 @@ JitInstance::Result JitInstance::CompileMethod(MethodContext* MethodToCompile, i
pParam->pThis->lt.Stop();
pParam->pThis->times[0] = pParam->pThis->lt.GetCycles();
}
+
+ CorInfoMethodRuntimeFlags flags = pParam->pThis->mc->cr->repSetMethodAttribs(pParam->info.ftn);
+ if ((flags & CORINFO_FLG_SWITCHED_TO_MIN_OPT) != 0)
+ {
+ *pParam->isMinOpts = true;
+ }
+ else if ((flags & CORINFO_FLG_SWITCHED_TO_OPTIMIZED) != 0)
+ {
+ *pParam->isMinOpts = false;
+ }
+
if (jitResult == CORJIT_SKIPPED)
{
SPMI_TARGET_ARCHITECTURE targetArch = GetSpmiTargetArchitecture();
@@ -436,7 +459,6 @@ JitInstance::Result JitInstance::CompileMethod(MethodContext* MethodToCompile, i
{
metrics->SuccessfulCompiles++;
metrics->NumExecutedInstructions += static_cast<long long>(insCountAfter - insCountBefore);
-
}
else
{
diff --git a/src/coreclr/tools/superpmi/superpmi/jitinstance.h b/src/coreclr/tools/superpmi/superpmi/jitinstance.h
index 8e8fbabf82e..35b322d172f 100644
--- a/src/coreclr/tools/superpmi/superpmi/jitinstance.h
+++ b/src/coreclr/tools/superpmi/superpmi/jitinstance.h
@@ -60,7 +60,7 @@ public:
bool resetConfig(MethodContext* firstContext);
- Result CompileMethod(MethodContext* MethodToCompile, int mcIndex, bool collectThroughput, class MetricsSummary* summary);
+ Result CompileMethod(MethodContext* MethodToCompile, int mcIndex, bool collectThroughput, struct MetricsSummary* metrics, bool* isMinOpts);
const WCHAR* getForceOption(const WCHAR* key);
const WCHAR* getOption(const WCHAR* key);
diff --git a/src/coreclr/tools/superpmi/superpmi/metricssummary.cpp b/src/coreclr/tools/superpmi/superpmi/metricssummary.cpp
index cf93ce902de..7967cf90293 100644
--- a/src/coreclr/tools/superpmi/superpmi/metricssummary.cpp
+++ b/src/coreclr/tools/superpmi/superpmi/metricssummary.cpp
@@ -4,110 +4,115 @@
#include "standardpch.h"
#include "metricssummary.h"
#include "logging.h"
+#include "fileio.h"
-struct HandleCloser
+void MetricsSummary::AggregateFrom(const MetricsSummary& other)
{
- void operator()(HANDLE hFile)
- {
- CloseHandle(hFile);
- }
-};
+ SuccessfulCompiles += other.SuccessfulCompiles;
+ FailingCompiles += other.FailingCompiles;
+ MissingCompiles += other.MissingCompiles;
+ NumContextsWithDiffs += other.NumContextsWithDiffs;
+ NumCodeBytes += other.NumCodeBytes;
+ NumDiffedCodeBytes += other.NumDiffedCodeBytes;
+ NumExecutedInstructions += other.NumExecutedInstructions;
+ NumDiffExecutedInstructions += other.NumDiffExecutedInstructions;
+}
-struct FileHandleWrapper
+void MetricsSummaries::AggregateFrom(const MetricsSummaries& other)
{
- FileHandleWrapper(HANDLE hFile)
- : hFile(hFile)
- {
- }
-
- ~FileHandleWrapper()
- {
- CloseHandle(hFile);
- }
-
- HANDLE get() { return hFile; }
-
-private:
- HANDLE hFile;
-};
+ Overall.AggregateFrom(other.Overall);
+ MinOpts.AggregateFrom(other.MinOpts);
+ FullOpts.AggregateFrom(other.FullOpts);
+}
-bool MetricsSummary::SaveToFile(const char* path)
+bool MetricsSummaries::SaveToFile(const char* path)
{
- FileHandleWrapper file(CreateFile(path, GENERIC_WRITE, 0, nullptr, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr));
- if (file.get() == INVALID_HANDLE_VALUE)
+ FileWriter file;
+ if (!FileWriter::CreateNew(path, &file))
{
return false;
}
- char buffer[4096];
- int len =
- sprintf_s(
- buffer, sizeof(buffer),
- "Successful compiles,Failing compiles,Missing compiles,Code bytes,Diffed code bytes,Executed instructions,Diff executed instructions\n"
- "%d,%d,%d,%lld,%lld,%lld,%lld\n",
- SuccessfulCompiles,
- FailingCompiles,
- MissingCompiles,
- NumCodeBytes,
- NumDiffedCodeBytes,
- NumExecutedInstructions,
- NumDiffExecutedInstructions);
- DWORD numWritten;
- if (!WriteFile(file.get(), buffer, static_cast<DWORD>(len), &numWritten, nullptr) || numWritten != static_cast<DWORD>(len))
+ if (!file.Printf(
+ "Successful compiles,Failing compiles,Missing compiles,Contexts with diffs,"
+ "Code bytes,Diffed code bytes,Executed instructions,Diff executed instructions,Name\n"))
{
return false;
}
- return true;
+ return
+ WriteRow(file, "Overall", Overall) &&
+ WriteRow(file, "MinOpts", MinOpts) &&
+ WriteRow(file, "FullOpts", FullOpts);
}
-bool MetricsSummary::LoadFromFile(const char* path, MetricsSummary* metrics)
+bool MetricsSummaries::WriteRow(FileWriter& fw, const char* name, const MetricsSummary& summary)
{
- FileHandleWrapper file(CreateFile(path, GENERIC_READ, FILE_SHARE_READ, nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr));
- if (file.get() == INVALID_HANDLE_VALUE)
+ return
+ fw.Printf(
+ "%d,%d,%d,%d,%lld,%lld,%lld,%lld,%s\n",
+ summary.SuccessfulCompiles,
+ summary.FailingCompiles,
+ summary.MissingCompiles,
+ summary.NumContextsWithDiffs,
+ summary.NumCodeBytes,
+ summary.NumDiffedCodeBytes,
+ summary.NumExecutedInstructions,
+ summary.NumDiffExecutedInstructions,
+ name);
+}
+
+bool MetricsSummaries::LoadFromFile(const char* path, MetricsSummaries* metrics)
+{
+ FileLineReader reader;
+ if (!FileLineReader::Open(path, &reader))
{
return false;
}
- LARGE_INTEGER len;
- if (!GetFileSizeEx(file.get(), &len))
+ if (!reader.AdvanceLine())
{
return false;
}
- DWORD stringLen = static_cast<DWORD>(len.QuadPart);
- std::vector<char> content(stringLen + 1);
- DWORD numRead;
- if (!ReadFile(file.get(), content.data(), stringLen, &numRead, nullptr) || numRead != stringLen)
+ *metrics = MetricsSummaries();
+ bool result = true;
+ while (reader.AdvanceLine())
{
- return false;
- }
+ MetricsSummary summary;
- content[stringLen] = '\0';
-
- int scanResult =
- sscanf_s(
- content.data(),
- "Successful compiles,Failing compiles,Missing compiles,Code bytes,Diffed code bytes,Executed instructions,Diff executed instructions\n"
- "%d,%d,%d,%lld,%lld,%lld,%lld\n",
- &metrics->SuccessfulCompiles,
- &metrics->FailingCompiles,
- &metrics->MissingCompiles,
- &metrics->NumCodeBytes,
- &metrics->NumDiffedCodeBytes,
- &metrics->NumExecutedInstructions,
- &metrics->NumDiffExecutedInstructions);
+ char name[32];
+ int scanResult =
+ sscanf_s(
+ reader.GetCurrentLine(),
+ "%d,%d,%d,%d,%lld,%lld,%lld,%lld,%s",
+ &summary.SuccessfulCompiles,
+ &summary.FailingCompiles,
+ &summary.MissingCompiles,
+ &summary.NumContextsWithDiffs,
+ &summary.NumCodeBytes,
+ &summary.NumDiffedCodeBytes,
+ &summary.NumExecutedInstructions,
+ &summary.NumDiffExecutedInstructions,
+ name, (unsigned)sizeof(name));
- return scanResult == 7;
-}
+ if (scanResult == 9)
+ {
+ MetricsSummary* tarSummary = nullptr;
+ if (strcmp(name, "Overall") == 0)
+ metrics->Overall = summary;
+ else if (strcmp(name, "MinOpts") == 0)
+ metrics->MinOpts = summary;
+ else if (strcmp(name, "FullOpts") == 0)
+ metrics->FullOpts = summary;
+ else
+ result = false;
+ }
+ else
+ {
+ result = false;
+ }
+ }
-void MetricsSummary::AggregateFrom(const MetricsSummary& other)
-{
- SuccessfulCompiles += other.SuccessfulCompiles;
- FailingCompiles += other.FailingCompiles;
- MissingCompiles += other.MissingCompiles;
- NumCodeBytes += other.NumCodeBytes;
- NumDiffedCodeBytes += other.NumDiffedCodeBytes;
- NumExecutedInstructions += other.NumExecutedInstructions;
- NumDiffExecutedInstructions += other.NumDiffExecutedInstructions;
+ return result;
}
diff --git a/src/coreclr/tools/superpmi/superpmi/metricssummary.h b/src/coreclr/tools/superpmi/superpmi/metricssummary.h
index 51208355755..14e364cd9fc 100644
--- a/src/coreclr/tools/superpmi/superpmi/metricssummary.h
+++ b/src/coreclr/tools/superpmi/superpmi/metricssummary.h
@@ -4,15 +4,16 @@
#ifndef _MetricsSummary
#define _MetricsSummary
-class MetricsSummary
+struct MetricsSummary
{
-public:
// Number of methods successfully jitted.
int SuccessfulCompiles = 0;
// Number of methods that failed jitting.
int FailingCompiles = 0;
// Number of methods that failed jitting due to missing SPMI data.
int MissingCompiles = 0;
+ // Number of contexts that had any diff.
+ int NumContextsWithDiffs = 0;
// Number of code bytes produced by the JIT for the successful compiles.
long long NumCodeBytes = 0;
// Number of code bytes that were diffed with the other compiler in diff mode.
@@ -23,9 +24,22 @@ public:
// Number of executed instructions inside contexts that were successfully diffed.
long long NumDiffExecutedInstructions = 0;
- bool SaveToFile(const char* path);
- static bool LoadFromFile(const char* path, MetricsSummary* metrics);
void AggregateFrom(const MetricsSummary& other);
};
+class MetricsSummaries
+{
+public:
+ MetricsSummary Overall;
+ MetricsSummary MinOpts;
+ MetricsSummary FullOpts;
+
+ void AggregateFrom(const MetricsSummaries& other);
+
+ bool SaveToFile(const char* path);
+ static bool LoadFromFile(const char* path, MetricsSummaries* metrics);
+private:
+ static bool WriteRow(class FileWriter& fw, const char* name, const MetricsSummary& summary);
+};
+
#endif
diff --git a/src/coreclr/tools/superpmi/superpmi/parallelsuperpmi.cpp b/src/coreclr/tools/superpmi/superpmi/parallelsuperpmi.cpp
index 92b172e196d..228fea93934 100644
--- a/src/coreclr/tools/superpmi/superpmi/parallelsuperpmi.cpp
+++ b/src/coreclr/tools/superpmi/superpmi/parallelsuperpmi.cpp
@@ -9,6 +9,7 @@
#include "commandline.h"
#include "errorhandling.h"
#include "metricssummary.h"
+#include "fileio.h"
#define MAX_LOG_LINE_SIZE 0x1000 // 4 KB
@@ -294,12 +295,16 @@ Cleanup:
}
}
-static bool ProcessChildMetrics(const char* baseMetricsSummaryPath, const char* diffMetricsSummaryPath, MetricsSummary* baseMetrics, MetricsSummary* diffMetrics)
+static bool ProcessChildMetrics(
+ const char* baseMetricsSummaryPath,
+ MetricsSummaries* baseMetrics,
+ const char* diffMetricsSummaryPath,
+ MetricsSummaries* diffMetrics)
{
if (baseMetricsSummaryPath != nullptr)
{
- MetricsSummary childBaseMetrics;
- if (!MetricsSummary::LoadFromFile(baseMetricsSummaryPath, &childBaseMetrics))
+ MetricsSummaries childBaseMetrics;
+ if (!MetricsSummaries::LoadFromFile(baseMetricsSummaryPath, &childBaseMetrics))
{
LogError("Couldn't load base metrics summary created by child process");
return false;
@@ -310,8 +315,8 @@ static bool ProcessChildMetrics(const char* baseMetricsSummaryPath, const char*
if (diffMetricsSummaryPath != nullptr)
{
- MetricsSummary childDiffMetrics;
- if (!MetricsSummary::LoadFromFile(diffMetricsSummaryPath, &childDiffMetrics))
+ MetricsSummaries childDiffMetrics;
+ if (!MetricsSummaries::LoadFromFile(diffMetricsSummaryPath, &childDiffMetrics))
{
LogError("Couldn't load diff metrics summary created by child process");
return false;
@@ -345,7 +350,7 @@ struct PerWorkerData
HANDLE hStdError;
char* failingMCListPath;
- char* diffMCListPath;
+ char* diffsInfoPath;
char* stdOutputPath;
char* stdErrorPath;
char* baseMetricsSummaryPath;
@@ -355,7 +360,7 @@ struct PerWorkerData
: hStdOutput(INVALID_HANDLE_VALUE)
, hStdError(INVALID_HANDLE_VALUE)
, failingMCListPath(nullptr)
- , diffMCListPath(nullptr)
+ , diffsInfoPath(nullptr)
, stdOutputPath(nullptr)
, stdErrorPath(nullptr)
, baseMetricsSummaryPath(nullptr)
@@ -364,7 +369,7 @@ struct PerWorkerData
}
};
-void MergeWorkerMCLs(char* mclFilename, PerWorkerData* workerData, int workerCount, char* PerWorkerData::*mclPath)
+static void MergeWorkerMCLs(char* mclFilename, PerWorkerData* workerData, int workerCount, char* PerWorkerData::*mclPath)
{
int **MCL = new int *[workerCount], *MCLCount = new int[workerCount], totalCount = 0;
@@ -392,6 +397,39 @@ void MergeWorkerMCLs(char* mclFilename, PerWorkerData* workerData, int workerCou
LogError("Unable to write to MCL file %s.", mclFilename);
}
+static void MergeWorkerCsvs(char* csvFilename, PerWorkerData* workerData, int workerCount, char* PerWorkerData::* csvPath)
+{
+ FileWriter fw;
+ if (!FileWriter::CreateNew(csvFilename, &fw))
+ {
+ LogError("Could not create file %s", csvFilename);
+ return;
+ }
+
+ bool hasHeader = false;
+ for (int i = 0; i < workerCount; i++)
+ {
+ FileLineReader reader;
+ if (!FileLineReader::Open(workerData[i].*csvPath, &reader))
+ {
+ LogError("Could not open child CSV file %s", workerData[i].*csvPath);
+ continue;
+ }
+
+ if (hasHeader && !reader.AdvanceLine())
+ {
+ continue;
+ }
+
+ while (reader.AdvanceLine())
+ {
+ fw.Printf("%s\n", reader.GetCurrentLine());
+ }
+
+ hasHeader = true;
+ }
+}
+
#define MAX_CMDLINE_SIZE 0x1000 // 4 KB
//-------------------------------------------------------------
@@ -449,6 +487,7 @@ char* ConstructChildProcessArgs(const CommandLine::Options& o)
ADDARG_BOOL(o.breakOnError, "-boe");
ADDARG_BOOL(o.breakOnAssert, "-boa");
ADDARG_BOOL(o.breakOnException, "-box");
+ ADDARG_BOOL(o.ignoreStoredConfig, "-ignoreStoredConfig");
ADDARG_BOOL(o.applyDiff, "-applyDiff");
ADDARG_STRING(o.reproName, "-reproName");
ADDARG_STRING(o.writeLogFile, "-writeLogFile");
@@ -524,8 +563,8 @@ int doParallelSuperPMI(CommandLine::Options& o)
LogVerbose("Using child (%s) with args (%s)", spmiFilename, spmiArgs);
if (o.mclFilename != nullptr)
LogVerbose(" failingMCList=%s", o.mclFilename);
- if (o.diffMCLFilename != nullptr)
- LogVerbose(" diffMCLFilename=%s", o.diffMCLFilename);
+ if (o.diffsInfo != nullptr)
+ LogVerbose(" diffsInfo=%s", o.diffsInfo);
LogVerbose(" workerCount=%d, skipCleanup=%d.", o.workerCount, o.skipCleanup);
PerWorkerData* perWorkerData = new PerWorkerData[o.workerCount];
@@ -547,22 +586,22 @@ int doParallelSuperPMI(CommandLine::Options& o)
sprintf_s(wd.failingMCListPath, MAX_PATH, "%sParallelSuperPMI-%u-%d.mcl", tempPath, randNumber, i);
}
- if (o.diffMCLFilename != nullptr)
+ if (o.diffsInfo != nullptr)
{
- wd.diffMCListPath = new char[MAX_PATH];
- sprintf_s(wd.diffMCListPath, MAX_PATH, "%sParallelSuperPMI-Diff-%u-%d.mcl", tempPath, randNumber, i);
+ wd.diffsInfoPath = new char[MAX_PATH];
+ sprintf_s(wd.diffsInfoPath, MAX_PATH, "%sParallelSuperPMI-Diff-%u-%d.mcl", tempPath, randNumber, i);
}
if (o.baseMetricsSummaryFile != nullptr)
{
wd.baseMetricsSummaryPath = new char[MAX_PATH];
- sprintf_s(wd.baseMetricsSummaryPath, MAX_PATH, "%sParallelSuperPMI-BaseMetricsSummary-%u-%d.txt", tempPath, randNumber, i);
+ sprintf_s(wd.baseMetricsSummaryPath, MAX_PATH, "%sParallelSuperPMI-BaseMetricsSummary-%u-%d.csv", tempPath, randNumber, i);
}
if (o.diffMetricsSummaryFile != nullptr)
{
wd.diffMetricsSummaryPath = new char[MAX_PATH];
- sprintf_s(wd.diffMetricsSummaryPath, MAX_PATH, "%sParallelSuperPMI-DiffMetricsSummary-%u-%d.txt", tempPath, randNumber, i);
+ sprintf_s(wd.diffMetricsSummaryPath, MAX_PATH, "%sParallelSuperPMI-DiffMetricsSummary-%u-%d.csv", tempPath, randNumber, i);
}
wd.stdOutputPath = new char[MAX_PATH];
@@ -589,10 +628,10 @@ int doParallelSuperPMI(CommandLine::Options& o)
wd.failingMCListPath);
}
- if (wd.diffMCListPath != nullptr)
+ if (wd.diffsInfoPath != nullptr)
{
- bytesWritten += sprintf_s(cmdLine + bytesWritten, MAX_CMDLINE_SIZE - bytesWritten, " -diffMCList %s",
- wd.diffMCListPath);
+ bytesWritten += sprintf_s(cmdLine + bytesWritten, MAX_CMDLINE_SIZE - bytesWritten, " -diffsInfo %s",
+ wd.diffsInfoPath);
}
if (wd.baseMetricsSummaryPath != nullptr)
@@ -693,8 +732,8 @@ int doParallelSuperPMI(CommandLine::Options& o)
bool usageError = false; // variable to flag if we hit a usage error in SuperPMI
int loaded = 0, jitted = 0, failed = 0, excluded = 0, missing = 0, diffs = 0;
- MetricsSummary baseMetrics;
- MetricsSummary diffMetrics;
+ MetricsSummaries baseMetrics;
+ MetricsSummaries diffMetrics;
// Read the stderr files and log them as errors
// Read the stdout files and parse them for counts and log any MISSING or ISSUE errors
@@ -703,7 +742,7 @@ int doParallelSuperPMI(CommandLine::Options& o)
PerWorkerData& wd = perWorkerData[i];
ProcessChildStdErr(wd.stdErrorPath);
ProcessChildStdOut(o, wd.stdOutputPath, &loaded, &jitted, &failed, &excluded, &missing, &diffs, &usageError);
- ProcessChildMetrics(wd.baseMetricsSummaryPath, wd.diffMetricsSummaryPath, &baseMetrics, &diffMetrics);
+ ProcessChildMetrics(wd.baseMetricsSummaryPath, &baseMetrics, wd.diffMetricsSummaryPath, &diffMetrics);
if (usageError)
break;
@@ -715,10 +754,10 @@ int doParallelSuperPMI(CommandLine::Options& o)
MergeWorkerMCLs(o.mclFilename, perWorkerData, o.workerCount, &PerWorkerData::failingMCListPath);
}
- if (o.diffMCLFilename != nullptr && !usageError)
+ if (o.diffsInfo != nullptr && !usageError)
{
// Concat the resulting diff .mcl files
- MergeWorkerMCLs(o.diffMCLFilename, perWorkerData, o.workerCount, &PerWorkerData::diffMCListPath);
+ MergeWorkerCsvs(o.diffsInfo, perWorkerData, o.workerCount, &PerWorkerData::diffsInfoPath);
}
if (o.baseMetricsSummaryFile != nullptr && !usageError)
@@ -757,9 +796,9 @@ int doParallelSuperPMI(CommandLine::Options& o)
{
DeleteFile(wd.failingMCListPath);
}
- if (wd.diffMCListPath != nullptr)
+ if (wd.diffsInfoPath != nullptr)
{
- DeleteFile(wd.diffMCListPath);
+ DeleteFile(wd.diffsInfoPath);
}
if (wd.baseMetricsSummaryPath != nullptr)
{
diff --git a/src/coreclr/tools/superpmi/superpmi/superpmi.cpp b/src/coreclr/tools/superpmi/superpmi/superpmi.cpp
index c43ed6fad68..c0d64df1acc 100644
--- a/src/coreclr/tools/superpmi/superpmi/superpmi.cpp
+++ b/src/coreclr/tools/superpmi/superpmi/superpmi.cpp
@@ -19,6 +19,7 @@
#include "methodstatsemitter.h"
#include "spmiutil.h"
#include "metricssummary.h"
+#include "fileio.h"
extern int doParallelSuperPMI(CommandLine::Options& o);
@@ -64,56 +65,47 @@ void SetSuperPmiTargetArchitecture(const char* targetArchitecture)
}
}
+enum class NearDifferResult
+{
+ SuccessWithoutDiff,
+ SuccessWithDiff,
+ Failure,
+};
+
// This function uses PAL_TRY, so it can't be in the a function that requires object unwinding. Extracting it out here
// avoids compiler error.
//
-void InvokeNearDiffer(NearDiffer* nearDiffer,
- CommandLine::Options* o,
- MethodContext** mc,
- CompileResult** crl,
- int* matchCount,
- MethodContextReader** reader,
- MCList* failingMCL,
- MCList* diffMCL)
+static NearDifferResult InvokeNearDiffer(NearDiffer* nearDiffer,
+ MethodContext** mc,
+ CompileResult** crl,
+ MethodContextReader** reader)
{
+
struct Param : FilterSuperPMIExceptionsParam_CaptureException
{
NearDiffer* nearDiffer;
- CommandLine::Options* o;
MethodContext** mc;
CompileResult** crl;
- int* matchCount;
MethodContextReader** reader;
- MCList* failingMCL;
- MCList* diffMCL;
+ NearDifferResult result;
} param;
param.nearDiffer = nearDiffer;
- param.o = o;
param.mc = mc;
param.crl = crl;
- param.matchCount = matchCount;
param.reader = reader;
- param.failingMCL = failingMCL;
- param.diffMCL = diffMCL;
+ param.result = NearDifferResult::Failure;
PAL_TRY(Param*, pParam, &param)
{
- if (pParam->nearDiffer->compare(*pParam->mc, *pParam->crl, (*pParam->mc)->cr))
+ if (!pParam->nearDiffer->compare(*pParam->mc, *pParam->crl, (*pParam->mc)->cr))
{
- (*pParam->matchCount)++;
+ pParam->result = NearDifferResult::SuccessWithDiff;
+ LogIssue(ISSUE_ASM_DIFF, "main method %d of size %d differs", (*pParam->reader)->GetMethodContextIndex(),
+ (*pParam->mc)->methodSize);
}
else
{
- LogIssue(ISSUE_ASM_DIFF, "main method %d of size %d differs", (*pParam->reader)->GetMethodContextIndex(),
- (*pParam->mc)->methodSize);
-
- // This is a difference in ASM outputs from Jit1 & Jit2 and not a playback failure
- // We will add this MC to the diffMCList if one is requested
- // Otherwise this will end up in failingMCList
- if ((*pParam->o).diffMCLFilename != nullptr)
- (*pParam->diffMCL).AddMethodToMCL((*pParam->reader)->GetMethodContextIndex());
- else if ((*pParam->o).mclFilename != nullptr)
- (*pParam->failingMCL).AddMethodToMCL((*pParam->reader)->GetMethodContextIndex());
+ pParam->result = NearDifferResult::SuccessWithoutDiff;
}
}
PAL_EXCEPT_FILTER(FilterSuperPMIExceptions_CaptureExceptionAndStop)
@@ -123,10 +115,26 @@ void InvokeNearDiffer(NearDiffer* nearDiffer,
LogError("main method %d of size %d failed to load and compile correctly.", (*reader)->GetMethodContextIndex(),
(*mc)->methodSize);
e.ShowAndDeleteMessage();
- if ((*o).mclFilename != nullptr)
- (*failingMCL).AddMethodToMCL((*reader)->GetMethodContextIndex());
+ param.result = NearDifferResult::Failure;
}
PAL_ENDTRY
+
+ return param.result;
+}
+
+static bool PrintDiffsCsvHeader(FileWriter& fw)
+{
+ return fw.Printf("Context,Context size,Base size,Diff size,Base instructions,Diff instructions\n");
+}
+
+static bool PrintDiffsCsvRow(
+ FileWriter& fw,
+ int context,
+ uint32_t contextSize,
+ long long baseSize, long long diffSize,
+ long long baseInstructions, long long diffInstructions)
+{
+ return fw.Printf("%d,%u,%lld,%lld,%lld,%lld\n", context, contextSize, baseSize, diffSize, baseInstructions, diffInstructions);
}
// Run superpmi. The return value is as follows:
@@ -173,7 +181,8 @@ int __cdecl main(int argc, char* argv[])
#endif
bool collectThroughput = false;
- MCList failingToReplayMCL, diffMCL;
+ MCList failingToReplayMCL;
+ FileWriter diffCsv;
CommandLine::Options o;
if (!CommandLine::Parse(argc, argv, &o))
@@ -232,9 +241,13 @@ int __cdecl main(int argc, char* argv[])
{
failingToReplayMCL.InitializeMCL(o.mclFilename);
}
- if (o.diffMCLFilename != nullptr)
+ if (o.diffsInfo != nullptr)
{
- diffMCL.InitializeMCL(o.diffMCLFilename);
+ if (!FileWriter::CreateNew(o.diffsInfo, &diffCsv))
+ {
+ LogError("Could not create file %s", o.diffsInfo);
+ return (int)SpmiResult::GeneralFailure;
+ }
}
SetDebugDumpVariables();
@@ -250,7 +263,6 @@ int __cdecl main(int argc, char* argv[])
int loadedCount = 0;
int jittedCount = 0;
- int matchCount = 0;
int failToReplayCount = 0;
int errorCount = 0;
int errorCount2 = 0;
@@ -269,8 +281,13 @@ int __cdecl main(int argc, char* argv[])
}
}
- MetricsSummary totalBaseMetrics;
- MetricsSummary totalDiffMetrics;
+ if (o.diffsInfo != nullptr)
+ {
+ PrintDiffsCsvHeader(diffCsv);
+ }
+
+ MetricsSummaries totalBaseMetrics;
+ MetricsSummaries totalDiffMetrics;
while (true)
{
@@ -289,9 +306,9 @@ int __cdecl main(int argc, char* argv[])
st1.Stop();
if (o.applyDiff)
{
- LogVerbose(" %2.1f%% - Loaded %d Jitted %d Matching %d FailedCompile %d at %d per second",
- reader->PercentComplete(), loadedCount, jittedCount, matchCount, failToReplayCount,
- (int)((double)500 / st1.GetSeconds()));
+ LogVerbose(" %2.1f%% - Loaded %d Jitted %d Diffs %d FailedCompile %d at %d per second",
+ reader->PercentComplete(), loadedCount, jittedCount, totalBaseMetrics.Overall.NumContextsWithDiffs,
+ failToReplayCount, (int)((double)500 / st1.GetSeconds()));
}
else
{
@@ -311,6 +328,11 @@ int __cdecl main(int argc, char* argv[])
return (int)SpmiResult::GeneralFailure;
}
+ if (o.ignoreStoredConfig)
+ {
+ mc->setIgnoreStoredConfig();
+ }
+
if (reader->IsMethodExcluded(mc))
{
excludedCount++;
@@ -367,18 +389,27 @@ int __cdecl main(int argc, char* argv[])
}
MetricsSummary baseMetrics;
+ bool isMinOpts;
jittedCount++;
st3.Start();
- res = jit->CompileMethod(mc, reader->GetMethodContextIndex(), collectThroughput, &baseMetrics);
+ res = jit->CompileMethod(mc, reader->GetMethodContextIndex(), collectThroughput, &baseMetrics, &isMinOpts);
st3.Stop();
LogDebug("Method %d compiled%s in %fms, result %d",
reader->GetMethodContextIndex(), (o.nameOfJit2 == nullptr) ? "" : " by JIT1", st3.GetMilliseconds(), res);
- totalBaseMetrics.AggregateFrom(baseMetrics);
+ MetricsSummary& totalBaseMetricsOpts = isMinOpts ? totalBaseMetrics.MinOpts : totalBaseMetrics.FullOpts;
+ MetricsSummary& totalDiffMetricsOpts = isMinOpts ? totalDiffMetrics.MinOpts : totalDiffMetrics.FullOpts;
- if ((res == JitInstance::RESULT_SUCCESS) && Logger::IsLogLevelEnabled(LOGLEVEL_DEBUG))
+ totalBaseMetrics.Overall.AggregateFrom(baseMetrics);
+
+ if (res == JitInstance::RESULT_SUCCESS)
{
- mc->cr->dumpToConsole(); // Dump the compile results if doing debug logging
+ totalBaseMetricsOpts.AggregateFrom(baseMetrics);
+
+ if (Logger::IsLogLevelEnabled(LOGLEVEL_DEBUG))
+ {
+ mc->cr->dumpToConsole(); // Dump the compile results if doing debug logging
+ }
}
MetricsSummary diffMetrics;
@@ -391,17 +422,23 @@ int __cdecl main(int argc, char* argv[])
crl = mc->cr;
mc->cr = new CompileResult();
+ bool isMinOptsDiff;
st4.Start();
- res2 = jit2->CompileMethod(mc, reader->GetMethodContextIndex(), collectThroughput, &diffMetrics);
+ res2 = jit2->CompileMethod(mc, reader->GetMethodContextIndex(), collectThroughput, &diffMetrics, &isMinOptsDiff);
st4.Stop();
LogDebug("Method %d compiled by JIT2 in %fms, result %d", reader->GetMethodContextIndex(),
st4.GetMilliseconds(), res2);
- totalDiffMetrics.AggregateFrom(diffMetrics);
+ totalDiffMetrics.Overall.AggregateFrom(diffMetrics);
- if ((res2 == JitInstance::RESULT_SUCCESS) && Logger::IsLogLevelEnabled(LOGLEVEL_DEBUG))
+ if (res2 == JitInstance::RESULT_SUCCESS)
{
- mc->cr->dumpToConsole(); // Dump the compile results if doing debug logging
+ totalDiffMetricsOpts.AggregateFrom(diffMetrics);
+
+ if (Logger::IsLogLevelEnabled(LOGLEVEL_DEBUG))
+ {
+ mc->cr->dumpToConsole(); // Dump the compile results if doing debug logging
+ }
}
if (res2 == JitInstance::RESULT_ERROR)
@@ -540,13 +577,55 @@ int __cdecl main(int argc, char* argv[])
}
else
{
- InvokeNearDiffer(&nearDiffer, &o, &mc, &crl, &matchCount, &reader, &failingToReplayMCL, &diffMCL);
+ NearDifferResult result = InvokeNearDiffer(&nearDiffer, &mc, &crl, &reader);
- totalBaseMetrics.NumDiffedCodeBytes += baseMetrics.NumCodeBytes;
- totalDiffMetrics.NumDiffedCodeBytes += diffMetrics.NumCodeBytes;
+ switch (result)
+ {
+ case NearDifferResult::SuccessWithDiff:
+ totalBaseMetrics.Overall.NumContextsWithDiffs++;
+ totalDiffMetrics.Overall.NumContextsWithDiffs++;
+
+ totalBaseMetricsOpts.NumContextsWithDiffs++;
+ totalDiffMetricsOpts.NumContextsWithDiffs++;
- totalBaseMetrics.NumDiffExecutedInstructions += baseMetrics.NumExecutedInstructions;
- totalDiffMetrics.NumDiffExecutedInstructions += diffMetrics.NumExecutedInstructions;
+ // This is a difference in ASM outputs from Jit1 & Jit2 and not a playback failure
+ // We will add this MC to the diffs info if there is one.
+ // Otherwise this will end up in failingMCList
+ if (o.diffsInfo != nullptr)
+ {
+ PrintDiffsCsvRow(
+ diffCsv,
+ reader->GetMethodContextIndex(),
+ mcb.size,
+ baseMetrics.NumCodeBytes, diffMetrics.NumCodeBytes,
+ baseMetrics.NumExecutedInstructions, diffMetrics.NumExecutedInstructions);
+ }
+ else if (o.mclFilename != nullptr)
+ {
+ failingToReplayMCL.AddMethodToMCL(reader->GetMethodContextIndex());
+ }
+
+ break;
+ case NearDifferResult::SuccessWithoutDiff:
+ break;
+ case NearDifferResult::Failure:
+ if (o.mclFilename != nullptr)
+ failingToReplayMCL.AddMethodToMCL(reader->GetMethodContextIndex());
+
+ break;
+ }
+
+ totalBaseMetrics.Overall.NumDiffedCodeBytes += baseMetrics.NumCodeBytes;
+ totalDiffMetrics.Overall.NumDiffedCodeBytes += diffMetrics.NumCodeBytes;
+
+ totalBaseMetricsOpts.NumDiffedCodeBytes += baseMetrics.NumCodeBytes;
+ totalDiffMetricsOpts.NumDiffedCodeBytes += diffMetrics.NumCodeBytes;
+
+ totalBaseMetrics.Overall.NumDiffExecutedInstructions += baseMetrics.NumExecutedInstructions;
+ totalDiffMetrics.Overall.NumDiffExecutedInstructions += diffMetrics.NumExecutedInstructions;
+
+ totalBaseMetricsOpts.NumDiffExecutedInstructions += baseMetrics.NumExecutedInstructions;
+ totalDiffMetricsOpts.NumDiffExecutedInstructions += diffMetrics.NumExecutedInstructions;
}
}
}
@@ -597,7 +676,7 @@ int __cdecl main(int argc, char* argv[])
if (o.breakOnError)
{
if (o.indexCount == -1)
- LogInfo("HINT: to repro add '/c %d' to cmdline", reader->GetMethodContextIndex());
+ LogInfo("HINT: to repro add '-c %d' to cmdline", reader->GetMethodContextIndex());
__debugbreak();
}
}
@@ -617,7 +696,7 @@ int __cdecl main(int argc, char* argv[])
if (o.applyDiff)
{
LogInfo(g_AsmDiffsSummaryFormatString, loadedCount, jittedCount, failToReplayCount, excludedCount,
- missingCount, jittedCount - failToReplayCount - matchCount);
+ missingCount, totalDiffMetrics.Overall.NumContextsWithDiffs);
}
else
{
@@ -646,10 +725,6 @@ int __cdecl main(int argc, char* argv[])
{
failingToReplayMCL.CloseMCL();
}
- if (o.diffMCLFilename != nullptr)
- {
- diffMCL.CloseMCL();
- }
Logger::Shutdown();
SpmiResult result = SpmiResult::Success;
@@ -658,7 +733,7 @@ int __cdecl main(int argc, char* argv[])
{
result = SpmiResult::Error;
}
- else if (o.applyDiff && (matchCount != jittedCount - missingCount))
+ else if (o.applyDiff && (totalDiffMetrics.Overall.NumContextsWithDiffs > 0))
{
result = SpmiResult::Diffs;
}
diff --git a/src/coreclr/utilcode/util_nodependencies.cpp b/src/coreclr/utilcode/util_nodependencies.cpp
index 50973d4d060..dbb7706f6bf 100644
--- a/src/coreclr/utilcode/util_nodependencies.cpp
+++ b/src/coreclr/utilcode/util_nodependencies.cpp
@@ -14,6 +14,10 @@
#include "utilcode.h"
#include "ex.h"
+#ifdef HOST_WINDOWS
+#include <versionhelpers.h>
+#endif
+
#if !defined(FEATURE_UTILCODE_NO_DEPENDENCIES) || defined(_DEBUG)
RunningOnStatusEnum gRunningOnStatus = RUNNING_ON_STATUS_UNINITED;
@@ -25,65 +29,26 @@ RunningOnStatusEnum gRunningOnStatus = RUNNING_ON_STATUS_UNINITED;
//*****************************************************************************
void InitRunningOnVersionStatus ()
{
-#ifndef TARGET_UNIX
+#ifdef HOST_WINDOWS
STATIC_CONTRACT_NOTHROW;
STATIC_CONTRACT_GC_NOTRIGGER;
STATIC_CONTRACT_CANNOT_TAKE_LOCK;
- BOOL fSupportedPlatform = FALSE;
- OSVERSIONINFOEX sVer;
- DWORDLONG dwlConditionMask;
-
- ZeroMemory(&sVer, sizeof(OSVERSIONINFOEX));
- sVer.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
-
- sVer.dwMajorVersion = 6;
- sVer.dwMinorVersion = 2;
- sVer.dwPlatformId = VER_PLATFORM_WIN32_NT;
-
-
- dwlConditionMask = 0;
- dwlConditionMask = VER_SET_CONDITION(dwlConditionMask, VER_PLATFORMID, VER_EQUAL);
- dwlConditionMask = VER_SET_CONDITION(dwlConditionMask, VER_MAJORVERSION, VER_GREATER_EQUAL);
- dwlConditionMask = VER_SET_CONDITION(dwlConditionMask, VER_MINORVERSION, VER_GREATER_EQUAL);
-
- if(VerifyVersionInfo(&sVer, VER_MAJORVERSION | VER_PLATFORMID | VER_MINORVERSION, dwlConditionMask))
+ if(IsWindows8OrGreater())
{
gRunningOnStatus = RUNNING_ON_WIN8;
- fSupportedPlatform = TRUE;
- goto CHECK_SUPPORTED;
}
-
-
- ZeroMemory(&sVer, sizeof(OSVERSIONINFOEX));
- sVer.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
-
- sVer.dwMajorVersion = 6;
- sVer.dwMinorVersion = 1;
- sVer.dwPlatformId = VER_PLATFORM_WIN32_NT;
-
-
- dwlConditionMask = 0;
- dwlConditionMask = VER_SET_CONDITION(dwlConditionMask, VER_PLATFORMID, VER_EQUAL);
- dwlConditionMask = VER_SET_CONDITION(dwlConditionMask, VER_MAJORVERSION, VER_GREATER_EQUAL);
- dwlConditionMask = VER_SET_CONDITION(dwlConditionMask, VER_MINORVERSION, VER_GREATER_EQUAL);
-
- if(VerifyVersionInfo(&sVer, VER_MAJORVERSION | VER_PLATFORMID | VER_MINORVERSION, dwlConditionMask))
+ else if(IsWindows7OrGreater())
{
gRunningOnStatus = RUNNING_ON_WIN7;
- fSupportedPlatform = TRUE;
- goto CHECK_SUPPORTED;
}
-
-CHECK_SUPPORTED:
-
- if (!fSupportedPlatform)
+ else
{
// The current platform isn't supported. Display a message to this effect and exit.
- fprintf(stderr, "Platform not supported: The minimum supported platform is Windows 7\n");
+ fprintf(stderr, "Platform not supported: Windows 7 is the minimum supported version\n");
TerminateProcess(GetCurrentProcess(), NON_SUPPORTED_PLATFORM_TERMINATE_ERROR_CODE);
}
-#endif // TARGET_UNIX
+#endif // HOST_WINDOWS
} // InitRunningOnVersionStatus
#ifndef HOST_64BIT
diff --git a/src/coreclr/vm/amd64/AsmHelpers.asm b/src/coreclr/vm/amd64/AsmHelpers.asm
index c62adef078e..c4501546d83 100644
--- a/src/coreclr/vm/amd64/AsmHelpers.asm
+++ b/src/coreclr/vm/amd64/AsmHelpers.asm
@@ -649,6 +649,22 @@ LEAF_ENTRY xmmYmmStateSupport, _TEXT
ret
LEAF_END xmmYmmStateSupport, _TEXT
+;; extern "C" DWORD __stdcall avx512StateSupport();
+LEAF_ENTRY avx512StateSupport, _TEXT
+ mov ecx, 0 ; Specify xcr0
+ xgetbv ; result in EDX:EAX
+ and eax, 0E6H
+ cmp eax, 0E6H ; check OS has enabled XMM, YMM and ZMM state support
+ jne not_supported
+ mov eax, 1
+ jmp done
+ not_supported:
+ mov eax, 0
+ done:
+ ret
+LEAF_END avx512StateSupport, _TEXT
+
+
; EXTERN_C void moveOWord(LPVOID* src, LPVOID* target);
; <NOTE>
diff --git a/src/coreclr/vm/amd64/unixstubs.cpp b/src/coreclr/vm/amd64/unixstubs.cpp
index 09d2568a927..8fdcfd15a9b 100644
--- a/src/coreclr/vm/amd64/unixstubs.cpp
+++ b/src/coreclr/vm/amd64/unixstubs.cpp
@@ -48,6 +48,18 @@ extern "C"
return ((eax & 0x06) == 0x06) ? 1 : 0;
}
+ DWORD avx512StateSupport()
+ {
+ DWORD eax;
+ __asm(" xgetbv\n" \
+ : "=a"(eax) /*output in eax*/\
+ : "c"(0) /*inputs - 0 in ecx*/\
+ : "edx" /* registers that are clobbered*/
+ );
+ // check OS has enabled XMM, YMM and ZMM state support
+ return ((eax & 0x0E6) == 0x0E6) ? 1 : 0;
+ }
+
void STDMETHODCALLTYPE JIT_ProfilerEnterLeaveTailcallStub(UINT_PTR ProfilerHandle)
{
}
diff --git a/src/coreclr/vm/appdomain.cpp b/src/coreclr/vm/appdomain.cpp
index 6fa4b73a659..ef560aa4477 100644
--- a/src/coreclr/vm/appdomain.cpp
+++ b/src/coreclr/vm/appdomain.cpp
@@ -51,7 +51,6 @@
#include "typeequivalencehash.hpp"
#include "appdomain.inl"
-#include "typeparse.h"
#ifndef TARGET_UNIX
#include "dwreport.h"
diff --git a/src/coreclr/vm/arm/asmconstants.h b/src/coreclr/vm/arm/asmconstants.h
index 2aa29578aa3..b3b16f1ed62 100644
--- a/src/coreclr/vm/arm/asmconstants.h
+++ b/src/coreclr/vm/arm/asmconstants.h
@@ -123,9 +123,6 @@ ASMCONSTANTS_C_ASSERT(MethodDesc__mdcClassification == mdcClassification)
#ifdef FEATURE_COMINTEROP
-#define MethodDesc__mcComInterop 0x6
-ASMCONSTANTS_C_ASSERT(MethodDesc__mcComInterop == mcComInterop)
-
#define Stub__m_pCode DBG_FRE(0x10, 0x0c)
ASMCONSTANTS_C_ASSERT(Stub__m_pCode == sizeof(Stub))
diff --git a/src/coreclr/vm/array.cpp b/src/coreclr/vm/array.cpp
index 6615e60cffa..d77f48cdfa7 100644
--- a/src/coreclr/vm/array.cpp
+++ b/src/coreclr/vm/array.cpp
@@ -530,7 +530,7 @@ MethodTable* Module::CreateArrayMethodTable(TypeHandle elemTypeHnd, CorElementTy
+ 3; // for rank specific Get, Set, Address
MethodDescChunk * pChunks = MethodDescChunk::CreateChunk(pAllocator->GetHighFrequencyHeap(),
- dwMethodDescs, mcArray, FALSE /* fNonVtableSlot*/, FALSE /* fNativeCodeSlot */, FALSE /* fComPlusCallInfo */,
+ dwMethodDescs, mcArray, FALSE /* fNonVtableSlot*/, FALSE /* fNativeCodeSlot */,
pMT, pamTracker);
pClass->SetChunks(pChunks);
diff --git a/src/coreclr/vm/ceemain.cpp b/src/coreclr/vm/ceemain.cpp
index b3a16126011..cb6720645c4 100644
--- a/src/coreclr/vm/ceemain.cpp
+++ b/src/coreclr/vm/ceemain.cpp
@@ -156,7 +156,6 @@
#include "virtualcallstub.h"
#include "strongnameinternal.h"
#include "syncclean.hpp"
-#include "typeparse.h"
#include "debuginfostore.h"
#include "finalizerthread.h"
#include "threadsuspend.h"
diff --git a/src/coreclr/vm/cgensys.h b/src/coreclr/vm/cgensys.h
index 868e9cf26bf..5e378c48533 100644
--- a/src/coreclr/vm/cgensys.h
+++ b/src/coreclr/vm/cgensys.h
@@ -101,6 +101,7 @@ extern "C" void __stdcall __cpuid(int cpuInfo[4], int function_id);
extern "C" void __stdcall __cpuidex(int cpuInfo[4], int function_id, int subFunction_id);
#endif // TARGET_UNIX
extern "C" DWORD __stdcall xmmYmmStateSupport();
+extern "C" DWORD __stdcall avx512StateSupport();
#endif
const int CPUID_EAX = 0;
diff --git a/src/coreclr/vm/class.cpp b/src/coreclr/vm/class.cpp
index fd6053c64bf..bc0af4953c6 100644
--- a/src/coreclr/vm/class.cpp
+++ b/src/coreclr/vm/class.cpp
@@ -591,7 +591,6 @@ HRESULT EEClass::AddMethod(MethodTable * pMT, mdMethodDef methodDef, RVA newRVA,
mcInstantiated,
TRUE /* fNonVtableSlot */,
TRUE /* fNativeCodeSlot */,
- FALSE /* fComPlusCallInfo */,
pMT,
&dummyAmTracker);
diff --git a/src/coreclr/vm/classnames.h b/src/coreclr/vm/classnames.h
index 9a4d4e35845..00a192fd36f 100644
--- a/src/coreclr/vm/classnames.h
+++ b/src/coreclr/vm/classnames.h
@@ -112,8 +112,6 @@
#define g_UnmanagedCallersOnlyAttribute "System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute"
#define g_FixedBufferAttribute "System.Runtime.CompilerServices.FixedBufferAttribute"
-#define g_CompilerServicesTypeDependencyAttribute "System.Runtime.CompilerServices.TypeDependencyAttribute"
-
#define g_ReferenceAssemblyAttribute "System.Runtime.CompilerServices.ReferenceAssemblyAttribute"
#define g_CriticalFinalizerObjectName "CriticalFinalizerObject"
diff --git a/src/coreclr/vm/clrtocomcall.cpp b/src/coreclr/vm/clrtocomcall.cpp
index 73b942d9d6d..06d28f50724 100644
--- a/src/coreclr/vm/clrtocomcall.cpp
+++ b/src/coreclr/vm/clrtocomcall.cpp
@@ -168,7 +168,7 @@ PCODE ComPlusCall::GetStubForILStub(MethodDesc* pMD, MethodDesc** ppStubMD)
{
STANDARD_VM_CONTRACT;
- _ASSERTE(pMD->IsComPlusCall() || pMD->IsGenericComPlusCall());
+ _ASSERTE(pMD->IsComPlusCall());
_ASSERTE(*ppStubMD == NULL);
DWORD dwStubFlags;
diff --git a/src/coreclr/vm/codeman.cpp b/src/coreclr/vm/codeman.cpp
index 6c2e15fe7a8..ddf189c013f 100644
--- a/src/coreclr/vm/codeman.cpp
+++ b/src/coreclr/vm/codeman.cpp
@@ -1289,6 +1289,36 @@ bool DoesOSSupportAVX()
return TRUE;
}
+bool DoesOSSupportAVX512()
+{
+ LIMITED_METHOD_CONTRACT;
+
+#ifndef TARGET_UNIX
+ // On Windows we have an api(GetEnabledXStateFeatures) to check if AVX512 is supported
+ typedef DWORD64 (WINAPI *PGETENABLEDXSTATEFEATURES)();
+ PGETENABLEDXSTATEFEATURES pfnGetEnabledXStateFeatures = NULL;
+
+ HMODULE hMod = WszLoadLibraryEx(WINDOWS_KERNEL32_DLLNAME_W, NULL, LOAD_LIBRARY_SEARCH_SYSTEM32);
+ if(hMod == NULL)
+ return FALSE;
+
+ pfnGetEnabledXStateFeatures = (PGETENABLEDXSTATEFEATURES)GetProcAddress(hMod, "GetEnabledXStateFeatures");
+
+ if (pfnGetEnabledXStateFeatures == NULL)
+ {
+ return FALSE;
+ }
+
+ DWORD64 FeatureMask = pfnGetEnabledXStateFeatures();
+ if ((FeatureMask & XSTATE_MASK_AVX512) == 0)
+ {
+ return FALSE;
+ }
+#endif // !TARGET_UNIX
+
+ return TRUE;
+}
+
#endif // defined(TARGET_X86) || defined(TARGET_AMD64)
#ifdef TARGET_ARM64
@@ -1377,7 +1407,31 @@ void EEJitManager::SetCpuInfo()
// CORJIT_FLAG_USE_AVXVNNI if the following feature bit is set (input EAX of 0x07 and input ECX of 1):
// CORJIT_FLAG_USE_AVX2
// AVXVNNI - EAX bit 4
- // CORJIT_FLAG_USE_AVX_512 is not currently set, but defined so that it can be used in future without
+ // CORJIT_FLAG_USE_AVX_512F if the following feature bit is set (input EAX of 0x07 and input ECX of 0), and avx512StateSupport returns 1:
+ // CORJIT_FLAG_USE_AVX2
+ // AVX512F - EBX bit 16
+ // XGETBV - XRC0[7:5] 111b
+ // CORJIT_FLAG_USE_AVX_512F_VL if the following feature bit is set (input EAX of 0x07 and input ECX of 0):
+ // CORJIT_FLAG_USE_AVX512F
+ // AVX512VL - EBX bit 31
+ // CORJIT_FLAG_USE_AVX_512BW if the following feature bit is set (input EAX of 0x07 and input ECX of 0):
+ // CORJIT_FLAG_USE_AVX512F
+ // AVX512BW - EBX bit 30
+ // CORJIT_FLAG_USE_AVX_512BW_VL if the following feature bit is set (input EAX of 0x07 and input ECX of 0):
+ // CORJIT_FLAG_USE_AVX512F_VL
+ // CORJIT_FLAG_USE_AVX_512BW
+ // CORJIT_FLAG_USE_AVX_512CD if the following feature bit is set (input EAX of 0x07 and input ECX of 0):
+ // CORJIT_FLAG_USE_AVX512F
+ // AVX512CD - EBX bit 28
+ // CORJIT_FLAG_USE_AVX_512CD_VL if the following feature bit is set (input EAX of 0x07 and input ECX of 0):
+ // CORJIT_FLAG_USE_AVX512F_VL
+ // CORJIT_FLAG_USE_AVX_512CD
+ // CORJIT_FLAG_USE_AVX_512DQ if the following feature bit is set (input EAX of 0x07 and input ECX of 0):
+ // CORJIT_FLAG_USE_AVX512F
+ // AVX512DQ - EBX bit 7
+ // CORJIT_FLAG_USE_AVX_512DQ_VL if the following feature bit is set (input EAX of 0x07 and input ECX of 0):
+ // CORJIT_FLAG_USE_AVX512F_VL
+ // CORJIT_FLAG_USE_AVX_512DQ
// CORJIT_FLAG_USE_BMI1 if the following feature bit is set (input EAX of 0x07 and input ECX of 0):
// BMI1 - EBX bit 3
// CORJIT_FLAG_USE_BMI2 if the following feature bit is set (input EAX of 0x07 and input ECX of 0):
@@ -1460,6 +1514,48 @@ void EEJitManager::SetCpuInfo()
{
CPUCompileFlags.Set(InstructionSet_AVX2);
+ if (DoesOSSupportAVX512() && (avx512StateSupport() == 1)) // XGETBV XRC0[7:5] == 111
+ {
+ if ((cpuidInfo[EBX] & (1 << 16)) != 0) // AVX512F
+ {
+ CPUCompileFlags.Set(InstructionSet_AVX512F);
+
+ bool isAVX512_VLSupported = false;
+ if ((cpuidInfo[EBX] & (1 << 31)) != 0) // AVX512VL
+ {
+ CPUCompileFlags.Set(InstructionSet_AVX512F_VL);
+ isAVX512_VLSupported = true;
+ }
+
+ if ((cpuidInfo[EBX] & (1 << 30)) != 0) // AVX512BW
+ {
+ CPUCompileFlags.Set(InstructionSet_AVX512BW);
+ if (isAVX512_VLSupported) // AVX512BW_VL
+ {
+ CPUCompileFlags.Set(InstructionSet_AVX512BW_VL);
+ }
+ }
+
+ if ((cpuidInfo[EBX] & (1 << 28)) != 0) // AVX512CD
+ {
+ CPUCompileFlags.Set(InstructionSet_AVX512CD);
+ if (isAVX512_VLSupported) // AVX512CD_VL
+ {
+ CPUCompileFlags.Set(InstructionSet_AVX512CD_VL);
+ }
+ }
+
+ if ((cpuidInfo[EBX] & (1 << 17)) != 0) // AVX512DQ
+ {
+ CPUCompileFlags.Set(InstructionSet_AVX512DQ);
+ if (isAVX512_VLSupported) // AVX512DQ_VL
+ {
+ CPUCompileFlags.Set(InstructionSet_AVX512DQ_VL);
+ }
+ }
+ }
+ }
+
__cpuidex(cpuidInfo, 0x00000007, 0x00000001);
if ((cpuidInfo[EAX] & (1 << 4)) != 0) // AVX-VNNI
{
@@ -1615,6 +1711,46 @@ void EEJitManager::SetCpuInfo()
CPUCompileFlags.Clear(InstructionSet_AVX2);
}
+ if (!CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_EnableAVX512F))
+ {
+ CPUCompileFlags.Clear(InstructionSet_AVX512F);
+ }
+
+ if (!CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_EnableAVX512F_VL))
+ {
+ CPUCompileFlags.Clear(InstructionSet_AVX512F_VL);
+ }
+
+ if (!CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_EnableAVX512BW))
+ {
+ CPUCompileFlags.Clear(InstructionSet_AVX512BW);
+ }
+
+ if (!CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_EnableAVX512BW_VL))
+ {
+ CPUCompileFlags.Clear(InstructionSet_AVX512BW_VL);
+ }
+
+ if (!CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_EnableAVX512CD))
+ {
+ CPUCompileFlags.Clear(InstructionSet_AVX512CD);
+ }
+
+ if (!CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_EnableAVX512CD_VL))
+ {
+ CPUCompileFlags.Clear(InstructionSet_AVX512CD_VL);
+ }
+
+ if (!CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_EnableAVX512DQ))
+ {
+ CPUCompileFlags.Clear(InstructionSet_AVX512DQ);
+ }
+
+ if (!CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_EnableAVX512DQ_VL))
+ {
+ CPUCompileFlags.Clear(InstructionSet_AVX512DQ_VL);
+ }
+
if (!CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_EnableAVXVNNI))
{
CPUCompileFlags.Clear(InstructionSet_AVXVNNI);
@@ -1691,6 +1827,7 @@ void EEJitManager::SetCpuInfo()
{
CPUCompileFlags.Clear(InstructionSet_X86Serialize);
}
+
#elif defined(TARGET_ARM64)
if (!CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_EnableHWIntrinsic))
{
diff --git a/src/coreclr/vm/comcallablewrapper.cpp b/src/coreclr/vm/comcallablewrapper.cpp
index e0c5c063ac2..0064fb391a5 100644
--- a/src/coreclr/vm/comcallablewrapper.cpp
+++ b/src/coreclr/vm/comcallablewrapper.cpp
@@ -43,14 +43,6 @@
#include "appdomain.inl"
#include "typestring.h"
-// The enum that describes the value of the IDispatchImplAttribute custom attribute.
-enum IDispatchImplType
-{
- SystemDefinedImpl = 0,
- InternalImpl = 1,
- CompatibleImpl = 2
-};
-
// The enum that describe the value of System.Runtime.InteropServices.CustomQueryInterfaceResult
// It is the return value of the method System.Runtime.InteropServices.ICustomQueryInterface.GetInterface
enum CustomQueryInterfaceResult
@@ -319,68 +311,6 @@ ComCallMethodDesc* ComMethodTable::ComCallMethodDescFromSlot(unsigned i)
}
//--------------------------------------------------------------------------
-// Determines if the Compatible IDispatch implementation is required for
-// the specified class.
-//--------------------------------------------------------------------------
-bool IsOleAutDispImplRequiredForClass(MethodTable *pClass)
-{
- CONTRACTL
- {
- THROWS;
- GC_NOTRIGGER;
- MODE_ANY;
- PRECONDITION(CheckPointer(pClass));
- }
- CONTRACTL_END;
-
- HRESULT hr;
- const BYTE * pVal;
- ULONG cbVal;
- Assembly * pAssembly = pClass->GetAssembly();
- IDispatchImplType DispImplType = SystemDefinedImpl;
-
- // First check for the IDispatchImplType custom attribute first.
- hr = pClass->GetCustomAttribute(WellKnownAttribute::IDispatchImpl, (const void**)&pVal, &cbVal);
- if (hr == S_OK)
- {
- CustomAttributeParser cap(pVal, cbVal);
- IfFailThrow(cap.SkipProlog());
- UINT8 u1;
- IfFailThrow(cap.GetU1(&u1));
-
- DispImplType = (IDispatchImplType)u1;
- if ((DispImplType > 2) || (DispImplType < 0))
- DispImplType = SystemDefinedImpl;
- }
-
- // If the custom attribute was set to something other than system defined then we will use that.
- if (DispImplType != SystemDefinedImpl)
- return (bool) (DispImplType == CompatibleImpl);
-
- // Check to see if the assembly has the IDispatchImplType attribute set.
- hr = pAssembly->GetCustomAttribute(pAssembly->GetManifestToken(), WellKnownAttribute::IDispatchImpl, (const void**)&pVal, &cbVal);
- if (hr == S_OK)
- {
- CustomAttributeParser cap(pVal, cbVal);
- IfFailThrow(cap.SkipProlog());
- UINT8 u1;
- IfFailThrow(cap.GetU1(&u1));
-
- DispImplType = (IDispatchImplType)u1;
- if ((DispImplType > 2) || (DispImplType < 0))
- DispImplType = SystemDefinedImpl;
- }
-
- // If the custom attribute was set to something other than system defined then we will use that.
- if (DispImplType != SystemDefinedImpl)
- return (bool) (DispImplType == CompatibleImpl);
-
- // Removed registry key check per reg cleanup bug 45978
- // Effect: Will return false so code cleanup
- return false;
-}
-
-//--------------------------------------------------------------------------
// This routine is called anytime a com method is invoked for the first time.
// It is responsible for generating the real stub.
//
@@ -4733,12 +4663,6 @@ ComCallWrapperTemplate* ComCallWrapperTemplate::CreateTemplate(TypeHandle thClas
pTemplate->m_flags |= enum_SupportsIClassX;
}
- if (IsOleAutDispImplRequiredForClass(pMT))
- {
- // Determine what IDispatch implementation this class should use
- pTemplate->m_flags |= enum_UseOleAutDispatchImpl;
- }
-
// Eagerly create the interface CMTs.
// when iterate the interfaces implemented by the methodtable, we can check whether
// the interface supports ICustomQueryInterface.
diff --git a/src/coreclr/vm/comcallablewrapper.h b/src/coreclr/vm/comcallablewrapper.h
index d4b0ebfb277..71b79ca0029 100644
--- a/src/coreclr/vm/comcallablewrapper.h
+++ b/src/coreclr/vm/comcallablewrapper.h
@@ -255,12 +255,6 @@ public:
return (m_flags & enum_RepresentsVariantInterface);
}
- BOOL IsUseOleAutDispatchImpl()
- {
- LIMITED_METHOD_CONTRACT;
- return (m_flags & enum_UseOleAutDispatchImpl);
- }
-
BOOL ImplementsIMarshal()
{
LIMITED_METHOD_CONTRACT;
@@ -327,7 +321,7 @@ private:
enum_RepresentsVariantInterface = 0x400, // this is a template for an interface with variance
- enum_UseOleAutDispatchImpl = 0x800, // the class is decorated with IDispatchImplAttribute(CompatibleImpl)
+ // enum_Unused = 0x800,
enum_ImplementsIMarshal = 0x1000, // the class implements a managed interface with Guid == IID_IMarshal
diff --git a/src/coreclr/vm/comutilnative.cpp b/src/coreclr/vm/comutilnative.cpp
index 3f049367525..dbe8bc0b7c3 100644
--- a/src/coreclr/vm/comutilnative.cpp
+++ b/src/coreclr/vm/comutilnative.cpp
@@ -1639,13 +1639,13 @@ static BOOL HasOverriddenMethod(MethodTable* mt, MethodTable* classMT, WORD meth
return TRUE;
}
-static BOOL CanCompareBitsOrUseFastGetHashCode(MethodTable* mt)
+BOOL CanCompareBitsOrUseFastGetHashCode(MethodTable* mt)
{
CONTRACTL
{
THROWS;
GC_TRIGGERS;
- MODE_COOPERATIVE;
+ MODE_ANY;
} CONTRACTL_END;
_ASSERTE(mt != NULL);
diff --git a/src/coreclr/vm/comutilnative.h b/src/coreclr/vm/comutilnative.h
index 495454d4227..258120c3fed 100644
--- a/src/coreclr/vm/comutilnative.h
+++ b/src/coreclr/vm/comutilnative.h
@@ -243,4 +243,6 @@ public:
static FCDECL1(FC_BOOL_RET, HasOverriddenBeginEndWrite, Object *stream);
};
+BOOL CanCompareBitsOrUseFastGetHashCode(MethodTable* mt);
+
#endif // _COMUTILNATIVE_H_
diff --git a/src/coreclr/vm/dllimport.cpp b/src/coreclr/vm/dllimport.cpp
index de49ed7b178..43174f4eb11 100644
--- a/src/coreclr/vm/dllimport.cpp
+++ b/src/coreclr/vm/dllimport.cpp
@@ -5641,7 +5641,7 @@ PCODE GetStubForInteropMethod(MethodDesc* pMD, DWORD dwStubFlags)
STANDARD_VM_CHECK;
PRECONDITION(CheckPointer(pMD));
- PRECONDITION(pMD->IsNDirect() || pMD->IsComPlusCall() || pMD->IsGenericComPlusCall() || pMD->IsEEImpl() || pMD->IsIL());
+ PRECONDITION(pMD->IsNDirect() || pMD->IsComPlusCall() || pMD->IsEEImpl() || pMD->IsIL());
}
CONTRACT_END;
@@ -5655,7 +5655,7 @@ PCODE GetStubForInteropMethod(MethodDesc* pMD, DWORD dwStubFlags)
}
#ifdef FEATURE_COMINTEROP
else
- if (pMD->IsComPlusCall() || pMD->IsGenericComPlusCall())
+ if (pMD->IsComPlusCall())
{
pStub = ComPlusCall::GetStubForILStub(pMD, &pStubMD);
}
diff --git a/src/coreclr/vm/dynamicmethod.cpp b/src/coreclr/vm/dynamicmethod.cpp
index a4227c4d000..98b70206f10 100644
--- a/src/coreclr/vm/dynamicmethod.cpp
+++ b/src/coreclr/vm/dynamicmethod.cpp
@@ -162,7 +162,7 @@ void DynamicMethodTable::AddMethodsToList()
// allocate as many chunks as needed to hold the methods
//
MethodDescChunk* pChunk = MethodDescChunk::CreateChunk(pHeap, 0 /* one chunk of maximum size */,
- mcDynamic, TRUE /* fNonVtableSlot */, TRUE /* fNativeCodeSlot */, FALSE /* fComPlusCallInfo */, m_pMethodTable, &amt);
+ mcDynamic, TRUE /* fNonVtableSlot */, TRUE /* fNativeCodeSlot */, m_pMethodTable, &amt);
if (m_DynamicMethodList) RETURN;
int methodCount = pChunk->GetCount();
diff --git a/src/coreclr/vm/eepolicy.cpp b/src/coreclr/vm/eepolicy.cpp
index 655e971bfb2..25b787e381c 100644
--- a/src/coreclr/vm/eepolicy.cpp
+++ b/src/coreclr/vm/eepolicy.cpp
@@ -445,10 +445,12 @@ void EEPolicy::LogFatalError(UINT exitCode, UINT_PTR address, LPCWSTR pszMessage
failureType = EventReporter::ERT_ManagedFailFast;
else if (exitCode == (UINT)COR_E_CODECONTRACTFAILED)
failureType = EventReporter::ERT_CodeContractFailed;
+ else if (exitCode == EXCEPTION_ACCESS_VIOLATION)
+ failureType = EventReporter::ERT_UnhandledException;
EventReporter reporter(failureType);
StackSString s(argExceptionString);
- if ((exitCode == (UINT)COR_E_FAILFAST) || (exitCode == (UINT)COR_E_CODECONTRACTFAILED) || (exitCode == (UINT)CLR_E_GC_OOM))
+ if ((exitCode == (UINT)COR_E_FAILFAST) || (exitCode == (UINT)COR_E_CODECONTRACTFAILED) || (exitCode == (UINT)CLR_E_GC_OOM) || (exitCode == EXCEPTION_ACCESS_VIOLATION))
{
if (pszMessage)
{
diff --git a/src/coreclr/vm/eventing/eventpipe/ep-rt-coreclr.h b/src/coreclr/vm/eventing/eventpipe/ep-rt-coreclr.h
index a494b4d1566..6e8227dfc04 100644
--- a/src/coreclr/vm/eventing/eventpipe/ep-rt-coreclr.h
+++ b/src/coreclr/vm/eventing/eventpipe/ep-rt-coreclr.h
@@ -2012,28 +2012,43 @@ ep_rt_thread_create (
EX_TRY
{
- rt_coreclr_thread_params_internal_t *thread_params = new (nothrow) rt_coreclr_thread_params_internal_t ();
- if (thread_params) {
- thread_params->thread_params.thread_type = thread_type;
- if (thread_type == EP_THREAD_TYPE_SESSION || thread_type == EP_THREAD_TYPE_SAMPLING) {
+ if (thread_type == EP_THREAD_TYPE_SERVER)
+ {
+ DWORD thread_id = 0;
+ HANDLE server_thread = ::CreateThread (nullptr, 0, reinterpret_cast<LPTHREAD_START_ROUTINE>(thread_func), nullptr, 0, &thread_id);
+ if (server_thread != NULL)
+ {
+ if (id)
+ {
+ *reinterpret_cast<DWORD *>(id) = thread_id;
+ }
+ ::CloseHandle (server_thread);
+ result = true;
+ }
+ }
+ else if (thread_type == EP_THREAD_TYPE_SESSION || thread_type == EP_THREAD_TYPE_SAMPLING)
+ {
+ rt_coreclr_thread_params_internal_t *thread_params = new (nothrow) rt_coreclr_thread_params_internal_t ();
+ if (thread_params)
+ {
+ thread_params->thread_params.thread_type = thread_type;
thread_params->thread_params.thread = SetupUnstartedThread ();
thread_params->thread_params.thread_func = reinterpret_cast<LPTHREAD_START_ROUTINE>(thread_func);
thread_params->thread_params.thread_params = params;
- if (thread_params->thread_params.thread->CreateNewThread (0, ep_rt_thread_coreclr_start_func, thread_params)) {
- thread_params->thread_params.thread->SetBackground (TRUE);
- thread_params->thread_params.thread->StartThread ();
+
+ if (thread_params->thread_params.thread->CreateNewThread (0, ep_rt_thread_coreclr_start_func, thread_params))
+ {
if (id)
+ {
*reinterpret_cast<DWORD *>(id) = thread_params->thread_params.thread->GetThreadId ();
+ }
+ thread_params->thread_params.thread->SetBackground (TRUE);
+ thread_params->thread_params.thread->StartThread ();
result = true;
}
- } else if (thread_type == EP_THREAD_TYPE_SERVER) {
- DWORD thread_id = 0;
- HANDLE server_thread = ::CreateThread (nullptr, 0, reinterpret_cast<LPTHREAD_START_ROUTINE>(thread_func), nullptr, 0, &thread_id);
- if (server_thread != NULL) {
- ::CloseHandle (server_thread);
- if (id)
- *reinterpret_cast<DWORD *>(id) = thread_id;
- result = true;
+ else
+ {
+ delete thread_params;
}
}
}
@@ -2050,6 +2065,14 @@ ep_rt_thread_create (
static
inline
void
+ep_rt_set_server_name(void)
+{
+ ::SetThreadName(GetCurrentThread(), W(".NET EventPipe"));
+}
+
+static
+inline
+void
ep_rt_thread_sleep (uint64_t ns)
{
STATIC_CONTRACT_NOTHROW;
diff --git a/src/coreclr/vm/excep.cpp b/src/coreclr/vm/excep.cpp
index 8af866c35c1..f45288afd54 100644
--- a/src/coreclr/vm/excep.cpp
+++ b/src/coreclr/vm/excep.cpp
@@ -6526,24 +6526,6 @@ AdjustContextForJITHelpers(
#if defined(USE_FEF) && !defined(TARGET_UNIX)
-static void FixContextForFaultingExceptionFrame(
- EXCEPTION_POINTERS* ep,
- EXCEPTION_RECORD* pOriginalExceptionRecord,
- CONTEXT* pOriginalExceptionContext)
-{
- WRAPPER_NO_CONTRACT;
-
- // don't copy param args as have already supplied them on the throw
- memcpy((void*) ep->ExceptionRecord,
- (void*) pOriginalExceptionRecord,
- offsetof(EXCEPTION_RECORD, ExceptionInformation)
- );
-
- ReplaceExceptionContextRecord(ep->ContextRecord, pOriginalExceptionContext);
-
- GetThread()->ResetThreadStateNC(Thread::TSNC_DebuggerIsManagedException);
-}
-
struct HandleManagedFaultFilterParam
{
// It's possible for our filter to be called more than once if some other first-pass
@@ -6551,7 +6533,6 @@ struct HandleManagedFaultFilterParam
// the first exception we see. This flag takes care of that.
BOOL fFilterExecuted;
EXCEPTION_RECORD *pOriginalExceptionRecord;
- CONTEXT *pOriginalExceptionContext;
};
static LONG HandleManagedFaultFilter(EXCEPTION_POINTERS* ep, LPVOID pv)
@@ -6562,7 +6543,8 @@ static LONG HandleManagedFaultFilter(EXCEPTION_POINTERS* ep, LPVOID pv)
if (!pParam->fFilterExecuted)
{
- FixContextForFaultingExceptionFrame(ep, pParam->pOriginalExceptionRecord, pParam->pOriginalExceptionContext);
+ ep->ExceptionRecord->ExceptionAddress = pParam->pOriginalExceptionRecord->ExceptionAddress;
+ GetThread()->ResetThreadStateNC(Thread::TSNC_DebuggerIsManagedException);
pParam->fFilterExecuted = TRUE;
}
@@ -6584,7 +6566,6 @@ void HandleManagedFault(EXCEPTION_RECORD* pExceptionRecord, CONTEXT* pContext)
HandleManagedFaultFilterParam param;
param.fFilterExecuted = FALSE;
param.pOriginalExceptionRecord = pExceptionRecord;
- param.pOriginalExceptionContext = pContext;
PAL_TRY(HandleManagedFaultFilterParam *, pParam, &param)
{
@@ -6592,7 +6573,7 @@ void HandleManagedFault(EXCEPTION_RECORD* pExceptionRecord, CONTEXT* pContext)
EXCEPTION_RECORD *pRecord = pParam->pOriginalExceptionRecord;
- RaiseException(pRecord->ExceptionCode, pRecord->ExceptionFlags,
+ RaiseException(pRecord->ExceptionCode, 0,
pRecord->NumberParameters, pRecord->ExceptionInformation);
}
PAL_EXCEPT_FILTER(HandleManagedFaultFilter)
diff --git a/src/coreclr/vm/fieldmarshaler.cpp b/src/coreclr/vm/fieldmarshaler.cpp
index 17ded4ec02b..ea0bbb871cf 100644
--- a/src/coreclr/vm/fieldmarshaler.cpp
+++ b/src/coreclr/vm/fieldmarshaler.cpp
@@ -25,10 +25,6 @@
#include <corerror.h>
#include "sigformat.h"
#include "marshalnative.h"
-#include "typeparse.h"
-#ifdef FEATURE_COMINTEROP
-#include <winstring.h>
-#endif // FEATURE_COMINTEROP
VOID ParseNativeType(Module* pModule,
SigPointer sig,
diff --git a/src/coreclr/vm/gcenv.ee.cpp b/src/coreclr/vm/gcenv.ee.cpp
index 8b289e9c744..4b9442184d9 100644
--- a/src/coreclr/vm/gcenv.ee.cpp
+++ b/src/coreclr/vm/gcenv.ee.cpp
@@ -1397,7 +1397,7 @@ namespace
assert(args != nullptr);
ClrFlsSetThreadType(ThreadType_GC);
- args->Thread->SetGCSpecial(true);
+ args->Thread->SetGCSpecial();
STRESS_LOG_RESERVE_MEM(GC_STRESSLOG_MULTIPLY);
args->HasStarted = !!args->Thread->HasStarted();
diff --git a/src/coreclr/vm/gcenv.os.cpp b/src/coreclr/vm/gcenv.os.cpp
index 18413baea25..fe6dfceffc3 100644
--- a/src/coreclr/vm/gcenv.os.cpp
+++ b/src/coreclr/vm/gcenv.os.cpp
@@ -1047,11 +1047,11 @@ int64_t GCToOSInterface::QueryPerformanceFrequency()
// Get a time stamp with a low precision
// Return:
// Time stamp in milliseconds
-uint32_t GCToOSInterface::GetLowPrecisionTimeStamp()
+uint64_t GCToOSInterface::GetLowPrecisionTimeStamp()
{
LIMITED_METHOD_CONTRACT;
- return ::GetTickCount();
+ return ::GetTickCount64();
}
uint32_t GCToOSInterface::GetTotalProcessorCount()
diff --git a/src/coreclr/vm/gcinfodecoder.cpp b/src/coreclr/vm/gcinfodecoder.cpp
index ab87649a1eb..f69513e0559 100644
--- a/src/coreclr/vm/gcinfodecoder.cpp
+++ b/src/coreclr/vm/gcinfodecoder.cpp
@@ -111,6 +111,8 @@ GcInfoDecoder::GcInfoDecoder(
GcInfoHeaderFlags headerFlags;
bool slimHeader = (m_Reader.ReadOneFast() == 0);
+ // Use flag mask to bail out early if we already decoded all the pieces that caller requested
+ int remainingFlags = flags == DECODE_EVERYTHING ? ~0 : flags;
if (slimHeader)
{
@@ -142,14 +144,21 @@ GcInfoDecoder::GcInfoDecoder(
m_ReturnKind =
(ReturnKind)((UINT32)m_Reader.Read(returnKindBits));
- if (flags == DECODE_RETURN_KIND) {
+ remainingFlags &= ~(DECODE_RETURN_KIND | DECODE_VARARG);
+#if defined(TARGET_ARM) || defined(TARGET_ARM64) || defined(TARGET_LOONGARCH64)
+ remainingFlags &= ~DECODE_HAS_TAILCALLS;
+#endif
+ if (remainingFlags == 0)
+ {
// Bail, if we've decoded enough,
return;
}
m_CodeLength = (UINT32) DENORMALIZE_CODE_LENGTH((UINT32) m_Reader.DecodeVarLengthUnsigned(CODE_LENGTH_ENCBASE));
- if (flags == DECODE_CODE_LENGTH) {
+ remainingFlags &= ~DECODE_CODE_LENGTH;
+ if (remainingFlags == 0)
+ {
// Bail, if we've decoded enough,
return;
}
@@ -181,7 +190,9 @@ GcInfoDecoder::GcInfoDecoder(
m_ValidRangeStart = m_ValidRangeEnd = 0;
}
- if (flags == DECODE_PROLOG_LENGTH) {
+ remainingFlags &= ~DECODE_PROLOG_LENGTH;
+ if (remainingFlags == 0)
+ {
// Bail, if we've decoded enough,
return;
}
@@ -196,7 +207,9 @@ GcInfoDecoder::GcInfoDecoder(
m_SecurityObjectStackSlot = NO_SECURITY_OBJECT;
}
- if (flags == DECODE_SECURITY_OBJECT) {
+ remainingFlags &= ~DECODE_SECURITY_OBJECT;
+ if (remainingFlags == 0)
+ {
// Bail, if we've decoded enough,
return;
}
@@ -211,7 +224,9 @@ GcInfoDecoder::GcInfoDecoder(
m_GSCookieStackSlot = NO_GS_COOKIE;
}
- if (flags == DECODE_GS_COOKIE) {
+ remainingFlags &= ~DECODE_GS_COOKIE;
+ if (remainingFlags == 0)
+ {
// Bail, if we've decoded enough,
return;
}
@@ -227,7 +242,9 @@ GcInfoDecoder::GcInfoDecoder(
m_PSPSymStackSlot = NO_PSP_SYM;
}
- if (flags == DECODE_PSP_SYM) {
+ remainingFlags &= ~DECODE_PSP_SYM;
+ if (remainingFlags == 0)
+ {
// Bail, if we've decoded enough,
return;
}
@@ -242,7 +259,9 @@ GcInfoDecoder::GcInfoDecoder(
m_GenericsInstContextStackSlot = NO_GENERICS_INST_CONTEXT;
}
- if (flags == DECODE_GENERICS_INST_CONTEXT) {
+ remainingFlags &= ~DECODE_GENERICS_INST_CONTEXT;
+ if (remainingFlags == 0)
+ {
// Bail, if we've decoded enough,
return;
}
@@ -278,6 +297,13 @@ GcInfoDecoder::GcInfoDecoder(
#endif
}
+ remainingFlags &= ~DECODE_EDIT_AND_CONTINUE;
+ if (remainingFlags == 0)
+ {
+ // Bail, if we've decoded enough,
+ return;
+ }
+
if (hasReversePInvokeFrame)
{
m_ReversePInvokeFrameStackSlot = (INT32)DENORMALIZE_STACK_SLOT(m_Reader.DecodeVarLengthSigned(REVERSE_PINVOKE_FRAME_ENCBASE));
@@ -287,6 +313,12 @@ GcInfoDecoder::GcInfoDecoder(
m_ReversePInvokeFrameStackSlot = NO_REVERSE_PINVOKE_FRAME;
}
+ remainingFlags &= ~DECODE_REVERSE_PINVOKE_VAR;
+ if (remainingFlags == 0)
+ {
+ // Bail, if we've decoded enough,
+ return;
+ }
#ifdef FIXED_STACK_PARAMETER_SCRATCH_AREA
if (slimHeader)
diff --git a/src/coreclr/vm/gdbjit.cpp b/src/coreclr/vm/gdbjit.cpp
index 126193549b4..bea3035299d 100644
--- a/src/coreclr/vm/gdbjit.cpp
+++ b/src/coreclr/vm/gdbjit.cpp
@@ -508,7 +508,7 @@ GetDebugInfoFromPDB(MethodDesc* methodDescPtr,
return E_FAIL;
const Module* mod = methodDescPtr->GetMethodTable()->GetModule();
- SString modName = mod->GetFile()->GetPath();
+ SString modName = mod->GetPEAssembly()->GetPath();
if (modName.IsEmpty())
return E_FAIL;
@@ -2533,7 +2533,7 @@ void NotifyGdb::OnMethodPrepared(MethodDesc* methodDescPtr)
/* Get module name */
const Module* mod = methodDescPtr->GetMethodTable()->GetModule();
- SString modName = mod->GetFile()->GetPath();
+ SString modName = mod->GetPEAssembly()->GetPath();
const char* szModName = modName.GetUTF8();
const char* szModuleFile = SplitFilename(szModName);
diff --git a/src/coreclr/vm/genmeth.cpp b/src/coreclr/vm/genmeth.cpp
index c43681513d8..da38d13e1d6 100644
--- a/src/coreclr/vm/genmeth.cpp
+++ b/src/coreclr/vm/genmeth.cpp
@@ -67,7 +67,6 @@ static MethodDesc* CreateMethodDesc(LoaderAllocator *pAllocator,
MethodDesc *pTemplateMD,
DWORD classification,
BOOL fNativeCodeSlot,
- BOOL fComPlusCallInfo,
AllocMemTracker *pamTracker)
{
CONTRACTL
@@ -92,7 +91,6 @@ static MethodDesc* CreateMethodDesc(LoaderAllocator *pAllocator,
classification,
TRUE /* fNonVtableSlot*/,
fNativeCodeSlot,
- fComPlusCallInfo,
pMT,
pamTracker);
@@ -407,8 +405,6 @@ InstantiatedMethodDesc::NewInstantiatedMethodDesc(MethodTable *pExactMT,
}
}
- BOOL forComInterop = FALSE;
-
// Create a new singleton chunk for the new instantiated method descriptor
// Notice that we've passed in the method table pointer; this gets
// used in some of the subsequent setup methods for method descs.
@@ -418,7 +414,6 @@ InstantiatedMethodDesc::NewInstantiatedMethodDesc(MethodTable *pExactMT,
pGenericMDescInRepMT,
mcInstantiated,
!pWrappedMD, // This is pesimistic estimate for fNativeCodeSlot
- forComInterop,
&amt));
// Initialize the MD the way it needs to be
@@ -899,7 +894,6 @@ MethodDesc::FindOrCreateAssociatedMethodDesc(MethodDesc* pDefMD,
pMDescInCanonMT,
mcInstantiated,
FALSE /* fNativeCodeSlot */,
- FALSE /* fComPlusCallInfo */,
&amt);
// Indicate that this is a stub method which takes a BOXed this pointer.
@@ -981,7 +975,6 @@ MethodDesc::FindOrCreateAssociatedMethodDesc(MethodDesc* pDefMD,
pNonUnboxingStub,
mcInstantiated,
FALSE /* fNativeCodeSlot */,
- FALSE /* fComPlusCallInfo */,
&amt);
pResultMD->SetIsUnboxingStub();
diff --git a/src/coreclr/vm/hosting.cpp b/src/coreclr/vm/hosting.cpp
index 4783c4d3c52..7eefe12c467 100644
--- a/src/coreclr/vm/hosting.cpp
+++ b/src/coreclr/vm/hosting.cpp
@@ -380,3 +380,51 @@ DEBUG_NOINLINE void ClrLeaveCriticalSection(CRITSEC_COOKIE cookie)
pCrst->Leave();
}
+
+#ifndef DACCESS_COMPILE
+
+NOINLINE static void FailFastOnApiErrorWithHandle(const WCHAR *apiName, HANDLE handle)
+{
+ WRAPPER_NO_CONTRACT;
+
+ DWORD errorCode = GetLastError();
+ WCHAR message[128] = W("\0");
+ swprintf_s(
+ message,
+ sizeof(message) / sizeof(message[0]),
+ W("%s failed with error %u. Handle: 0x%Ix"),
+ apiName,
+ errorCode,
+ (SIZE_T)handle);
+ EEPOLICY_HANDLE_FATAL_ERROR_WITH_MESSAGE(COR_E_EXECUTIONENGINE, message);
+}
+
+#ifdef TARGET_WINDOWS
+DWORD ClrSuspendThread(HANDLE hThread)
+{
+ WRAPPER_NO_CONTRACT;
+
+ DWORD result = SuspendThread(hThread);
+ if (result == (DWORD)-1)
+ {
+ FailFastOnApiErrorWithHandle(W("SuspendThread"), hThread);
+ }
+
+ return result;
+}
+#endif // TARGET_WINDOWS
+
+DWORD ClrResumeThread(HANDLE hThread)
+{
+ WRAPPER_NO_CONTRACT;
+
+ DWORD result = ResumeThread(hThread);
+ if (result == (DWORD)-1)
+ {
+ FailFastOnApiErrorWithHandle(W("ResumeThread"), hThread);
+ }
+
+ return result;
+}
+
+#endif // !DACCESS_COMPILE
diff --git a/src/coreclr/vm/i386/asmconstants.h b/src/coreclr/vm/i386/asmconstants.h
index 138f007a788..c2a0c0edc16 100644
--- a/src/coreclr/vm/i386/asmconstants.h
+++ b/src/coreclr/vm/i386/asmconstants.h
@@ -242,9 +242,6 @@ ASMCONSTANTS_C_ASSERT(MethodDesc_m_wFlags == offsetof(MethodDesc, m_wFlags))
#define MethodDesc_mdcClassification 7
ASMCONSTANTS_C_ASSERT(MethodDesc_mdcClassification == mdcClassification)
-#define MethodDesc_mcComInterop 6
-ASMCONSTANTS_C_ASSERT(MethodDesc_mcComInterop == mcComInterop)
-
#define ComPlusCallMethodDesc__m_pComPlusCallInfo DBG_FRE(0x1C, 0x8)
ASMCONSTANTS_C_ASSERT(ComPlusCallMethodDesc__m_pComPlusCallInfo == offsetof(ComPlusCallMethodDesc, m_pComPlusCallInfo))
diff --git a/src/coreclr/vm/i386/cgenx86.cpp b/src/coreclr/vm/i386/cgenx86.cpp
index 356dab119f7..811c84a140d 100644
--- a/src/coreclr/vm/i386/cgenx86.cpp
+++ b/src/coreclr/vm/i386/cgenx86.cpp
@@ -1106,6 +1106,31 @@ extern "C" DWORD __stdcall xmmYmmStateSupport()
}
#pragma warning(pop)
+#pragma warning(push)
+#pragma warning(disable: 4035)
+extern "C" DWORD __stdcall avx512StateSupport()
+{
+ // No CONTRACT
+ STATIC_CONTRACT_NOTHROW;
+ STATIC_CONTRACT_GC_NOTRIGGER;
+
+ __asm
+ {
+ mov ecx, 0 ; Specify xcr0
+ xgetbv ; result in EDX:EAX
+ and eax, 0E6H
+ cmp eax, 0E6H ; check OS has enabled XMM, YMM and ZMM state support
+ jne not_supported
+ mov eax, 1
+ jmp done
+ not_supported:
+ mov eax, 0
+ done:
+ }
+}
+#pragma warning(pop)
+
+
#else // !TARGET_UNIX
void __cpuid(int cpuInfo[4], int function_id)
@@ -1142,6 +1167,18 @@ extern "C" DWORD __stdcall xmmYmmStateSupport()
return ((eax & 0x06) == 0x06) ? 1 : 0;
}
+extern "C" DWORD __stdcall avx512StateSupport()
+{
+ DWORD eax;
+ __asm(" xgetbv\n" \
+ : "=a"(eax) /*output in eax*/\
+ : "c"(0) /*inputs - 0 in ecx*/\
+ : "edx" /* registers that are clobbered*/
+ );
+ // check OS has enabled XMM, YMM and ZMM state support
+ return ((eax & 0x0E6) == 0x0E6) ? 1 : 0;
+}
+
#endif // !TARGET_UNIX
void UMEntryThunkCode::Encode(UMEntryThunkCode *pEntryThunkCodeRX, BYTE* pTargetCode, void* pvSecretParam)
diff --git a/src/coreclr/vm/ilstubcache.cpp b/src/coreclr/vm/ilstubcache.cpp
index 44ece6bf30b..8737bbd33bf 100644
--- a/src/coreclr/vm/ilstubcache.cpp
+++ b/src/coreclr/vm/ilstubcache.cpp
@@ -184,7 +184,6 @@ MethodDesc* ILStubCache::CreateNewMethodDesc(LoaderHeap* pCreationHeap, MethodTa
mcDynamic,
TRUE /* fNonVtableSlot */,
TRUE /* fNativeCodeSlot */,
- FALSE /* fComPlusCallInfo */,
pMT,
pamTracker);
diff --git a/src/coreclr/vm/jithelpers.cpp b/src/coreclr/vm/jithelpers.cpp
index d541266109c..2628f560ab4 100644
--- a/src/coreclr/vm/jithelpers.cpp
+++ b/src/coreclr/vm/jithelpers.cpp
@@ -4916,6 +4916,9 @@ HCIMPLEND
void JIT_Patchpoint(int* counter, int ilOffset)
{
+ // BEGIN_PRESERVE_LAST_ERROR;
+ DWORD dwLastError = ::GetLastError();
+
// This method may not return normally
STATIC_CONTRACT_GC_NOTRIGGER;
STATIC_CONTRACT_MODE_COOPERATIVE;
@@ -4929,6 +4932,8 @@ void JIT_Patchpoint(int* counter, int ilOffset)
LoaderAllocator* allocator = pMD->GetLoaderAllocator();
OnStackReplacementManager* manager = allocator->GetOnStackReplacementManager();
PerPatchpointInfo * ppInfo = manager->GetPerPatchpointInfo(ip);
+ PCODE osrMethodCode = NULL;
+ bool isNewMethod = false;
// In the current prototype, counter is shared by all patchpoints
// in a method, so no matter what happens below, we don't want to
@@ -4955,12 +4960,12 @@ void JIT_Patchpoint(int* counter, int ilOffset)
{
LOG((LF_TIEREDCOMPILATION, LL_INFO1000, "Jit_Patchpoint: invalid patchpoint [%d] (0x%p) in Method=0x%pM (%s::%s) at offset %d\n",
ppId, ip, pMD, pMD->m_pszDebugClassName, pMD->m_pszDebugMethodName, ilOffset));
- return;
+
+ goto DONE;
}
// See if we have an OSR method for this patchpoint.
- PCODE osrMethodCode = ppInfo->m_osrMethodCode;
- bool isNewMethod = false;
+ osrMethodCode = ppInfo->m_osrMethodCode;
if (osrMethodCode == NULL)
{
@@ -4983,7 +4988,7 @@ void JIT_Patchpoint(int* counter, int ilOffset)
{
LOG((LF_TIEREDCOMPILATION, LL_INFO10, "Jit_Patchpoint: ignoring patchpoint [%d] (0x%p) in Method=0x%pM (%s::%s) at offset %d\n",
ppId, ip, pMD, pMD->m_pszDebugClassName, pMD->m_pszDebugMethodName, ilOffset));
- return;
+ goto DONE;
}
#endif
@@ -5024,7 +5029,7 @@ void JIT_Patchpoint(int* counter, int ilOffset)
// Defer, if we haven't yet reached the limit
if (hitCount < hitLimit)
{
- return;
+ goto DONE;
}
// Third, make sure no other thread is trying to create the OSR method.
@@ -5032,7 +5037,7 @@ void JIT_Patchpoint(int* counter, int ilOffset)
if ((oldFlags & PerPatchpointInfo::patchpoint_triggered) == PerPatchpointInfo::patchpoint_triggered)
{
LOG((LF_TIEREDCOMPILATION, LL_INFO1000, "Jit_Patchpoint: AWAITING OSR method for patchpoint [%d] (0x%p)\n", ppId, ip));
- return;
+ goto DONE;
}
LONG newFlags = oldFlags | PerPatchpointInfo::patchpoint_triggered;
@@ -5041,7 +5046,7 @@ void JIT_Patchpoint(int* counter, int ilOffset)
if (!triggerTransition)
{
LOG((LF_TIEREDCOMPILATION, LL_INFO1000, "Jit_Patchpoint: (lost race) AWAITING OSR method for patchpoint [%d] (0x%p)\n", ppId, ip));
- return;
+ goto DONE;
}
// Time to create the OSR method.
@@ -5071,7 +5076,7 @@ void JIT_Patchpoint(int* counter, int ilOffset)
" marking patchpoint invalid for Method=0x%pM il offset %d\n", ip, pMD, ilOffset);
InterlockedOr(&ppInfo->m_flags, (LONG)PerPatchpointInfo::patchpoint_invalid);
- return;
+ goto DONE;
}
// We've successfully created the osr method; make it available.
@@ -5083,115 +5088,126 @@ void JIT_Patchpoint(int* counter, int ilOffset)
// If we get here, we have code to transition to...
_ASSERTE(osrMethodCode != NULL);
- Thread *pThread = GetThread();
+ {
+ Thread *pThread = GetThread();
#ifdef FEATURE_HIJACK
- // We can't crawl the stack of a thread that currently has a hijack pending
- // (since the hijack routine won't be recognized by any code manager). So we
- // Undo any hijack, the EE will re-attempt it later.
- pThread->UnhijackThread();
+ // We can't crawl the stack of a thread that currently has a hijack pending
+ // (since the hijack routine won't be recognized by any code manager). So we
+ // Undo any hijack, the EE will re-attempt it later.
+ pThread->UnhijackThread();
#endif
- // Find context for the original method
- CONTEXT *pFrameContext = NULL;
+ // Find context for the original method
+ CONTEXT *pFrameContext = NULL;
#if defined(TARGET_WINDOWS) && defined(TARGET_AMD64)
- DWORD contextSize = 0;
- ULONG64 xStateCompactionMask = 0;
- DWORD contextFlags = CONTEXT_FULL;
- if (Thread::AreCetShadowStacksEnabled())
- {
- xStateCompactionMask = XSTATE_MASK_CET_U;
- contextFlags |= CONTEXT_XSTATE;
- }
+ DWORD contextSize = 0;
+ ULONG64 xStateCompactionMask = 0;
+ DWORD contextFlags = CONTEXT_FULL;
+ if (Thread::AreCetShadowStacksEnabled())
+ {
+ xStateCompactionMask = XSTATE_MASK_CET_U;
+ contextFlags |= CONTEXT_XSTATE;
+ }
- // The initialize call should fail but return contextSize
- BOOL success = g_pfnInitializeContext2 ?
- g_pfnInitializeContext2(NULL, contextFlags, NULL, &contextSize, xStateCompactionMask) :
- InitializeContext(NULL, contextFlags, NULL, &contextSize);
+ // The initialize call should fail but return contextSize
+ BOOL success = g_pfnInitializeContext2 ?
+ g_pfnInitializeContext2(NULL, contextFlags, NULL, &contextSize, xStateCompactionMask) :
+ InitializeContext(NULL, contextFlags, NULL, &contextSize);
- _ASSERTE(!success && (GetLastError() == ERROR_INSUFFICIENT_BUFFER));
+ _ASSERTE(!success && (GetLastError() == ERROR_INSUFFICIENT_BUFFER));
- PVOID pBuffer = _alloca(contextSize);
- success = g_pfnInitializeContext2 ?
- g_pfnInitializeContext2(pBuffer, contextFlags, &pFrameContext, &contextSize, xStateCompactionMask) :
- InitializeContext(pBuffer, contextFlags, &pFrameContext, &contextSize);
- _ASSERTE(success);
+ PVOID pBuffer = _alloca(contextSize);
+ success = g_pfnInitializeContext2 ?
+ g_pfnInitializeContext2(pBuffer, contextFlags, &pFrameContext, &contextSize, xStateCompactionMask) :
+ InitializeContext(pBuffer, contextFlags, &pFrameContext, &contextSize);
+ _ASSERTE(success);
#else // TARGET_WINDOWS && TARGET_AMD64
- CONTEXT frameContext;
- frameContext.ContextFlags = CONTEXT_FULL;
- pFrameContext = &frameContext;
+ CONTEXT frameContext;
+ frameContext.ContextFlags = CONTEXT_FULL;
+ pFrameContext = &frameContext;
#endif // TARGET_WINDOWS && TARGET_AMD64
- // Find context for the original method
- RtlCaptureContext(pFrameContext);
+ // Find context for the original method
+ RtlCaptureContext(pFrameContext);
#if defined(TARGET_WINDOWS) && defined(TARGET_AMD64)
- if (Thread::AreCetShadowStacksEnabled())
- {
- pFrameContext->ContextFlags |= CONTEXT_XSTATE;
- SetXStateFeaturesMask(pFrameContext, xStateCompactionMask);
- SetSSP(pFrameContext, _rdsspq());
- }
+ if (Thread::AreCetShadowStacksEnabled())
+ {
+ pFrameContext->ContextFlags |= CONTEXT_XSTATE;
+ SetXStateFeaturesMask(pFrameContext, xStateCompactionMask);
+ SetSSP(pFrameContext, _rdsspq());
+ }
#endif // TARGET_WINDOWS && TARGET_AMD64
- // Walk back to the original method frame
- pThread->VirtualUnwindToFirstManagedCallFrame(pFrameContext);
+ // Walk back to the original method frame
+ pThread->VirtualUnwindToFirstManagedCallFrame(pFrameContext);
- // Remember original method FP and SP because new method will inherit them.
- UINT_PTR currentSP = GetSP(pFrameContext);
- UINT_PTR currentFP = GetFP(pFrameContext);
+ // Remember original method FP and SP because new method will inherit them.
+ UINT_PTR currentSP = GetSP(pFrameContext);
+ UINT_PTR currentFP = GetFP(pFrameContext);
- // We expect to be back at the right IP
- if ((UINT_PTR)ip != GetIP(pFrameContext))
- {
- // Should be fatal
- STRESS_LOG2(LF_TIEREDCOMPILATION, LL_FATALERROR, "Jit_Patchpoint: patchpoint (0x%p) TRANSITION"
- " unexpected context IP 0x%p\n", ip, GetIP(pFrameContext));
- EEPOLICY_HANDLE_FATAL_ERROR(COR_E_EXECUTIONENGINE);
- }
+ // We expect to be back at the right IP
+ if ((UINT_PTR)ip != GetIP(pFrameContext))
+ {
+ // Should be fatal
+ STRESS_LOG2(LF_TIEREDCOMPILATION, LL_FATALERROR, "Jit_Patchpoint: patchpoint (0x%p) TRANSITION"
+ " unexpected context IP 0x%p\n", ip, GetIP(pFrameContext));
+ EEPOLICY_HANDLE_FATAL_ERROR(COR_E_EXECUTIONENGINE);
+ }
- // Now unwind back to the original method caller frame.
- EECodeInfo callerCodeInfo(GetIP(pFrameContext));
- ULONG_PTR establisherFrame = 0;
- PVOID handlerData = NULL;
- RtlVirtualUnwind(UNW_FLAG_NHANDLER, callerCodeInfo.GetModuleBase(), GetIP(pFrameContext), callerCodeInfo.GetFunctionEntry(),
- pFrameContext, &handlerData, &establisherFrame, NULL);
+ // Now unwind back to the original method caller frame.
+ EECodeInfo callerCodeInfo(GetIP(pFrameContext));
+ ULONG_PTR establisherFrame = 0;
+ PVOID handlerData = NULL;
+ RtlVirtualUnwind(UNW_FLAG_NHANDLER, callerCodeInfo.GetModuleBase(), GetIP(pFrameContext), callerCodeInfo.GetFunctionEntry(),
+ pFrameContext, &handlerData, &establisherFrame, NULL);
- // Now, set FP and SP back to the values they had just before this helper was called,
- // since the new method must have access to the original method frame.
- //
- // TODO: if we access the patchpointInfo here, we can read out the FP-SP delta from there and
- // use that to adjust the stack, likely saving some stack space.
+ // Now, set FP and SP back to the values they had just before this helper was called,
+ // since the new method must have access to the original method frame.
+ //
+ // TODO: if we access the patchpointInfo here, we can read out the FP-SP delta from there and
+ // use that to adjust the stack, likely saving some stack space.
#if defined(TARGET_AMD64)
- // If calls push the return address, we need to simulate that here, so the OSR
- // method sees the "expected" SP misalgnment on entry.
- _ASSERTE(currentSP % 16 == 0);
- currentSP -= 8;
+ // If calls push the return address, we need to simulate that here, so the OSR
+ // method sees the "expected" SP misalgnment on entry.
+ _ASSERTE(currentSP % 16 == 0);
+ currentSP -= 8;
#if defined(TARGET_WINDOWS)
- DWORD64 ssp = GetSSP(pFrameContext);
- if (ssp != 0)
- {
- SetSSP(pFrameContext, ssp - 8);
- }
+ DWORD64 ssp = GetSSP(pFrameContext);
+ if (ssp != 0)
+ {
+ SetSSP(pFrameContext, ssp - 8);
+ }
#endif // TARGET_WINDOWS
- pFrameContext->Rbp = currentFP;
+ pFrameContext->Rbp = currentFP;
#endif // TARGET_AMD64
- SetSP(pFrameContext, currentSP);
+ SetSP(pFrameContext, currentSP);
- // Note we can get here w/o triggering, if there is an existing OSR method and
- // we hit the patchpoint.
- const int transitionLogLevel = isNewMethod ? LL_INFO10 : LL_INFO1000;
- LOG((LF_TIEREDCOMPILATION, transitionLogLevel, "Jit_Patchpoint: patchpoint [%d] (0x%p) TRANSITION to ip 0x%p\n", ppId, ip, osrMethodCode));
+ // Note we can get here w/o triggering, if there is an existing OSR method and
+ // we hit the patchpoint.
+ const int transitionLogLevel = isNewMethod ? LL_INFO10 : LL_INFO1000;
+ LOG((LF_TIEREDCOMPILATION, transitionLogLevel, "Jit_Patchpoint: patchpoint [%d] (0x%p) TRANSITION to ip 0x%p\n", ppId, ip, osrMethodCode));
- // Install new entry point as IP
- SetIP(pFrameContext, osrMethodCode);
+ // Install new entry point as IP
+ SetIP(pFrameContext, osrMethodCode);
- // Transition!
- ClrRestoreNonvolatileContext(pFrameContext);
+ // Restore last error (since call below does not return)
+ // END_PRESERVE_LAST_ERROR;
+ ::SetLastError(dwLastError);
+
+ // Transition!
+ ClrRestoreNonvolatileContext(pFrameContext);
+ }
+
+ DONE:
+
+ // END_PRESERVE_LAST_ERROR;
+ ::SetLastError(dwLastError);
}
// Jit helper invoked at a partial compilation patchpoint.
@@ -5205,6 +5221,9 @@ void JIT_Patchpoint(int* counter, int ilOffset)
//
void JIT_PartialCompilationPatchpoint(int ilOffset)
{
+ // BEGIN_PRESERVE_LAST_ERROR;
+ DWORD dwLastError = ::GetLastError();
+
// This method will not return normally
STATIC_CONTRACT_GC_NOTRIGGER;
STATIC_CONTRACT_MODE_COOPERATIVE;
@@ -5356,6 +5375,10 @@ void JIT_PartialCompilationPatchpoint(int ilOffset)
// Install new entry point as IP
SetIP(&frameContext, osrMethodCode);
+ // Restore last error (since call below does not return)
+ // END_PRESERVE_LAST_ERROR;
+ ::SetLastError(dwLastError);
+
// Transition!
RtlRestoreContext(&frameContext, NULL);
}
diff --git a/src/coreclr/vm/jitinterface.cpp b/src/coreclr/vm/jitinterface.cpp
index bc146b76ef9..ef511c1814f 100644
--- a/src/coreclr/vm/jitinterface.cpp
+++ b/src/coreclr/vm/jitinterface.cpp
@@ -1302,7 +1302,7 @@ CorInfoHelpFunc CEEInfo::getSharedStaticsHelper(FieldDesc * pField, MethodTable
helper += delta;
}
else
- if (!pFieldMT->HasClassConstructor() && !pFieldMT->HasBoxedRegularStatics())
+ if ((!pFieldMT->HasClassConstructor() && !pFieldMT->HasBoxedRegularStatics()) || pFieldMT->IsClassInited())
{
const int delta = CORINFO_HELP_GETSHARED_GCSTATIC_BASE_NOCTOR - CORINFO_HELP_GETSHARED_GCSTATIC_BASE;
@@ -7142,6 +7142,25 @@ bool getILIntrinsicImplementationForInterlocked(MethodDesc * ftn,
return true;
}
+bool IsBitwiseEquatable(TypeHandle typeHandle, MethodTable * methodTable)
+{
+ if (!methodTable->IsValueType() ||
+ !CanCompareBitsOrUseFastGetHashCode(methodTable))
+ {
+ return false;
+ }
+
+ // CanCompareBitsOrUseFastGetHashCode checks for an object.Equals override.
+ // We also need to check for an IEquatable<T> implementation.
+ Instantiation inst(&typeHandle, 1);
+ if (typeHandle.CanCastTo(TypeHandle(CoreLibBinder::GetClass(CLASS__IEQUATABLEGENERIC)).Instantiate(inst)))
+ {
+ return false;
+ }
+
+ return true;
+}
+
bool getILIntrinsicImplementationForRuntimeHelpers(MethodDesc * ftn,
CORINFO_METHOD_INFO * methInfo)
{
@@ -7192,8 +7211,9 @@ bool getILIntrinsicImplementationForRuntimeHelpers(MethodDesc * ftn,
static const BYTE returnFalse[] = { CEE_LDC_I4_0, CEE_RET };
// Ideally we could detect automatically whether a type is trivially equatable
- // (i.e., its operator == could be implemented via memcmp). But for now we'll
- // do the simple thing and hardcode the list of types we know fulfill this contract.
+ // (i.e., its operator == could be implemented via memcmp). The best we can do
+ // for now is hardcode a list of known supported types and then also include anything
+ // that doesn't provide its own object.Equals override / IEquatable<T> implementation.
// n.b. This doesn't imply that the type's CompareTo method can be memcmp-implemented,
// as a method like CompareTo may need to take a type's signedness into account.
@@ -7210,7 +7230,8 @@ bool getILIntrinsicImplementationForRuntimeHelpers(MethodDesc * ftn,
|| methodTable == CoreLibBinder::GetClass(CLASS__INTPTR)
|| methodTable == CoreLibBinder::GetClass(CLASS__UINTPTR)
|| methodTable == CoreLibBinder::GetClass(CLASS__RUNE)
- || methodTable->IsEnum())
+ || methodTable->IsEnum()
+ || IsBitwiseEquatable(typeHandle, methodTable))
{
methInfo->ILCode = const_cast<BYTE*>(returnTrue);
}
diff --git a/src/coreclr/vm/method.cpp b/src/coreclr/vm/method.cpp
index 31144206061..b4ac30905de 100644
--- a/src/coreclr/vm/method.cpp
+++ b/src/coreclr/vm/method.cpp
@@ -135,9 +135,6 @@ SIZE_T MethodDesc::SizeOf()
(mdcClassification
| mdcHasNonVtableSlot
| mdcMethodImpl
-#ifdef FEATURE_COMINTEROP
- | mdcHasComPlusCallInfo
-#endif
| mdcHasNativeCodeSlot)];
return size;
@@ -1691,7 +1688,7 @@ MethodDesc* MethodDesc::StripMethodInstantiation()
//*******************************************************************************
MethodDescChunk *MethodDescChunk::CreateChunk(LoaderHeap *pHeap, DWORD methodDescCount,
- DWORD classification, BOOL fNonVtableSlot, BOOL fNativeCodeSlot, BOOL fComPlusCallInfo, MethodTable *pInitialMT, AllocMemTracker *pamTracker)
+ DWORD classification, BOOL fNonVtableSlot, BOOL fNativeCodeSlot, MethodTable *pInitialMT, AllocMemTracker *pamTracker)
{
CONTRACT(MethodDescChunk *)
{
@@ -1715,13 +1712,6 @@ MethodDescChunk *MethodDescChunk::CreateChunk(LoaderHeap *pHeap, DWORD methodDes
if (fNativeCodeSlot)
oneSize += sizeof(MethodDesc::NativeCodeSlot);
-#ifdef FEATURE_COMINTEROP
- if (fComPlusCallInfo)
- oneSize += sizeof(ComPlusCallInfo);
-#else // FEATURE_COMINTEROP
- _ASSERTE(!fComPlusCallInfo);
-#endif // FEATURE_COMINTEROP
-
_ASSERTE((oneSize & MethodDesc::ALIGNMENT_MASK) == 0);
DWORD maxMethodDescsPerChunk = (DWORD)(MethodDescChunk::MaxSizeOfMethodDescs / oneSize);
@@ -1761,10 +1751,6 @@ MethodDescChunk *MethodDescChunk::CreateChunk(LoaderHeap *pHeap, DWORD methodDes
pMD->SetHasNonVtableSlot();
if (fNativeCodeSlot)
pMD->SetHasNativeCodeSlot();
-#ifdef FEATURE_COMINTEROP
- if (fComPlusCallInfo)
- pMD->SetupGenericComPlusCall();
-#endif // FEATURE_COMINTEROP
_ASSERTE(pMD->SizeOf() == oneSize);
@@ -2295,7 +2281,7 @@ BOOL MethodDesc::RequiresMethodDescCallingConvention(BOOL fEstimateForChunk /*=F
LIMITED_METHOD_CONTRACT;
// Interop marshaling is implemented using shared stubs
- if (IsNDirect() || IsComPlusCall() || IsGenericComPlusCall())
+ if (IsNDirect() || IsComPlusCall())
return TRUE;
diff --git a/src/coreclr/vm/method.hpp b/src/coreclr/vm/method.hpp
index 0532163cd60..0edff0f4ff3 100644
--- a/src/coreclr/vm/method.hpp
+++ b/src/coreclr/vm/method.hpp
@@ -138,11 +138,7 @@ enum MethodDescClassification
// Has slot for native code
mdcHasNativeCodeSlot = 0x0020,
-#ifdef FEATURE_COMINTEROP
- mdcHasComPlusCallInfo = 0x0040,
-#else
// unused = 0x0040,
-#endif
// Method is static
mdcStatic = 0x0080,
@@ -657,8 +653,6 @@ public:
WRAPPER_NO_CONTRACT;
return mcComInterop == GetClassification();
}
- inline DWORD IsGenericComPlusCall();
- inline void SetupGenericComPlusCall();
#else // !FEATURE_COMINTEROP
// hardcoded to return FALSE to improve code readability
inline DWORD IsComPlusCall()
@@ -666,11 +660,6 @@ public:
LIMITED_METHOD_CONTRACT;
return FALSE;
}
- inline DWORD IsGenericComPlusCall()
- {
- LIMITED_METHOD_CONTRACT;
- return FALSE;
- }
#endif // !FEATURE_COMINTEROP
// Update flags in a thread safe manner.
@@ -2185,7 +2174,6 @@ public:
DWORD classification,
BOOL fNonVtableSlot,
BOOL fNativeCodeSlot,
- BOOL fComPlusCallInfo,
MethodTable *initialMT,
class AllocMemTracker *pamTracker);
@@ -3375,25 +3363,6 @@ public:
#endif
}
-#ifdef FEATURE_COMINTEROP
- void IMD_SetupGenericComPlusCall()
- {
- LIMITED_METHOD_CONTRACT;
-
- IMD_GetComPlusCallInfo()->InitStackArgumentSize();
- }
-
- PTR_ComPlusCallInfo IMD_GetComPlusCallInfo()
- {
- LIMITED_METHOD_CONTRACT;
-
- _ASSERTE(IsGenericComPlusCall());
- SIZE_T size = s_ClassificationSizeTable[m_wFlags & (mdcClassification | mdcHasNonVtableSlot | mdcMethodImpl | mdcHasNativeCodeSlot)];
-
- return dac_cast<PTR_ComPlusCallInfo>(dac_cast<TADDR>(this) + size);
- }
-#endif // FEATURE_COMINTEROP
-
PTR_DictionaryLayout GetDictLayoutRaw()
{
LIMITED_METHOD_DAC_CONTRACT;
diff --git a/src/coreclr/vm/method.inl b/src/coreclr/vm/method.inl
index feca2073300..c348cd5c7a0 100644
--- a/src/coreclr/vm/method.inl
+++ b/src/coreclr/vm/method.inl
@@ -112,23 +112,6 @@ inline BOOL MethodDesc::IsQCall()
}
#ifdef FEATURE_COMINTEROP
-FORCEINLINE DWORD MethodDesc::IsGenericComPlusCall()
-{
- LIMITED_METHOD_CONTRACT;
- return m_wFlags & mdcHasComPlusCallInfo;
-}
-
-inline void MethodDesc::SetupGenericComPlusCall()
-{
- LIMITED_METHOD_CONTRACT;
- m_wFlags |= mdcHasComPlusCallInfo;
-
- AsInstantiatedMethodDesc()->IMD_SetupGenericComPlusCall();
-}
-#endif // FEATURE_COMINTEROP
-
-
-#ifdef FEATURE_COMINTEROP
// static
inline ComPlusCallInfo *ComPlusCallInfo::FromMethodDesc(MethodDesc *pMD)
@@ -138,14 +121,10 @@ inline ComPlusCallInfo *ComPlusCallInfo::FromMethodDesc(MethodDesc *pMD)
{
return ((ComPlusCallMethodDesc *)pMD)->m_pComPlusCallInfo;
}
- else if (pMD->IsEEImpl())
- {
- return ((DelegateEEClass *)pMD->GetClass())->m_pComPlusCallInfo;
- }
else
{
- _ASSERTE(pMD->IsGenericComPlusCall());
- return pMD->AsInstantiatedMethodDesc()->IMD_GetComPlusCallInfo();
+ _ASSERTE(pMD->IsEEImpl());
+ return ((DelegateEEClass *)pMD->GetClass())->m_pComPlusCallInfo;
}
}
diff --git a/src/coreclr/vm/methodtablebuilder.cpp b/src/coreclr/vm/methodtablebuilder.cpp
index b0c0c1ce749..be4fee76f2f 100644
--- a/src/coreclr/vm/methodtablebuilder.cpp
+++ b/src/coreclr/vm/methodtablebuilder.cpp
@@ -575,13 +575,6 @@ MethodTableBuilder::LoadApproxInterfaceMap()
// Use the same injection status as typical instantiation
bmtInterface->dbg_fShouldInjectInterfaceDuplicates =
bmtGenerics->Debug_GetTypicalMethodTable()->Debug_HasInjectedInterfaceDuplicates();
-
- if (GetModule() == g_pObjectClass->GetModule())
- { // CoreLib has some weird hardcoded information about interfaces (e.g.
- // code:CEEPreloader::ApplyTypeDependencyForSZArrayHelper), so we don't inject duplicates into
- // CoreLib types
- bmtInterface->dbg_fShouldInjectInterfaceDuplicates = FALSE;
- }
}
#endif //_DEBUG
@@ -2666,14 +2659,6 @@ MethodTableBuilder::EnumerateClassMethods()
METHOD_IMPL_TYPE implType;
LPSTR strMethodName;
-#ifdef FEATURE_TYPEEQUIVALENCE
- // TypeEquivalent structs must not have methods
- if (bmtProp->fIsTypeEquivalent && fIsClassValueType)
- {
- BuildMethodTableThrowException(IDS_CLASSLOAD_EQUIVALENTSTRUCTMETHODS);
- }
-#endif
-
//
// Go to the next method and retrieve its attributes.
//
@@ -2693,6 +2678,14 @@ MethodTableBuilder::EnumerateClassMethods()
BuildMethodTableThrowException(IDS_CLASSLOAD_BADFORMAT);
}
+#ifdef FEATURE_TYPEEQUIVALENCE
+ // TypeEquivalent structs must not have non-static methods
+ if (!IsMdStatic(dwMemberAttrs) && bmtProp->fIsTypeEquivalent && fIsClassValueType)
+ {
+ BuildMethodTableThrowException(IDS_CLASSLOAD_EQUIVALENTSTRUCTMETHODS);
+ }
+#endif
+
bool isVtblGap = false;
if (IsMdRTSpecialName(dwMemberAttrs) || IsMdVirtual(dwMemberAttrs) || IsDelegate())
{
@@ -2705,7 +2698,7 @@ MethodTableBuilder::EnumerateClassMethods()
BuildMethodTableThrowException(BFA_METHOD_NAME_TOO_LONG);
}
- isVtblGap = IsMdRTSpecialName(dwMemberAttrs) && strncmp(strMethodName, "_VtblGap", 8) == 0;
+ isVtblGap = IsMdRTSpecialName(dwMemberAttrs) && IsVtblGapName(strMethodName);
}
else
{
@@ -2744,9 +2737,6 @@ MethodTableBuilder::EnumerateClassMethods()
}
numGenericMethodArgs = hEnumTyPars.EnumGetCount();
-
- // We do not want to support context-bound objects with generic methods.
-
if (numGenericMethodArgs != 0)
{
HENUMInternalHolder hEnumGenericPars(pMDInternalImport);
@@ -2806,7 +2796,7 @@ MethodTableBuilder::EnumerateClassMethods()
// the '_'. We ignore this.
//
- LPCSTR pos = strMethodName + 8;
+ LPCSTR pos = strMethodName + COR_VTABLEGAP_NAME_LENGTH;
// Skip optional number.
while (IS_DIGIT(*pos))
@@ -3198,7 +3188,6 @@ MethodTableBuilder::EnumerateClassMethods()
else
#endif // !FEATURE_COMINTEROP
{
- // This codepath is used by remoting
type = METHOD_TYPE_NORMAL;
}
}
@@ -10006,7 +9995,7 @@ void MethodTableBuilder::CheckForSystemTypes()
// * UInt128: unsigned __int128
//
// This behavior matches the ABI standard on various Unix platforms
- // On Windows, no standard for Int128 has been established yet,
+ // On Windows, no standard for Int128 has been established yet,
// although applying 16 byte alignment is consistent with treatment of 128 bit SSE types
// even on X86
pLayout->m_ManagedLargestAlignmentRequirementOfAllMembers = 16; // sizeof(__int128)
diff --git a/src/coreclr/vm/mngstdinterfaces.cpp b/src/coreclr/vm/mngstdinterfaces.cpp
index 042afcb7bfe..1e8a4800be4 100644
--- a/src/coreclr/vm/mngstdinterfaces.cpp
+++ b/src/coreclr/vm/mngstdinterfaces.cpp
@@ -21,7 +21,6 @@
#include "method.hpp"
#include "runtimecallablewrapper.h"
#include "excep.h"
-#include "typeparse.h"
//
// Declare the static field int the ManagedStdInterfaceMap class.
diff --git a/src/coreclr/vm/prestub.cpp b/src/coreclr/vm/prestub.cpp
index 7df9cf15540..0aba1852ab4 100644
--- a/src/coreclr/vm/prestub.cpp
+++ b/src/coreclr/vm/prestub.cpp
@@ -2078,7 +2078,7 @@ PCODE MethodDesc::DoPrestub(MethodTable *pDispatchingMT, CallerGCMode callerGCMo
// they are not your every day method descriptors, for example
// they don't have an IL or code.
*/
- if (IsComPlusCall() || IsGenericComPlusCall())
+ if (IsComPlusCall())
{
pCode = GetStubForInteropMethod(this);
diff --git a/src/coreclr/vm/stdinterfaces.cpp b/src/coreclr/vm/stdinterfaces.cpp
index 44022ca573b..cffce984a04 100644
--- a/src/coreclr/vm/stdinterfaces.cpp
+++ b/src/coreclr/vm/stdinterfaces.cpp
@@ -1172,12 +1172,6 @@ Dispatch_GetIDsOfNames(IDispatch* pDisp, REFIID riid, _In_reads_(cNames) OLECHAR
if (pCMT->HasInvisibleParent())
return E_NOTIMPL;
- ComCallWrapperTemplate *pTemplate = MapIUnknownToWrapper(pDisp)->GetComCallWrapperTemplate();
- if (pTemplate->IsUseOleAutDispatchImpl())
- {
- return OleAutDispatchImpl_GetIDsOfNames(pDisp, riid, rgszNames, cNames, lcid, rgdispid);
- }
-
return InternalDispatchImpl_GetIDsOfNames(pDisp, riid, rgszNames, cNames, lcid, rgdispid);
}
@@ -1212,124 +1206,9 @@ Dispatch_Invoke
if (pCMT->HasInvisibleParent())
return E_NOTIMPL;
- ComCallWrapperTemplate *pTemplate = MapIUnknownToWrapper(pDisp)->GetComCallWrapperTemplate();
- if (pTemplate->IsUseOleAutDispatchImpl())
- {
- return OleAutDispatchImpl_Invoke(pDisp, dispidMember, riid, lcid, wFlags, pdispparams, pvarResult, pexcepinfo, puArgErr);
- }
-
return InternalDispatchImpl_Invoke(pDisp, dispidMember, riid, lcid, wFlags, pdispparams, pvarResult, pexcepinfo, puArgErr);
}
-
-//------------------------------------------------------------------------------------------
-// IDispatch methods for COM+ objects implemented internally using reflection.
-
-
-HRESULT __stdcall
-OleAutDispatchImpl_GetIDsOfNames
-(
- IDispatch* pDisp,
- REFIID riid,
- _In_reads_(cNames) OLECHAR **rgszNames,
- unsigned int cNames,
- LCID lcid,
- DISPID *rgdispid
-)
-{
- CONTRACTL
- {
- NOTHROW;
- GC_TRIGGERS;
- MODE_PREEMPTIVE;
- INJECT_FAULT(return E_OUTOFMEMORY);
- PRECONDITION(CheckPointer(pDisp));
- PRECONDITION(IsInProcCCWTearOff(pDisp));
- PRECONDITION(CheckPointer(rgszNames));
- }
- CONTRACTL_END;
-
- // Make sure that riid is IID_NULL.
- if (riid != IID_NULL)
- return DISP_E_UNKNOWNINTERFACE;
-
- // Retrieve the COM method table from the IP.
- ComMethodTable *pCMT = ComMethodTable::ComMethodTableFromIP(pDisp);
- if (pCMT->IsIClassXOrBasicItf() && pCMT->GetClassInterfaceType() != clsIfNone)
- if (pCMT->HasInvisibleParent())
- return E_NOTIMPL;
-
- ITypeInfo *pTI;
- HRESULT hr = GetITypeInfoForMT(pCMT, &pTI);
- if (FAILED(hr))
- return (hr);
-
- hr = pTI->GetIDsOfNames(rgszNames, cNames, rgdispid);
- return hr;
-}
-
-HRESULT __stdcall
-OleAutDispatchImpl_Invoke
- (
- IDispatch* pDisp,
- DISPID dispidMember,
- REFIID riid,
- LCID lcid,
- unsigned short wFlags,
- DISPPARAMS *pdispparams,
- VARIANT *pvarResult,
- EXCEPINFO *pexcepinfo,
- unsigned int *puArgErr
- )
-{
- CONTRACTL
- {
- NOTHROW;
- GC_TRIGGERS;
- MODE_PREEMPTIVE;
- PRECONDITION(CheckPointer(pDisp));
- PRECONDITION(IsInProcCCWTearOff(pDisp));
- }
- CONTRACTL_END;
-
- HRESULT hr = S_OK;
-
- // Make sure that riid is IID_NULL.
- if (riid != IID_NULL)
- return DISP_E_UNKNOWNINTERFACE;
-
- // Retrieve the COM method table from the IP.
- ComMethodTable *pCMT = ComMethodTable::ComMethodTableFromIP(pDisp);
- if (pCMT->IsIClassXOrBasicItf() && pCMT->GetClassInterfaceType() != clsIfNone)
- if (pCMT->HasInvisibleParent())
- return E_NOTIMPL;
-
- ITypeInfo *pTI;
- hr = GetITypeInfoForMT(pCMT, &pTI);
- if (FAILED(hr))
- return hr;
-
- EX_TRY
- {
- // If we have a basic or IClassX interface then we're going to invoke through
- // the class interface.
- if (pCMT->IsIClassXOrBasicItf())
- {
- CCWHolder pCCW = ComCallWrapper::GetWrapperFromIP(pDisp);
- pDisp = (IDispatch*)pCCW->GetIClassXIP();
- }
-
- hr = pTI->Invoke(pDisp, dispidMember, wFlags, pdispparams, pvarResult, pexcepinfo, puArgErr);
- }
- EX_CATCH
- {
- hr = GET_EXCEPTION()->GetHR();
- }
- EX_END_CATCH(SwallowAllExceptions);
-
- return hr;
-}
-
HRESULT __stdcall
InternalDispatchImpl_GetIDsOfNames (
IDispatch* pDisp,
diff --git a/src/coreclr/vm/stdinterfaces_internal.h b/src/coreclr/vm/stdinterfaces_internal.h
index bd1b7b336a2..a268f566cda 100644
--- a/src/coreclr/vm/stdinterfaces_internal.h
+++ b/src/coreclr/vm/stdinterfaces_internal.h
@@ -93,34 +93,6 @@ HRESULT __stdcall Dispatch_Invoke (
EXCEPINFO *pexcepinfo,
unsigned int *puArgErr);
-
-//------------------------------------------------------------------------------------------
-// IDispatch methods for COM+ objects that use our OleAut's implementation.
-
-
-// IDispatch::GetIDsofNames
-HRESULT __stdcall OleAutDispatchImpl_GetIDsOfNames (
- IDispatch* pDisp,
- REFIID riid,
- _In_reads_(cNames) OLECHAR **rgszNames,
- unsigned int cNames,
- LCID lcid,
- DISPID *rgdispid);
-
-// IDispatch::Invoke
-HRESULT __stdcall OleAutDispatchImpl_Invoke (
- IDispatch* pDisp,
- DISPID dispidMember,
- REFIID riid,
- LCID lcid,
- unsigned short wFlags,
- DISPPARAMS *pdispparams,
- VARIANT *pvarResult,
- EXCEPINFO *pexcepinfo,
- unsigned int *puArgErr);
-
-
-
//------------------------------------------------------------------------------------------
// IDispatch methods for COM+ objects that use our internal implementation.
diff --git a/src/coreclr/vm/stubhelpers.cpp b/src/coreclr/vm/stubhelpers.cpp
index 7a34979aace..e82b5e4d3b0 100644
--- a/src/coreclr/vm/stubhelpers.cpp
+++ b/src/coreclr/vm/stubhelpers.cpp
@@ -294,7 +294,7 @@ FCIMPL4(IUnknown*, StubHelpers::GetCOMIPFromRCW, Object* pSrcUNSAFE, MethodDesc*
CONTRACTL
{
FCALL_CHECK;
- PRECONDITION(pMD->IsComPlusCall() || pMD->IsGenericComPlusCall() || pMD->IsEEImpl());
+ PRECONDITION(pMD->IsComPlusCall() || pMD->IsEEImpl());
}
CONTRACTL_END;
diff --git a/src/coreclr/vm/threads.cpp b/src/coreclr/vm/threads.cpp
index f1f8f4fb243..d4919f4e112 100644
--- a/src/coreclr/vm/threads.cpp
+++ b/src/coreclr/vm/threads.cpp
@@ -575,7 +575,7 @@ DWORD Thread::StartThread()
#endif
_ASSERTE (GetThreadHandle() != INVALID_HANDLE_VALUE);
- DWORD dwRetVal = ::ResumeThread(GetThreadHandle());
+ DWORD dwRetVal = ClrResumeThread(GetThreadHandle());
return dwRetVal;
}
diff --git a/src/coreclr/vm/threads.h b/src/coreclr/vm/threads.h
index 54da8e94405..c312981b707 100644
--- a/src/coreclr/vm/threads.h
+++ b/src/coreclr/vm/threads.h
@@ -4260,7 +4260,7 @@ public:
// GC calls this when creating special threads that also happen to have an EE Thread
// object associated with them (e.g., the bgc thread).
- void SetGCSpecial(bool fGCSpecial);
+ void SetGCSpecial();
private:
diff --git a/src/coreclr/vm/threads.inl b/src/coreclr/vm/threads.inl
index 86012a2282e..c64382d4bbd 100644
--- a/src/coreclr/vm/threads.inl
+++ b/src/coreclr/vm/threads.inl
@@ -165,10 +165,10 @@ inline bool Thread::IsGCSpecial()
return m_fGCSpecial;
}
-inline void Thread::SetGCSpecial(bool fGCSpecial)
+inline void Thread::SetGCSpecial()
{
LIMITED_METHOD_CONTRACT;
- m_fGCSpecial = fGCSpecial;
+ m_fGCSpecial = true;
}
#if !defined(DACCESS_COMPILE)
diff --git a/src/coreclr/vm/threadsuspend.cpp b/src/coreclr/vm/threadsuspend.cpp
index 5bd3adc72b2..73f10f1ef4c 100644
--- a/src/coreclr/vm/threadsuspend.cpp
+++ b/src/coreclr/vm/threadsuspend.cpp
@@ -250,7 +250,7 @@ Thread::SuspendThreadResult Thread::SuspendThread(BOOL fOneTryOnly, DWORD *pdwSu
if (InterlockedOr(&m_dwForbidSuspendThread, 0))
{
#if defined(_DEBUG)
- // Enable the diagnostic ::SuspendThread() if the
+ // Enable the diagnostic ClrSuspendThread() if the
// DiagnosticSuspend config setting is set.
// This will interfere with the mutual suspend race but it's
// here only for diagnostic purposes anyway
@@ -259,7 +259,7 @@ Thread::SuspendThreadResult Thread::SuspendThread(BOOL fOneTryOnly, DWORD *pdwSu
goto retry;
}
- dwSuspendCount = ::SuspendThread(hThread);
+ dwSuspendCount = ClrSuspendThread(hThread);
//
// Since SuspendThread is asynchronous, we now must wait for the thread to
@@ -271,7 +271,7 @@ Thread::SuspendThreadResult Thread::SuspendThread(BOOL fOneTryOnly, DWORD *pdwSu
{
if (!EnsureThreadIsSuspended(hThread, this))
{
- ::ResumeThread(hThread);
+ ClrResumeThread(hThread);
str = STR_Failure;
break;
}
@@ -308,7 +308,7 @@ Thread::SuspendThreadResult Thread::SuspendThread(BOOL fOneTryOnly, DWORD *pdwSu
++nCnt;
}
#endif // _DEBUG
- ::ResumeThread(hThread);
+ ClrResumeThread(hThread);
#if defined(_DEBUG)
// If the suspend diagnostics are enabled we need to spin here in order to avoid
@@ -388,10 +388,10 @@ retry:
if (i64TimestampCur - i64TimestampStart >= i64TimestampTicksMax)
{
- dwSuspendCount = ::SuspendThread(hThread);
+ dwSuspendCount = ClrSuspendThread(hThread);
_ASSERTE(!"It takes too long to suspend a thread");
if ((int)dwSuspendCount >= 0)
- ::ResumeThread(hThread);
+ ClrResumeThread(hThread);
}
#endif // _DEBUG
@@ -444,8 +444,8 @@ DWORD Thread::ResumeThread()
_ASSERTE (m_ThreadHandleForResume != INVALID_HANDLE_VALUE);
- //DWORD res = ::ResumeThread(GetThreadHandle());
- DWORD res = ::ResumeThread(m_ThreadHandleForResume);
+ //DWORD res = ClrResumeThread(GetThreadHandle());
+ DWORD res = ClrResumeThread(m_ThreadHandleForResume);
_ASSERTE (res != 0 && "Thread is not previously suspended");
#ifdef _DEBUG_IMPL
_ASSERTE (!m_Creator.IsCurrentThread());
@@ -3394,6 +3394,12 @@ void ThreadSuspend::SuspendRuntime(ThreadSuspend::SUSPEND_REASON reason)
continue;
}
+ if (thread->IsGCSpecial())
+ {
+ // GC threads can not be forced to run preemptively, so we will not try.
+ continue;
+ }
+
// this is an interesting thread in cooperative mode, let's guide it to preemptive
if (!Thread::UseContextBasedThreadRedirection())
@@ -3996,8 +4002,8 @@ BOOL Thread::HandleJITCaseForAbort()
return FALSE;
}
-// Threads suspended by the Win32 ::SuspendThread() are resumed in two ways. If we
-// suspended them in error, they are resumed via the Win32 ::ResumeThread(). But if
+// Threads suspended by ClrSuspendThread() are resumed in two ways. If we
+// suspended them in error, they are resumed via ClrResumeThread(). But if
// this is the HandledJIT() case and the thread is in fully interruptible code, we
// can resume them under special control. ResumeRuntime and UserResume are cases
// of this.
diff --git a/src/coreclr/vm/typestring.h b/src/coreclr/vm/typestring.h
index df54ed76b5b..f003984633c 100644
--- a/src/coreclr/vm/typestring.h
+++ b/src/coreclr/vm/typestring.h
@@ -213,4 +213,3 @@ private:
};
#endif
-
diff --git a/src/coreclr/vm/weakreferencenative.cpp b/src/coreclr/vm/weakreferencenative.cpp
index b26d017c3de..946ce8d6675 100644
--- a/src/coreclr/vm/weakreferencenative.cpp
+++ b/src/coreclr/vm/weakreferencenative.cpp
@@ -13,7 +13,6 @@
#include "gchandleutilities.h"
#include "weakreferencenative.h"
#include "typestring.h"
-#include "typeparse.h"
#include "threadsuspend.h"
#include "interoplibinterface.h"
diff --git a/src/coreclr/vm/wellknownattributes.h b/src/coreclr/vm/wellknownattributes.h
index b247d62e052..f1ac8a69767 100644
--- a/src/coreclr/vm/wellknownattributes.h
+++ b/src/coreclr/vm/wellknownattributes.h
@@ -22,7 +22,6 @@ enum class WellKnownAttribute : DWORD
DefaultDllImportSearchPaths,
Guid,
LCIDConversion,
- IDispatchImpl,
ImportedFromTypeLib,
Intrinsic,
IsByRefLike,
@@ -77,8 +76,6 @@ inline const char *GetWellKnownAttributeName(WellKnownAttribute attribute)
return "System.Runtime.InteropServices.GuidAttribute";
case WellKnownAttribute::LCIDConversion:
return "System.Runtime.InteropServices.LCIDConversionAttribute";
- case WellKnownAttribute::IDispatchImpl:
- return "System.Runtime.InteropServices.IDispatchImplAttribute";
case WellKnownAttribute::ImportedFromTypeLib:
return "System.Runtime.InteropServices.ImportedFromTypeLibAttribute";
case WellKnownAttribute::Intrinsic:
diff --git a/src/installer/managed/Microsoft.NET.HostModel/AppHost/AppHostExceptions.cs b/src/installer/managed/Microsoft.NET.HostModel/AppHost/AppHostExceptions.cs
index ceae7c46cdc..274876879c8 100644
--- a/src/installer/managed/Microsoft.NET.HostModel/AppHost/AppHostExceptions.cs
+++ b/src/installer/managed/Microsoft.NET.HostModel/AppHost/AppHostExceptions.cs
@@ -37,6 +37,7 @@ namespace Microsoft.NET.HostModel.AppHost
public readonly MachOFormatError Error;
internal AppHostMachOFormatException(MachOFormatError error)
+ : base($"Failed to process MachO file: {error}")
{
Error = error;
}
@@ -48,7 +49,8 @@ namespace Microsoft.NET.HostModel.AppHost
/// </summary>
public sealed class AppHostNotCUIException : AppHostUpdateException
{
- internal AppHostNotCUIException()
+ internal AppHostNotCUIException(ushort subsystem)
+ : base($"Selected apphost is not a CUI Windows application. Subsystem: {subsystem}")
{
}
}
@@ -59,8 +61,12 @@ namespace Microsoft.NET.HostModel.AppHost
/// </summary>
public sealed class AppHostNotPEFileException : AppHostUpdateException
{
- internal AppHostNotPEFileException()
+ public readonly string Reason;
+
+ internal AppHostNotPEFileException(string reason)
+ : base($"Selected apphost is not a valid PE file. {reason}")
{
+ Reason = reason;
}
}
@@ -72,8 +78,9 @@ namespace Microsoft.NET.HostModel.AppHost
public readonly int ExitCode;
internal AppHostSigningException(int exitCode, string signingErrorMessage)
- : base(signingErrorMessage)
+ : base($"{signingErrorMessage}; Exit code: {exitCode}")
{
+ ExitCode = exitCode;
}
}
@@ -85,6 +92,7 @@ namespace Microsoft.NET.HostModel.AppHost
public string LongName { get; }
internal AppNameTooLongException(string name)
+ : base($"The name of the app is too long (must be less than 1024 bytes). Name: {name}")
{
LongName = name;
}
diff --git a/src/installer/managed/Microsoft.NET.HostModel/AppHost/HostWriter.cs b/src/installer/managed/Microsoft.NET.HostModel/AppHost/HostWriter.cs
index be83a7067d7..d9d3debcdba 100644
--- a/src/installer/managed/Microsoft.NET.HostModel/AppHost/HostWriter.cs
+++ b/src/installer/managed/Microsoft.NET.HostModel/AppHost/HostWriter.cs
@@ -59,7 +59,7 @@ namespace Microsoft.NET.HostModel.AppHost
{
if (!appHostIsPEImage)
{
- throw new AppHostNotPEFileException();
+ throw new AppHostNotPEFileException("PE file signature not found.");
}
PEUtils.SetWindowsGraphicalUserInterfaceBit(accessor);
@@ -141,7 +141,7 @@ namespace Microsoft.NET.HostModel.AppHost
if (chmodReturnCode == -1)
{
- throw new Win32Exception(Marshal.GetLastWin32Error(), $"Could not set file permission {filePermissionOctal} for {appHostDestinationFilePath}.");
+ throw new Win32Exception(Marshal.GetLastWin32Error(), $"Could not set file permission {Convert.ToString(filePermissionOctal, 8)} for {appHostDestinationFilePath}.");
}
if (enableMacOSCodeSign && RuntimeInformation.IsOSPlatform(OSPlatform.OSX) && HostModelUtils.IsCodesignAvailable())
diff --git a/src/installer/managed/Microsoft.NET.HostModel/AppHost/PEUtils.cs b/src/installer/managed/Microsoft.NET.HostModel/AppHost/PEUtils.cs
index 726810200f3..e38a5c67d60 100644
--- a/src/installer/managed/Microsoft.NET.HostModel/AppHost/PEUtils.cs
+++ b/src/installer/managed/Microsoft.NET.HostModel/AppHost/PEUtils.cs
@@ -97,7 +97,7 @@ namespace Microsoft.NET.HostModel.AppHost
if (accessor.Capacity < peHeaderOffset + SubsystemOffset + sizeof(ushort))
{
- throw new AppHostNotPEFileException();
+ throw new AppHostNotPEFileException("Subsystem offset out of file range.");
}
ushort* subsystem = ((ushort*)(bytes + peHeaderOffset + SubsystemOffset));
@@ -106,7 +106,7 @@ namespace Microsoft.NET.HostModel.AppHost
// The subsystem of the prebuilt apphost should be set to CUI
if (subsystem[0] != WindowsCUISubsystem)
{
- throw new AppHostNotCUIException();
+ throw new AppHostNotCUIException(subsystem[0]);
}
// Set the subsystem to GUI
@@ -150,7 +150,7 @@ namespace Microsoft.NET.HostModel.AppHost
if (accessor.Capacity < peHeaderOffset + SubsystemOffset + sizeof(ushort))
{
- throw new AppHostNotPEFileException();
+ throw new AppHostNotPEFileException("Subsystem offset out of file range.");
}
ushort* subsystem = ((ushort*)(bytes + peHeaderOffset + SubsystemOffset));
diff --git a/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.AppHost.Tests/AppHostUpdateTests.cs b/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.AppHost.Tests/AppHostUpdateTests.cs
index 1ead2f0ed6f..232410be8f2 100644
--- a/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.AppHost.Tests/AppHostUpdateTests.cs
+++ b/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.AppHost.Tests/AppHostUpdateTests.cs
@@ -313,6 +313,7 @@ namespace Microsoft.NET.HostModel.Tests
windowsGraphicalUserInterface: false,
enableMacOSCodeSign: true));
Assert.Contains($"{destinationFilePath}: is already signed", exception.Message);
+ Assert.True(exception.ExitCode == 1, $"AppHostSigningException.ExitCode - expected: 1, actual: '{exception.ExitCode}'");
}
}
diff --git a/src/libraries/Common/src/Interop/Android/System.Security.Cryptography.Native.Android/Interop.Cipher.cs b/src/libraries/Common/src/Interop/Android/System.Security.Cryptography.Native.Android/Interop.Cipher.cs
index 8b987ce31ea..8cc861a948c 100644
--- a/src/libraries/Common/src/Interop/Android/System.Security.Cryptography.Native.Android/Interop.Cipher.cs
+++ b/src/libraries/Common/src/Interop/Android/System.Security.Cryptography.Native.Android/Interop.Cipher.cs
@@ -136,6 +136,34 @@ internal static partial class Interop
return EvpCipherFinalEx(ctx, ref MemoryMarshal.GetReference(output), out bytesWritten);
}
+ [LibraryImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_AeadCipherFinalEx")]
+ [return: MarshalAs(UnmanagedType.Bool)]
+ private static unsafe partial bool EvpAeadCipherFinalEx(
+ SafeEvpCipherCtxHandle ctx,
+ byte* outm,
+ out int outl,
+ [MarshalAs(UnmanagedType.Bool)] out bool authTagMismatch);
+
+ internal static unsafe bool EvpAeadCipherFinalEx(
+ SafeEvpCipherCtxHandle ctx,
+ Span<byte> output,
+ out int bytesWritten,
+ out bool authTagMismatch)
+ {
+ scoped Span<byte> notNullOutput = output;
+
+ // We can't pass null down to the native shim, so create a valid pointer if we have an empty span.
+ if (notNullOutput.IsEmpty)
+ {
+ notNullOutput = (stackalloc byte[1]).Slice(1);
+ }
+
+ fixed (byte* pOutput = &MemoryMarshal.GetReference(notNullOutput))
+ {
+ return EvpAeadCipherFinalEx(ctx, pOutput, out bytesWritten, out authTagMismatch);
+ }
+ }
+
[LibraryImport(Libraries.AndroidCryptoNative, EntryPoint = "AndroidCryptoNative_CipherSetTagLength")]
[return: MarshalAs(UnmanagedType.Bool)]
internal static partial bool CipherSetTagLength(
diff --git a/src/libraries/Common/src/Interop/OSX/System.Native/Interop.SearchPath.cs b/src/libraries/Common/src/Interop/OSX/System.Native/Interop.SearchPath.cs
index 89681a69c5e..ccb15a00227 100644
--- a/src/libraries/Common/src/Interop/OSX/System.Native/Interop.SearchPath.cs
+++ b/src/libraries/Common/src/Interop/OSX/System.Native/Interop.SearchPath.cs
@@ -19,6 +19,7 @@ internal static partial class Interop
NSDocumentDirectory = 9,
NSDesktopDirectory = 12,
NSCachesDirectory = 13,
+ NSApplicationSupportDirectory = 14,
NSMoviesDirectory = 17,
NSMusicDirectory = 18,
NSPicturesDirectory = 19
diff --git a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Aead.cs b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Aead.cs
new file mode 100644
index 00000000000..62102ac0a59
--- /dev/null
+++ b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Aead.cs
@@ -0,0 +1,120 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System;
+using System.Diagnostics;
+using System.Runtime.InteropServices;
+using System.Security.Cryptography;
+using System.Security.Cryptography.Apple;
+
+internal static partial class Interop
+{
+ internal static partial class AppleCrypto
+ {
+ internal static unsafe void ChaCha20Poly1305Encrypt(
+ ReadOnlySpan<byte> key,
+ ReadOnlySpan<byte> nonce,
+ ReadOnlySpan<byte> plaintext,
+ Span<byte> ciphertext,
+ Span<byte> tag,
+ ReadOnlySpan<byte> aad)
+ {
+ fixed (byte* keyPtr = key)
+ fixed (byte* noncePtr = nonce)
+ fixed (byte* plaintextPtr = plaintext)
+ fixed (byte* ciphertextPtr = ciphertext)
+ fixed (byte* tagPtr = tag)
+ fixed (byte* aadPtr = aad)
+ {
+ const int Success = 1;
+ int result = AppleCryptoNative_ChaCha20Poly1305Encrypt(
+ keyPtr, key.Length,
+ noncePtr, nonce.Length,
+ plaintextPtr, plaintext.Length,
+ ciphertextPtr, ciphertext.Length,
+ tagPtr, tag.Length,
+ aadPtr, aad.Length);
+
+ if (result != Success)
+ {
+ Debug.Assert(result == 0);
+ CryptographicOperations.ZeroMemory(ciphertext);
+ CryptographicOperations.ZeroMemory(tag);
+ throw new CryptographicException();
+ }
+ }
+ }
+
+ internal static unsafe void ChaCha20Poly1305Decrypt(
+ ReadOnlySpan<byte> key,
+ ReadOnlySpan<byte> nonce,
+ ReadOnlySpan<byte> ciphertext,
+ ReadOnlySpan<byte> tag,
+ Span<byte> plaintext,
+ ReadOnlySpan<byte> aad)
+ {
+ fixed (byte* keyPtr = key)
+ fixed (byte* noncePtr = nonce)
+ fixed (byte* ciphertextPtr = ciphertext)
+ fixed (byte* tagPtr = tag)
+ fixed (byte* plaintextPtr = plaintext)
+ fixed (byte* aadPtr = aad)
+ {
+ const int Success = 1;
+ const int AuthTagMismatch = -1;
+ int result = AppleCryptoNative_ChaCha20Poly1305Decrypt(
+ keyPtr, key.Length,
+ noncePtr, nonce.Length,
+ ciphertextPtr, ciphertext.Length,
+ tagPtr, tag.Length,
+ plaintextPtr, plaintext.Length,
+ aadPtr, aad.Length);
+
+ if (result != Success)
+ {
+ CryptographicOperations.ZeroMemory(plaintext);
+
+ if (result == AuthTagMismatch)
+ {
+ throw new AuthenticationTagMismatchException();
+ }
+ else
+ {
+ Debug.Assert(result == 0);
+ throw new CryptographicException();
+ }
+ }
+ }
+ }
+
+ [LibraryImport(Libraries.AppleCryptoNative)]
+ private static unsafe partial int AppleCryptoNative_ChaCha20Poly1305Encrypt(
+ byte* keyPtr,
+ int keyLength,
+ byte* noncePtr,
+ int nonceLength,
+ byte* plaintextPtr,
+ int plaintextLength,
+ byte* ciphertextPtr,
+ int ciphertextLength,
+ byte* tagPtr,
+ int tagLength,
+ byte* aadPtr,
+ int aadLength);
+
+ [LibraryImport(Libraries.AppleCryptoNative)]
+ private static unsafe partial int AppleCryptoNative_ChaCha20Poly1305Decrypt(
+ byte* keyPtr,
+ int keyLength,
+ byte* noncePtr,
+ int nonceLength,
+ byte* ciphertextPtr,
+ int ciphertextLength,
+ byte* tagPtr,
+ int tagLength,
+ byte* plaintextPtr,
+ int plaintextLength,
+ byte* aadPtr,
+ int aadLength);
+ }
+}
diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/BCryptAlgorithmCache.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/BCryptAlgorithmCache.cs
index 5de32d75706..aec34aeb523 100644
--- a/src/libraries/Common/src/Interop/Windows/BCrypt/BCryptAlgorithmCache.cs
+++ b/src/libraries/Common/src/Interop/Windows/BCrypt/BCryptAlgorithmCache.cs
@@ -1,10 +1,8 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-using System;
using System.Diagnostics;
using System.Collections.Concurrent;
-using System.Security.Cryptography;
using Microsoft.Win32.SafeHandles;
@@ -31,30 +29,12 @@ internal static partial class Interop
return result.Handle;
}
- NTSTATUS ntStatus = Interop.BCrypt.BCryptOpenAlgorithmProvider(out SafeBCryptAlgorithmHandle handle, key.hashAlgorithmId, null, key.flags);
- if (ntStatus != NTSTATUS.STATUS_SUCCESS)
- {
- Exception e = Interop.BCrypt.CreateCryptographicException(ntStatus);
- handle.Dispose();
- throw e;
- }
-
- int hashSize;
- ntStatus = Interop.BCrypt.BCryptGetProperty(
- handle,
- Interop.BCrypt.BCryptPropertyStrings.BCRYPT_HASH_LENGTH,
- &hashSize,
- sizeof(int),
- out int cbHashSize,
- 0);
- if (ntStatus != NTSTATUS.STATUS_SUCCESS)
- {
- Exception e = Interop.BCrypt.CreateCryptographicException(ntStatus);
- handle.Dispose();
- throw e;
- }
+ SafeBCryptAlgorithmHandle handle = BCryptOpenAlgorithmProvider(
+ key.hashAlgorithmId,
+ null,
+ key.flags);
- Debug.Assert(cbHashSize == sizeof(int));
+ int hashSize = BCryptGetDWordProperty(handle, BCryptPropertyStrings.BCRYPT_HASH_LENGTH);
Debug.Assert(hashSize > 0);
if (!s_handles.TryAdd(key, (handle, hashSize)))
diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Cng.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Cng.cs
index a54507556dd..cc43b062336 100644
--- a/src/libraries/Common/src/Interop/Windows/BCrypt/Cng.cs
+++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Cng.cs
@@ -70,7 +70,10 @@ namespace Internal.NativeCrypto
public const string BCRYPT_CHAIN_MODE_CFB = "ChainingModeCFB";
public const string BCRYPT_CHAIN_MODE_CCM = "ChainingModeCCM";
- public static SafeAlgorithmHandle BCryptOpenAlgorithmProvider(string pszAlgId, string? pszImplementation, OpenAlgorithmProviderFlags dwFlags)
+ public static SafeAlgorithmHandle BCryptOpenAlgorithmProvider(
+ string pszAlgId,
+ string? pszImplementation = null,
+ OpenAlgorithmProviderFlags dwFlags = 0)
{
SafeAlgorithmHandle hAlgorithm;
NTSTATUS ntStatus = Interop.BCryptOpenAlgorithmProvider(out hAlgorithm, pszAlgId, pszImplementation, (int)dwFlags);
diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptEncryptDecrypt.RSA.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptEncryptDecrypt.RSA.cs
new file mode 100644
index 00000000000..0d28bc9dc2b
--- /dev/null
+++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptEncryptDecrypt.RSA.cs
@@ -0,0 +1,205 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System;
+using System.Runtime.InteropServices;
+
+using Microsoft.Win32.SafeHandles;
+
+internal static partial class Interop
+{
+ internal static partial class BCrypt
+ {
+ [Flags]
+ private enum BCryptEncryptFlags : uint
+ {
+ BCRYPT_PAD_PKCS1 = 2,
+ BCRYPT_PAD_OAEP = 4,
+ }
+
+ [LibraryImport(Libraries.BCrypt)]
+ private static unsafe partial NTSTATUS BCryptEncrypt(
+ SafeBCryptKeyHandle hKey,
+ byte* pbInput,
+ int cbInput,
+ void* paddingInfo,
+ byte* pbIV,
+ int cbIV,
+ byte* pbOutput,
+ int cbOutput,
+ out int cbResult,
+ BCryptEncryptFlags dwFlags);
+
+ [LibraryImport(Libraries.BCrypt)]
+ private static unsafe partial NTSTATUS BCryptDecrypt(
+ SafeBCryptKeyHandle hKey,
+ byte* pbInput,
+ int cbInput,
+ void* paddingInfo,
+ byte* pbIV,
+ int cbIV,
+ byte* pbOutput,
+ int cbOutput,
+ out int cbResult,
+ BCryptEncryptFlags dwFlags);
+
+ private static unsafe int BCryptEncryptRsa(
+ SafeBCryptKeyHandle key,
+ ReadOnlySpan<byte> source,
+ Span<byte> destination,
+ void* pPaddingInfo,
+ BCryptEncryptFlags dwFlags)
+ {
+ // BCryptEncrypt does not accept null/0, only non-null/0.
+ Span<byte> notNull = stackalloc byte[1];
+ scoped ReadOnlySpan<byte> effectiveSource;
+
+ if (source.IsEmpty)
+ {
+ effectiveSource = notNull.Slice(1);
+ }
+ else
+ {
+ effectiveSource = source;
+ }
+
+ NTSTATUS status;
+ int written;
+
+ fixed (byte* pSource = &MemoryMarshal.GetReference(effectiveSource))
+ fixed (byte* pDest = &MemoryMarshal.GetReference(destination))
+ {
+ status = BCryptEncrypt(
+ key,
+ pSource,
+ source.Length,
+ pPaddingInfo,
+ null,
+ 0,
+ pDest,
+ destination.Length,
+ out written,
+ dwFlags);
+ }
+
+ if (status != NTSTATUS.STATUS_SUCCESS)
+ {
+ throw CreateCryptographicException(status);
+ }
+
+ return written;
+ }
+
+ private static unsafe bool BCryptDecryptRsa(
+ SafeBCryptKeyHandle key,
+ ReadOnlySpan<byte> source,
+ Span<byte> destination,
+ void* pPaddingInfo,
+ BCryptEncryptFlags dwFlags,
+ out int bytesWritten)
+ {
+ NTSTATUS status;
+ int written;
+
+ fixed (byte* pSource = &MemoryMarshal.GetReference(source))
+ fixed (byte* pDest = &MemoryMarshal.GetReference(destination))
+ {
+ status = BCryptDecrypt(
+ key,
+ pSource,
+ source.Length,
+ pPaddingInfo,
+ null,
+ 0,
+ pDest,
+ destination.Length,
+ out written,
+ dwFlags);
+ }
+
+ if (status == NTSTATUS.STATUS_SUCCESS)
+ {
+ bytesWritten = written;
+ return true;
+ }
+
+ if (status == NTSTATUS.STATUS_BUFFER_TOO_SMALL)
+ {
+ bytesWritten = 0;
+ return false;
+ }
+
+ throw CreateCryptographicException(status);
+ }
+
+ internal static unsafe int BCryptEncryptPkcs1(
+ SafeBCryptKeyHandle key,
+ ReadOnlySpan<byte> source,
+ Span<byte> destination)
+ {
+ return BCryptEncryptRsa(
+ key,
+ source,
+ destination,
+ null,
+ BCryptEncryptFlags.BCRYPT_PAD_PKCS1);
+ }
+
+ internal static unsafe int BCryptEncryptOaep(
+ SafeBCryptKeyHandle key,
+ ReadOnlySpan<byte> source,
+ Span<byte> destination,
+ string? hashAlgorithmName)
+ {
+ fixed (char* pHashAlg = hashAlgorithmName)
+ {
+ BCRYPT_OAEP_PADDING_INFO paddingInfo = default;
+ paddingInfo.pszAlgId = (IntPtr)pHashAlg;
+
+ return BCryptEncryptRsa(
+ key,
+ source,
+ destination,
+ &paddingInfo,
+ BCryptEncryptFlags.BCRYPT_PAD_OAEP);
+ }
+ }
+
+ internal static unsafe bool BCryptDecryptPkcs1(
+ SafeBCryptKeyHandle key,
+ ReadOnlySpan<byte> source,
+ Span<byte> destination,
+ out int bytesWritten)
+ {
+ return BCryptDecryptRsa(
+ key,
+ source,
+ destination,
+ null,
+ BCryptEncryptFlags.BCRYPT_PAD_PKCS1,
+ out bytesWritten);
+ }
+
+ internal static unsafe bool BCryptDecryptOaep(
+ SafeBCryptKeyHandle key,
+ ReadOnlySpan<byte> source,
+ Span<byte> destination,
+ string? hashAlgorithmName,
+ out int bytesWritten)
+ {
+ fixed (char* pHashAlg = hashAlgorithmName)
+ {
+ BCRYPT_OAEP_PADDING_INFO paddingInfo = default;
+ paddingInfo.pszAlgId = (IntPtr)pHashAlg;
+
+ return BCryptDecryptRsa(
+ key,
+ source,
+ destination,
+ &paddingInfo,
+ BCryptEncryptFlags.BCRYPT_PAD_OAEP,
+ out bytesWritten);
+ }
+ }
+ }
+}
diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptExportKey.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptExportKey.cs
index 6570c7a79b4..3be63fdfe17 100644
--- a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptExportKey.cs
+++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptExportKey.cs
@@ -2,8 +2,8 @@
// The .NET Foundation licenses this file to you under the MIT license.
using System;
-using System.Diagnostics;
using System.Runtime.InteropServices;
+using System.Security.Cryptography;
using Microsoft.Win32.SafeHandles;
@@ -12,6 +12,34 @@ internal static partial class Interop
internal static partial class BCrypt
{
[LibraryImport(Libraries.BCrypt, StringMarshalling = StringMarshalling.Utf16)]
- internal static partial NTSTATUS BCryptExportKey(SafeBCryptKeyHandle hKey, IntPtr hExportKey, string pszBlobType, byte[]? pbOutput, int cbOutput, out int pcbResult, int dwFlags);
+ private static partial NTSTATUS BCryptExportKey(
+ SafeBCryptKeyHandle hKey,
+ IntPtr hExportKey,
+ string pszBlobType,
+ byte[]? pbOutput,
+ int cbOutput,
+ out int pcbResult,
+ int dwFlags);
+
+ internal static ArraySegment<byte> BCryptExportKey(SafeBCryptKeyHandle key, string blobType)
+ {
+ int numBytesNeeded;
+ NTSTATUS ntStatus = BCryptExportKey(key, IntPtr.Zero, blobType, null, 0, out numBytesNeeded, 0);
+
+ if (ntStatus != NTSTATUS.STATUS_SUCCESS)
+ {
+ throw CreateCryptographicException(ntStatus);
+ }
+
+ byte[] rented = CryptoPool.Rent(numBytesNeeded);
+ ntStatus = BCryptExportKey(key, IntPtr.Zero, blobType, rented, numBytesNeeded, out numBytesNeeded, 0);
+
+ if (ntStatus != NTSTATUS.STATUS_SUCCESS)
+ {
+ throw CreateCryptographicException(ntStatus);
+ }
+
+ return new ArraySegment<byte>(rented, 0, numBytesNeeded);
+ }
}
}
diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptFinalizeKey.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptFinalizeKey.cs
new file mode 100644
index 00000000000..75c382ff13f
--- /dev/null
+++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptFinalizeKey.cs
@@ -0,0 +1,28 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System;
+using System.Runtime.InteropServices;
+
+using Microsoft.Win32.SafeHandles;
+
+internal static partial class Interop
+{
+ internal static partial class BCrypt
+ {
+ [LibraryImport(Libraries.BCrypt)]
+ private static unsafe partial NTSTATUS BCryptFinalizeKeyPair(
+ SafeBCryptKeyHandle hKey,
+ uint dwFlags);
+
+ internal static void BCryptFinalizeKeyPair(SafeBCryptKeyHandle key)
+ {
+ NTSTATUS status = BCryptFinalizeKeyPair(key, 0);
+
+ if (status != NTSTATUS.STATUS_SUCCESS)
+ {
+ throw CreateCryptographicException(status);
+ }
+ }
+ }
+}
diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptGenerateKeyPair.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptGenerateKeyPair.cs
new file mode 100644
index 00000000000..98a00b63009
--- /dev/null
+++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptGenerateKeyPair.cs
@@ -0,0 +1,38 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Runtime.InteropServices;
+
+using Microsoft.Win32.SafeHandles;
+
+internal static partial class Interop
+{
+ internal static partial class BCrypt
+ {
+ [LibraryImport(Libraries.BCrypt)]
+ private static unsafe partial NTSTATUS BCryptGenerateKeyPair(
+ SafeBCryptAlgorithmHandle hAlgorithm,
+ out SafeBCryptKeyHandle phKey,
+ int dwLength,
+ uint dwFlags);
+
+ internal static SafeBCryptKeyHandle BCryptGenerateKeyPair(
+ SafeBCryptAlgorithmHandle hAlgorithm,
+ int keyLength)
+ {
+ NTSTATUS status = BCryptGenerateKeyPair(
+ hAlgorithm,
+ out SafeBCryptKeyHandle hKey,
+ keyLength,
+ 0);
+
+ if (status != NTSTATUS.STATUS_SUCCESS)
+ {
+ hKey.Dispose();
+ throw CreateCryptographicException(status);
+ }
+
+ return hKey;
+ }
+ }
+}
diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptGetProperty.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptGetProperty.cs
index 2e56b42e381..0dfd951a5aa 100644
--- a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptGetProperty.cs
+++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptGetProperty.cs
@@ -1,9 +1,8 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-using System;
-using System.Diagnostics;
using System.Runtime.InteropServices;
+using System.Security.Cryptography;
using Microsoft.Win32.SafeHandles;
@@ -12,6 +11,37 @@ internal static partial class Interop
internal static partial class BCrypt
{
[LibraryImport(Libraries.BCrypt, StringMarshalling = StringMarshalling.Utf16)]
- internal static unsafe partial NTSTATUS BCryptGetProperty(SafeBCryptHandle hObject, string pszProperty, void* pbOutput, int cbOutput, out int pcbResult, int dwFlags);
+ internal static unsafe partial NTSTATUS BCryptGetProperty(
+ SafeBCryptHandle hObject,
+ string pszProperty,
+ void* pbOutput,
+ int cbOutput,
+ out int pcbResult,
+ int dwFlags);
+
+ internal static unsafe int BCryptGetDWordProperty(SafeBCryptHandle hObject, string pszProperty)
+ {
+ int ret = 0;
+
+ NTSTATUS status = BCryptGetProperty(
+ hObject,
+ pszProperty,
+ &ret,
+ sizeof(int),
+ out int written,
+ 0);
+
+ if (status != NTSTATUS.STATUS_SUCCESS)
+ {
+ throw CreateCryptographicException(status);
+ }
+
+ if (written != sizeof(int))
+ {
+ throw new CryptographicException();
+ }
+
+ return ret;
+ }
}
}
diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptImportKeyPair.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptImportKeyPair.cs
new file mode 100644
index 00000000000..dd877b544d6
--- /dev/null
+++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptImportKeyPair.cs
@@ -0,0 +1,52 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System;
+using System.Runtime.InteropServices;
+
+using Microsoft.Win32.SafeHandles;
+
+internal static partial class Interop
+{
+ internal static partial class BCrypt
+ {
+ [LibraryImport(Libraries.BCrypt, StringMarshalling = StringMarshalling.Utf16)]
+ private static unsafe partial NTSTATUS BCryptImportKeyPair(
+ SafeBCryptAlgorithmHandle hAlgorithm,
+ IntPtr hImportKey,
+ string pszBlobType,
+ out SafeBCryptKeyHandle phKey,
+ byte* pbInput,
+ int cbInput,
+ uint dwFlags);
+
+ internal static unsafe SafeBCryptKeyHandle BCryptImportKeyPair(
+ SafeBCryptAlgorithmHandle algorithm,
+ string blobType,
+ ReadOnlySpan<byte> keyBlob)
+ {
+ NTSTATUS status;
+ SafeBCryptKeyHandle key;
+
+ fixed (byte* pBlob = keyBlob)
+ {
+ status = BCryptImportKeyPair(
+ algorithm,
+ IntPtr.Zero,
+ blobType,
+ out key,
+ pBlob,
+ keyBlob.Length,
+ 0);
+ }
+
+ if (status != NTSTATUS.STATUS_SUCCESS)
+ {
+ key.Dispose();
+ throw CreateCryptographicException(status);
+ }
+
+ return key;
+ }
+ }
+}
diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptOpenAlgorithmProvider.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptOpenAlgorithmProvider.cs
index 8b73a512918..af8875c0397 100644
--- a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptOpenAlgorithmProvider.cs
+++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptOpenAlgorithmProvider.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
using System;
-using System.Diagnostics;
using System.Runtime.InteropServices;
using Microsoft.Win32.SafeHandles;
@@ -12,7 +11,31 @@ internal static partial class Interop
internal static partial class BCrypt
{
[LibraryImport(Libraries.BCrypt, StringMarshalling = StringMarshalling.Utf16)]
- internal static partial NTSTATUS BCryptOpenAlgorithmProvider(out SafeBCryptAlgorithmHandle phAlgorithm, string pszAlgId, string? pszImplementation, BCryptOpenAlgorithmProviderFlags dwFlags);
+ internal static partial NTSTATUS BCryptOpenAlgorithmProvider(
+ out SafeBCryptAlgorithmHandle phAlgorithm,
+ string pszAlgId,
+ string? pszImplementation,
+ BCryptOpenAlgorithmProviderFlags dwFlags);
+
+ internal static SafeBCryptAlgorithmHandle BCryptOpenAlgorithmProvider(
+ string pszAlgId,
+ string? pszImplementation = null,
+ BCryptOpenAlgorithmProviderFlags dwFlags = 0)
+ {
+ NTSTATUS status = BCryptOpenAlgorithmProvider(
+ out SafeBCryptAlgorithmHandle hAlgorithm,
+ pszAlgId,
+ pszImplementation,
+ dwFlags);
+
+ if (status != NTSTATUS.STATUS_SUCCESS)
+ {
+ hAlgorithm.Dispose();
+ throw CreateCryptographicException(status);
+ }
+
+ return hAlgorithm;
+ }
[Flags]
internal enum BCryptOpenAlgorithmProviderFlags : int
diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptPropertyStrings.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptPropertyStrings.cs
index 3636abdea7e..8c7b67476a6 100644
--- a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptPropertyStrings.cs
+++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptPropertyStrings.cs
@@ -11,6 +11,7 @@ internal static partial class Interop
internal const string BCRYPT_ECC_PARAMETERS = "ECCParameters";
internal const string BCRYPT_EFFECTIVE_KEY_LENGTH = "EffectiveKeyLength";
internal const string BCRYPT_HASH_LENGTH = "HashDigestLength";
+ internal const string BCRYPT_KEY_STRENGTH = "KeyStrength";
internal const string BCRYPT_MESSAGE_BLOCK_LENGTH = "MessageBlockLength";
}
}
diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptSignHash.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptSignHash.cs
new file mode 100644
index 00000000000..4bacf465c5a
--- /dev/null
+++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptSignHash.cs
@@ -0,0 +1,77 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System;
+using System.Runtime.InteropServices;
+
+using Microsoft.Win32.SafeHandles;
+
+internal static partial class Interop
+{
+ internal static partial class BCrypt
+ {
+ [LibraryImport(Libraries.BCrypt)]
+ private static unsafe partial NTSTATUS BCryptSignHash(
+ SafeBCryptKeyHandle hKey,
+ void* pPaddingInfo,
+ byte* pbInput,
+ int cbInput,
+ byte* pbOutput,
+ int cbOutput,
+ out int pcbResult,
+ BCryptSignVerifyFlags dwFlags);
+
+ internal static unsafe NTSTATUS BCryptSignHashPkcs1(
+ SafeBCryptKeyHandle key,
+ ReadOnlySpan<byte> hash,
+ Span<byte> destination,
+ string hashAlgorithmName,
+ out int bytesWritten)
+ {
+ fixed (char* pHashAlgorithmName = hashAlgorithmName)
+ fixed (byte* pHash = &MemoryMarshal.GetReference(hash))
+ fixed (byte* pDest = &MemoryMarshal.GetReference(destination))
+ {
+ BCRYPT_PKCS1_PADDING_INFO paddingInfo = default;
+ paddingInfo.pszAlgId = (IntPtr)pHashAlgorithmName;
+
+ return BCryptSignHash(
+ key,
+ &paddingInfo,
+ pHash,
+ hash.Length,
+ pDest,
+ destination.Length,
+ out bytesWritten,
+ BCryptSignVerifyFlags.BCRYPT_PAD_PKCS1);
+ }
+ }
+
+ internal static unsafe NTSTATUS BCryptSignHashPss(
+ SafeBCryptKeyHandle key,
+ ReadOnlySpan<byte> hash,
+ Span<byte> destination,
+ string hashAlgorithmName,
+ out int bytesWritten)
+ {
+ fixed (char* pHashAlgorithmName = hashAlgorithmName)
+ fixed (byte* pHash = &MemoryMarshal.GetReference(hash))
+ fixed (byte* pDest = &MemoryMarshal.GetReference(destination))
+ {
+ BCRYPT_PSS_PADDING_INFO paddingInfo = default;
+ paddingInfo.pszAlgId = (IntPtr)pHashAlgorithmName;
+ paddingInfo.cbSalt = hash.Length;
+
+ return BCryptSignHash(
+ key,
+ &paddingInfo,
+ pHash,
+ hash.Length,
+ pDest,
+ destination.Length,
+ out bytesWritten,
+ BCryptSignVerifyFlags.BCRYPT_PAD_PSS);
+ }
+ }
+ }
+}
diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptVerifySignature.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptVerifySignature.cs
new file mode 100644
index 00000000000..02e65df9580
--- /dev/null
+++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptVerifySignature.cs
@@ -0,0 +1,88 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System;
+using System.Runtime.InteropServices;
+
+using Microsoft.Win32.SafeHandles;
+
+internal static partial class Interop
+{
+ internal static partial class BCrypt
+ {
+ [Flags]
+ private enum BCryptSignVerifyFlags : uint
+ {
+ BCRYPT_PAD_PKCS1 = 2,
+ BCRYPT_PAD_PSS = 8,
+ }
+
+ [LibraryImport(Libraries.BCrypt)]
+ private static unsafe partial NTSTATUS BCryptVerifySignature(
+ SafeBCryptKeyHandle hKey,
+ void* pPaddingInfo,
+ byte* pbHash,
+ int cbHash,
+ byte* pbSignature,
+ int cbSignature,
+ BCryptSignVerifyFlags dwFlags);
+
+ internal static unsafe bool BCryptVerifySignaturePkcs1(
+ SafeBCryptKeyHandle key,
+ ReadOnlySpan<byte> hash,
+ ReadOnlySpan<byte> signature,
+ string hashAlgorithmName)
+ {
+ NTSTATUS status;
+
+ fixed (char* pHashAlgorithmName = hashAlgorithmName)
+ fixed (byte* pHash = &MemoryMarshal.GetReference(hash))
+ fixed (byte* pSignature = &MemoryMarshal.GetReference(signature))
+ {
+ BCRYPT_PKCS1_PADDING_INFO paddingInfo = default;
+ paddingInfo.pszAlgId = (IntPtr)pHashAlgorithmName;
+
+ status = BCryptVerifySignature(
+ key,
+ &paddingInfo,
+ pHash,
+ hash.Length,
+ pSignature,
+ signature.Length,
+ BCryptSignVerifyFlags.BCRYPT_PAD_PKCS1);
+ }
+
+ return status == NTSTATUS.STATUS_SUCCESS;
+ }
+
+ internal static unsafe bool BCryptVerifySignaturePss(
+ SafeBCryptKeyHandle key,
+ ReadOnlySpan<byte> hash,
+ ReadOnlySpan<byte> signature,
+ string hashAlgorithmName)
+ {
+
+ NTSTATUS status;
+
+ fixed (char* pHashAlgorithmName = hashAlgorithmName)
+ fixed (byte* pHash = &MemoryMarshal.GetReference(hash))
+ fixed (byte* pSignature = &MemoryMarshal.GetReference(signature))
+ {
+ BCRYPT_PSS_PADDING_INFO paddingInfo = default;
+ paddingInfo.pszAlgId = (IntPtr)pHashAlgorithmName;
+ paddingInfo.cbSalt = hash.Length;
+
+ status = BCryptVerifySignature(
+ key,
+ &paddingInfo,
+ pHash,
+ hash.Length,
+ pSignature,
+ signature.Length,
+ BCryptSignVerifyFlags.BCRYPT_PAD_PSS);
+ }
+
+ return status == NTSTATUS.STATUS_SUCCESS;
+ }
+ }
+}
diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.Blobs.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.Blobs.cs
index 302e2aff864..24fc43f96f9 100644
--- a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.Blobs.cs
+++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.Blobs.cs
@@ -63,8 +63,17 @@ internal static partial class Interop
/// </summary>
internal static byte[] Consume(byte[] blob, ref int offset, int count)
{
- byte[] value = new byte[count];
- Buffer.BlockCopy(blob, offset, value, 0, count);
+ byte[] value = new ReadOnlySpan<byte>(blob, offset, count).ToArray();
+ offset += count;
+ return value;
+ }
+
+ /// <summary>
+ /// Peel off the next "count" bytes in blob and return them in a byte array.
+ /// </summary>
+ internal static byte[] Consume(ReadOnlySpan<byte> blob, ref int offset, int count)
+ {
+ byte[] value = blob.Slice(offset, count).ToArray();
offset += count;
return value;
}
diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.NTSTATUS.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.NTSTATUS.cs
index 051f2193898..060aa3e517f 100644
--- a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.NTSTATUS.cs
+++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.NTSTATUS.cs
@@ -8,9 +8,11 @@ internal static partial class Interop
internal enum NTSTATUS : uint
{
STATUS_SUCCESS = 0x0,
+ STATUS_UNSUCCESSFUL = 0xC0000001,
STATUS_NOT_FOUND = 0xc0000225,
STATUS_INVALID_PARAMETER = 0xc000000d,
STATUS_NO_MEMORY = 0xc0000017,
+ STATUS_BUFFER_TOO_SMALL = 0xC0000023,
STATUS_AUTH_TAG_MISMATCH = 0xc000a002,
}
}
diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertCreateCertificateContext.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertCreateCertificateContext.cs
deleted file mode 100644
index cb4ea0c6c4a..00000000000
--- a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertCreateCertificateContext.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.Runtime.InteropServices;
-using Microsoft.Win32.SafeHandles;
-
-internal static partial class Interop
-{
- internal static partial class Crypt32
- {
- [LibraryImport(Libraries.Crypt32, SetLastError = true)]
- internal static unsafe partial SafeCertContextHandle CertCreateCertificateContext(
- MsgEncodingType dwCertEncodingType,
- void* pbCertEncoded,
- int cbCertEncoded);
- }
-}
diff --git a/src/libraries/Common/src/System/IO/PathInternal.Unix.cs b/src/libraries/Common/src/System/IO/PathInternal.Unix.cs
index 5bb8ab93fd9..4914071a448 100644
--- a/src/libraries/Common/src/System/IO/PathInternal.Unix.cs
+++ b/src/libraries/Common/src/System/IO/PathInternal.Unix.cs
@@ -17,6 +17,7 @@ namespace System.IO
internal const string DirectorySeparatorCharAsString = "/";
internal const string ParentDirectoryPrefix = @"../";
internal const string DirectorySeparators = DirectorySeparatorCharAsString;
+ internal static ReadOnlySpan<byte> Utf8DirectorySeparators => "/"u8;
internal static int GetRootLength(ReadOnlySpan<char> path)
{
diff --git a/src/libraries/Common/src/System/IO/PathInternal.Windows.cs b/src/libraries/Common/src/System/IO/PathInternal.Windows.cs
index 3bc5b493c37..e0aff528555 100644
--- a/src/libraries/Common/src/System/IO/PathInternal.Windows.cs
+++ b/src/libraries/Common/src/System/IO/PathInternal.Windows.cs
@@ -55,6 +55,7 @@ namespace System.IO
internal const string DevicePathPrefix = @"\\.\";
internal const string ParentDirectoryPrefix = @"..\";
internal const string DirectorySeparators = @"\/";
+ internal static ReadOnlySpan<byte> Utf8DirectorySeparators => @"\/"u8;
internal const int MaxShortPath = 260;
internal const int MaxShortDirectoryPath = 248;
diff --git a/src/libraries/Common/src/System/Reflection/AssemblyMetadataAttribute.cs b/src/libraries/Common/src/System/Reflection/AssemblyMetadataAttribute.cs
deleted file mode 100644
index b0948b0c4aa..00000000000
--- a/src/libraries/Common/src/System/Reflection/AssemblyMetadataAttribute.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-namespace System.Reflection
-{
- [AttributeUsage(AttributeTargets.Assembly, AllowMultiple=true, Inherited=false)]
- internal sealed class AssemblyMetadataAttribute : Attribute
- {
- private string m_key;
- private string m_value;
-
- public AssemblyMetadataAttribute(string key, string value)
- {
- m_key = key;
- m_value = value;
- }
-
- public string Key
- {
- get { return m_key; }
- }
-
- public string Value
- {
- get { return m_value;}
- }
- }
-}
diff --git a/src/libraries/Common/src/System/Runtime/InteropServices/ComEventsMethod.cs b/src/libraries/Common/src/System/Runtime/InteropServices/ComEventsMethod.cs
index 9da0795ec6e..9ffd267a881 100644
--- a/src/libraries/Common/src/System/Runtime/InteropServices/ComEventsMethod.cs
+++ b/src/libraries/Common/src/System/Runtime/InteropServices/ComEventsMethod.cs
@@ -3,6 +3,7 @@
using System.Collections.Generic;
using System.Diagnostics;
+using System.Threading;
using System.Reflection;
namespace System.Runtime.InteropServices
@@ -99,7 +100,7 @@ namespace System.Runtime.InteropServices
/// Since multicast delegate's built-in chaining supports only chaining instances of the same type,
/// we need to complement this design by using an explicit linked list data structure.
/// </summary>
- private readonly List<DelegateWrapper> _delegateWrappers = new List<DelegateWrapper>();
+ private DelegateWrapper[] _delegateWrappers = Array.Empty<DelegateWrapper>();
private readonly int _dispid;
private ComEventsMethod? _next;
@@ -154,48 +155,36 @@ namespace System.Runtime.InteropServices
public bool Empty
{
- get
- {
- lock (_delegateWrappers)
- {
- return _delegateWrappers.Count == 0;
- }
- }
+ get => _delegateWrappers.Length == 0;
}
public void AddDelegate(Delegate d, bool wrapArgs = false)
{
- lock (_delegateWrappers)
+ DelegateWrapper[] wrappers, newWrappers;
+ do
{
- // Update an existing delegate wrapper
- foreach (DelegateWrapper wrapper in _delegateWrappers)
- {
- if (wrapper.Delegate.GetType() == d.GetType() && wrapper.WrapArgs == wrapArgs)
- {
- wrapper.Delegate = Delegate.Combine(wrapper.Delegate, d);
- return;
- }
- }
-
- var newWrapper = new DelegateWrapper(d, wrapArgs);
- _delegateWrappers.Add(newWrapper);
- }
+ wrappers = _delegateWrappers;
+ newWrappers = new DelegateWrapper[wrappers.Length + 1];
+ wrappers.CopyTo(newWrappers, 0);
+ newWrappers[^1] = new DelegateWrapper(d, wrapArgs);
+ } while (!PublishNewWrappers(newWrappers, wrappers));
}
public void RemoveDelegate(Delegate d, bool wrapArgs = false)
{
- lock (_delegateWrappers)
+ DelegateWrapper[] wrappers, newWrappers;
+ do
{
+ wrappers = _delegateWrappers;
+
// Find delegate wrapper index
int removeIdx = -1;
- DelegateWrapper? wrapper = null;
- for (int i = 0; i < _delegateWrappers.Count; i++)
+ for (int i = 0; i < wrappers.Length; i++)
{
- DelegateWrapper wrapperMaybe = _delegateWrappers[i];
- if (wrapperMaybe.Delegate.GetType() == d.GetType() && wrapperMaybe.WrapArgs == wrapArgs)
+ DelegateWrapper wrapperMaybe = wrappers[i];
+ if (wrapperMaybe.Delegate == d && wrapperMaybe.WrapArgs == wrapArgs)
{
removeIdx = i;
- wrapper = wrapperMaybe;
break;
}
}
@@ -206,51 +195,23 @@ namespace System.Runtime.InteropServices
return;
}
- // Update wrapper or remove from collection
- Delegate? newDelegate = Delegate.Remove(wrapper!.Delegate, d);
- if (newDelegate != null)
- {
- wrapper.Delegate = newDelegate;
- }
- else
- {
- _delegateWrappers.RemoveAt(removeIdx);
- }
- }
+ newWrappers = new DelegateWrapper[wrappers.Length - 1];
+ wrappers.AsSpan(0, removeIdx).CopyTo(newWrappers);
+ wrappers.AsSpan(removeIdx + 1).CopyTo(newWrappers.AsSpan(removeIdx));
+ } while (!PublishNewWrappers(newWrappers, wrappers));
}
public void RemoveDelegates(Func<Delegate, bool> condition)
{
- lock (_delegateWrappers)
+ DelegateWrapper[] wrappers, newWrappers;
+ do
{
- // Find delegate wrapper indexes. Iterate in reverse such that the list to remove is sorted by high to low index.
- List<int> toRemove = new List<int>();
- for (int i = _delegateWrappers.Count - 1; i >= 0; i--)
- {
- DelegateWrapper wrapper = _delegateWrappers[i];
- Delegate[] invocationList = wrapper.Delegate.GetInvocationList();
- foreach (Delegate delegateMaybe in invocationList)
- {
- if (condition(delegateMaybe))
- {
- Delegate? newDelegate = Delegate.Remove(wrapper!.Delegate, delegateMaybe);
- if (newDelegate != null)
- {
- wrapper.Delegate = newDelegate;
- }
- else
- {
- toRemove.Add(i);
- }
- }
- }
- }
-
- foreach (int idx in toRemove)
- {
- _delegateWrappers.RemoveAt(idx);
- }
+ wrappers = _delegateWrappers;
+ List<DelegateWrapper> tmp = new(wrappers);
+ tmp.RemoveAll(w => condition(w.Delegate));
+ newWrappers = tmp.ToArray();
}
+ while (!PublishNewWrappers(newWrappers, wrappers));
}
public object? Invoke(object[] args)
@@ -258,15 +219,18 @@ namespace System.Runtime.InteropServices
Debug.Assert(!Empty);
object? result = null;
- lock (_delegateWrappers)
+ foreach (DelegateWrapper wrapper in _delegateWrappers)
{
- foreach (DelegateWrapper wrapper in _delegateWrappers)
- {
- result = wrapper.Invoke(args);
- }
+ result = wrapper.Invoke(args);
}
return result;
}
+
+ // Attempt to update the member wrapper field
+ private bool PublishNewWrappers(DelegateWrapper[] newWrappers, DelegateWrapper[] currentMaybe)
+ {
+ return Interlocked.CompareExchange(ref _delegateWrappers, newWrappers, currentMaybe) == currentMaybe;
+ }
}
}
diff --git a/src/libraries/Common/src/System/Runtime/InteropServices/WindowsRuntime/WindowsRuntimeImportAttribute.cs b/src/libraries/Common/src/System/Runtime/InteropServices/WindowsRuntime/WindowsRuntimeImportAttribute.cs
deleted file mode 100644
index 64ec4467df1..00000000000
--- a/src/libraries/Common/src/System/Runtime/InteropServices/WindowsRuntime/WindowsRuntimeImportAttribute.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-namespace System.Runtime.InteropServices.WindowsRuntime
-{
- // Types decorated with this attribute are treated specially by the compiler. A "windowsruntime" bit is set in their metadata.
- [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Enum | AttributeTargets.Struct | AttributeTargets.Delegate, Inherited = false)]
- internal sealed class WindowsRuntimeImportAttribute : Attribute
- {
- public WindowsRuntimeImportAttribute() { }
- }
-}
diff --git a/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanAndroid.cs b/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanAndroid.cs
index e7562198ac0..8f36a7e1a95 100644
--- a/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanAndroid.cs
+++ b/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanAndroid.cs
@@ -35,11 +35,7 @@ namespace System.Security.Cryptography
KeySizeValue = _key.KeySize;
}
- public override KeySizes[] LegalKeySizes =>
- new[] {
- new KeySizes(minSize: 256, maxSize: 384, skipSize: 128),
- new KeySizes(minSize: 521, maxSize: 521, skipSize: 0)
- };
+ public override KeySizes[] LegalKeySizes => s_defaultKeySizes.CloneKeySizesArray();
protected override void Dispose(bool disposing)
{
diff --git a/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanCng.cs b/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanCng.cs
index b79dd9474a9..a25cfcc3a4f 100644
--- a/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanCng.cs
+++ b/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanCng.cs
@@ -66,17 +66,8 @@ namespace System.Security.Cryptography
KeySizeValue = newKeySize;
}
- public override KeySizes[] LegalKeySizes
- {
- get
- {
- // Return the three sizes that can be explicitly set (for backwards compatibility)
- return new[] {
- new KeySizes(minSize: 256, maxSize: 384, skipSize: 128),
- new KeySizes(minSize: 521, maxSize: 521, skipSize: 0),
- };
- }
- }
+ // Return the three sizes that can be explicitly set (for backwards compatibility)
+ public override KeySizes[] LegalKeySizes => s_defaultKeySizes.CloneKeySizesArray();
public override byte[] DeriveKeyFromHash(
ECDiffieHellmanPublicKey otherPartyPublicKey,
diff --git a/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanOpenSsl.cs b/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanOpenSsl.cs
index 7855638b639..2f962e19fc3 100644
--- a/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanOpenSsl.cs
+++ b/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanOpenSsl.cs
@@ -45,11 +45,7 @@ namespace System.Security.Cryptography
_key = new ECOpenSsl(this);
}
- public override KeySizes[] LegalKeySizes =>
- new[] {
- new KeySizes(minSize: 256, maxSize: 384, skipSize: 128),
- new KeySizes(minSize: 521, maxSize: 521, skipSize: 0)
- };
+ public override KeySizes[] LegalKeySizes => s_defaultKeySizes.CloneKeySizesArray();
protected override void Dispose(bool disposing)
{
diff --git a/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanSecurityTransforms.cs b/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanSecurityTransforms.cs
index dd5a73838a1..496ee778970 100644
--- a/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanSecurityTransforms.cs
+++ b/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanSecurityTransforms.cs
@@ -27,18 +27,8 @@ namespace System.Security.Cryptography
KeySizeValue = _ecc.SetKeyAndGetSize(SecKeyPair.PublicPrivatePair(publicKey, privateKey));
}
- public override KeySizes[] LegalKeySizes
- {
- get
- {
- // Return the three sizes that can be explicitly set (for backwards compatibility)
- return new[]
- {
- new KeySizes(minSize: 256, maxSize: 384, skipSize: 128),
- new KeySizes(minSize: 521, maxSize: 521, skipSize: 0),
- };
- }
- }
+ // Return the three sizes that can be explicitly set (for backwards compatibility)
+ public override KeySizes[] LegalKeySizes => s_defaultKeySizes.CloneKeySizesArray();
public override int KeySize
{
diff --git a/src/libraries/Common/src/System/Security/Cryptography/ECDsaAndroid.cs b/src/libraries/Common/src/System/Security/Cryptography/ECDsaAndroid.cs
index 3b09a8045d0..0aac5fc91d9 100644
--- a/src/libraries/Common/src/System/Security/Cryptography/ECDsaAndroid.cs
+++ b/src/libraries/Common/src/System/Security/Cryptography/ECDsaAndroid.cs
@@ -68,17 +68,8 @@ namespace System.Security.Cryptography
KeySizeValue = newKeySize;
}
- public override KeySizes[] LegalKeySizes
- {
- get
- {
- // Return the three sizes that can be explicitly set (for backwards compatibility)
- return new[] {
- new KeySizes(minSize: 256, maxSize: 384, skipSize: 128),
- new KeySizes(minSize: 521, maxSize: 521, skipSize: 0),
- };
- }
- }
+ // Return the three sizes that can be explicitly set (for backwards compatibility)
+ public override KeySizes[] LegalKeySizes => s_defaultKeySizes.CloneKeySizesArray();
public override byte[] SignHash(byte[] hash)
{
diff --git a/src/libraries/Common/src/System/Security/Cryptography/ECDsaCng.cs b/src/libraries/Common/src/System/Security/Cryptography/ECDsaCng.cs
index 0edc06e4880..426a6bdd4ad 100644
--- a/src/libraries/Common/src/System/Security/Cryptography/ECDsaCng.cs
+++ b/src/libraries/Common/src/System/Security/Cryptography/ECDsaCng.cs
@@ -83,16 +83,7 @@ namespace System.Security.Cryptography
KeySizeValue = newKeySize;
}
- public override KeySizes[] LegalKeySizes
- {
- get
- {
- // Return the three sizes that can be explicitly set (for backwards compatibility)
- return new[] {
- new KeySizes(minSize: 256, maxSize: 384, skipSize: 128),
- new KeySizes(minSize: 521, maxSize: 521, skipSize: 0),
- };
- }
- }
+ // Return the three sizes that can be explicitly set (for backwards compatibility)
+ public override KeySizes[] LegalKeySizes => s_defaultKeySizes.CloneKeySizesArray();
}
}
diff --git a/src/libraries/Common/src/System/Security/Cryptography/ECDsaOpenSsl.cs b/src/libraries/Common/src/System/Security/Cryptography/ECDsaOpenSsl.cs
index 0e681955ae5..242711f8e5c 100644
--- a/src/libraries/Common/src/System/Security/Cryptography/ECDsaOpenSsl.cs
+++ b/src/libraries/Common/src/System/Security/Cryptography/ECDsaOpenSsl.cs
@@ -78,17 +78,8 @@ namespace System.Security.Cryptography
KeySizeValue = newKeySize;
}
- public override KeySizes[] LegalKeySizes
- {
- get
- {
- // Return the three sizes that can be explicitly set (for backwards compatibility)
- return new[] {
- new KeySizes(minSize: 256, maxSize: 384, skipSize: 128),
- new KeySizes(minSize: 521, maxSize: 521, skipSize: 0),
- };
- }
- }
+ // Return the three sizes that can be explicitly set (for backwards compatibility)
+ public override KeySizes[] LegalKeySizes => s_defaultKeySizes.CloneKeySizesArray();
public override byte[] SignHash(byte[] hash)
{
diff --git a/src/libraries/Common/src/System/Security/Cryptography/ECDsaSecurityTransforms.cs b/src/libraries/Common/src/System/Security/Cryptography/ECDsaSecurityTransforms.cs
index 7eaeb3b0b36..e02ea25ae2f 100644
--- a/src/libraries/Common/src/System/Security/Cryptography/ECDsaSecurityTransforms.cs
+++ b/src/libraries/Common/src/System/Security/Cryptography/ECDsaSecurityTransforms.cs
@@ -28,17 +28,8 @@ namespace System.Security.Cryptography
KeySizeValue = _ecc.SetKeyAndGetSize(SecKeyPair.PublicPrivatePair(publicKey, privateKey));
}
- public override KeySizes[] LegalKeySizes
- {
- get
- {
- // Return the three sizes that can be explicitly set (for backwards compatibility)
- return new[] {
- new KeySizes(minSize: 256, maxSize: 384, skipSize: 128),
- new KeySizes(minSize: 521, maxSize: 521, skipSize: 0),
- };
- }
- }
+ // Return the three sizes that can be explicitly set (for backwards compatibility)
+ public override KeySizes[] LegalKeySizes => s_defaultKeySizes.CloneKeySizesArray();
public override int KeySize
{
diff --git a/src/libraries/Common/src/System/Security/Cryptography/RSACng.ImportExport.cs b/src/libraries/Common/src/System/Security/Cryptography/RSACng.ImportExport.cs
index 928bf654c93..2d0129412d9 100644
--- a/src/libraries/Common/src/System/Security/Cryptography/RSACng.ImportExport.cs
+++ b/src/libraries/Common/src/System/Security/Cryptography/RSACng.ImportExport.cs
@@ -1,25 +1,19 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-using System.Diagnostics;
-using Internal.Cryptography;
using Internal.NativeCrypto;
-using ErrorCode = Interop.NCrypt.ErrorCode;
-using KeyBlobMagicNumber = Interop.BCrypt.KeyBlobMagicNumber;
-using BCRYPT_RSAKEY_BLOB = Interop.BCrypt.BCRYPT_RSAKEY_BLOB;
-
namespace System.Security.Cryptography
{
public sealed partial class RSACng : RSA
{
/// <summary>
- /// <para>
- /// ImportParameters will replace the existing key that RSACng is working with by creating a
- /// new CngKey for the parameters structure. If the parameters structure contains only an
- /// exponent and modulus, then only a public key will be imported. If the parameters also
- /// contain P and Q values, then a full key pair will be imported.
- /// </para>
+ /// <para>
+ /// ImportParameters will replace the existing key that RSACng is working with by creating a
+ /// new CngKey for the parameters structure. If the parameters structure contains only an
+ /// exponent and modulus, then only a public key will be imported. If the parameters also
+ /// contain P and Q values, then a full key pair will be imported.
+ /// </para>
/// </summary>
/// <exception cref="ArgumentException">
/// if <paramref name="parameters" /> contains neither an exponent nor a modulus.
@@ -30,336 +24,166 @@ namespace System.Security.Cryptography
/// </exception>
public override unsafe void ImportParameters(RSAParameters parameters)
{
- if (parameters.Exponent == null || parameters.Modulus == null)
- throw new CryptographicException(SR.Cryptography_InvalidRsaParameters);
+ ArraySegment<byte> keyBlob = parameters.ToBCryptBlob();
- bool includePrivate;
- if (parameters.D == null)
+ try
{
- includePrivate = false;
-
- if (parameters.P != null ||
- parameters.DP != null ||
- parameters.Q != null ||
- parameters.DQ != null ||
- parameters.InverseQ != null)
- {
- throw new CryptographicException(SR.Cryptography_InvalidRsaParameters);
- }
- }
- else
- {
- includePrivate = true;
-
- if (parameters.P == null ||
- parameters.DP == null ||
- parameters.Q == null ||
- parameters.DQ == null ||
- parameters.InverseQ == null)
- {
- throw new CryptographicException(SR.Cryptography_InvalidRsaParameters);
- }
-
- // Half, rounded up.
- int halfModulusLength = (parameters.Modulus.Length + 1) / 2;
-
- // The same checks are done by RSACryptoServiceProvider on import (when building the key blob)
- // Historically RSACng let CNG handle this (reporting NTE_NOT_SUPPORTED), but on RS1 CNG let the
- // import succeed, then on private key use (e.g. signing) it would report NTE_INVALID_PARAMETER.
- //
- // Doing the check here prevents the state in RS1 where the Import succeeds, but corrupts the key,
- // and makes for a friendlier exception message.
- if (parameters.D.Length != parameters.Modulus.Length ||
- parameters.P.Length != halfModulusLength ||
- parameters.Q.Length != halfModulusLength ||
- parameters.DP.Length != halfModulusLength ||
- parameters.DQ.Length != halfModulusLength ||
- parameters.InverseQ.Length != halfModulusLength)
- {
- throw new CryptographicException(SR.Cryptography_InvalidRsaParameters);
- }
+ ImportKeyBlob(keyBlob, parameters.D != null);
}
-
- //
- // We need to build a key blob structured as follows:
- //
- // BCRYPT_RSAKEY_BLOB header
- // byte[cbPublicExp] publicExponent - Exponent
- // byte[cbModulus] modulus - Modulus
- // -- Only if "includePrivate" is true --
- // byte[cbPrime1] prime1 - P
- // byte[cbPrime2] prime2 - Q
- // ------------------
- //
-
- int blobSize = sizeof(BCRYPT_RSAKEY_BLOB) +
- parameters.Exponent.Length +
- parameters.Modulus.Length;
- if (includePrivate)
+ finally
{
- blobSize += parameters.P!.Length +
- parameters.Q!.Length;
+ CryptoPool.Return(keyBlob);
}
+ }
- byte[] rsaBlob = new byte[blobSize];
- fixed (byte* pRsaBlob = &rsaBlob[0])
- {
- // Build the header
- BCRYPT_RSAKEY_BLOB* pBcryptBlob = (BCRYPT_RSAKEY_BLOB*)pRsaBlob;
- pBcryptBlob->Magic = includePrivate ? KeyBlobMagicNumber.BCRYPT_RSAPRIVATE_MAGIC : KeyBlobMagicNumber.BCRYPT_RSAPUBLIC_MAGIC;
- pBcryptBlob->BitLength = parameters.Modulus.Length * 8;
- pBcryptBlob->cbPublicExp = parameters.Exponent.Length;
- pBcryptBlob->cbModulus = parameters.Modulus.Length;
-
- if (includePrivate)
- {
- pBcryptBlob->cbPrime1 = parameters.P!.Length;
- pBcryptBlob->cbPrime2 = parameters.Q!.Length;
- }
+ public override void ImportPkcs8PrivateKey(ReadOnlySpan<byte> source, out int bytesRead)
+ {
+ ThrowIfDisposed();
- int offset = sizeof(BCRYPT_RSAKEY_BLOB);
+ CngPkcs8.Pkcs8Response response = CngPkcs8.ImportPkcs8PrivateKey(source, out int localRead);
- Interop.BCrypt.Emit(rsaBlob, ref offset, parameters.Exponent);
- Interop.BCrypt.Emit(rsaBlob, ref offset, parameters.Modulus);
+ ProcessPkcs8Response(response);
+ bytesRead = localRead;
+ }
- if (includePrivate)
- {
- Interop.BCrypt.Emit(rsaBlob, ref offset, parameters.P!);
- Interop.BCrypt.Emit(rsaBlob, ref offset, parameters.Q!);
- }
+ public override void ImportEncryptedPkcs8PrivateKey(
+ ReadOnlySpan<byte> passwordBytes,
+ ReadOnlySpan<byte> source,
+ out int bytesRead)
+ {
+ ThrowIfDisposed();
- // We better have computed the right allocation size above!
- Debug.Assert(offset == blobSize, "offset == blobSize");
- }
+ CngPkcs8.Pkcs8Response response = CngPkcs8.ImportEncryptedPkcs8PrivateKey(
+ passwordBytes,
+ source,
+ out int localRead);
- ImportKeyBlob(rsaBlob, includePrivate);
+ ProcessPkcs8Response(response);
+ bytesRead = localRead;
}
- public override void ImportPkcs8PrivateKey(ReadOnlySpan<byte> source, out int bytesRead)
- {
- ThrowIfDisposed();
+ public override void ImportEncryptedPkcs8PrivateKey(
+ ReadOnlySpan<char> password,
+ ReadOnlySpan<byte> source,
+ out int bytesRead)
+ {
+ ThrowIfDisposed();
- CngPkcs8.Pkcs8Response response = CngPkcs8.ImportPkcs8PrivateKey(source, out int localRead);
+ CngPkcs8.Pkcs8Response response = CngPkcs8.ImportEncryptedPkcs8PrivateKey(
+ password,
+ source,
+ out int localRead);
- ProcessPkcs8Response(response);
- bytesRead = localRead;
- }
+ ProcessPkcs8Response(response);
+ bytesRead = localRead;
+ }
- public override void ImportEncryptedPkcs8PrivateKey(
- ReadOnlySpan<byte> passwordBytes,
- ReadOnlySpan<byte> source,
- out int bytesRead)
+ private void ProcessPkcs8Response(CngPkcs8.Pkcs8Response response)
+ {
+ // Wrong algorithm?
+ if (response.GetAlgorithmGroup() != BCryptNative.AlgorithmName.RSA)
{
- ThrowIfDisposed();
-
- CngPkcs8.Pkcs8Response response = CngPkcs8.ImportEncryptedPkcs8PrivateKey(
- passwordBytes,
- source,
- out int localRead);
-
- ProcessPkcs8Response(response);
- bytesRead = localRead;
+ response.FreeKey();
+ throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey);
}
- public override void ImportEncryptedPkcs8PrivateKey(
- ReadOnlySpan<char> password,
- ReadOnlySpan<byte> source,
- out int bytesRead)
- {
- ThrowIfDisposed();
+ AcceptImport(response);
+ }
- CngPkcs8.Pkcs8Response response = CngPkcs8.ImportEncryptedPkcs8PrivateKey(
- password,
- source,
- out int localRead);
+ public override byte[] ExportEncryptedPkcs8PrivateKey(
+ ReadOnlySpan<byte> passwordBytes,
+ PbeParameters pbeParameters)
+ {
+ ArgumentNullException.ThrowIfNull(pbeParameters);
- ProcessPkcs8Response(response);
- bytesRead = localRead;
- }
+ return CngPkcs8.ExportEncryptedPkcs8PrivateKey(
+ this,
+ passwordBytes,
+ pbeParameters);
+ }
- private void ProcessPkcs8Response(CngPkcs8.Pkcs8Response response)
- {
- // Wrong algorithm?
- if (response.GetAlgorithmGroup() != BCryptNative.AlgorithmName.RSA)
- {
- response.FreeKey();
- throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey);
- }
+ public override byte[] ExportEncryptedPkcs8PrivateKey(
+ ReadOnlySpan<char> password,
+ PbeParameters pbeParameters)
+ {
+ ArgumentNullException.ThrowIfNull(pbeParameters);
- AcceptImport(response);
- }
+ PasswordBasedEncryption.ValidatePbeParameters(
+ pbeParameters,
+ password,
+ ReadOnlySpan<byte>.Empty);
- public override byte[] ExportEncryptedPkcs8PrivateKey(
- ReadOnlySpan<byte> passwordBytes,
- PbeParameters pbeParameters)
+ if (CngPkcs8.IsPlatformScheme(pbeParameters))
{
- ArgumentNullException.ThrowIfNull(pbeParameters);
-
- return CngPkcs8.ExportEncryptedPkcs8PrivateKey(
- this,
- passwordBytes,
- pbeParameters);
+ return ExportEncryptedPkcs8(password, pbeParameters.IterationCount);
}
- public override byte[] ExportEncryptedPkcs8PrivateKey(
- ReadOnlySpan<char> password,
- PbeParameters pbeParameters)
- {
- ArgumentNullException.ThrowIfNull(pbeParameters);
-
- PasswordBasedEncryption.ValidatePbeParameters(
- pbeParameters,
- password,
- ReadOnlySpan<byte>.Empty);
-
- if (CngPkcs8.IsPlatformScheme(pbeParameters))
- {
- return ExportEncryptedPkcs8(password, pbeParameters.IterationCount);
- }
+ return CngPkcs8.ExportEncryptedPkcs8PrivateKey(
+ this,
+ password,
+ pbeParameters);
+ }
- return CngPkcs8.ExportEncryptedPkcs8PrivateKey(
- this,
- password,
- pbeParameters);
- }
+ public override bool TryExportEncryptedPkcs8PrivateKey(
+ ReadOnlySpan<byte> passwordBytes,
+ PbeParameters pbeParameters,
+ Span<byte> destination,
+ out int bytesWritten)
+ {
+ ArgumentNullException.ThrowIfNull(pbeParameters);
+
+ PasswordBasedEncryption.ValidatePbeParameters(
+ pbeParameters,
+ ReadOnlySpan<char>.Empty,
+ passwordBytes);
+
+ return CngPkcs8.TryExportEncryptedPkcs8PrivateKey(
+ this,
+ passwordBytes,
+ pbeParameters,
+ destination,
+ out bytesWritten);
+ }
- public override bool TryExportEncryptedPkcs8PrivateKey(
- ReadOnlySpan<byte> passwordBytes,
- PbeParameters pbeParameters,
- Span<byte> destination,
- out int bytesWritten)
- {
- ArgumentNullException.ThrowIfNull(pbeParameters);
+ public override bool TryExportEncryptedPkcs8PrivateKey(
+ ReadOnlySpan<char> password,
+ PbeParameters pbeParameters,
+ Span<byte> destination,
+ out int bytesWritten)
+ {
+ ArgumentNullException.ThrowIfNull(pbeParameters);
- PasswordBasedEncryption.ValidatePbeParameters(
- pbeParameters,
- ReadOnlySpan<char>.Empty,
- passwordBytes);
+ PasswordBasedEncryption.ValidatePbeParameters(
+ pbeParameters,
+ password,
+ ReadOnlySpan<byte>.Empty);
- return CngPkcs8.TryExportEncryptedPkcs8PrivateKey(
- this,
- passwordBytes,
- pbeParameters,
- destination,
- out bytesWritten);
- }
-
- public override bool TryExportEncryptedPkcs8PrivateKey(
- ReadOnlySpan<char> password,
- PbeParameters pbeParameters,
- Span<byte> destination,
- out int bytesWritten)
+ if (CngPkcs8.IsPlatformScheme(pbeParameters))
{
- ArgumentNullException.ThrowIfNull(pbeParameters);
-
- PasswordBasedEncryption.ValidatePbeParameters(
- pbeParameters,
- password,
- ReadOnlySpan<byte>.Empty);
-
- if (CngPkcs8.IsPlatformScheme(pbeParameters))
- {
- return TryExportEncryptedPkcs8(
- password,
- pbeParameters.IterationCount,
- destination,
- out bytesWritten);
- }
-
- return CngPkcs8.TryExportEncryptedPkcs8PrivateKey(
- this,
+ return TryExportEncryptedPkcs8(
password,
- pbeParameters,
+ pbeParameters.IterationCount,
destination,
out bytesWritten);
}
- /// <summary>
- /// Exports the key used by the RSA object into an RSAParameters object.
- /// </summary>
- public override RSAParameters ExportParameters(bool includePrivateParameters)
- {
- byte[] rsaBlob = ExportKeyBlob(includePrivateParameters);
- RSAParameters rsaParams = default;
- ExportParameters(ref rsaParams, rsaBlob, includePrivateParameters);
- return rsaParams;
- }
-
- private static void ExportParameters(ref RSAParameters rsaParams, byte[] rsaBlob, bool includePrivateParameters)
- {
- //
- // We now have a buffer laid out as follows:
- // BCRYPT_RSAKEY_BLOB header
- // byte[cbPublicExp] publicExponent - Exponent
- // byte[cbModulus] modulus - Modulus
- // -- Private only --
- // byte[cbPrime1] prime1 - P
- // byte[cbPrime2] prime2 - Q
- // byte[cbPrime1] exponent1 - DP
- // byte[cbPrime2] exponent2 - DQ
- // byte[cbPrime1] coefficient - InverseQ
- // byte[cbModulus] privateExponent - D
- //
- KeyBlobMagicNumber magic = (KeyBlobMagicNumber)BitConverter.ToInt32(rsaBlob, 0);
-
- // Check the magic value in the key blob header. If the blob does not have the required magic,
- // then throw a CryptographicException.
- CheckMagicValueOfKey(magic, includePrivateParameters);
-
- unsafe
- {
- // Fail-fast if a rogue provider gave us a blob that isn't even the size of the blob header.
- if (rsaBlob.Length < sizeof(BCRYPT_RSAKEY_BLOB))
- throw ErrorCode.E_FAIL.ToCryptographicException();
-
- fixed (byte* pRsaBlob = &rsaBlob[0])
- {
- BCRYPT_RSAKEY_BLOB* pBcryptBlob = (BCRYPT_RSAKEY_BLOB*)pRsaBlob;
-
- int offset = sizeof(BCRYPT_RSAKEY_BLOB);
-
- // Read out the exponent
- rsaParams.Exponent = Interop.BCrypt.Consume(rsaBlob, ref offset, pBcryptBlob->cbPublicExp);
- rsaParams.Modulus = Interop.BCrypt.Consume(rsaBlob, ref offset, pBcryptBlob->cbModulus);
-
- if (includePrivateParameters)
- {
- rsaParams.P = Interop.BCrypt.Consume(rsaBlob, ref offset, pBcryptBlob->cbPrime1);
- rsaParams.Q = Interop.BCrypt.Consume(rsaBlob, ref offset, pBcryptBlob->cbPrime2);
- rsaParams.DP = Interop.BCrypt.Consume(rsaBlob, ref offset, pBcryptBlob->cbPrime1);
- rsaParams.DQ = Interop.BCrypt.Consume(rsaBlob, ref offset, pBcryptBlob->cbPrime2);
- rsaParams.InverseQ = Interop.BCrypt.Consume(rsaBlob, ref offset, pBcryptBlob->cbPrime1);
- rsaParams.D = Interop.BCrypt.Consume(rsaBlob, ref offset, pBcryptBlob->cbModulus);
- }
- }
- }
+ return CngPkcs8.TryExportEncryptedPkcs8PrivateKey(
+ this,
+ password,
+ pbeParameters,
+ destination,
+ out bytesWritten);
}
/// <summary>
- /// This function checks the magic value in the key blob header
+ /// Exports the key used by the RSA object into an RSAParameters object.
/// </summary>
- /// <param name="magic">The expected magic number.</param>
- /// <param name="includePrivateParameters">Private blob if true else public key blob</param>
- private static void CheckMagicValueOfKey(KeyBlobMagicNumber magic, bool includePrivateParameters)
+ public override RSAParameters ExportParameters(bool includePrivateParameters)
{
- if (includePrivateParameters)
- {
- if (magic != KeyBlobMagicNumber.BCRYPT_RSAPRIVATE_MAGIC && magic != KeyBlobMagicNumber.BCRYPT_RSAFULLPRIVATE_MAGIC)
- {
- throw new CryptographicException(SR.Cryptography_NotValidPrivateKey);
- }
- }
- else
- {
- if (magic != KeyBlobMagicNumber.BCRYPT_RSAPUBLIC_MAGIC)
- {
- // Private key magic is permissible too since the public key can be derived from the private key blob.
- if (magic != KeyBlobMagicNumber.BCRYPT_RSAPRIVATE_MAGIC && magic != KeyBlobMagicNumber.BCRYPT_RSAFULLPRIVATE_MAGIC)
- {
- throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey);
- }
- }
- }
+ byte[] rsaBlob = ExportKeyBlob(includePrivateParameters);
+ RSAParameters rsaParams = default;
+ rsaParams.FromBCryptBlob(rsaBlob, includePrivateParameters);
+ return rsaParams;
}
}
}
diff --git a/src/libraries/Common/src/System/Security/Cryptography/RSACng.SignVerify.cs b/src/libraries/Common/src/System/Security/Cryptography/RSACng.SignVerify.cs
index c8b5e63d26c..2be52770881 100644
--- a/src/libraries/Common/src/System/Security/Cryptography/RSACng.SignVerify.cs
+++ b/src/libraries/Common/src/System/Security/Cryptography/RSACng.SignVerify.cs
@@ -24,7 +24,7 @@ namespace System.Security.Cryptography
KeyValuePair.Create(HashAlgorithmName.SHA512, 512 / 8),
});
- private static int GetHashSizeInBytes(HashAlgorithmName hashAlgorithm)
+ internal static int GetHashSizeInBytes(HashAlgorithmName hashAlgorithm)
{
return s_hashSizes.GetOrAdd(
hashAlgorithm,
diff --git a/src/libraries/Common/src/System/SerializableAttribute.cs b/src/libraries/Common/src/System/SerializableAttribute.cs
deleted file mode 100644
index bf4a6f73af9..00000000000
--- a/src/libraries/Common/src/System/SerializableAttribute.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-namespace System
-{
- [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Delegate, Inherited = false)]
- internal sealed class SerializableAttribute : Attribute
- {
- public SerializableAttribute() { }
- }
-}
diff --git a/src/libraries/Common/tests/StaticTestGenerator/Program.cs b/src/libraries/Common/tests/StaticTestGenerator/Program.cs
index bd81a9e53f2..f5c2e72f153 100644
--- a/src/libraries/Common/tests/StaticTestGenerator/Program.cs
+++ b/src/libraries/Common/tests/StaticTestGenerator/Program.cs
@@ -199,9 +199,10 @@ namespace StaticTestGenerator
// Write out the associated .csproj
string csprojPath = Path.Combine(outputPath, Path.GetFileNameWithoutExtension(testAssemblyPath) + "-runner.csproj");
+ Version version = Environment.Version;
File.WriteAllText(
csprojPath,
- CSProjTemplate
+ GetCsprojTemplate($"net{version.Major}.{version.Minor}")
.Replace("#HelperAssemblyLocation#", Path.GetDirectoryName(testAssemblyPath) + Path.DirectorySeparatorChar)
.Replace("#TestAssembly#", Path.GetFullPath(testAssemblyPath))
.Replace("#TestAssemblyLocation#", testAssemblyPath));
@@ -1127,13 +1128,11 @@ public static class Test
}
";
- /// <summary>The template for the .csproj.</summary>
- private const string CSProjTemplate =
-@"<Project Sdk=""Microsoft.NET.Sdk"">
+ private string GetCsprojTemplate(string targetFramework) =>
+$@"<Project Sdk=""Microsoft.NET.Sdk"">
<PropertyGroup>
<OutputType>Exe</OutputType>
- <TargetFramework>net5.0</TargetFramework>
- <LangVersion>preview</LangVersion>
+ <TargetFramework>{targetFramework}</TargetFramework>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>IDE0049</NoWarn> <!-- names can be simplified -->
</PropertyGroup>
diff --git a/src/libraries/Common/tests/StaticTestGenerator/StaticTestGenerator.csproj b/src/libraries/Common/tests/StaticTestGenerator/StaticTestGenerator.csproj
index 035387e854d..ae6943c0f92 100644
--- a/src/libraries/Common/tests/StaticTestGenerator/StaticTestGenerator.csproj
+++ b/src/libraries/Common/tests/StaticTestGenerator/StaticTestGenerator.csproj
@@ -1,9 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
- <TargetFramework>net6.0</TargetFramework>
+ <TargetFramework>net7.0</TargetFramework>
<EnableDefaultItems>false</EnableDefaultItems>
- <LangVersion>preview</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn />
diff --git a/src/libraries/Common/tests/System/Collections/IDictionary.Generic.Tests.cs b/src/libraries/Common/tests/System/Collections/IDictionary.Generic.Tests.cs
index d701197d848..ce7682dd36f 100644
--- a/src/libraries/Common/tests/System/Collections/IDictionary.Generic.Tests.cs
+++ b/src/libraries/Common/tests/System/Collections/IDictionary.Generic.Tests.cs
@@ -411,10 +411,12 @@ namespace System.Collections.Tests
}
else
{
- keysEnum.MoveNext();
+ if (keysEnum.MoveNext())
+ {
+ _ = keysEnum.Current;
+ }
keysEnum.Reset();
}
- var cur = keysEnum.Current;
}
[Theory]
@@ -506,10 +508,12 @@ namespace System.Collections.Tests
}
else
{
- valuesEnum.MoveNext();
+ if (valuesEnum.MoveNext())
+ {
+ _ = valuesEnum.Current;
+ }
valuesEnum.Reset();
}
- var cur = valuesEnum.Current;
}
[Theory]
diff --git a/src/libraries/Common/tests/System/Collections/IEnumerable.Generic.Tests.cs b/src/libraries/Common/tests/System/Collections/IEnumerable.Generic.Tests.cs
index 624feb798a3..ba5810a7f1e 100644
--- a/src/libraries/Common/tests/System/Collections/IEnumerable.Generic.Tests.cs
+++ b/src/libraries/Common/tests/System/Collections/IEnumerable.Generic.Tests.cs
@@ -63,6 +63,18 @@ namespace System.Collections.Tests
protected virtual bool Enumerator_Current_UndefinedOperation_Throws => false;
/// <summary>
+ /// When calling Current of the empty enumerator before the first MoveNext, after the end of the collection,
+ /// or after modification of the enumeration, the resulting behavior is undefined. Tests are included
+ /// to cover two behavioral scenarios:
+ /// - Throwing an InvalidOperationException
+ /// - Returning an undefined value.
+ ///
+ /// If this property is set to true, the tests ensure that the exception is thrown. The default value is
+ /// <see cref="Enumerator_Current_UndefinedOperation_Throws"/>.
+ /// </summary>
+ protected virtual bool Enumerator_Empty_Current_UndefinedOperation_Throws => Enumerator_Current_UndefinedOperation_Throws;
+
+ /// <summary>
/// When calling MoveNext or Reset after modification of the enumeration, the resulting behavior is
/// undefined. Tests are included to cover two behavioral scenarios:
/// - Throwing an InvalidOperationException
@@ -590,7 +602,8 @@ namespace System.Collections.Tests
IEnumerable<T> enumerable = GenericIEnumerableFactory(count);
using (IEnumerator<T> enumerator = enumerable.GetEnumerator())
{
- if (Enumerator_Current_UndefinedOperation_Throws)
+ if (Enumerator_Current_UndefinedOperation_Throws ||
+ (count == 0 && Enumerator_Empty_Current_UndefinedOperation_Throws))
Assert.Throws<InvalidOperationException>(() => enumerator.Current);
else
current = enumerator.Current;
@@ -606,7 +619,8 @@ namespace System.Collections.Tests
using (IEnumerator<T> enumerator = enumerable.GetEnumerator())
{
while (enumerator.MoveNext()) ;
- if (Enumerator_Current_UndefinedOperation_Throws)
+ if (Enumerator_Current_UndefinedOperation_Throws ||
+ (count == 0 && Enumerator_Empty_Current_UndefinedOperation_Throws))
Assert.Throws<InvalidOperationException>(() => enumerator.Current);
else
current = enumerator.Current;
diff --git a/src/libraries/Common/tests/System/Collections/TestBase.Generic.cs b/src/libraries/Common/tests/System/Collections/TestBase.Generic.cs
index 44c272dbd93..3769da939c0 100644
--- a/src/libraries/Common/tests/System/Collections/TestBase.Generic.cs
+++ b/src/libraries/Common/tests/System/Collections/TestBase.Generic.cs
@@ -37,42 +37,49 @@ namespace System.Collections.Tests
/// MemberData to be passed to tests that take an IEnumerable{T}. This method returns every permutation of
/// EnumerableType to test on (e.g. HashSet, Queue), and size of set to test with (e.g. 0, 1, etc.).
/// </summary>
- public static IEnumerable<object[]> EnumerableTestData()
+ public static IEnumerable<object[]> EnumerableTestData() =>
+ ((IEnumerable<EnumerableType>)Enum.GetValues(typeof(EnumerableType))).SelectMany(GetEnumerableTestData);
+
+ /// <summary>
+ /// MemberData to be passed to tests that take an IEnumerable{T}. This method returns results for various
+ /// sizes of sets to test with (e.g. 0, 1, etc.) but only for List.
+ /// </summary>
+ public static IEnumerable<object[]> ListTestData() =>
+ GetEnumerableTestData(EnumerableType.List);
+
+ private static IEnumerable<object[]> GetEnumerableTestData(EnumerableType enumerableType)
{
foreach (object[] collectionSizeArray in ValidCollectionSizes())
{
- foreach (EnumerableType enumerableType in Enum.GetValues(typeof(EnumerableType)))
+ int count = (int)collectionSizeArray[0];
+ yield return new object[] { enumerableType, count, 0, 0, 0 }; // Empty Enumerable
+ yield return new object[] { enumerableType, count, count + 1, 0, 0 }; // Enumerable that is 1 larger
+
+ if (count >= 1)
+ {
+ yield return new object[] { enumerableType, count, count, 0, 0 }; // Enumerable of the same size
+ yield return new object[] { enumerableType, count, count - 1, 0, 0 }; // Enumerable that is 1 smaller
+ yield return new object[] { enumerableType, count, count, 1, 0 }; // Enumerable of the same size with 1 matching element
+ yield return new object[] { enumerableType, count, count + 1, 1, 0 }; // Enumerable that is 1 longer with 1 matching element
+ yield return new object[] { enumerableType, count, count, count, 0 }; // Enumerable with all elements matching
+ yield return new object[] { enumerableType, count, count + 1, count, 0 }; // Enumerable with all elements matching plus one extra
+ }
+
+ if (count >= 2)
+ {
+ yield return new object[] { enumerableType, count, count - 1, 1, 0 }; // Enumerable that is 1 smaller with 1 matching element
+ yield return new object[] { enumerableType, count, count + 2, 2, 0 }; // Enumerable that is 2 longer with 2 matching element
+ yield return new object[] { enumerableType, count, count - 1, count - 1, 0 }; // Enumerable with all elements matching minus one
+ yield return new object[] { enumerableType, count, count, 2, 0 }; // Enumerable of the same size with 2 matching element
+ if ((enumerableType == EnumerableType.List || enumerableType == EnumerableType.Queue))
+ yield return new object[] { enumerableType, count, count, 0, 1 }; // Enumerable with 1 element duplicated
+ }
+
+ if (count >= 3)
{
- int count = (int)collectionSizeArray[0];
- yield return new object[] { enumerableType, count, 0, 0, 0 }; // Empty Enumerable
- yield return new object[] { enumerableType, count, count + 1, 0, 0 }; // Enumerable that is 1 larger
-
- if (count >= 1)
- {
- yield return new object[] { enumerableType, count, count, 0, 0 }; // Enumerable of the same size
- yield return new object[] { enumerableType, count, count - 1, 0, 0 }; // Enumerable that is 1 smaller
- yield return new object[] { enumerableType, count, count, 1, 0 }; // Enumerable of the same size with 1 matching element
- yield return new object[] { enumerableType, count, count + 1, 1, 0 }; // Enumerable that is 1 longer with 1 matching element
- yield return new object[] { enumerableType, count, count, count, 0 }; // Enumerable with all elements matching
- yield return new object[] { enumerableType, count, count + 1, count, 0 }; // Enumerable with all elements matching plus one extra
- }
-
- if (count >= 2)
- {
- yield return new object[] { enumerableType, count, count - 1, 1, 0 }; // Enumerable that is 1 smaller with 1 matching element
- yield return new object[] { enumerableType, count, count + 2, 2, 0 }; // Enumerable that is 2 longer with 2 matching element
- yield return new object[] { enumerableType, count, count - 1, count - 1, 0 }; // Enumerable with all elements matching minus one
- yield return new object[] { enumerableType, count, count, 2, 0 }; // Enumerable of the same size with 2 matching element
- if ((enumerableType == EnumerableType.List || enumerableType == EnumerableType.Queue))
- yield return new object[] { enumerableType, count, count, 0, 1 }; // Enumerable with 1 element duplicated
- }
-
- if (count >= 3)
- {
- if ((enumerableType == EnumerableType.List || enumerableType == EnumerableType.Queue))
- yield return new object[] { enumerableType, count, count, 0, 1 }; // Enumerable with all elements duplicated
- yield return new object[] { enumerableType, count, count - 1, 2, 0 }; // Enumerable that is 1 smaller with 2 matching elements
- }
+ if ((enumerableType == EnumerableType.List || enumerableType == EnumerableType.Queue))
+ yield return new object[] { enumerableType, count, count, 0, 1 }; // Enumerable with all elements duplicated
+ yield return new object[] { enumerableType, count, count - 1, 2, 0 }; // Enumerable that is 1 smaller with 2 matching elements
}
}
}
diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs
index daa55476615..91ea0ae621b 100644
--- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs
+++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs
@@ -1296,7 +1296,6 @@ namespace System.Net.Http.Functional.Tests
}
[Fact]
- [ActiveIssue("https://github.com/dotnet/runtime/issues/58812", TestPlatforms.Browser)]
public async Task Dispose_DisposingHandlerCancelsActiveOperationsWithoutResponses()
{
if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value)
diff --git a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs
index 8b57b3762f4..f4e4ec8a168 100644
--- a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs
+++ b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs
@@ -73,6 +73,8 @@ namespace System
public static bool Is64BitProcess => IntPtr.Size == 8;
public static bool IsNotWindows => !IsWindows;
+ public static bool IsMarshalGetExceptionPointersSupported => !IsMonoRuntime && !IsNativeAot;
+
private static readonly Lazy<bool> s_isCheckedRuntime = new Lazy<bool>(() => AssemblyConfigurationEquals("Checked"));
private static readonly Lazy<bool> s_isReleaseRuntime = new Lazy<bool>(() => AssemblyConfigurationEquals("Release"));
private static readonly Lazy<bool> s_isDebugRuntime = new Lazy<bool>(() => AssemblyConfigurationEquals("Debug"));
diff --git a/src/libraries/Directory.Build.props b/src/libraries/Directory.Build.props
index d609d71b29f..b7abf93f6d9 100644
--- a/src/libraries/Directory.Build.props
+++ b/src/libraries/Directory.Build.props
@@ -22,10 +22,12 @@
<PropertyGroup Condition="$(MSBuildProjectFullPath.Contains('$([System.IO.Path]::DirectorySeparatorChar)tests$([System.IO.Path]::DirectorySeparatorChar)'))">
<IsTestProject Condition="$(MSBuildProjectName.EndsWith('.UnitTests')) or $(MSBuildProjectName.EndsWith('.Tests'))">true</IsTestProject>
<IsTrimmingTestProject Condition="$(MSBuildProjectName.EndsWith('.TrimmingTests'))">true</IsTrimmingTestProject>
- <IsTestSupportProject Condition="'$(IsTestProject)' != 'true' and '$(IsTrimmingTestProject)' != 'true'">true</IsTestSupportProject>
+ <IsNativeAotTestProject Condition="$(MSBuildProjectName.EndsWith('.NativeAotTests'))">true</IsNativeAotTestProject>
+ <IsPublishedAppTestProject Condition="'$(IsTrimmingTestProject)' == 'true' or '$(IsNativeAotTestProject)' == 'true'">true</IsPublishedAppTestProject>
+ <IsTestSupportProject Condition="'$(IsTestProject)' != 'true' and '$(IsPublishedAppTestProject)' != 'true'">true</IsTestSupportProject>
<!-- Treat test assemblies as non-shipping (do not publish or sign them). -->
- <IsShipping Condition="'$(IsTestProject)' == 'true' or '$(IsTestSupportProject)' == 'true' or '$(IsTrimmingTestProject)' == 'true'">false</IsShipping>
+ <IsShipping Condition="'$(IsTestProject)' == 'true' or '$(IsTestSupportProject)' == 'true' or '$(IsPublishedAppTestProject)' == 'true'">false</IsShipping>
</PropertyGroup>
<PropertyGroup>
@@ -36,14 +38,14 @@
'$(IsReferenceAssemblyProject)' != 'true' and
'$(IsGeneratorProject)' != 'true' and
'$(IsTestProject)' != 'true' and
- '$(IsTrimmingTestProject)' != 'true' and
+ '$(IsPublishedAppTestProject)' != 'true' and
'$(IsTestSupportProject)' != 'true' and
'$(UsingMicrosoftNoTargetsSdk)' != 'true' and
'$(UsingMicrosoftTraversalSdk)' != 'true'">true</IsSourceProject>
</PropertyGroup>
<!-- Warnings that should be disabled in our test projects. -->
- <PropertyGroup Condition="'$(IsTestProject)' == 'true' or '$(IsTestSupportProject)' == 'true' or '$(IsTrimmingTestProject)' == 'true'">
+ <PropertyGroup Condition="'$(IsTestProject)' == 'true' or '$(IsTestSupportProject)' == 'true' or '$(IsPublishedAppTestProject)' == 'true'">
<!-- don't warn on usage of BinaryFormatter from test projects -->
<NoWarn>$(NoWarn);SYSLIB0011</NoWarn>
<!-- don't warn about unnecessary trim warning suppressions. can be removed with preview 6. -->
diff --git a/src/libraries/Directory.Build.targets b/src/libraries/Directory.Build.targets
index 8f9b52adb28..46cc84f810c 100644
--- a/src/libraries/Directory.Build.targets
+++ b/src/libraries/Directory.Build.targets
@@ -127,7 +127,7 @@
<Import Project="$(RepositoryEngineeringDir)references.targets" />
<Import Project="$(RepositoryEngineeringDir)resolveContract.targets" />
<Import Project="$(RepositoryEngineeringDir)testing\tests.targets" Condition="'$(EnableTestSupport)' == 'true'" />
- <Import Project="$(RepositoryEngineeringDir)testing\linker\trimmingTests.targets" Condition="'$(IsTrimmingTestProject)' == 'true'" />
+ <Import Project="$(RepositoryEngineeringDir)testing\linker\trimmingTests.targets" Condition="'$(IsPublishedAppTestProject)' == 'true'" />
<Import Project="$(RepositoryEngineeringDir)testing\runtimeConfiguration.targets" />
<Import Project="$(RepositoryEngineeringDir)testing\runsettings.targets" Condition="'$(EnableRunSettingsSupport)' == 'true'" />
<Import Project="$(RepositoryEngineeringDir)testing\coverage.targets" Condition="'$(EnableRunSettingsSupport)' == 'true' or '$(EnableCoverageSupport)' == 'true'" />
diff --git a/src/libraries/Microsoft.Extensions.Caching.Memory/Microsoft.Extensions.Caching.Memory.sln b/src/libraries/Microsoft.Extensions.Caching.Memory/Microsoft.Extensions.Caching.Memory.sln
index ab4bc722740..1702b76375d 100644
--- a/src/libraries/Microsoft.Extensions.Caching.Memory/Microsoft.Extensions.Caching.Memory.sln
+++ b/src/libraries/Microsoft.Extensions.Caching.Memory/Microsoft.Extensions.Caching.Memory.sln
@@ -27,6 +27,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Loggin
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Roslyn4.0", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.0.csproj", "{11D672F4-D640-423D-A79A-2A5EA498D3BF}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Roslyn4.4", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.4.csproj", "{51A94A31-6734-4BD1-AACF-73A0D704C985}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\ref\Microsoft.Extensions.Logging.Abstractions.csproj", "{BDC4E2D9-627A-4DE2-BF31-A95351C1CB7C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\src\Microsoft.Extensions.Logging.Abstractions.csproj", "{C76753D0-F564-45E9-AA60-A846EFE0A414}"
@@ -113,6 +115,10 @@ Global
{11D672F4-D640-423D-A79A-2A5EA498D3BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{11D672F4-D640-423D-A79A-2A5EA498D3BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{11D672F4-D640-423D-A79A-2A5EA498D3BF}.Release|Any CPU.Build.0 = Release|Any CPU
+ {51A94A31-6734-4BD1-AACF-73A0D704C985}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {51A94A31-6734-4BD1-AACF-73A0D704C985}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {51A94A31-6734-4BD1-AACF-73A0D704C985}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {51A94A31-6734-4BD1-AACF-73A0D704C985}.Release|Any CPU.Build.0 = Release|Any CPU
{BDC4E2D9-627A-4DE2-BF31-A95351C1CB7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BDC4E2D9-627A-4DE2-BF31-A95351C1CB7C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BDC4E2D9-627A-4DE2-BF31-A95351C1CB7C}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -170,6 +176,7 @@ Global
{DA43AA92-35BA-4B84-BAA2-C3BB56C8BB3B} = {67719AA1-52DC-4E35-B6F7-2F53A50B913A}
{A7F69E1A-D6DF-46A9-A347-66354425BC9E} = {C77F6550-84B5-4C20-8541-8B6118A8651A}
{11D672F4-D640-423D-A79A-2A5EA498D3BF} = {C77F6550-84B5-4C20-8541-8B6118A8651A}
+ {51A94A31-6734-4BD1-AACF-73A0D704C985} = {C77F6550-84B5-4C20-8541-8B6118A8651A}
{88C1F3B9-B92E-4847-AF86-A437FA34382B} = {C77F6550-84B5-4C20-8541-8B6118A8651A}
{94673D00-C1BB-48F3-8A1B-75DDEA247AB0} = {C77F6550-84B5-4C20-8541-8B6118A8651A}
EndGlobalSection
diff --git a/src/libraries/Microsoft.Extensions.Configuration.Json/Microsoft.Extensions.Configuration.Json.sln b/src/libraries/Microsoft.Extensions.Configuration.Json/Microsoft.Extensions.Configuration.Json.sln
index 89f0d35fcdf..68dcad4276f 100644
--- a/src/libraries/Microsoft.Extensions.Configuration.Json/Microsoft.Extensions.Configuration.Json.sln
+++ b/src/libraries/Microsoft.Extensions.Configuration.Json/Microsoft.Extensions.Configuration.Json.sln
@@ -63,6 +63,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGene
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.0", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.Roslyn4.0.csproj", "{701D92CA-90E0-4611-B1DF-F2D31503563F}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.4", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.Roslyn4.4.csproj", "{33B45D1D-587A-47CB-A7A7-DFAD65B1AB5F}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\ref\System.Text.Json.csproj", "{6EB2865B-C9F6-4F9B-82DA-4C577587B577}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{A49023C8-173A-4B8F-84B3-2FF37FE8344A}"
@@ -209,6 +211,10 @@ Global
{701D92CA-90E0-4611-B1DF-F2D31503563F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{701D92CA-90E0-4611-B1DF-F2D31503563F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{701D92CA-90E0-4611-B1DF-F2D31503563F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {33B45D1D-587A-47CB-A7A7-DFAD65B1AB5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {33B45D1D-587A-47CB-A7A7-DFAD65B1AB5F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {33B45D1D-587A-47CB-A7A7-DFAD65B1AB5F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {33B45D1D-587A-47CB-A7A7-DFAD65B1AB5F}.Release|Any CPU.Build.0 = Release|Any CPU
{6EB2865B-C9F6-4F9B-82DA-4C577587B577}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6EB2865B-C9F6-4F9B-82DA-4C577587B577}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6EB2865B-C9F6-4F9B-82DA-4C577587B577}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -256,6 +262,7 @@ Global
{AFEFC5C1-C952-45EE-BCF9-DC246ADE43DF} = {B4A09B09-2C03-4FC7-B12F-5DD6FC10A5B1}
{CC3E9E0A-4417-4678-87CC-1D2B001C3232} = {B4A09B09-2C03-4FC7-B12F-5DD6FC10A5B1}
{701D92CA-90E0-4611-B1DF-F2D31503563F} = {B4A09B09-2C03-4FC7-B12F-5DD6FC10A5B1}
+ {33B45D1D-587A-47CB-A7A7-DFAD65B1AB5F} = {B4A09B09-2C03-4FC7-B12F-5DD6FC10A5B1}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {2D9A0B20-A56C-4FBA-805A-DAAA97615597}
diff --git a/src/libraries/Microsoft.Extensions.Configuration.Json/src/Microsoft.Extensions.Configuration.Json.csproj b/src/libraries/Microsoft.Extensions.Configuration.Json/src/Microsoft.Extensions.Configuration.Json.csproj
index 47373297f2a..121cb04bd5d 100644
--- a/src/libraries/Microsoft.Extensions.Configuration.Json/src/Microsoft.Extensions.Configuration.Json.csproj
+++ b/src/libraries/Microsoft.Extensions.Configuration.Json/src/Microsoft.Extensions.Configuration.Json.csproj
@@ -6,7 +6,8 @@
<EnableDefaultItems>true</EnableDefaultItems>
<IsPackable>true</IsPackable>
<EnableAOTAnalyzer>true</EnableAOTAnalyzer>
- <PackageDescription>JSON configuration provider implementation for Microsoft.Extensions.Configuration.</PackageDescription>
+ <PackageDescription>JSON configuration provider implementation for Microsoft.Extensions.Configuration. This package enables you to read your application's settings from a JSON file. You can use JsonConfigurationExtensions.AddJsonFile extension method on IConfigurationBuilder to add the JSON configuration provider to the configuration builder.</PackageDescription>
+ <PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>
<ItemGroup>
@@ -17,6 +18,7 @@
<ProjectReference Include="$(LibrariesProjectRoot)System.Text.Json\src\System.Text.Json.csproj" />
<Compile Include="$(CommonPath)System\ThrowHelper.cs"
Link="Common\System\ThrowHelper.cs" />
+ <None Include="README.md" Pack="true" PackagePath="\"/>
</ItemGroup>
</Project>
diff --git a/src/libraries/Microsoft.Extensions.Configuration.Json/src/README.md b/src/libraries/Microsoft.Extensions.Configuration.Json/src/README.md
new file mode 100644
index 00000000000..869626b27e8
--- /dev/null
+++ b/src/libraries/Microsoft.Extensions.Configuration.Json/src/README.md
@@ -0,0 +1,66 @@
+## About
+
+JSON configuration provider implementation for [Microsoft.Extensions.Configuration](https://www.nuget.org/packages/Microsoft.Extensions.Configuration/). This package enables you to read your application's settings from a JSON file. You can use [JsonConfigurationExtensions.AddJsonFile](https://docs.microsoft.com/dotnet/api/microsoft.extensions.configuration.jsonconfigurationextensions.addjsonfile) extension method on `IConfigurationBuilder` to add the JSON configuration provider to the configuration builder.
+
+For more information, see the documentation:
+
+- [Configuration in .NET](https://docs.microsoft.com/dotnet/core/extensions/configuration)
+- [Microsoft.Extensions.Configuration.Json namespace](https://docs.microsoft.com/dotnet/api/microsoft.extensions.configuration.json)
+
+## Example
+
+The following example shows how to read application settings from the JSON configuration file.
+
+```cs
+using System;
+using Microsoft.Extensions.Configuration;
+
+class Program
+{
+ static void Main()
+ {
+ // Build a configuration object from JSON file
+ IConfiguration config = new ConfigurationBuilder()
+ .AddJsonFile("appsettings.json")
+ .Build();
+
+ // Get a configuration section
+ IConfigurationSection section = config.GetSection("Settings");
+
+ // Read simple values
+ Console.WriteLine($"Server: {section["Server"]}");
+ Console.WriteLine($"Database: {section["Database"]}");
+
+ // Read a collection
+ Console.WriteLine("Ports: ");
+ IConfigurationSection ports = section.GetSection("Ports");
+
+ foreach (IConfigurationSection child in ports.GetChildren())
+ {
+ Console.WriteLine(child.Value);
+ }
+ }
+}
+```
+
+To run this example, include an `appsettings.json` file with the following content in your project:
+
+```json
+{
+ "Settings": {
+ "Server": "example.com",
+ "Database": "Northwind",
+ "Ports": [ 80, 81 ]
+ }
+}
+```
+
+You can include a configuration file using a code like this in your `.csproj` file:
+
+```xml
+<ItemGroup>
+ <Content Include="appsettings.json">
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ </Content>
+</ItemGroup>
+```
diff --git a/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/Microsoft.Extensions.Configuration.UserSecrets.sln b/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/Microsoft.Extensions.Configuration.UserSecrets.sln
index 328abcfca43..ebf774199bf 100644
--- a/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/Microsoft.Extensions.Configuration.UserSecrets.sln
+++ b/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/Microsoft.Extensions.Configuration.UserSecrets.sln
@@ -63,6 +63,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGene
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.0", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.Roslyn4.0.csproj", "{D52BA380-089D-46CD-98E5-F471B9D7CCA4}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.4", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.Roslyn4.4.csproj", "{1630193B-055E-46C0-8341-60AFCEE606BE}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\ref\System.Text.Json.csproj", "{705F880D-3E27-4ACA-87CC-808BB7DDA610}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{82700778-D9AD-4B9D-8A1C-CDC1A19E4D54}"
@@ -209,6 +211,10 @@ Global
{D52BA380-089D-46CD-98E5-F471B9D7CCA4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D52BA380-089D-46CD-98E5-F471B9D7CCA4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D52BA380-089D-46CD-98E5-F471B9D7CCA4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1630193B-055E-46C0-8341-60AFCEE606BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1630193B-055E-46C0-8341-60AFCEE606BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1630193B-055E-46C0-8341-60AFCEE606BE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1630193B-055E-46C0-8341-60AFCEE606BE}.Release|Any CPU.Build.0 = Release|Any CPU
{705F880D-3E27-4ACA-87CC-808BB7DDA610}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{705F880D-3E27-4ACA-87CC-808BB7DDA610}.Debug|Any CPU.Build.0 = Debug|Any CPU
{705F880D-3E27-4ACA-87CC-808BB7DDA610}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -256,6 +262,7 @@ Global
{0243557C-E886-4392-8E9F-ECA0820E094B} = {48CD61B8-2937-4229-8BAB-3F1167B54E61}
{C5BA84F6-C75B-4698-9733-38C67C285215} = {48CD61B8-2937-4229-8BAB-3F1167B54E61}
{D52BA380-089D-46CD-98E5-F471B9D7CCA4} = {48CD61B8-2937-4229-8BAB-3F1167B54E61}
+ {1630193B-055E-46C0-8341-60AFCEE606BE} = {48CD61B8-2937-4229-8BAB-3F1167B54E61}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E7F79175-49DD-42AD-833B-AE64950FE3D2}
diff --git a/src/libraries/Microsoft.Extensions.Configuration/Microsoft.Extensions.Configuration.sln b/src/libraries/Microsoft.Extensions.Configuration/Microsoft.Extensions.Configuration.sln
index fa1c13fee6a..76c6e53cd4f 100644
--- a/src/libraries/Microsoft.Extensions.Configuration/Microsoft.Extensions.Configuration.sln
+++ b/src/libraries/Microsoft.Extensions.Configuration/Microsoft.Extensions.Configuration.sln
@@ -99,6 +99,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGene
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.0", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.Roslyn4.0.csproj", "{81104506-C075-4889-819C-F0B3D81A40A1}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.4", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.Roslyn4.4.csproj", "{E53C22E4-3827-4540-8616-B09FD71AE779}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\ref\System.Text.Json.csproj", "{CFDBC0E2-792D-4F88-8AB5-978DF8E2167D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{41234DB5-1F3A-4E4A-8BD9-4A277C249666}"
@@ -317,6 +319,10 @@ Global
{81104506-C075-4889-819C-F0B3D81A40A1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{81104506-C075-4889-819C-F0B3D81A40A1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{81104506-C075-4889-819C-F0B3D81A40A1}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E53C22E4-3827-4540-8616-B09FD71AE779}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E53C22E4-3827-4540-8616-B09FD71AE779}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E53C22E4-3827-4540-8616-B09FD71AE779}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E53C22E4-3827-4540-8616-B09FD71AE779}.Release|Any CPU.Build.0 = Release|Any CPU
{CFDBC0E2-792D-4F88-8AB5-978DF8E2167D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CFDBC0E2-792D-4F88-8AB5-978DF8E2167D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CFDBC0E2-792D-4F88-8AB5-978DF8E2167D}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -382,6 +388,7 @@ Global
{27A201BF-246A-44B2-A018-DF67C8A6DC02} = {DCF01C23-85A0-4385-B480-D1276ED99A92}
{11C8AB75-D137-4A1B-85E5-1018EBFB422B} = {DCF01C23-85A0-4385-B480-D1276ED99A92}
{81104506-C075-4889-819C-F0B3D81A40A1} = {DCF01C23-85A0-4385-B480-D1276ED99A92}
+ {E53C22E4-3827-4540-8616-B09FD71AE779} = {DCF01C23-85A0-4385-B480-D1276ED99A92}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {81EEF2A5-6387-4CC4-B7CD-908EEA4E5C79}
diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/Microsoft.Extensions.DependencyModel.sln b/src/libraries/Microsoft.Extensions.DependencyModel/Microsoft.Extensions.DependencyModel.sln
index 7abb30d2375..b89538295a1 100644
--- a/src/libraries/Microsoft.Extensions.DependencyModel/Microsoft.Extensions.DependencyModel.sln
+++ b/src/libraries/Microsoft.Extensions.DependencyModel/Microsoft.Extensions.DependencyModel.sln
@@ -33,6 +33,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGene
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.0", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.Roslyn4.0.csproj", "{B4C5A0BE-3E21-4464-875C-E6EBED176EE3}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.4", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.Roslyn4.4.csproj", "{30DEAC25-AFDB-4E91-90A4-7B94E1809C59}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\ref\System.Text.Json.csproj", "{8E212A9D-391B-4EFA-943D-7D104A9D3D7E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{FA7201FE-097D-4197-BDEC-329986814D8D}"
@@ -119,6 +121,10 @@ Global
{B4C5A0BE-3E21-4464-875C-E6EBED176EE3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B4C5A0BE-3E21-4464-875C-E6EBED176EE3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B4C5A0BE-3E21-4464-875C-E6EBED176EE3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {30DEAC25-AFDB-4E91-90A4-7B94E1809C59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {30DEAC25-AFDB-4E91-90A4-7B94E1809C59}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {30DEAC25-AFDB-4E91-90A4-7B94E1809C59}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {30DEAC25-AFDB-4E91-90A4-7B94E1809C59}.Release|Any CPU.Build.0 = Release|Any CPU
{8E212A9D-391B-4EFA-943D-7D104A9D3D7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8E212A9D-391B-4EFA-943D-7D104A9D3D7E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8E212A9D-391B-4EFA-943D-7D104A9D3D7E}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -151,6 +157,7 @@ Global
{6F992337-EAEE-4F7A-BF3B-DDC526F054F7} = {55D04C80-4A8F-40AC-967D-3FA77C814D7B}
{240E7B1C-6D7D-4932-9598-815C2EA420AF} = {55D04C80-4A8F-40AC-967D-3FA77C814D7B}
{B4C5A0BE-3E21-4464-875C-E6EBED176EE3} = {55D04C80-4A8F-40AC-967D-3FA77C814D7B}
+ {30DEAC25-AFDB-4E91-90A4-7B94E1809C59} = {55D04C80-4A8F-40AC-967D-3FA77C814D7B}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {810D114A-26F4-4151-9EFE-29A7F1BF62AA}
diff --git a/src/libraries/Microsoft.Extensions.HostFactoryResolver/Microsoft.Extensions.HostFactoryResolver.sln b/src/libraries/Microsoft.Extensions.HostFactoryResolver/Microsoft.Extensions.HostFactoryResolver.sln
index 8b052f49284..7396f905156 100644
--- a/src/libraries/Microsoft.Extensions.HostFactoryResolver/Microsoft.Extensions.HostFactoryResolver.sln
+++ b/src/libraries/Microsoft.Extensions.HostFactoryResolver/Microsoft.Extensions.HostFactoryResolver.sln
@@ -105,6 +105,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Loggin
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Roslyn4.0", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.0.csproj", "{0540EF81-262A-4A23-92E3-14A3971A17A5}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Roslyn4.4", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.4.csproj", "{A8840229-74D9-4A14-8975-272C8C436190}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\ref\Microsoft.Extensions.Logging.Abstractions.csproj", "{5AF0AAC8-20DD-4A9D-A4D6-681830F1C81C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\src\Microsoft.Extensions.Logging.Abstractions.csproj", "{1EDBDC83-B048-49CB-A43D-C61C07127AAA}"
@@ -175,6 +177,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGene
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.0", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.Roslyn4.0.csproj", "{7EA80D36-7A73-47A8-A6C8-8E0D49CEE93A}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.4", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.Roslyn4.4.csproj", "{67ABDEA8-6D44-4FB0-A41A-62878F0E04BC}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\ref\System.Text.Json.csproj", "{ADCD61FC-DA64-4448-889C-E0B1DC937A33}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{1D04506B-4530-4BC4-B0F7-7E46DF497454}"
@@ -405,6 +409,10 @@ Global
{0540EF81-262A-4A23-92E3-14A3971A17A5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0540EF81-262A-4A23-92E3-14A3971A17A5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0540EF81-262A-4A23-92E3-14A3971A17A5}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A8840229-74D9-4A14-8975-272C8C436190}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A8840229-74D9-4A14-8975-272C8C436190}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A8840229-74D9-4A14-8975-272C8C436190}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A8840229-74D9-4A14-8975-272C8C436190}.Release|Any CPU.Build.0 = Release|Any CPU
{5AF0AAC8-20DD-4A9D-A4D6-681830F1C81C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5AF0AAC8-20DD-4A9D-A4D6-681830F1C81C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5AF0AAC8-20DD-4A9D-A4D6-681830F1C81C}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -545,6 +553,10 @@ Global
{7EA80D36-7A73-47A8-A6C8-8E0D49CEE93A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7EA80D36-7A73-47A8-A6C8-8E0D49CEE93A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7EA80D36-7A73-47A8-A6C8-8E0D49CEE93A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {67ABDEA8-6D44-4FB0-A41A-62878F0E04BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {67ABDEA8-6D44-4FB0-A41A-62878F0E04BC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {67ABDEA8-6D44-4FB0-A41A-62878F0E04BC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {67ABDEA8-6D44-4FB0-A41A-62878F0E04BC}.Release|Any CPU.Build.0 = Release|Any CPU
{ADCD61FC-DA64-4448-889C-E0B1DC937A33}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ADCD61FC-DA64-4448-889C-E0B1DC937A33}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ADCD61FC-DA64-4448-889C-E0B1DC937A33}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -644,10 +656,12 @@ Global
{1D04506B-4530-4BC4-B0F7-7E46DF497454} = {549715BC-A4E3-49F5-A8AC-84D2F65FAC0F}
{B764D730-34BD-4BED-A756-373F2F17391A} = {64423F79-97D4-45E8-9F06-6CFB06A36C0F}
{0540EF81-262A-4A23-92E3-14A3971A17A5} = {64423F79-97D4-45E8-9F06-6CFB06A36C0F}
+ {A8840229-74D9-4A14-8975-272C8C436190} = {64423F79-97D4-45E8-9F06-6CFB06A36C0F}
{1406D871-3350-4754-9E69-DA6E75E56857} = {64423F79-97D4-45E8-9F06-6CFB06A36C0F}
{0A3C61A6-F9D7-4189-B23C-41BF629E8237} = {64423F79-97D4-45E8-9F06-6CFB06A36C0F}
{5A1C0774-4BF1-478D-812F-5CF34431AAD0} = {64423F79-97D4-45E8-9F06-6CFB06A36C0F}
{7EA80D36-7A73-47A8-A6C8-8E0D49CEE93A} = {64423F79-97D4-45E8-9F06-6CFB06A36C0F}
+ {67ABDEA8-6D44-4FB0-A41A-62878F0E04BC} = {64423F79-97D4-45E8-9F06-6CFB06A36C0F}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {80C3C947-5A43-4A55-9E1C-D62738588863}
diff --git a/src/libraries/Microsoft.Extensions.Hosting.Systemd/Microsoft.Extensions.Hosting.Systemd.sln b/src/libraries/Microsoft.Extensions.Hosting.Systemd/Microsoft.Extensions.Hosting.Systemd.sln
index af2c3d2c7e8..de2fc95ec77 100644
--- a/src/libraries/Microsoft.Extensions.Hosting.Systemd/Microsoft.Extensions.Hosting.Systemd.sln
+++ b/src/libraries/Microsoft.Extensions.Hosting.Systemd/Microsoft.Extensions.Hosting.Systemd.sln
@@ -75,6 +75,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Loggin
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Roslyn4.0", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.0.csproj", "{0D1BFEB4-CEF6-4319-9212-E3E7840B287A}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Roslyn4.4", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.4.csproj", "{7D8C7904-C8AC-4732-89BE-0DB348E6E9AC}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\ref\Microsoft.Extensions.Logging.Abstractions.csproj", "{860B845B-929F-4442-AED1-1F4186DBF497}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\src\Microsoft.Extensions.Logging.Abstractions.csproj", "{A0AF82AE-ED18-4EEB-AD9A-B44017510F0C}"
@@ -145,6 +147,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGene
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.0", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.Roslyn4.0.csproj", "{771CB4BB-4237-444E-82CE-C81A4979D89F}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.4", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.Roslyn4.4.csproj", "{DBEB8F5B-477E-4602-A59B-5154ED1934C3}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\ref\System.Text.Json.csproj", "{AA2CD494-414F-42BF-9C68-7822DEB09255}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{25474DE2-4D3D-4950-BDA7-CF6FE3CCD940}"
@@ -315,6 +319,10 @@ Global
{0D1BFEB4-CEF6-4319-9212-E3E7840B287A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0D1BFEB4-CEF6-4319-9212-E3E7840B287A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0D1BFEB4-CEF6-4319-9212-E3E7840B287A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7D8C7904-C8AC-4732-89BE-0DB348E6E9AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7D8C7904-C8AC-4732-89BE-0DB348E6E9AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7D8C7904-C8AC-4732-89BE-0DB348E6E9AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7D8C7904-C8AC-4732-89BE-0DB348E6E9AC}.Release|Any CPU.Build.0 = Release|Any CPU
{860B845B-929F-4442-AED1-1F4186DBF497}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{860B845B-929F-4442-AED1-1F4186DBF497}.Debug|Any CPU.Build.0 = Debug|Any CPU
{860B845B-929F-4442-AED1-1F4186DBF497}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -455,6 +463,10 @@ Global
{771CB4BB-4237-444E-82CE-C81A4979D89F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{771CB4BB-4237-444E-82CE-C81A4979D89F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{771CB4BB-4237-444E-82CE-C81A4979D89F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {DBEB8F5B-477E-4602-A59B-5154ED1934C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DBEB8F5B-477E-4602-A59B-5154ED1934C3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DBEB8F5B-477E-4602-A59B-5154ED1934C3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {DBEB8F5B-477E-4602-A59B-5154ED1934C3}.Release|Any CPU.Build.0 = Release|Any CPU
{AA2CD494-414F-42BF-9C68-7822DEB09255}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AA2CD494-414F-42BF-9C68-7822DEB09255}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AA2CD494-414F-42BF-9C68-7822DEB09255}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -539,10 +551,12 @@ Global
{25474DE2-4D3D-4950-BDA7-CF6FE3CCD940} = {192FD259-E55F-40C5-82EE-9E924EA6C3CB}
{5F69DAFF-F4BC-4E29-A4FA-E96A4D55EC2D} = {694561D4-7901-4727-B87C-109C7CED0404}
{0D1BFEB4-CEF6-4319-9212-E3E7840B287A} = {694561D4-7901-4727-B87C-109C7CED0404}
+ {7D8C7904-C8AC-4732-89BE-0DB348E6E9AC} = {694561D4-7901-4727-B87C-109C7CED0404}
{EDF8F173-CFE7-40FB-8EEB-795A1DFB6D99} = {694561D4-7901-4727-B87C-109C7CED0404}
{D8A16E22-8BF8-49ED-A033-0150D6341282} = {694561D4-7901-4727-B87C-109C7CED0404}
{5C6A1B61-B02B-46AA-8AD5-B8F61EE57453} = {694561D4-7901-4727-B87C-109C7CED0404}
{771CB4BB-4237-444E-82CE-C81A4979D89F} = {694561D4-7901-4727-B87C-109C7CED0404}
+ {DBEB8F5B-477E-4602-A59B-5154ED1934C3} = {694561D4-7901-4727-B87C-109C7CED0404}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {EFB87E5C-C4CE-4855-8CBB-B20180560CB1}
diff --git a/src/libraries/Microsoft.Extensions.Hosting.WindowsServices/Microsoft.Extensions.Hosting.WindowsServices.sln b/src/libraries/Microsoft.Extensions.Hosting.WindowsServices/Microsoft.Extensions.Hosting.WindowsServices.sln
index ab347957f8d..9fd6c25d3e2 100644
--- a/src/libraries/Microsoft.Extensions.Hosting.WindowsServices/Microsoft.Extensions.Hosting.WindowsServices.sln
+++ b/src/libraries/Microsoft.Extensions.Hosting.WindowsServices/Microsoft.Extensions.Hosting.WindowsServices.sln
@@ -75,6 +75,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Loggin
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Roslyn4.0", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.0.csproj", "{59BC5420-D5C8-4689-8F9E-1E8AC338180E}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Roslyn4.4", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.4.csproj", "{ACA22F95-D64E-462A-99C6-CB31B3F45347}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\ref\Microsoft.Extensions.Logging.Abstractions.csproj", "{723957C4-C433-4B6D-BF0C-28AE36AEDDBD}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\src\Microsoft.Extensions.Logging.Abstractions.csproj", "{E5F61C36-FB9B-4DA7-96C0-056FBEADBB53}"
@@ -149,6 +151,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGene
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.0", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.Roslyn4.0.csproj", "{2CEA1741-8B0C-41F8-9CA9-B827D329261F}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.4", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.Roslyn4.4.csproj", "{9842527F-AC6E-4ADD-92AF-1DF8613B83C6}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\ref\System.Text.Json.csproj", "{35F7F32D-B404-46B3-8FCE-CFEBEC7114C3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{C50BBD27-2445-4DF4-9A1D-C7919D016BBC}"
@@ -319,6 +323,10 @@ Global
{59BC5420-D5C8-4689-8F9E-1E8AC338180E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{59BC5420-D5C8-4689-8F9E-1E8AC338180E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{59BC5420-D5C8-4689-8F9E-1E8AC338180E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {ACA22F95-D64E-462A-99C6-CB31B3F45347}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {ACA22F95-D64E-462A-99C6-CB31B3F45347}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {ACA22F95-D64E-462A-99C6-CB31B3F45347}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {ACA22F95-D64E-462A-99C6-CB31B3F45347}.Release|Any CPU.Build.0 = Release|Any CPU
{723957C4-C433-4B6D-BF0C-28AE36AEDDBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{723957C4-C433-4B6D-BF0C-28AE36AEDDBD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{723957C4-C433-4B6D-BF0C-28AE36AEDDBD}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -467,6 +475,10 @@ Global
{2CEA1741-8B0C-41F8-9CA9-B827D329261F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2CEA1741-8B0C-41F8-9CA9-B827D329261F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2CEA1741-8B0C-41F8-9CA9-B827D329261F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9842527F-AC6E-4ADD-92AF-1DF8613B83C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9842527F-AC6E-4ADD-92AF-1DF8613B83C6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9842527F-AC6E-4ADD-92AF-1DF8613B83C6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9842527F-AC6E-4ADD-92AF-1DF8613B83C6}.Release|Any CPU.Build.0 = Release|Any CPU
{35F7F32D-B404-46B3-8FCE-CFEBEC7114C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{35F7F32D-B404-46B3-8FCE-CFEBEC7114C3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{35F7F32D-B404-46B3-8FCE-CFEBEC7114C3}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -553,10 +565,12 @@ Global
{C50BBD27-2445-4DF4-9A1D-C7919D016BBC} = {76933DF1-12AA-4B5B-8863-EF38F10B1EC9}
{D3A7C7B1-10DC-45E9-8678-2C964A1459D7} = {0D30E826-4EE9-4404-A74D-5255FDB76A12}
{59BC5420-D5C8-4689-8F9E-1E8AC338180E} = {0D30E826-4EE9-4404-A74D-5255FDB76A12}
+ {ACA22F95-D64E-462A-99C6-CB31B3F45347} = {0D30E826-4EE9-4404-A74D-5255FDB76A12}
{34C7A201-C14D-4586-9903-8358EF179EAD} = {0D30E826-4EE9-4404-A74D-5255FDB76A12}
{11EE7722-5FA4-403C-B53B-59A154EE0267} = {0D30E826-4EE9-4404-A74D-5255FDB76A12}
{0EC461A2-083B-4E9E-AADE-935ECB15B951} = {0D30E826-4EE9-4404-A74D-5255FDB76A12}
{2CEA1741-8B0C-41F8-9CA9-B827D329261F} = {0D30E826-4EE9-4404-A74D-5255FDB76A12}
+ {9842527F-AC6E-4ADD-92AF-1DF8613B83C6} = {0D30E826-4EE9-4404-A74D-5255FDB76A12}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {81854B5B-5AA0-49DC-9B7B-9E2DB24D7507}
diff --git a/src/libraries/Microsoft.Extensions.Hosting/Microsoft.Extensions.Hosting.sln b/src/libraries/Microsoft.Extensions.Hosting/Microsoft.Extensions.Hosting.sln
index b94d1a81e9c..5e359dac75a 100644
--- a/src/libraries/Microsoft.Extensions.Hosting/Microsoft.Extensions.Hosting.sln
+++ b/src/libraries/Microsoft.Extensions.Hosting/Microsoft.Extensions.Hosting.sln
@@ -75,6 +75,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Loggin
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Roslyn4.0", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.0.csproj", "{5F6EF6F2-A742-445B-9418-682188F61130}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Roslyn4.4", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.4.csproj", "{3F732A69-1E48-4EA7-A40E-9C6C9332388E}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\ref\Microsoft.Extensions.Logging.Abstractions.csproj", "{42E1BF94-6FE0-4017-9702-55913BD95EDE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\src\Microsoft.Extensions.Logging.Abstractions.csproj", "{8845E6FF-94B2-4994-A8F4-DF30844A2168}"
@@ -145,6 +147,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGene
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.0", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.Roslyn4.0.csproj", "{B69B7D59-6E7D-43FC-B83F-AA481B677B06}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.4", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.Roslyn4.4.csproj", "{4F7612BF-0AFB-4AC5-952F-7D12D99FA357}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\ref\System.Text.Json.csproj", "{1E3D79D4-51D6-46C6-BF0F-DF51A47C5952}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{0813853E-8C78-429A-B01A-3FB2EF1898F8}"
@@ -315,6 +319,10 @@ Global
{5F6EF6F2-A742-445B-9418-682188F61130}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5F6EF6F2-A742-445B-9418-682188F61130}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5F6EF6F2-A742-445B-9418-682188F61130}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3F732A69-1E48-4EA7-A40E-9C6C9332388E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3F732A69-1E48-4EA7-A40E-9C6C9332388E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3F732A69-1E48-4EA7-A40E-9C6C9332388E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3F732A69-1E48-4EA7-A40E-9C6C9332388E}.Release|Any CPU.Build.0 = Release|Any CPU
{42E1BF94-6FE0-4017-9702-55913BD95EDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{42E1BF94-6FE0-4017-9702-55913BD95EDE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{42E1BF94-6FE0-4017-9702-55913BD95EDE}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -455,6 +463,10 @@ Global
{B69B7D59-6E7D-43FC-B83F-AA481B677B06}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B69B7D59-6E7D-43FC-B83F-AA481B677B06}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B69B7D59-6E7D-43FC-B83F-AA481B677B06}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4F7612BF-0AFB-4AC5-952F-7D12D99FA357}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4F7612BF-0AFB-4AC5-952F-7D12D99FA357}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4F7612BF-0AFB-4AC5-952F-7D12D99FA357}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4F7612BF-0AFB-4AC5-952F-7D12D99FA357}.Release|Any CPU.Build.0 = Release|Any CPU
{1E3D79D4-51D6-46C6-BF0F-DF51A47C5952}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1E3D79D4-51D6-46C6-BF0F-DF51A47C5952}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1E3D79D4-51D6-46C6-BF0F-DF51A47C5952}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -539,10 +551,12 @@ Global
{0813853E-8C78-429A-B01A-3FB2EF1898F8} = {59A29BF0-B76B-41F8-A733-E2A0847AB992}
{1B235247-6666-4B62-95A4-AC043626FDEA} = {A9A8D649-4C09-4FD1-9837-EE7B9D902253}
{5F6EF6F2-A742-445B-9418-682188F61130} = {A9A8D649-4C09-4FD1-9837-EE7B9D902253}
+ {3F732A69-1E48-4EA7-A40E-9C6C9332388E} = {A9A8D649-4C09-4FD1-9837-EE7B9D902253}
{C00722C2-E56B-424F-9216-FA6A91788986} = {A9A8D649-4C09-4FD1-9837-EE7B9D902253}
{90DD4D77-E3DC-456E-A27F-F13DA6194481} = {A9A8D649-4C09-4FD1-9837-EE7B9D902253}
{0A495D7B-44DE-4E59-8497-6CBF7C55CFA5} = {A9A8D649-4C09-4FD1-9837-EE7B9D902253}
{B69B7D59-6E7D-43FC-B83F-AA481B677B06} = {A9A8D649-4C09-4FD1-9837-EE7B9D902253}
+ {4F7612BF-0AFB-4AC5-952F-7D12D99FA357} = {A9A8D649-4C09-4FD1-9837-EE7B9D902253}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {971198CC-ACB9-4718-9024-42A87E02E503}
diff --git a/src/libraries/Microsoft.Extensions.Hosting/src/HostBuilder.cs b/src/libraries/Microsoft.Extensions.Hosting/src/HostBuilder.cs
index a285d3e487e..9c864e489ab 100644
--- a/src/libraries/Microsoft.Extensions.Hosting/src/HostBuilder.cs
+++ b/src/libraries/Microsoft.Extensions.Hosting/src/HostBuilder.cs
@@ -188,8 +188,6 @@ namespace Microsoft.Extensions.Hosting
return diagnosticListener;
}
- [UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode",
- Justification = "DiagnosticSource is used here to pass objects in-memory to code using HostFactoryResolver. This won't require creating new generic types.")]
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:UnrecognizedReflectionPattern",
Justification = "The values being passed into Write are being consumed by the application already.")]
private static void Write<T>(
diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Microsoft.Extensions.Hosting.Unit.Tests.csproj b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Microsoft.Extensions.Hosting.Unit.Tests.csproj
index b5c760d44ca..0743d679b15 100644
--- a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Microsoft.Extensions.Hosting.Unit.Tests.csproj
+++ b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Microsoft.Extensions.Hosting.Unit.Tests.csproj
@@ -5,6 +5,7 @@
<EnableDefaultItems>true</EnableDefaultItems>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
<AutoGenerateBindingRedirects Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) == '.NETFramework'">true</AutoGenerateBindingRedirects>
+ <EventSourceSupport Condition="'$(TestNativeAot)' == 'true'">true</EventSourceSupport>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/Microsoft.Extensions.Http/Microsoft.Extensions.Http.sln b/src/libraries/Microsoft.Extensions.Http/Microsoft.Extensions.Http.sln
index 31db3d63566..d99b74a2020 100644
--- a/src/libraries/Microsoft.Extensions.Http/Microsoft.Extensions.Http.sln
+++ b/src/libraries/Microsoft.Extensions.Http/Microsoft.Extensions.Http.sln
@@ -23,6 +23,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Loggin
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Roslyn4.0", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.0.csproj", "{136C7622-75EE-4C95-9642-DAD4A5392274}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Roslyn4.4", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.4.csproj", "{E0BC3CBF-BE02-4228-AF7F-876CC4C832EA}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\ref\Microsoft.Extensions.Logging.Abstractions.csproj", "{85615392-9242-4CAF-A0FE-A439FF615462}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\src\Microsoft.Extensions.Logging.Abstractions.csproj", "{BAFF07C7-1F5F-4706-B7D7-9D5D309CBFE2}"
@@ -111,6 +113,10 @@ Global
{136C7622-75EE-4C95-9642-DAD4A5392274}.Debug|Any CPU.Build.0 = Debug|Any CPU
{136C7622-75EE-4C95-9642-DAD4A5392274}.Release|Any CPU.ActiveCfg = Release|Any CPU
{136C7622-75EE-4C95-9642-DAD4A5392274}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E0BC3CBF-BE02-4228-AF7F-876CC4C832EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E0BC3CBF-BE02-4228-AF7F-876CC4C832EA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E0BC3CBF-BE02-4228-AF7F-876CC4C832EA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E0BC3CBF-BE02-4228-AF7F-876CC4C832EA}.Release|Any CPU.Build.0 = Release|Any CPU
{85615392-9242-4CAF-A0FE-A439FF615462}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{85615392-9242-4CAF-A0FE-A439FF615462}.Debug|Any CPU.Build.0 = Debug|Any CPU
{85615392-9242-4CAF-A0FE-A439FF615462}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -191,6 +197,7 @@ Global
{1A02FCFD-12D4-4F46-8AD4-8C052E7BF0F8} = {96EA71C4-C73B-4C6C-AA06-05635B20A2DC}
{2F7292AF-429F-4888-B938-B6615F06E838} = {D1CE7D63-2182-40E3-83E0-618DA3770779}
{136C7622-75EE-4C95-9642-DAD4A5392274} = {D1CE7D63-2182-40E3-83E0-618DA3770779}
+ {E0BC3CBF-BE02-4228-AF7F-876CC4C832EA} = {D1CE7D63-2182-40E3-83E0-618DA3770779}
{083B8368-1518-40DE-904F-CD028C8E21F1} = {D1CE7D63-2182-40E3-83E0-618DA3770779}
{167FDAED-3220-4516-AC8F-C506F593896D} = {D1CE7D63-2182-40E3-83E0-618DA3770779}
EndGlobalSection
diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/Microsoft.Extensions.Logging.Abstractions.sln b/src/libraries/Microsoft.Extensions.Logging.Abstractions/Microsoft.Extensions.Logging.Abstractions.sln
index 46c0a9afbe5..8838004dd2f 100644
--- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/Microsoft.Extensions.Logging.Abstractions.sln
+++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/Microsoft.Extensions.Logging.Abstractions.sln
@@ -5,6 +5,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Loggin
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Roslyn4.0", "gen\Microsoft.Extensions.Logging.Generators.Roslyn4.0.csproj", "{A5439E79-96D6-4F02-8DD0-23DFF979851D}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Roslyn4.4", "gen\Microsoft.Extensions.Logging.Generators.Roslyn4.4.csproj", "{BF948816-45E1-4F0F-985A-0B4DB4D3BF40}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "ref\Microsoft.Extensions.Logging.Abstractions.csproj", "{7F536552-0E2A-4642-B7CF-863727C2F9CD}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "src\Microsoft.Extensions.Logging.Abstractions.csproj", "{75C579F7-F20B-41F1-8CAF-641DE7ADA4EE}"
@@ -43,6 +45,10 @@ Global
{A5439E79-96D6-4F02-8DD0-23DFF979851D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A5439E79-96D6-4F02-8DD0-23DFF979851D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A5439E79-96D6-4F02-8DD0-23DFF979851D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BF948816-45E1-4F0F-985A-0B4DB4D3BF40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BF948816-45E1-4F0F-985A-0B4DB4D3BF40}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BF948816-45E1-4F0F-985A-0B4DB4D3BF40}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BF948816-45E1-4F0F-985A-0B4DB4D3BF40}.Release|Any CPU.Build.0 = Release|Any CPU
{7F536552-0E2A-4642-B7CF-863727C2F9CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7F536552-0E2A-4642-B7CF-863727C2F9CD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7F536552-0E2A-4642-B7CF-863727C2F9CD}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -77,6 +83,7 @@ Global
{1CB869A7-2EEC-4A53-9C33-DF9E0C75825B} = {4DE63935-DCA9-4D63-9C1F-AAE79C89CA8B}
{1491B9C9-955D-4DB0-B1D5-70137A78EAAE} = {03F31CEE-D63E-4E7F-949F-139B33DC3385}
{A5439E79-96D6-4F02-8DD0-23DFF979851D} = {03F31CEE-D63E-4E7F-949F-139B33DC3385}
+ {BF948816-45E1-4F0F-985A-0B4DB4D3BF40} = {03F31CEE-D63E-4E7F-949F-139B33DC3385}
{852D4E16-58C3-47C2-A6BC-A5B12B37209F} = {03F31CEE-D63E-4E7F-949F-139B33DC3385}
{6645D0C4-83D1-4426-B9CD-67096CB7A60F} = {03F31CEE-D63E-4E7F-949F-139B33DC3385}
{7F536552-0E2A-4642-B7CF-863727C2F9CD} = {7631380A-FB73-4241-9987-0891A21E9769}
diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/LoggerMessageGenerator.Parser.cs b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/LoggerMessageGenerator.Parser.cs
index cc8dc0b5aae..0a6eadbbfee 100644
--- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/LoggerMessageGenerator.Parser.cs
+++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/LoggerMessageGenerator.Parser.cs
@@ -248,9 +248,10 @@ namespace Microsoft.Extensions.Logging.Generators
keepMethod = false;
}
- if (method.Body != null)
+ CSharpSyntaxNode? methodBody = method.Body as CSharpSyntaxNode ?? method.ExpressionBody;
+ if (methodBody != null)
{
- Diag(DiagnosticDescriptors.LoggingMethodHasBody, method.Body.GetLocation());
+ Diag(DiagnosticDescriptors.LoggingMethodHasBody, methodBody.GetLocation());
keepMethod = false;
}
diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/LoggerMessageGenerator.Roslyn4.0.cs b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/LoggerMessageGenerator.Roslyn4.0.cs
index ab342384270..7dd80ba2926 100644
--- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/LoggerMessageGenerator.Roslyn4.0.cs
+++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/LoggerMessageGenerator.Roslyn4.0.cs
@@ -7,7 +7,9 @@ using System.Linq;
using System.Text;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp.Syntax;
+#if !ROSLYN4_4_OR_GREATER
using Microsoft.CodeAnalysis.DotnetRuntime.Extensions;
+#endif
using Microsoft.CodeAnalysis.Text;
[assembly: System.Resources.NeutralResourcesLanguage("en-us")]
@@ -21,7 +23,9 @@ namespace Microsoft.Extensions.Logging.Generators
{
IncrementalValuesProvider<ClassDeclarationSyntax> classDeclarations = context.SyntaxProvider
.ForAttributeWithMetadataName(
+#if !ROSLYN4_4_OR_GREATER
context,
+#endif
Parser.LoggerMessageAttribute,
(node, _) => node is MethodDeclarationSyntax,
(context, _) => context.TargetNode.Parent as ClassDeclarationSyntax)
diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Microsoft.Extensions.Logging.Generators.Roslyn4.4.csproj b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Microsoft.Extensions.Logging.Generators.Roslyn4.4.csproj
new file mode 100644
index 00000000000..27bbeb67f7e
--- /dev/null
+++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Microsoft.Extensions.Logging.Generators.Roslyn4.4.csproj
@@ -0,0 +1,20 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <AnalyzerRoslynVersion>4.4</AnalyzerRoslynVersion>
+ <RoslynApiVersion>$(MicrosoftCodeAnalysisVersion_4_4)</RoslynApiVersion>
+ <DefineConstants>$(DefineConstants);ROSLYN4_0_OR_GREATER;ROSLYN4_4_OR_GREATER</DefineConstants>
+ </PropertyGroup>
+
+ <Import Project="Microsoft.Extensions.Logging.Generators.targets" />
+
+ <ItemGroup>
+ <Compile Include="$(CoreLibSharedDir)System\Collections\Generic\ValueListBuilder.cs" Link="Production\ValueListBuilder.cs" />
+ <Compile Include="$(CoreLibSharedDir)System\Collections\Generic\ValueListBuilder.Pop.cs" Link="Production\ValueListBuilder.Pop.cs" />
+ </ItemGroup>
+
+ <ItemGroup>
+ <Compile Remove="LoggerMessageGenerator.Roslyn3.11.cs" />
+ </ItemGroup>
+
+</Project>
diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/Microsoft.Extensions.Logging.Abstractions.csproj b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/Microsoft.Extensions.Logging.Abstractions.csproj
index 09e2e23824b..e95fbc0ac99 100644
--- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/Microsoft.Extensions.Logging.Abstractions.csproj
+++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/Microsoft.Extensions.Logging.Abstractions.csproj
@@ -45,6 +45,9 @@ Microsoft.Extensions.Logging.Abstractions.NullLogger</PackageDescription>
<AnalyzerReference Include="..\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.0.csproj"
Pack="true"
ReferenceAnalyzer="false" />
+ <AnalyzerReference Include="..\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.4.csproj"
+ Pack="true"
+ ReferenceAnalyzer="false" />
</ItemGroup>
</Project>
diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/tests/Microsoft.Extensions.Logging.Generators.Tests/LoggerMessageGeneratorParserTests.cs b/src/libraries/Microsoft.Extensions.Logging.Abstractions/tests/Microsoft.Extensions.Logging.Generators.Tests/LoggerMessageGeneratorParserTests.cs
index 4bb4271e265..b09409a76b6 100644
--- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/tests/Microsoft.Extensions.Logging.Generators.Tests/LoggerMessageGeneratorParserTests.cs
+++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/tests/Microsoft.Extensions.Logging.Generators.Tests/LoggerMessageGeneratorParserTests.cs
@@ -80,6 +80,23 @@ namespace Microsoft.Extensions.Logging.Generators.Tests
Assert.Equal(DiagnosticDescriptors.LoggingMethodHasBody.Id, diagnostics[0].Id);
}
+ [Fact]
+ public async Task InvalidMethodExpressionBody()
+ {
+ IReadOnlyList<Diagnostic> diagnostics = await RunGenerator(@"
+ partial class C
+ {
+ static partial void M1(ILogger logger);
+
+ [LoggerMessage(EventId = 0, Level = LogLevel.Debug, Message = ""M1"")]
+ static partial void M1(ILogger logger) => throw new Exception();
+ }
+ ");
+
+ Assert.Single(diagnostics);
+ Assert.Equal(DiagnosticDescriptors.LoggingMethodHasBody.Id, diagnostics[0].Id);
+ }
+
[Theory]
[InlineData("EventId = 0, Level = null, Message = \"This is a message with {foo}\"")]
[InlineData("eventId: 0, level: null, message: \"This is a message with {foo}\"")]
diff --git a/src/libraries/Microsoft.Extensions.Logging.Configuration/Microsoft.Extensions.Logging.Configuration.sln b/src/libraries/Microsoft.Extensions.Logging.Configuration/Microsoft.Extensions.Logging.Configuration.sln
index 1ca6c6d11dc..409aba8bfcf 100644
--- a/src/libraries/Microsoft.Extensions.Logging.Configuration/Microsoft.Extensions.Logging.Configuration.sln
+++ b/src/libraries/Microsoft.Extensions.Logging.Configuration/Microsoft.Extensions.Logging.Configuration.sln
@@ -27,6 +27,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Loggin
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Roslyn4.0", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.0.csproj", "{A5BA71C3-A03C-43F7-B48E-96C301E87691}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Roslyn4.4", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.4.csproj", "{962C4BF1-F689-4344-847D-9A657E55B5FA}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\ref\Microsoft.Extensions.Logging.Abstractions.csproj", "{C4F75024-EA9D-46C5-B2D9-CAE8FC5EFF38}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\src\Microsoft.Extensions.Logging.Abstractions.csproj", "{E7035B72-0180-437E-A696-1F0CD8921279}"
@@ -129,6 +131,10 @@ Global
{A5BA71C3-A03C-43F7-B48E-96C301E87691}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A5BA71C3-A03C-43F7-B48E-96C301E87691}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A5BA71C3-A03C-43F7-B48E-96C301E87691}.Release|Any CPU.Build.0 = Release|Any CPU
+ {962C4BF1-F689-4344-847D-9A657E55B5FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {962C4BF1-F689-4344-847D-9A657E55B5FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {962C4BF1-F689-4344-847D-9A657E55B5FA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {962C4BF1-F689-4344-847D-9A657E55B5FA}.Release|Any CPU.Build.0 = Release|Any CPU
{C4F75024-EA9D-46C5-B2D9-CAE8FC5EFF38}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C4F75024-EA9D-46C5-B2D9-CAE8FC5EFF38}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C4F75024-EA9D-46C5-B2D9-CAE8FC5EFF38}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -231,6 +237,7 @@ Global
{B077F55F-E15A-4B91-A1EB-8178B8313908} = {ED0ADAC4-705C-421A-A8D2-69CFFFCF734B}
{77AA759E-5BF0-4C86-91EB-2A33263553EC} = {B51C2035-38E7-4F22-9F9B-A49DC2B6C92F}
{A5BA71C3-A03C-43F7-B48E-96C301E87691} = {B51C2035-38E7-4F22-9F9B-A49DC2B6C92F}
+ {962C4BF1-F689-4344-847D-9A657E55B5FA} = {B51C2035-38E7-4F22-9F9B-A49DC2B6C92F}
{4531AA3F-D0FC-4C1F-BF54-71E0D29CBA16} = {B51C2035-38E7-4F22-9F9B-A49DC2B6C92F}
{5D09D653-A257-4673-810F-6157486964F4} = {B51C2035-38E7-4F22-9F9B-A49DC2B6C92F}
EndGlobalSection
diff --git a/src/libraries/Microsoft.Extensions.Logging.Console/Microsoft.Extensions.Logging.Console.sln b/src/libraries/Microsoft.Extensions.Logging.Console/Microsoft.Extensions.Logging.Console.sln
index 32f82ebc68a..d88b3f64a44 100644
--- a/src/libraries/Microsoft.Extensions.Logging.Console/Microsoft.Extensions.Logging.Console.sln
+++ b/src/libraries/Microsoft.Extensions.Logging.Console/Microsoft.Extensions.Logging.Console.sln
@@ -29,6 +29,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Loggin
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Roslyn4.0", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.0.csproj", "{2ECBDD0B-43A8-408E-B770-878F64620915}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Roslyn4.4", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.4.csproj", "{629A8EEE-69D9-4EBA-BDB4-D0CDE942D3DB}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\ref\Microsoft.Extensions.Logging.Abstractions.csproj", "{9BCECFDA-BF6E-4BD8-BFE2-A25C61F57874}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\src\Microsoft.Extensions.Logging.Abstractions.csproj", "{6A02D298-6899-4DD0-BFF4-40702BC30BCD}"
@@ -83,6 +85,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGene
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.0", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.Roslyn4.0.csproj", "{F26A20A7-F0B2-4410-972C-15DACEEBDB8C}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.4", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.Roslyn4.4.csproj", "{92CCAC1D-3D54-44C0-A4E5-FF125B8362D5}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\ref\System.Text.Json.csproj", "{8C8B3A3F-A9C1-4E72-BA3F-DE8A8FE5B040}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{C9F3D8F9-8646-432E-82FC-2E4E8411CFFE}"
@@ -161,6 +165,10 @@ Global
{2ECBDD0B-43A8-408E-B770-878F64620915}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2ECBDD0B-43A8-408E-B770-878F64620915}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2ECBDD0B-43A8-408E-B770-878F64620915}.Release|Any CPU.Build.0 = Release|Any CPU
+ {629A8EEE-69D9-4EBA-BDB4-D0CDE942D3DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {629A8EEE-69D9-4EBA-BDB4-D0CDE942D3DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {629A8EEE-69D9-4EBA-BDB4-D0CDE942D3DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {629A8EEE-69D9-4EBA-BDB4-D0CDE942D3DB}.Release|Any CPU.Build.0 = Release|Any CPU
{9BCECFDA-BF6E-4BD8-BFE2-A25C61F57874}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9BCECFDA-BF6E-4BD8-BFE2-A25C61F57874}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9BCECFDA-BF6E-4BD8-BFE2-A25C61F57874}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -269,6 +277,10 @@ Global
{F26A20A7-F0B2-4410-972C-15DACEEBDB8C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F26A20A7-F0B2-4410-972C-15DACEEBDB8C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F26A20A7-F0B2-4410-972C-15DACEEBDB8C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {92CCAC1D-3D54-44C0-A4E5-FF125B8362D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {92CCAC1D-3D54-44C0-A4E5-FF125B8362D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {92CCAC1D-3D54-44C0-A4E5-FF125B8362D5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {92CCAC1D-3D54-44C0-A4E5-FF125B8362D5}.Release|Any CPU.Build.0 = Release|Any CPU
{8C8B3A3F-A9C1-4E72-BA3F-DE8A8FE5B040}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8C8B3A3F-A9C1-4E72-BA3F-DE8A8FE5B040}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8C8B3A3F-A9C1-4E72-BA3F-DE8A8FE5B040}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -322,10 +334,12 @@ Global
{C9F3D8F9-8646-432E-82FC-2E4E8411CFFE} = {F3BAE0A3-1AF5-4F38-ADBE-6FEC99664322}
{424A18FB-010E-4B03-B1E7-6747E1C5E31E} = {561502B1-98F5-40E0-B9D5-0F720E88E657}
{2ECBDD0B-43A8-408E-B770-878F64620915} = {561502B1-98F5-40E0-B9D5-0F720E88E657}
+ {629A8EEE-69D9-4EBA-BDB4-D0CDE942D3DB} = {561502B1-98F5-40E0-B9D5-0F720E88E657}
{17C4DD18-64B1-43FF-89A2-1D5EBFD4202E} = {561502B1-98F5-40E0-B9D5-0F720E88E657}
{83BADB4A-BD97-4121-B0B8-78BD3E3A352A} = {561502B1-98F5-40E0-B9D5-0F720E88E657}
{A276A0DD-B092-455B-90A7-6EE82BFF4C4B} = {561502B1-98F5-40E0-B9D5-0F720E88E657}
{F26A20A7-F0B2-4410-972C-15DACEEBDB8C} = {561502B1-98F5-40E0-B9D5-0F720E88E657}
+ {92CCAC1D-3D54-44C0-A4E5-FF125B8362D5} = {561502B1-98F5-40E0-B9D5-0F720E88E657}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C1591684-381C-4761-A20A-4B7FA24E5557}
diff --git a/src/libraries/Microsoft.Extensions.Logging.Console/src/ConsoleLoggerExtensions.cs b/src/libraries/Microsoft.Extensions.Logging.Console/src/ConsoleLoggerExtensions.cs
index f10f581fca6..160e099097f 100644
--- a/src/libraries/Microsoft.Extensions.Logging.Console/src/ConsoleLoggerExtensions.cs
+++ b/src/libraries/Microsoft.Extensions.Logging.Console/src/ConsoleLoggerExtensions.cs
@@ -4,12 +4,14 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.Versioning;
+using System.Text.Json;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Logging.Configuration;
using Microsoft.Extensions.Logging.Console;
using Microsoft.Extensions.Options;
+using ThrowHelper = System.ThrowHelper;
namespace Microsoft.Extensions.Logging
{
@@ -28,6 +30,7 @@ namespace Microsoft.Extensions.Logging
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode",
Justification = "AddConsoleFormatter and RegisterProviderOptions are only dangerous when the Options type cannot be statically analyzed, but that is not the case here. " +
"The DynamicallyAccessedMembers annotations on them will make sure to preserve the right members from the different options objects.")]
+ [DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(JsonWriterOptions))]
public static ILoggingBuilder AddConsole(this ILoggingBuilder builder)
{
builder.AddConfiguration();
diff --git a/src/libraries/Microsoft.Extensions.Logging.Console/src/Microsoft.Extensions.Logging.Console.csproj b/src/libraries/Microsoft.Extensions.Logging.Console/src/Microsoft.Extensions.Logging.Console.csproj
index dcadc414c52..7d039e7c437 100644
--- a/src/libraries/Microsoft.Extensions.Logging.Console/src/Microsoft.Extensions.Logging.Console.csproj
+++ b/src/libraries/Microsoft.Extensions.Logging.Console/src/Microsoft.Extensions.Logging.Console.csproj
@@ -34,6 +34,7 @@
</ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
+ <Compile Include="$(CoreLibSharedDir)System\Diagnostics\CodeAnalysis\DynamicDependencyAttribute.cs" />
<Compile Include="$(CoreLibSharedDir)System\Diagnostics\CodeAnalysis\DynamicallyAccessedMembersAttribute.cs" />
<Compile Include="$(CoreLibSharedDir)System\Diagnostics\CodeAnalysis\DynamicallyAccessedMemberTypes.cs" />
<Compile Include="$(CoreLibSharedDir)System\Diagnostics\CodeAnalysis\RequiresUnreferencedCodeAttribute.cs" />
diff --git a/src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/ConsoleLoggerExtensionsTests.cs b/src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/ConsoleLoggerExtensionsTests.cs
index d5843e65cce..38771eb2584 100644
--- a/src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/ConsoleLoggerExtensionsTests.cs
+++ b/src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/ConsoleLoggerExtensionsTests.cs
@@ -271,7 +271,6 @@ namespace Microsoft.Extensions.Logging.Console.Test
}
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
- [ActiveIssue("https://github.com/dotnet/runtime/issues/73436", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot))]
public void AddJsonConsole_ChangeProperties_IsReadFromLoggingConfiguration()
{
var configuration = new ConfigurationBuilder().AddInMemoryCollection(new[] {
diff --git a/src/libraries/Microsoft.Extensions.Logging.Console/tests/TrimmingTests/JsonFormattingTests.cs b/src/libraries/Microsoft.Extensions.Logging.Console/tests/TrimmingTests/JsonFormattingTests.cs
new file mode 100644
index 00000000000..5a0c323cb7e
--- /dev/null
+++ b/src/libraries/Microsoft.Extensions.Logging.Console/tests/TrimmingTests/JsonFormattingTests.cs
@@ -0,0 +1,120 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Logging;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Text;
+using System.Threading.Tasks;
+
+class Program
+{
+ /// <summary>
+ /// Tests that using Logging.Console Json formatter options coming from the Configuration works correctly with trimming
+ /// </summary>
+ static async Task<int> Main()
+ {
+ FakeConsoleWriter consoleWriter = new FakeConsoleWriter();
+ Console.SetOut(consoleWriter);
+
+ IServiceCollection services = new ServiceCollection();
+ IConfiguration config = new ConfigurationBuilder()
+ .AddInMemoryCollection(
+ new[]
+ {
+ new KeyValuePair<string, string>("Logging:Console:FormatterName", "json"),
+ new KeyValuePair<string, string>("Logging:Console:FormatterOptions:TimestampFormat", "dd/MM/yy"),
+ new KeyValuePair<string, string>("Logging:Console:FormatterOptions:JsonWriterOptions:Indented", "true"),
+ })
+ .Build();
+
+ services.AddLogging(logging =>
+ {
+ logging.AddConfiguration(config.GetSection("Logging"));
+ logging.AddConsole();
+ });
+
+ ServiceProvider provider = services.BuildServiceProvider();
+ ILogger logger = provider.GetRequiredService<ILogger<Program>>();
+
+ logger.LogError("Hello");
+
+ try
+ {
+ await consoleWriter.FinishedWriting.WaitAsync(TimeSpan.FromSeconds(10));
+ }
+ catch
+ {
+ // timing out means that FakeConsoleWriter isn't overriding the right 'Write' method
+ return -99;
+ }
+
+ string consoleOutput = consoleWriter.GetOutput();
+
+ // ensure the output contains whitespace between the property and the value
+ if (!consoleOutput.Contains("""
+ "Message": "Hello",
+ """))
+ {
+ return -1;
+ }
+
+ // ensure the output contains new lines since JsonWriterOptions.Indented is true
+ if (!consoleOutput.Contains('\n'))
+ {
+ return -2;
+ }
+
+ // ensure the output contains the right Timestamp format
+ int timestampIndex = consoleOutput.IndexOf("\"Timestamp\": \"");
+ if (timestampIndex == -1)
+ {
+ return -3;
+ }
+
+ if (!IsTimestampFormat(consoleOutput.AsSpan(timestampIndex + 14, 8)))
+ {
+ return -4;
+ }
+
+ return 100;
+ }
+
+ private static bool IsTimestampFormat(ReadOnlySpan<char> timestamp) =>
+ timestamp.Length == 8
+ && char.IsDigit(timestamp[0])
+ && char.IsDigit(timestamp[1])
+ && timestamp[2] == '/'
+ && char.IsDigit(timestamp[3])
+ && char.IsDigit(timestamp[4])
+ && timestamp[5] == '/'
+ && char.IsDigit(timestamp[6])
+ && char.IsDigit(timestamp[7]);
+
+ private sealed class FakeConsoleWriter : TextWriter
+ {
+ private readonly StringBuilder _sb;
+ private readonly TaskCompletionSource _onFinishedWriting;
+
+ public FakeConsoleWriter()
+ {
+ _sb = new StringBuilder();
+ _onFinishedWriting = new TaskCompletionSource();
+ }
+
+ public override Encoding Encoding => Encoding.Unicode;
+
+ public Task FinishedWriting => _onFinishedWriting.Task;
+
+ public override void Write(char[] buffer, int index, int count)
+ {
+ _sb.Append(buffer, index, count);
+ _onFinishedWriting.SetResult();
+ }
+
+ public string GetOutput() => _sb.ToString();
+ }
+}
diff --git a/src/libraries/Microsoft.Extensions.Logging.Console/tests/TrimmingTests/Microsoft.Extensions.Logging.Console.TrimmingTests.proj b/src/libraries/Microsoft.Extensions.Logging.Console/tests/TrimmingTests/Microsoft.Extensions.Logging.Console.TrimmingTests.proj
index 866b55f9a42..130aac066b6 100644
--- a/src/libraries/Microsoft.Extensions.Logging.Console/tests/TrimmingTests/Microsoft.Extensions.Logging.Console.TrimmingTests.proj
+++ b/src/libraries/Microsoft.Extensions.Logging.Console/tests/TrimmingTests/Microsoft.Extensions.Logging.Console.TrimmingTests.proj
@@ -8,6 +8,7 @@
<ItemGroup>
<TestConsoleAppSourceFiles Include="AddConsoleFormatterTests.cs" />
+ <TestConsoleAppSourceFiles Include="JsonFormattingTests.cs" />
</ItemGroup>
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" />
diff --git a/src/libraries/Microsoft.Extensions.Logging.Debug/Microsoft.Extensions.Logging.Debug.sln b/src/libraries/Microsoft.Extensions.Logging.Debug/Microsoft.Extensions.Logging.Debug.sln
index 19532e580b0..96f91ed2eaf 100644
--- a/src/libraries/Microsoft.Extensions.Logging.Debug/Microsoft.Extensions.Logging.Debug.sln
+++ b/src/libraries/Microsoft.Extensions.Logging.Debug/Microsoft.Extensions.Logging.Debug.sln
@@ -15,6 +15,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Loggin
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Roslyn4.0", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.0.csproj", "{B974A465-1912-4E4A-ADA6-B2BAF9DDE89D}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Roslyn4.4", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.4.csproj", "{93655DA5-BC50-4F07-85B3-509076003CBD}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\ref\Microsoft.Extensions.Logging.Abstractions.csproj", "{16E075F3-372C-4A98-BDAF-FF615B8A9855}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\src\Microsoft.Extensions.Logging.Abstractions.csproj", "{3DDCFBB7-A438-46BB-9094-A1A39060DD2A}"
@@ -89,6 +91,10 @@ Global
{B974A465-1912-4E4A-ADA6-B2BAF9DDE89D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B974A465-1912-4E4A-ADA6-B2BAF9DDE89D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B974A465-1912-4E4A-ADA6-B2BAF9DDE89D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {93655DA5-BC50-4F07-85B3-509076003CBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {93655DA5-BC50-4F07-85B3-509076003CBD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {93655DA5-BC50-4F07-85B3-509076003CBD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {93655DA5-BC50-4F07-85B3-509076003CBD}.Release|Any CPU.Build.0 = Release|Any CPU
{16E075F3-372C-4A98-BDAF-FF615B8A9855}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{16E075F3-372C-4A98-BDAF-FF615B8A9855}.Debug|Any CPU.Build.0 = Debug|Any CPU
{16E075F3-372C-4A98-BDAF-FF615B8A9855}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -175,6 +181,7 @@ Global
{A3AE4326-5EB6-454C-8276-93B1E5FA5A84} = {FC2F4F53-DFE7-4A0B-A85C-D266FDD51526}
{6D60A144-E901-4BCB-8DE6-148B56157771} = {B1578203-268C-45C3-B62C-3D5CFC340AB4}
{B974A465-1912-4E4A-ADA6-B2BAF9DDE89D} = {B1578203-268C-45C3-B62C-3D5CFC340AB4}
+ {93655DA5-BC50-4F07-85B3-509076003CBD} = {B1578203-268C-45C3-B62C-3D5CFC340AB4}
{04FB7C63-ACEF-41F4-98E4-35F5635B4D73} = {B1578203-268C-45C3-B62C-3D5CFC340AB4}
{635C575E-2759-4F37-A7CA-2A51BDCC84C5} = {B1578203-268C-45C3-B62C-3D5CFC340AB4}
EndGlobalSection
diff --git a/src/libraries/Microsoft.Extensions.Logging.EventLog/Microsoft.Extensions.Logging.EventLog.sln b/src/libraries/Microsoft.Extensions.Logging.EventLog/Microsoft.Extensions.Logging.EventLog.sln
index 09eeb020e26..3b3caec5e0f 100644
--- a/src/libraries/Microsoft.Extensions.Logging.EventLog/Microsoft.Extensions.Logging.EventLog.sln
+++ b/src/libraries/Microsoft.Extensions.Logging.EventLog/Microsoft.Extensions.Logging.EventLog.sln
@@ -15,6 +15,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Loggin
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Roslyn4.0", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.0.csproj", "{AA692D58-2C6C-4307-A13F-0884B6164026}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Roslyn4.4", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.4.csproj", "{4F09A07F-70C7-4288-A6F3-EFBD5306E1F7}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\ref\Microsoft.Extensions.Logging.Abstractions.csproj", "{B1BE2665-7E3F-46FB-BCE1-774D5984F76C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\src\Microsoft.Extensions.Logging.Abstractions.csproj", "{6C2850C7-56F0-4DCF-BFBF-4365DE2FC439}"
@@ -95,6 +97,10 @@ Global
{AA692D58-2C6C-4307-A13F-0884B6164026}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AA692D58-2C6C-4307-A13F-0884B6164026}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AA692D58-2C6C-4307-A13F-0884B6164026}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4F09A07F-70C7-4288-A6F3-EFBD5306E1F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4F09A07F-70C7-4288-A6F3-EFBD5306E1F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4F09A07F-70C7-4288-A6F3-EFBD5306E1F7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4F09A07F-70C7-4288-A6F3-EFBD5306E1F7}.Release|Any CPU.Build.0 = Release|Any CPU
{B1BE2665-7E3F-46FB-BCE1-774D5984F76C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B1BE2665-7E3F-46FB-BCE1-774D5984F76C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B1BE2665-7E3F-46FB-BCE1-774D5984F76C}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -196,6 +202,7 @@ Global
{204919F3-8E5C-4D4D-9E3B-ADFB1E453972} = {FD104C22-7ECA-47DD-8877-26AC1E0E5ECC}
{2F5646F6-8247-42E5-ACF5-8732ACB7067A} = {677D11A9-4811-41EA-8F93-F8DB15BF27DD}
{AA692D58-2C6C-4307-A13F-0884B6164026} = {677D11A9-4811-41EA-8F93-F8DB15BF27DD}
+ {4F09A07F-70C7-4288-A6F3-EFBD5306E1F7} = {677D11A9-4811-41EA-8F93-F8DB15BF27DD}
{7D8210EC-014D-4901-97D4-0C8AC919804E} = {677D11A9-4811-41EA-8F93-F8DB15BF27DD}
{82D7CA6B-8647-49A1-B4A1-40A8C6B9D7C2} = {677D11A9-4811-41EA-8F93-F8DB15BF27DD}
EndGlobalSection
diff --git a/src/libraries/Microsoft.Extensions.Logging.EventSource/Microsoft.Extensions.Logging.EventSource.sln b/src/libraries/Microsoft.Extensions.Logging.EventSource/Microsoft.Extensions.Logging.EventSource.sln
index ca25ae0e864..78211bb5e57 100644
--- a/src/libraries/Microsoft.Extensions.Logging.EventSource/Microsoft.Extensions.Logging.EventSource.sln
+++ b/src/libraries/Microsoft.Extensions.Logging.EventSource/Microsoft.Extensions.Logging.EventSource.sln
@@ -17,6 +17,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Loggin
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Roslyn4.0", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.0.csproj", "{9E6D88B5-926D-494D-BC52-A429EFBF419F}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Roslyn4.4", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.4.csproj", "{1201F595-5DD2-400E-B707-16C215E39FF9}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\ref\Microsoft.Extensions.Logging.Abstractions.csproj", "{F5B4A3CF-03B5-40A2-BE78-DA6230270113}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\src\Microsoft.Extensions.Logging.Abstractions.csproj", "{F4A703F8-3D69-4113-A86F-9AD908086092}"
@@ -63,6 +65,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGene
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.0", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.Roslyn4.0.csproj", "{4280A906-80BD-406D-A591-B3C58B2BD72C}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.4", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.Roslyn4.4.csproj", "{07C1E9F5-4FAD-4E03-8E14-BD6476561CF3}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\ref\System.Text.Json.csproj", "{3E80E645-8642-4944-9B45-0F317A8D2E58}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{5A956452-F322-4C4F-8689-D2B425764293}"
@@ -117,6 +121,10 @@ Global
{9E6D88B5-926D-494D-BC52-A429EFBF419F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9E6D88B5-926D-494D-BC52-A429EFBF419F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9E6D88B5-926D-494D-BC52-A429EFBF419F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1201F595-5DD2-400E-B707-16C215E39FF9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1201F595-5DD2-400E-B707-16C215E39FF9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1201F595-5DD2-400E-B707-16C215E39FF9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1201F595-5DD2-400E-B707-16C215E39FF9}.Release|Any CPU.Build.0 = Release|Any CPU
{F5B4A3CF-03B5-40A2-BE78-DA6230270113}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F5B4A3CF-03B5-40A2-BE78-DA6230270113}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F5B4A3CF-03B5-40A2-BE78-DA6230270113}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -209,6 +217,10 @@ Global
{4280A906-80BD-406D-A591-B3C58B2BD72C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4280A906-80BD-406D-A591-B3C58B2BD72C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4280A906-80BD-406D-A591-B3C58B2BD72C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {07C1E9F5-4FAD-4E03-8E14-BD6476561CF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {07C1E9F5-4FAD-4E03-8E14-BD6476561CF3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {07C1E9F5-4FAD-4E03-8E14-BD6476561CF3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {07C1E9F5-4FAD-4E03-8E14-BD6476561CF3}.Release|Any CPU.Build.0 = Release|Any CPU
{3E80E645-8642-4944-9B45-0F317A8D2E58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3E80E645-8642-4944-9B45-0F317A8D2E58}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3E80E645-8642-4944-9B45-0F317A8D2E58}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -252,10 +264,12 @@ Global
{5A956452-F322-4C4F-8689-D2B425764293} = {887BF6A4-CB22-4DF4-8E24-A1B267161ECB}
{332D5122-9FA6-41D5-ACDC-9EF680961C31} = {590E1BD9-E5AD-456B-B954-E26EA0BFE405}
{9E6D88B5-926D-494D-BC52-A429EFBF419F} = {590E1BD9-E5AD-456B-B954-E26EA0BFE405}
+ {1201F595-5DD2-400E-B707-16C215E39FF9} = {590E1BD9-E5AD-456B-B954-E26EA0BFE405}
{05F7A599-FAFB-4F24-ABB5-548219FF6492} = {590E1BD9-E5AD-456B-B954-E26EA0BFE405}
{F722EACC-BB4F-4A88-B833-BB931E20CFCD} = {590E1BD9-E5AD-456B-B954-E26EA0BFE405}
{62AECDFA-699B-41B0-AE5F-4B7D5D8F26B1} = {590E1BD9-E5AD-456B-B954-E26EA0BFE405}
{4280A906-80BD-406D-A591-B3C58B2BD72C} = {590E1BD9-E5AD-456B-B954-E26EA0BFE405}
+ {07C1E9F5-4FAD-4E03-8E14-BD6476561CF3} = {590E1BD9-E5AD-456B-B954-E26EA0BFE405}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {67B715CE-2E67-4605-BFB0-CA65F345C3A5}
diff --git a/src/libraries/Microsoft.Extensions.Logging.EventSource/tests/Microsoft.Extensions.Logging.EventSource.Tests.csproj b/src/libraries/Microsoft.Extensions.Logging.EventSource/tests/Microsoft.Extensions.Logging.EventSource.Tests.csproj
index 02fc06ade5e..cc24d8f4a83 100644
--- a/src/libraries/Microsoft.Extensions.Logging.EventSource/tests/Microsoft.Extensions.Logging.EventSource.Tests.csproj
+++ b/src/libraries/Microsoft.Extensions.Logging.EventSource/tests/Microsoft.Extensions.Logging.EventSource.Tests.csproj
@@ -3,6 +3,7 @@
<PropertyGroup>
<TargetFrameworks>$(NetCoreAppCurrent);$(NetFrameworkMinimum)</TargetFrameworks>
<EnableDefaultItems>true</EnableDefaultItems>
+ <EventSourceSupport Condition="'$(TestNativeAot)' == 'true'">true</EventSourceSupport>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/Microsoft.Extensions.Logging.TraceSource/Microsoft.Extensions.Logging.TraceSource.sln b/src/libraries/Microsoft.Extensions.Logging.TraceSource/Microsoft.Extensions.Logging.TraceSource.sln
index 678f31f3cde..ffa18ec8208 100644
--- a/src/libraries/Microsoft.Extensions.Logging.TraceSource/Microsoft.Extensions.Logging.TraceSource.sln
+++ b/src/libraries/Microsoft.Extensions.Logging.TraceSource/Microsoft.Extensions.Logging.TraceSource.sln
@@ -15,6 +15,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Loggin
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Roslyn4.0", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.0.csproj", "{D9B7AD79-A748-4D4F-9CF8-AB65D848085D}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Roslyn4.4", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.4.csproj", "{7B81FBBF-6DC2-4854-990F-0D4394E00A8A}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\ref\Microsoft.Extensions.Logging.Abstractions.csproj", "{367922CE-A24E-4977-89BE-D1F2F678F8B2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\src\Microsoft.Extensions.Logging.Abstractions.csproj", "{F63AB9DB-6E62-4FEC-BA06-E146615C08AC}"
@@ -89,6 +91,10 @@ Global
{D9B7AD79-A748-4D4F-9CF8-AB65D848085D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D9B7AD79-A748-4D4F-9CF8-AB65D848085D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D9B7AD79-A748-4D4F-9CF8-AB65D848085D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7B81FBBF-6DC2-4854-990F-0D4394E00A8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7B81FBBF-6DC2-4854-990F-0D4394E00A8A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7B81FBBF-6DC2-4854-990F-0D4394E00A8A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7B81FBBF-6DC2-4854-990F-0D4394E00A8A}.Release|Any CPU.Build.0 = Release|Any CPU
{367922CE-A24E-4977-89BE-D1F2F678F8B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{367922CE-A24E-4977-89BE-D1F2F678F8B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{367922CE-A24E-4977-89BE-D1F2F678F8B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -175,6 +181,7 @@ Global
{D72BF608-9C7C-41BE-9288-22BA49AF954F} = {DFF3B3E7-DC70-46BC-8EDC-DC73CD69F7FC}
{B3511D68-4F4C-4632-B993-649BCF73DE46} = {E852D5A7-219C-4E2B-A327-6C6B988E65FC}
{D9B7AD79-A748-4D4F-9CF8-AB65D848085D} = {E852D5A7-219C-4E2B-A327-6C6B988E65FC}
+ {7B81FBBF-6DC2-4854-990F-0D4394E00A8A} = {E852D5A7-219C-4E2B-A327-6C6B988E65FC}
{F5F7EA6D-5CBB-4711-8B79-17AF857DE2AC} = {E852D5A7-219C-4E2B-A327-6C6B988E65FC}
{4559571A-68B4-40DD-B22F-76D6E06683EB} = {E852D5A7-219C-4E2B-A327-6C6B988E65FC}
EndGlobalSection
diff --git a/src/libraries/Microsoft.Extensions.Logging/Microsoft.Extensions.Logging.sln b/src/libraries/Microsoft.Extensions.Logging/Microsoft.Extensions.Logging.sln
index 9d959add5ff..e9817f3ce45 100644
--- a/src/libraries/Microsoft.Extensions.Logging/Microsoft.Extensions.Logging.sln
+++ b/src/libraries/Microsoft.Extensions.Logging/Microsoft.Extensions.Logging.sln
@@ -49,6 +49,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Loggin
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Roslyn4.0", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.0.csproj", "{95CB49D4-0754-49C6-8E97-868626614390}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Roslyn4.4", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.4.csproj", "{E1519A2D-BBC6-4C15-BCAA-6B42EBE6FB0A}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\ref\Microsoft.Extensions.Logging.Abstractions.csproj", "{5CC86773-7762-4FB7-9B6E-F4002F286AD4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\src\Microsoft.Extensions.Logging.Abstractions.csproj", "{4BEF5648-8DBF-4E16-B6E6-6F80694E140D}"
@@ -123,6 +125,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGene
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.0", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.Roslyn4.0.csproj", "{D8001B54-0361-40B9-A094-13063C5CF9A3}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.4", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.Roslyn4.4.csproj", "{502417D7-C385-4490-BB0F-920900DA8C9E}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\ref\System.Text.Json.csproj", "{BB1EF0C4-822E-4476-8872-8620EA665C35}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{34C22E86-B0A3-457D-B8D9-7CF47AAF2570}"
@@ -241,6 +245,10 @@ Global
{95CB49D4-0754-49C6-8E97-868626614390}.Debug|Any CPU.Build.0 = Debug|Any CPU
{95CB49D4-0754-49C6-8E97-868626614390}.Release|Any CPU.ActiveCfg = Release|Any CPU
{95CB49D4-0754-49C6-8E97-868626614390}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E1519A2D-BBC6-4C15-BCAA-6B42EBE6FB0A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E1519A2D-BBC6-4C15-BCAA-6B42EBE6FB0A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E1519A2D-BBC6-4C15-BCAA-6B42EBE6FB0A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E1519A2D-BBC6-4C15-BCAA-6B42EBE6FB0A}.Release|Any CPU.Build.0 = Release|Any CPU
{5CC86773-7762-4FB7-9B6E-F4002F286AD4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5CC86773-7762-4FB7-9B6E-F4002F286AD4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5CC86773-7762-4FB7-9B6E-F4002F286AD4}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -389,6 +397,10 @@ Global
{D8001B54-0361-40B9-A094-13063C5CF9A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D8001B54-0361-40B9-A094-13063C5CF9A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D8001B54-0361-40B9-A094-13063C5CF9A3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {502417D7-C385-4490-BB0F-920900DA8C9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {502417D7-C385-4490-BB0F-920900DA8C9E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {502417D7-C385-4490-BB0F-920900DA8C9E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {502417D7-C385-4490-BB0F-920900DA8C9E}.Release|Any CPU.Build.0 = Release|Any CPU
{BB1EF0C4-822E-4476-8872-8620EA665C35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BB1EF0C4-822E-4476-8872-8620EA665C35}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BB1EF0C4-822E-4476-8872-8620EA665C35}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -462,10 +474,12 @@ Global
{34C22E86-B0A3-457D-B8D9-7CF47AAF2570} = {D8928AB2-2939-4421-90C5-56B789BF93E5}
{765ABDD6-8C3B-4CD8-9DAC-BE9DAB674726} = {BCF59319-979C-42FA-9B5E-19EFCC91D288}
{95CB49D4-0754-49C6-8E97-868626614390} = {BCF59319-979C-42FA-9B5E-19EFCC91D288}
+ {E1519A2D-BBC6-4C15-BCAA-6B42EBE6FB0A} = {BCF59319-979C-42FA-9B5E-19EFCC91D288}
{7268FF18-CAB4-4BC8-A767-161033C9D0BB} = {BCF59319-979C-42FA-9B5E-19EFCC91D288}
{2CBBB613-7A47-495A-839D-76824F6C2100} = {BCF59319-979C-42FA-9B5E-19EFCC91D288}
{C1557157-7D8E-43A3-89D1-9F4F2621D838} = {BCF59319-979C-42FA-9B5E-19EFCC91D288}
{D8001B54-0361-40B9-A094-13063C5CF9A3} = {BCF59319-979C-42FA-9B5E-19EFCC91D288}
+ {502417D7-C385-4490-BB0F-920900DA8C9E} = {BCF59319-979C-42FA-9B5E-19EFCC91D288}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B57B7C13-740F-4482-B7B6-B5E87014ACB1}
diff --git a/src/libraries/Microsoft.Extensions.Options/Microsoft.Extensions.Options.sln b/src/libraries/Microsoft.Extensions.Options/Microsoft.Extensions.Options.sln
index 3fa52a28877..b2a01d76807 100644
--- a/src/libraries/Microsoft.Extensions.Options/Microsoft.Extensions.Options.sln
+++ b/src/libraries/Microsoft.Extensions.Options/Microsoft.Extensions.Options.sln
@@ -69,6 +69,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Loggin
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Roslyn4.0", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.0.csproj", "{8A4E7CB4-9983-4B7F-BED9-7A94BAC7CA07}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Roslyn4.4", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.4.csproj", "{333116ED-7874-4ECD-91EC-641B8479F696}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\ref\Microsoft.Extensions.Logging.Abstractions.csproj", "{EFFB59C1-CAF4-4347-B996-4C773E1AFAA8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\src\Microsoft.Extensions.Logging.Abstractions.csproj", "{56D37CB2-68A3-42D3-AA0E-416813ABAD8B}"
@@ -145,6 +147,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGene
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.0", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.Roslyn4.0.csproj", "{E06CE29E-15EB-4C0E-97B7-4367FFEDD98D}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.4", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.Roslyn4.4.csproj", "{9021FD06-E11E-42DE-87EF-A1040BA5DB56}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\ref\System.Text.Json.csproj", "{6E2398EA-A64A-4493-A79B-63D2F072A690}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{D7CEC738-5D2D-4FCB-9268-9650EB01BF31}"
@@ -303,6 +307,10 @@ Global
{8A4E7CB4-9983-4B7F-BED9-7A94BAC7CA07}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8A4E7CB4-9983-4B7F-BED9-7A94BAC7CA07}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8A4E7CB4-9983-4B7F-BED9-7A94BAC7CA07}.Release|Any CPU.Build.0 = Release|Any CPU
+ {333116ED-7874-4ECD-91EC-641B8479F696}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {333116ED-7874-4ECD-91EC-641B8479F696}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {333116ED-7874-4ECD-91EC-641B8479F696}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {333116ED-7874-4ECD-91EC-641B8479F696}.Release|Any CPU.Build.0 = Release|Any CPU
{EFFB59C1-CAF4-4347-B996-4C773E1AFAA8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EFFB59C1-CAF4-4347-B996-4C773E1AFAA8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EFFB59C1-CAF4-4347-B996-4C773E1AFAA8}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -455,6 +463,10 @@ Global
{E06CE29E-15EB-4C0E-97B7-4367FFEDD98D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E06CE29E-15EB-4C0E-97B7-4367FFEDD98D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E06CE29E-15EB-4C0E-97B7-4367FFEDD98D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9021FD06-E11E-42DE-87EF-A1040BA5DB56}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9021FD06-E11E-42DE-87EF-A1040BA5DB56}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9021FD06-E11E-42DE-87EF-A1040BA5DB56}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9021FD06-E11E-42DE-87EF-A1040BA5DB56}.Release|Any CPU.Build.0 = Release|Any CPU
{6E2398EA-A64A-4493-A79B-63D2F072A690}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6E2398EA-A64A-4493-A79B-63D2F072A690}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6E2398EA-A64A-4493-A79B-63D2F072A690}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -539,10 +551,12 @@ Global
{D7CEC738-5D2D-4FCB-9268-9650EB01BF31} = {7028EE0A-D314-4F48-91CA-51A1633BC3F4}
{39EE5D71-77C5-4633-A47F-1062172FD121} = {C25891DB-FBAC-4B92-9BB9-A8181B5A0EF1}
{8A4E7CB4-9983-4B7F-BED9-7A94BAC7CA07} = {C25891DB-FBAC-4B92-9BB9-A8181B5A0EF1}
+ {333116ED-7874-4ECD-91EC-641B8479F696} = {C25891DB-FBAC-4B92-9BB9-A8181B5A0EF1}
{02425B61-8D98-4F4A-88AE-F77D4837DF9E} = {C25891DB-FBAC-4B92-9BB9-A8181B5A0EF1}
{E0460280-2F49-474C-862D-1787D9244CC8} = {C25891DB-FBAC-4B92-9BB9-A8181B5A0EF1}
{B5F25A78-B7FB-460B-9B71-BE82D22923FD} = {C25891DB-FBAC-4B92-9BB9-A8181B5A0EF1}
{E06CE29E-15EB-4C0E-97B7-4367FFEDD98D} = {C25891DB-FBAC-4B92-9BB9-A8181B5A0EF1}
+ {9021FD06-E11E-42DE-87EF-A1040BA5DB56} = {C25891DB-FBAC-4B92-9BB9-A8181B5A0EF1}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {FE89CDC6-6313-439C-85D7-A81D5DF593E9}
diff --git a/src/libraries/Microsoft.Extensions.Primitives/src/ChangeToken.cs b/src/libraries/Microsoft.Extensions.Primitives/src/ChangeToken.cs
index 75dbb217e26..1cd488d7e61 100644
--- a/src/libraries/Microsoft.Extensions.Primitives/src/ChangeToken.cs
+++ b/src/libraries/Microsoft.Extensions.Primitives/src/ChangeToken.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
using System;
-using System.Diagnostics;
using System.Threading;
namespace Microsoft.Extensions.Primitives
diff --git a/src/libraries/Microsoft.Extensions.Primitives/src/Extensions.cs b/src/libraries/Microsoft.Extensions.Primitives/src/Extensions.cs
index e955e243e61..e002bc0decc 100644
--- a/src/libraries/Microsoft.Extensions.Primitives/src/Extensions.cs
+++ b/src/libraries/Microsoft.Extensions.Primitives/src/Extensions.cs
@@ -5,6 +5,9 @@ using System.Text;
namespace Microsoft.Extensions.Primitives
{
+ /// <summary>
+ /// Provides extensions methods for the <see cref="Primitives"/> namespace.
+ /// </summary>
public static class Extensions
{
/// <summary>
diff --git a/src/libraries/Microsoft.Extensions.Primitives/src/StringSegment.cs b/src/libraries/Microsoft.Extensions.Primitives/src/StringSegment.cs
index 3bfe322b18a..f321de5ed23 100644
--- a/src/libraries/Microsoft.Extensions.Primitives/src/StringSegment.cs
+++ b/src/libraries/Microsoft.Extensions.Primitives/src/StringSegment.cs
@@ -141,7 +141,7 @@ namespace Microsoft.Extensions.Primitives
/// </summary>
/// <param name="start">The zero-based starting character position in this <see cref="StringSegment"/>.</param>
/// <param name="length">The number of characters in the span.</param>
- /// <returns>A <see cref="ReadOnlySpan{T}"/> with length <paramref name="length"/> that begins at
+ /// <returns>A <see cref="ReadOnlySpan{T}"/> with <paramref name="length"/> that begins at
/// <paramref name="start"/> in this <see cref="StringSegment"/>.</returns>
/// <exception cref="ArgumentOutOfRangeException">
/// <paramref name="start"/> or <paramref name="length"/> is less than zero, or <paramref name="start"/> + <paramref name="length"/> is
@@ -387,7 +387,7 @@ namespace Microsoft.Extensions.Primitives
/// </summary>
/// <param name="offset">The zero-based starting character position of a substring in this <see cref="StringSegment"/>.</param>
/// <param name="length">The number of characters in the substring.</param>
- /// <returns>A <see cref="string"/> that is equivalent to the substring of length <paramref name="length"/> that begins at
+ /// <returns>A <see cref="string"/> that is equivalent to the substring of <paramref name="length"/> that begins at
/// <paramref name="offset"/> in this <see cref="StringSegment"/></returns>
/// <exception cref="ArgumentOutOfRangeException">
/// <paramref name="offset"/> or <paramref name="length"/> is less than zero, or <paramref name="offset"/> + <paramref name="length"/> is
@@ -422,7 +422,7 @@ namespace Microsoft.Extensions.Primitives
/// </summary>
/// <param name="offset">The zero-based starting character position of a substring in this <see cref="StringSegment"/>.</param>
/// <param name="length">The number of characters in the substring.</param>
- /// <returns>A <see cref="StringSegment"/> that is equivalent to the substring of length <paramref name="length"/> that begins at <paramref name="offset"/> in this <see cref="StringSegment"/></returns>
+ /// <returns>A <see cref="StringSegment"/> that is equivalent to the substring of <paramref name="length"/> that begins at <paramref name="offset"/> in this <see cref="StringSegment"/></returns>
/// <exception cref="ArgumentOutOfRangeException">
/// <paramref name="offset"/> or <paramref name="length"/> is less than zero, or <paramref name="offset"/> + <paramref name="length"/> is
/// greater than <see cref="Length"/>.
diff --git a/src/libraries/Microsoft.Extensions.Primitives/src/StringSegmentComparer.cs b/src/libraries/Microsoft.Extensions.Primitives/src/StringSegmentComparer.cs
index 8b1101314ee..5d888306171 100644
--- a/src/libraries/Microsoft.Extensions.Primitives/src/StringSegmentComparer.cs
+++ b/src/libraries/Microsoft.Extensions.Primitives/src/StringSegmentComparer.cs
@@ -6,11 +6,20 @@ using System.Collections.Generic;
namespace Microsoft.Extensions.Primitives
{
+ /// <summary>
+ /// Compares two <see cref="StringSegment"/> objects.
+ /// </summary>
public class StringSegmentComparer : IComparer<StringSegment>, IEqualityComparer<StringSegment>
{
+ /// <summary>
+ /// Gets a <see cref="StringSegmentComparer"/> object that performs a case-sensitive ordinal <see cref="StringSegment"/> comparison.
+ /// </summary>
public static StringSegmentComparer Ordinal { get; }
= new StringSegmentComparer(StringComparison.Ordinal, StringComparer.Ordinal);
+ /// <summary>
+ /// Gets a <see cref="StringSegmentComparer"/> object that performs a case-insensitive ordinal <see cref="StringSegment"/> comparison.
+ /// </summary>
public static StringSegmentComparer OrdinalIgnoreCase { get; }
= new StringSegmentComparer(StringComparison.OrdinalIgnoreCase, StringComparer.OrdinalIgnoreCase);
@@ -33,6 +42,11 @@ namespace Microsoft.Extensions.Primitives
return StringSegment.Equals(x, y, Comparison);
}
+ /// <summary>
+ /// Returns a hash code for a <see cref="StringSegment"/> object.
+ /// </summary>
+ /// <param name="obj">The <see cref="StringSegment"/> to get a hash code for.</param>
+ /// <returns>A hash code for a <see cref="StringSegment"/>, suitable for use in hashing algorithms and data structures like a hash table.</returns>
public int GetHashCode(StringSegment obj)
{
#if NETCOREAPP || NETSTANDARD2_1
diff --git a/src/libraries/Microsoft.Extensions.Primitives/src/StringTokenizer.cs b/src/libraries/Microsoft.Extensions.Primitives/src/StringTokenizer.cs
index d3571852574..3ce726f5f09 100644
--- a/src/libraries/Microsoft.Extensions.Primitives/src/StringTokenizer.cs
+++ b/src/libraries/Microsoft.Extensions.Primitives/src/StringTokenizer.cs
@@ -10,7 +10,7 @@ namespace Microsoft.Extensions.Primitives
/// <summary>
/// Tokenizes a <see cref="string"/> into <see cref="StringSegment"/>s.
/// </summary>
- public readonly struct StringTokenizer : IEnumerable<StringSegment>
+ public readonly struct StringTokenizer : IEnumerable<StringSegment>
{
private readonly StringSegment _value;
private readonly char[] _separators;
@@ -57,12 +57,19 @@ namespace Microsoft.Extensions.Primitives
_separators = separators;
}
+ /// <summary>
+ /// Initializes a new instance of <see cref="Enumerator"/>.
+ /// </summary>
+ /// <returns>An <see cref="Enumerator"/> based on the <see cref="StringTokenizer"/>'s value and separators.</returns>
public Enumerator GetEnumerator() => new Enumerator(in _value, _separators);
IEnumerator<StringSegment> IEnumerable<StringSegment>.GetEnumerator() => GetEnumerator();
IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
+ /// <summary>
+ /// Enumerates the <see cref="string"/> tokens represented by <see cref="StringSegment"/>.
+ /// </summary>
public struct Enumerator : IEnumerator<StringSegment>
{
private readonly StringSegment _value;
@@ -77,6 +84,10 @@ namespace Microsoft.Extensions.Primitives
_index = 0;
}
+ /// <summary>
+ /// Initializes an <see cref="Enumerator"/> using a <see cref="StringTokenizer"/>.
+ /// </summary>
+ /// <param name="tokenizer"><see cref="StringTokenizer"/> containing value and separators for enumeration.</param>
public Enumerator(ref StringTokenizer tokenizer)
{
_value = tokenizer._value;
diff --git a/src/libraries/Microsoft.Extensions.Primitives/src/StringValues.cs b/src/libraries/Microsoft.Extensions.Primitives/src/StringValues.cs
index f78cfc16c5c..2c19ee225c2 100644
--- a/src/libraries/Microsoft.Extensions.Primitives/src/StringValues.cs
+++ b/src/libraries/Microsoft.Extensions.Primitives/src/StringValues.cs
@@ -727,7 +727,12 @@ namespace Microsoft.Extensions.Primitives
return false;
}
- /// <inheritdoc />
+ /// <summary>
+ /// Returns a hash code for this instance.
+ /// </summary>
+ /// <returns>
+ /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
+ /// </returns>
public override int GetHashCode()
{
object? value = _values;
@@ -774,6 +779,10 @@ namespace Microsoft.Extensions.Primitives
_index = 0;
}
+ /// <summary>
+ /// Instantiates an <see cref="Enumerator"/> using a <see cref="StringValues"/>.
+ /// </summary>
+ /// <param name="values">The <see cref="StringValues"/> to enumerate.</param>
public Enumerator(ref StringValues values) : this(values._values)
{ }
diff --git a/src/libraries/Microsoft.Internal.Runtime.AspNetCore.Transport/src/Microsoft.Internal.Runtime.AspNetCore.Transport.proj b/src/libraries/Microsoft.Internal.Runtime.AspNetCore.Transport/src/Microsoft.Internal.Runtime.AspNetCore.Transport.proj
index d9231b03072..821ac035123 100644
--- a/src/libraries/Microsoft.Internal.Runtime.AspNetCore.Transport/src/Microsoft.Internal.Runtime.AspNetCore.Transport.proj
+++ b/src/libraries/Microsoft.Internal.Runtime.AspNetCore.Transport/src/Microsoft.Internal.Runtime.AspNetCore.Transport.proj
@@ -13,6 +13,12 @@
<NoWarn>$(NoWarn);NU5131</NoWarn>
</PropertyGroup>
+ <!-- Always generate this package during servicing to flow the dependency to AspNetCore. -->
+ <PropertyGroup Condition="'$(PreReleaseVersionLabel)' == 'servicing'">
+ <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
+ <ServicingVersion>$(PatchVersion)</ServicingVersion>
+ </PropertyGroup>
+
<ItemGroup>
<!-- Requires Private=true to calculate ReferenceCopyLocalPaths items. -->
<ProjectReference Include="@(AspNetCoreAppLibrary->'$(LibrariesProjectRoot)%(Identity)\src\%(Identity).csproj')"
@@ -20,8 +26,8 @@
PrivateAssets="all"
Private="true"
IncludeReferenceAssemblyInPackage="true" />
- <!-- Only include the 4.0 version in the ref pack, since targeting net6.0 requires Roslyn 4.0 -->
- <AnalyzerReference Include="$(LibrariesProjectRoot)Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.0.csproj"
+ <!-- Only include the 4.4 version in the ref pack, since targeting net7.0 requires Roslyn 4.4 -->
+ <AnalyzerReference Include="$(LibrariesProjectRoot)Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.4.csproj"
Pack="true"
ReferenceAnalyzer="false" />
</ItemGroup>
diff --git a/src/libraries/Microsoft.Internal.Runtime.WindowsDesktop.Transport/src/Microsoft.Internal.Runtime.WindowsDesktop.Transport.proj b/src/libraries/Microsoft.Internal.Runtime.WindowsDesktop.Transport/src/Microsoft.Internal.Runtime.WindowsDesktop.Transport.proj
index b37fb720e78..9f1d2aca1b9 100644
--- a/src/libraries/Microsoft.Internal.Runtime.WindowsDesktop.Transport/src/Microsoft.Internal.Runtime.WindowsDesktop.Transport.proj
+++ b/src/libraries/Microsoft.Internal.Runtime.WindowsDesktop.Transport/src/Microsoft.Internal.Runtime.WindowsDesktop.Transport.proj
@@ -13,6 +13,12 @@
<NoWarn>$(NoWarn);NU5131</NoWarn>
</PropertyGroup>
+ <!-- Always generate this package during servicing to flow the dependency to WindowsDesktop. -->
+ <PropertyGroup Condition="'$(PreReleaseVersionLabel)' == 'servicing'">
+ <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
+ <ServicingVersion>$(PatchVersion)</ServicingVersion>
+ </PropertyGroup>
+
<ItemGroup>
<!-- Requires Private=true to calculate ReferenceCopyLocalPaths items.
ReferringTargetFramework is set to $(NetCoreAppCurrent)-windows so that we pack the Windows specific implementation assemblies -->
diff --git a/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj b/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj
index 482e0b70e47..742f1788189 100644
--- a/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj
+++ b/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj
@@ -17,7 +17,6 @@
<AvoidRestoreCycleOnSelfReference>true</AvoidRestoreCycleOnSelfReference>
<!-- TODO: Remove with AvoidRestoreCycleOnSelfReference hack. -->
<PackageValidationBaselineName>$(MSBuildProjectName)</PackageValidationBaselineName>
- <BeforePack>GenerateRuntimeJson;UpdateRuntimeJson;$(BeforePack)</BeforePack>
<_generateRuntimeGraphTargetFramework Condition="'$(MSBuildRuntimeType)' == 'core'">$(NetCoreAppToolCurrent)</_generateRuntimeGraphTargetFramework>
<_generateRuntimeGraphTargetFramework Condition="'$(MSBuildRuntimeType)' != 'core'">net472</_generateRuntimeGraphTargetFramework>
@@ -44,7 +43,7 @@
<ItemGroup>
<Content Condition="'$(AdditionalRuntimeIdentifiers)' == ''" Include="runtime.json" PackagePath="/" />
- <Content Condition="'$(AdditionalRuntimeIdentifiers)' != ''" Include="$(IntermediateOutputPath)runtime.json" PackagePath="/" />
+ <Content Condition="'$(AdditionalRuntimeIdentifiers)' != ''" Include="$(BaseOutputPath)runtime.json" PackagePath="/" />
<Content Include="$(PlaceholderFile)" PackagePath="lib/netstandard1.0" />
</ItemGroup>
@@ -58,12 +57,12 @@
<UsingTask TaskName="GenerateRuntimeGraph" AssemblyFile="$(_generateRuntimeGraphTask)"/>
- <Target Name="GenerateRuntimeJson" Condition="'$(AdditionalRuntimeIdentifiers)' != ''">
+ <Target Name="GenerateRuntimeJson" AfterTargets="Build" Condition="'$(AdditionalRuntimeIdentifiers)' != ''">
<MakeDir Directories="$(IntermediateOutputPath)" />
<GenerateRuntimeGraph RuntimeGroups="@(RuntimeGroupWithQualifiers)"
AdditionalRuntimeIdentifiers="$(AdditionalRuntimeIdentifiers)"
AdditionalRuntimeIdentifierParent="$(AdditionalRuntimeIdentifierParent)"
- RuntimeJson="$(IntermediateOutputPath)runtime.json"
+ RuntimeJson="$(BaseOutputPath)runtime.json"
UpdateRuntimeFiles="True" />
</Target>
diff --git a/src/libraries/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs b/src/libraries/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs
index 418aab57e6b..554e10b8ba2 100644
--- a/src/libraries/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs
+++ b/src/libraries/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs
@@ -1366,7 +1366,7 @@ namespace Microsoft.VisualBasic.FileIO
public string? ReadToEnd() { throw null; }
public void SetDelimiters(params string[]? delimiters) { }
public void SetFieldWidths(params int[]? fieldWidths) { }
- void System.IDisposable.Dispose() { }
+ public void Dispose() { }
}
public enum UICancelOption
{
diff --git a/src/libraries/Microsoft.Win32.Primitives/Microsoft.Win32.Primitives.sln b/src/libraries/Microsoft.Win32.Primitives/Microsoft.Win32.Primitives.sln
index e090f387698..21b951544c9 100644
--- a/src/libraries/Microsoft.Win32.Primitives/Microsoft.Win32.Primitives.sln
+++ b/src/libraries/Microsoft.Win32.Primitives/Microsoft.Win32.Primitives.sln
@@ -11,6 +11,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Win32.Primitives.
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{5F4ABB4F-CE69-47B7-860F-40B0DA68A7DB}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{895AA9ED-9EBE-489A-B765-22D3358A3438}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{5918B01B-FCAE-4321-8DCA-44466A57C04E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{EE5972A3-AD58-430B-ACEB-4F608FD1C0D6}"
@@ -69,11 +71,8 @@ Global
{069C76AC-B41A-4E17-A066-12233592145D}.Release|x86.ActiveCfg = Release|Any CPU
{069C76AC-B41A-4E17-A066-12233592145D}.Release|x86.Build.0 = Release|Any CPU
{069C76AC-B41A-4E17-A066-12233592145D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {069C76AC-B41A-4E17-A066-12233592145D}.Checked|Any CPU.Build.0 = Debug|Any CPU
{069C76AC-B41A-4E17-A066-12233592145D}.Checked|x64.ActiveCfg = Debug|Any CPU
- {069C76AC-B41A-4E17-A066-12233592145D}.Checked|x64.Build.0 = Debug|Any CPU
{069C76AC-B41A-4E17-A066-12233592145D}.Checked|x86.ActiveCfg = Debug|Any CPU
- {069C76AC-B41A-4E17-A066-12233592145D}.Checked|x86.Build.0 = Debug|Any CPU
{EA142E29-EE37-4751-868B-27516AE0A209}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EA142E29-EE37-4751-868B-27516AE0A209}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EA142E29-EE37-4751-868B-27516AE0A209}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -87,11 +86,8 @@ Global
{EA142E29-EE37-4751-868B-27516AE0A209}.Release|x86.ActiveCfg = Release|Any CPU
{EA142E29-EE37-4751-868B-27516AE0A209}.Release|x86.Build.0 = Release|Any CPU
{EA142E29-EE37-4751-868B-27516AE0A209}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {EA142E29-EE37-4751-868B-27516AE0A209}.Checked|Any CPU.Build.0 = Debug|Any CPU
{EA142E29-EE37-4751-868B-27516AE0A209}.Checked|x64.ActiveCfg = Debug|Any CPU
- {EA142E29-EE37-4751-868B-27516AE0A209}.Checked|x64.Build.0 = Debug|Any CPU
{EA142E29-EE37-4751-868B-27516AE0A209}.Checked|x86.ActiveCfg = Debug|Any CPU
- {EA142E29-EE37-4751-868B-27516AE0A209}.Checked|x86.Build.0 = Debug|Any CPU
{B3BBD7D9-30F3-43D3-9D6A-C9BD5E19D32E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B3BBD7D9-30F3-43D3-9D6A-C9BD5E19D32E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B3BBD7D9-30F3-43D3-9D6A-C9BD5E19D32E}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -105,11 +101,8 @@ Global
{B3BBD7D9-30F3-43D3-9D6A-C9BD5E19D32E}.Release|x86.ActiveCfg = Release|Any CPU
{B3BBD7D9-30F3-43D3-9D6A-C9BD5E19D32E}.Release|x86.Build.0 = Release|Any CPU
{B3BBD7D9-30F3-43D3-9D6A-C9BD5E19D32E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {B3BBD7D9-30F3-43D3-9D6A-C9BD5E19D32E}.Checked|Any CPU.Build.0 = Debug|Any CPU
{B3BBD7D9-30F3-43D3-9D6A-C9BD5E19D32E}.Checked|x64.ActiveCfg = Debug|Any CPU
- {B3BBD7D9-30F3-43D3-9D6A-C9BD5E19D32E}.Checked|x64.Build.0 = Debug|Any CPU
{B3BBD7D9-30F3-43D3-9D6A-C9BD5E19D32E}.Checked|x86.ActiveCfg = Debug|Any CPU
- {B3BBD7D9-30F3-43D3-9D6A-C9BD5E19D32E}.Checked|x86.Build.0 = Debug|Any CPU
{B43D6BB6-1760-4DB9-87CB-792D42846C62}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B43D6BB6-1760-4DB9-87CB-792D42846C62}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B43D6BB6-1760-4DB9-87CB-792D42846C62}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -123,11 +116,8 @@ Global
{B43D6BB6-1760-4DB9-87CB-792D42846C62}.Release|x86.ActiveCfg = Release|Any CPU
{B43D6BB6-1760-4DB9-87CB-792D42846C62}.Release|x86.Build.0 = Release|Any CPU
{B43D6BB6-1760-4DB9-87CB-792D42846C62}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {B43D6BB6-1760-4DB9-87CB-792D42846C62}.Checked|Any CPU.Build.0 = Debug|Any CPU
{B43D6BB6-1760-4DB9-87CB-792D42846C62}.Checked|x64.ActiveCfg = Debug|Any CPU
- {B43D6BB6-1760-4DB9-87CB-792D42846C62}.Checked|x64.Build.0 = Debug|Any CPU
{B43D6BB6-1760-4DB9-87CB-792D42846C62}.Checked|x86.ActiveCfg = Debug|Any CPU
- {B43D6BB6-1760-4DB9-87CB-792D42846C62}.Checked|x86.Build.0 = Debug|Any CPU
{5F4ABB4F-CE69-47B7-860F-40B0DA68A7DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5F4ABB4F-CE69-47B7-860F-40B0DA68A7DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5F4ABB4F-CE69-47B7-860F-40B0DA68A7DB}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -141,11 +131,23 @@ Global
{5F4ABB4F-CE69-47B7-860F-40B0DA68A7DB}.Release|x86.ActiveCfg = Release|Any CPU
{5F4ABB4F-CE69-47B7-860F-40B0DA68A7DB}.Release|x86.Build.0 = Release|Any CPU
{5F4ABB4F-CE69-47B7-860F-40B0DA68A7DB}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {5F4ABB4F-CE69-47B7-860F-40B0DA68A7DB}.Checked|Any CPU.Build.0 = Debug|Any CPU
{5F4ABB4F-CE69-47B7-860F-40B0DA68A7DB}.Checked|x64.ActiveCfg = Debug|Any CPU
- {5F4ABB4F-CE69-47B7-860F-40B0DA68A7DB}.Checked|x64.Build.0 = Debug|Any CPU
{5F4ABB4F-CE69-47B7-860F-40B0DA68A7DB}.Checked|x86.ActiveCfg = Debug|Any CPU
- {5F4ABB4F-CE69-47B7-860F-40B0DA68A7DB}.Checked|x86.Build.0 = Debug|Any CPU
+ {895AA9ED-9EBE-489A-B765-22D3358A3438}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {895AA9ED-9EBE-489A-B765-22D3358A3438}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {895AA9ED-9EBE-489A-B765-22D3358A3438}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {895AA9ED-9EBE-489A-B765-22D3358A3438}.Debug|x64.Build.0 = Debug|Any CPU
+ {895AA9ED-9EBE-489A-B765-22D3358A3438}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {895AA9ED-9EBE-489A-B765-22D3358A3438}.Debug|x86.Build.0 = Debug|Any CPU
+ {895AA9ED-9EBE-489A-B765-22D3358A3438}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {895AA9ED-9EBE-489A-B765-22D3358A3438}.Release|Any CPU.Build.0 = Release|Any CPU
+ {895AA9ED-9EBE-489A-B765-22D3358A3438}.Release|x64.ActiveCfg = Release|Any CPU
+ {895AA9ED-9EBE-489A-B765-22D3358A3438}.Release|x64.Build.0 = Release|Any CPU
+ {895AA9ED-9EBE-489A-B765-22D3358A3438}.Release|x86.ActiveCfg = Release|Any CPU
+ {895AA9ED-9EBE-489A-B765-22D3358A3438}.Release|x86.Build.0 = Release|Any CPU
+ {895AA9ED-9EBE-489A-B765-22D3358A3438}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {895AA9ED-9EBE-489A-B765-22D3358A3438}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {895AA9ED-9EBE-489A-B765-22D3358A3438}.Checked|x86.ActiveCfg = Debug|Any CPU
{5918B01B-FCAE-4321-8DCA-44466A57C04E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5918B01B-FCAE-4321-8DCA-44466A57C04E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5918B01B-FCAE-4321-8DCA-44466A57C04E}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -159,11 +161,8 @@ Global
{5918B01B-FCAE-4321-8DCA-44466A57C04E}.Release|x86.ActiveCfg = Release|Any CPU
{5918B01B-FCAE-4321-8DCA-44466A57C04E}.Release|x86.Build.0 = Release|Any CPU
{5918B01B-FCAE-4321-8DCA-44466A57C04E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {5918B01B-FCAE-4321-8DCA-44466A57C04E}.Checked|Any CPU.Build.0 = Debug|Any CPU
{5918B01B-FCAE-4321-8DCA-44466A57C04E}.Checked|x64.ActiveCfg = Debug|Any CPU
- {5918B01B-FCAE-4321-8DCA-44466A57C04E}.Checked|x64.Build.0 = Debug|Any CPU
{5918B01B-FCAE-4321-8DCA-44466A57C04E}.Checked|x86.ActiveCfg = Debug|Any CPU
- {5918B01B-FCAE-4321-8DCA-44466A57C04E}.Checked|x86.Build.0 = Debug|Any CPU
{EE5972A3-AD58-430B-ACEB-4F608FD1C0D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EE5972A3-AD58-430B-ACEB-4F608FD1C0D6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EE5972A3-AD58-430B-ACEB-4F608FD1C0D6}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -177,11 +176,8 @@ Global
{EE5972A3-AD58-430B-ACEB-4F608FD1C0D6}.Release|x86.ActiveCfg = Release|Any CPU
{EE5972A3-AD58-430B-ACEB-4F608FD1C0D6}.Release|x86.Build.0 = Release|Any CPU
{EE5972A3-AD58-430B-ACEB-4F608FD1C0D6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {EE5972A3-AD58-430B-ACEB-4F608FD1C0D6}.Checked|Any CPU.Build.0 = Debug|Any CPU
{EE5972A3-AD58-430B-ACEB-4F608FD1C0D6}.Checked|x64.ActiveCfg = Debug|Any CPU
- {EE5972A3-AD58-430B-ACEB-4F608FD1C0D6}.Checked|x64.Build.0 = Debug|Any CPU
{EE5972A3-AD58-430B-ACEB-4F608FD1C0D6}.Checked|x86.ActiveCfg = Debug|Any CPU
- {EE5972A3-AD58-430B-ACEB-4F608FD1C0D6}.Checked|x86.Build.0 = Debug|Any CPU
{EC1A6210-05C0-4F57-969C-0EE0F29B5B67}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EC1A6210-05C0-4F57-969C-0EE0F29B5B67}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EC1A6210-05C0-4F57-969C-0EE0F29B5B67}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -195,11 +191,8 @@ Global
{EC1A6210-05C0-4F57-969C-0EE0F29B5B67}.Release|x86.ActiveCfg = Release|Any CPU
{EC1A6210-05C0-4F57-969C-0EE0F29B5B67}.Release|x86.Build.0 = Release|Any CPU
{EC1A6210-05C0-4F57-969C-0EE0F29B5B67}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {EC1A6210-05C0-4F57-969C-0EE0F29B5B67}.Checked|Any CPU.Build.0 = Debug|Any CPU
{EC1A6210-05C0-4F57-969C-0EE0F29B5B67}.Checked|x64.ActiveCfg = Debug|Any CPU
- {EC1A6210-05C0-4F57-969C-0EE0F29B5B67}.Checked|x64.Build.0 = Debug|Any CPU
{EC1A6210-05C0-4F57-969C-0EE0F29B5B67}.Checked|x86.ActiveCfg = Debug|Any CPU
- {EC1A6210-05C0-4F57-969C-0EE0F29B5B67}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -210,6 +203,7 @@ Global
{069C76AC-B41A-4E17-A066-12233592145D} = {CEC48784-C8F0-46DF-AA1E-07850E754180}
{B43D6BB6-1760-4DB9-87CB-792D42846C62} = {CEC48784-C8F0-46DF-AA1E-07850E754180}
{EA142E29-EE37-4751-868B-27516AE0A209} = {08BAF9E0-068B-4201-91E6-91B725ABE3D2}
+ {895AA9ED-9EBE-489A-B765-22D3358A3438} = {08BAF9E0-068B-4201-91E6-91B725ABE3D2}
{EC1A6210-05C0-4F57-969C-0EE0F29B5B67} = {08BAF9E0-068B-4201-91E6-91B725ABE3D2}
{5F4ABB4F-CE69-47B7-860F-40B0DA68A7DB} = {A48D1F08-4510-44F9-9E77-7164B2769064}
{5918B01B-FCAE-4321-8DCA-44466A57C04E} = {A48D1F08-4510-44F9-9E77-7164B2769064}
diff --git a/src/libraries/NetCoreAppLibrary.props b/src/libraries/NetCoreAppLibrary.props
index 9f855259252..add24c58210 100644
--- a/src/libraries/NetCoreAppLibrary.props
+++ b/src/libraries/NetCoreAppLibrary.props
@@ -186,7 +186,7 @@
LibraryImportGenerator;
JSImportGenerator;
Microsoft.Interop.SourceGeneration;
- System.Text.Json.SourceGeneration.Roslyn4.0;
+ System.Text.Json.SourceGeneration.Roslyn4.4;
System.Text.RegularExpressions.Generator;
</NetCoreAppLibraryGenerator>
<AspNetCoreAppLibrary>
diff --git a/src/libraries/System.AppContext/System.AppContext.sln b/src/libraries/System.AppContext/System.AppContext.sln
index 1fa66f0c1d2..50afd100a94 100644
--- a/src/libraries/System.AppContext/System.AppContext.sln
+++ b/src/libraries/System.AppContext/System.AppContext.sln
@@ -11,6 +11,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.AppContext.Tests", "
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{1CFA73AC-672E-4EED-8003-51682AF702E5}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{D6D59793-F3EA-480A-8A95-085447BE1FAA}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{4F487746-811B-469D-BFD4-A875FC4F1203}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{0AC4B104-CB58-4158-A301-5984BCBEE897}"
@@ -69,11 +71,8 @@ Global
{F9B2FCA3-69C0-45A6-B1FA-E989263536C4}.Release|x86.ActiveCfg = Release|Any CPU
{F9B2FCA3-69C0-45A6-B1FA-E989263536C4}.Release|x86.Build.0 = Release|Any CPU
{F9B2FCA3-69C0-45A6-B1FA-E989263536C4}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {F9B2FCA3-69C0-45A6-B1FA-E989263536C4}.Checked|Any CPU.Build.0 = Debug|Any CPU
{F9B2FCA3-69C0-45A6-B1FA-E989263536C4}.Checked|x64.ActiveCfg = Debug|Any CPU
- {F9B2FCA3-69C0-45A6-B1FA-E989263536C4}.Checked|x64.Build.0 = Debug|Any CPU
{F9B2FCA3-69C0-45A6-B1FA-E989263536C4}.Checked|x86.ActiveCfg = Debug|Any CPU
- {F9B2FCA3-69C0-45A6-B1FA-E989263536C4}.Checked|x86.Build.0 = Debug|Any CPU
{BB689125-CDA7-4CFA-A4D6-1C932092A67F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BB689125-CDA7-4CFA-A4D6-1C932092A67F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BB689125-CDA7-4CFA-A4D6-1C932092A67F}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -87,11 +86,8 @@ Global
{BB689125-CDA7-4CFA-A4D6-1C932092A67F}.Release|x86.ActiveCfg = Release|Any CPU
{BB689125-CDA7-4CFA-A4D6-1C932092A67F}.Release|x86.Build.0 = Release|Any CPU
{BB689125-CDA7-4CFA-A4D6-1C932092A67F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {BB689125-CDA7-4CFA-A4D6-1C932092A67F}.Checked|Any CPU.Build.0 = Debug|Any CPU
{BB689125-CDA7-4CFA-A4D6-1C932092A67F}.Checked|x64.ActiveCfg = Debug|Any CPU
- {BB689125-CDA7-4CFA-A4D6-1C932092A67F}.Checked|x64.Build.0 = Debug|Any CPU
{BB689125-CDA7-4CFA-A4D6-1C932092A67F}.Checked|x86.ActiveCfg = Debug|Any CPU
- {BB689125-CDA7-4CFA-A4D6-1C932092A67F}.Checked|x86.Build.0 = Debug|Any CPU
{1648AC4C-3BEF-4B93-933B-5EC520BF11D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1648AC4C-3BEF-4B93-933B-5EC520BF11D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1648AC4C-3BEF-4B93-933B-5EC520BF11D5}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -105,11 +101,8 @@ Global
{1648AC4C-3BEF-4B93-933B-5EC520BF11D5}.Release|x86.ActiveCfg = Release|Any CPU
{1648AC4C-3BEF-4B93-933B-5EC520BF11D5}.Release|x86.Build.0 = Release|Any CPU
{1648AC4C-3BEF-4B93-933B-5EC520BF11D5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {1648AC4C-3BEF-4B93-933B-5EC520BF11D5}.Checked|Any CPU.Build.0 = Debug|Any CPU
{1648AC4C-3BEF-4B93-933B-5EC520BF11D5}.Checked|x64.ActiveCfg = Debug|Any CPU
- {1648AC4C-3BEF-4B93-933B-5EC520BF11D5}.Checked|x64.Build.0 = Debug|Any CPU
{1648AC4C-3BEF-4B93-933B-5EC520BF11D5}.Checked|x86.ActiveCfg = Debug|Any CPU
- {1648AC4C-3BEF-4B93-933B-5EC520BF11D5}.Checked|x86.Build.0 = Debug|Any CPU
{007AD19C-8A80-4463-834C-BE7AE1808A04}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{007AD19C-8A80-4463-834C-BE7AE1808A04}.Debug|Any CPU.Build.0 = Debug|Any CPU
{007AD19C-8A80-4463-834C-BE7AE1808A04}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -123,11 +116,8 @@ Global
{007AD19C-8A80-4463-834C-BE7AE1808A04}.Release|x86.ActiveCfg = Release|Any CPU
{007AD19C-8A80-4463-834C-BE7AE1808A04}.Release|x86.Build.0 = Release|Any CPU
{007AD19C-8A80-4463-834C-BE7AE1808A04}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {007AD19C-8A80-4463-834C-BE7AE1808A04}.Checked|Any CPU.Build.0 = Debug|Any CPU
{007AD19C-8A80-4463-834C-BE7AE1808A04}.Checked|x64.ActiveCfg = Debug|Any CPU
- {007AD19C-8A80-4463-834C-BE7AE1808A04}.Checked|x64.Build.0 = Debug|Any CPU
{007AD19C-8A80-4463-834C-BE7AE1808A04}.Checked|x86.ActiveCfg = Debug|Any CPU
- {007AD19C-8A80-4463-834C-BE7AE1808A04}.Checked|x86.Build.0 = Debug|Any CPU
{1CFA73AC-672E-4EED-8003-51682AF702E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1CFA73AC-672E-4EED-8003-51682AF702E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1CFA73AC-672E-4EED-8003-51682AF702E5}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -141,11 +131,23 @@ Global
{1CFA73AC-672E-4EED-8003-51682AF702E5}.Release|x86.ActiveCfg = Release|Any CPU
{1CFA73AC-672E-4EED-8003-51682AF702E5}.Release|x86.Build.0 = Release|Any CPU
{1CFA73AC-672E-4EED-8003-51682AF702E5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {1CFA73AC-672E-4EED-8003-51682AF702E5}.Checked|Any CPU.Build.0 = Debug|Any CPU
{1CFA73AC-672E-4EED-8003-51682AF702E5}.Checked|x64.ActiveCfg = Debug|Any CPU
- {1CFA73AC-672E-4EED-8003-51682AF702E5}.Checked|x64.Build.0 = Debug|Any CPU
{1CFA73AC-672E-4EED-8003-51682AF702E5}.Checked|x86.ActiveCfg = Debug|Any CPU
- {1CFA73AC-672E-4EED-8003-51682AF702E5}.Checked|x86.Build.0 = Debug|Any CPU
+ {D6D59793-F3EA-480A-8A95-085447BE1FAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D6D59793-F3EA-480A-8A95-085447BE1FAA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D6D59793-F3EA-480A-8A95-085447BE1FAA}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {D6D59793-F3EA-480A-8A95-085447BE1FAA}.Debug|x64.Build.0 = Debug|Any CPU
+ {D6D59793-F3EA-480A-8A95-085447BE1FAA}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {D6D59793-F3EA-480A-8A95-085447BE1FAA}.Debug|x86.Build.0 = Debug|Any CPU
+ {D6D59793-F3EA-480A-8A95-085447BE1FAA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D6D59793-F3EA-480A-8A95-085447BE1FAA}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D6D59793-F3EA-480A-8A95-085447BE1FAA}.Release|x64.ActiveCfg = Release|Any CPU
+ {D6D59793-F3EA-480A-8A95-085447BE1FAA}.Release|x64.Build.0 = Release|Any CPU
+ {D6D59793-F3EA-480A-8A95-085447BE1FAA}.Release|x86.ActiveCfg = Release|Any CPU
+ {D6D59793-F3EA-480A-8A95-085447BE1FAA}.Release|x86.Build.0 = Release|Any CPU
+ {D6D59793-F3EA-480A-8A95-085447BE1FAA}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {D6D59793-F3EA-480A-8A95-085447BE1FAA}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {D6D59793-F3EA-480A-8A95-085447BE1FAA}.Checked|x86.ActiveCfg = Debug|Any CPU
{4F487746-811B-469D-BFD4-A875FC4F1203}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4F487746-811B-469D-BFD4-A875FC4F1203}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4F487746-811B-469D-BFD4-A875FC4F1203}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -159,11 +161,8 @@ Global
{4F487746-811B-469D-BFD4-A875FC4F1203}.Release|x86.ActiveCfg = Release|Any CPU
{4F487746-811B-469D-BFD4-A875FC4F1203}.Release|x86.Build.0 = Release|Any CPU
{4F487746-811B-469D-BFD4-A875FC4F1203}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {4F487746-811B-469D-BFD4-A875FC4F1203}.Checked|Any CPU.Build.0 = Debug|Any CPU
{4F487746-811B-469D-BFD4-A875FC4F1203}.Checked|x64.ActiveCfg = Debug|Any CPU
- {4F487746-811B-469D-BFD4-A875FC4F1203}.Checked|x64.Build.0 = Debug|Any CPU
{4F487746-811B-469D-BFD4-A875FC4F1203}.Checked|x86.ActiveCfg = Debug|Any CPU
- {4F487746-811B-469D-BFD4-A875FC4F1203}.Checked|x86.Build.0 = Debug|Any CPU
{0AC4B104-CB58-4158-A301-5984BCBEE897}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0AC4B104-CB58-4158-A301-5984BCBEE897}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0AC4B104-CB58-4158-A301-5984BCBEE897}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -177,11 +176,8 @@ Global
{0AC4B104-CB58-4158-A301-5984BCBEE897}.Release|x86.ActiveCfg = Release|Any CPU
{0AC4B104-CB58-4158-A301-5984BCBEE897}.Release|x86.Build.0 = Release|Any CPU
{0AC4B104-CB58-4158-A301-5984BCBEE897}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {0AC4B104-CB58-4158-A301-5984BCBEE897}.Checked|Any CPU.Build.0 = Debug|Any CPU
{0AC4B104-CB58-4158-A301-5984BCBEE897}.Checked|x64.ActiveCfg = Debug|Any CPU
- {0AC4B104-CB58-4158-A301-5984BCBEE897}.Checked|x64.Build.0 = Debug|Any CPU
{0AC4B104-CB58-4158-A301-5984BCBEE897}.Checked|x86.ActiveCfg = Debug|Any CPU
- {0AC4B104-CB58-4158-A301-5984BCBEE897}.Checked|x86.Build.0 = Debug|Any CPU
{83BBF8EB-368C-473A-8C46-608F95085E2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{83BBF8EB-368C-473A-8C46-608F95085E2D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{83BBF8EB-368C-473A-8C46-608F95085E2D}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -195,11 +191,8 @@ Global
{83BBF8EB-368C-473A-8C46-608F95085E2D}.Release|x86.ActiveCfg = Release|Any CPU
{83BBF8EB-368C-473A-8C46-608F95085E2D}.Release|x86.Build.0 = Release|Any CPU
{83BBF8EB-368C-473A-8C46-608F95085E2D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {83BBF8EB-368C-473A-8C46-608F95085E2D}.Checked|Any CPU.Build.0 = Debug|Any CPU
{83BBF8EB-368C-473A-8C46-608F95085E2D}.Checked|x64.ActiveCfg = Debug|Any CPU
- {83BBF8EB-368C-473A-8C46-608F95085E2D}.Checked|x64.Build.0 = Debug|Any CPU
{83BBF8EB-368C-473A-8C46-608F95085E2D}.Checked|x86.ActiveCfg = Debug|Any CPU
- {83BBF8EB-368C-473A-8C46-608F95085E2D}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -210,6 +203,7 @@ Global
{F9B2FCA3-69C0-45A6-B1FA-E989263536C4} = {0AE25156-94A3-4936-80FD-8343290DF4B4}
{007AD19C-8A80-4463-834C-BE7AE1808A04} = {0AE25156-94A3-4936-80FD-8343290DF4B4}
{BB689125-CDA7-4CFA-A4D6-1C932092A67F} = {4E4CBD83-24E2-49A2-B0A5-57368BB1A055}
+ {D6D59793-F3EA-480A-8A95-085447BE1FAA} = {4E4CBD83-24E2-49A2-B0A5-57368BB1A055}
{83BBF8EB-368C-473A-8C46-608F95085E2D} = {4E4CBD83-24E2-49A2-B0A5-57368BB1A055}
{1CFA73AC-672E-4EED-8003-51682AF702E5} = {A1EFAD7B-1534-44CD-89D2-906AE96FB1F6}
{4F487746-811B-469D-BFD4-A875FC4F1203} = {A1EFAD7B-1534-44CD-89D2-906AE96FB1F6}
diff --git a/src/libraries/System.Buffers/System.Buffers.sln b/src/libraries/System.Buffers/System.Buffers.sln
index bdc166dc217..9421002fea0 100644
--- a/src/libraries/System.Buffers/System.Buffers.sln
+++ b/src/libraries/System.Buffers/System.Buffers.sln
@@ -11,6 +11,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Buffers.Tests", "tes
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{AA1510B5-19AF-488B-A390-AFFDA0109571}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{E80848F6-2107-4A1F-901D-DC053474FDCC}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{6CBC6ECE-606C-4784-AB3E-88D040E1DF30}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{A0F803EB-E5D5-429A-A0C6-6A997BCB0128}"
@@ -69,11 +71,8 @@ Global
{350A679C-F690-49B3-AB97-340AF05E1250}.Release|x86.ActiveCfg = Release|Any CPU
{350A679C-F690-49B3-AB97-340AF05E1250}.Release|x86.Build.0 = Release|Any CPU
{350A679C-F690-49B3-AB97-340AF05E1250}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {350A679C-F690-49B3-AB97-340AF05E1250}.Checked|Any CPU.Build.0 = Debug|Any CPU
{350A679C-F690-49B3-AB97-340AF05E1250}.Checked|x64.ActiveCfg = Debug|Any CPU
- {350A679C-F690-49B3-AB97-340AF05E1250}.Checked|x64.Build.0 = Debug|Any CPU
{350A679C-F690-49B3-AB97-340AF05E1250}.Checked|x86.ActiveCfg = Debug|Any CPU
- {350A679C-F690-49B3-AB97-340AF05E1250}.Checked|x86.Build.0 = Debug|Any CPU
{7F713B83-1256-4108-B40D-FDD380BB9DB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7F713B83-1256-4108-B40D-FDD380BB9DB6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7F713B83-1256-4108-B40D-FDD380BB9DB6}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -87,11 +86,8 @@ Global
{7F713B83-1256-4108-B40D-FDD380BB9DB6}.Release|x86.ActiveCfg = Release|Any CPU
{7F713B83-1256-4108-B40D-FDD380BB9DB6}.Release|x86.Build.0 = Release|Any CPU
{7F713B83-1256-4108-B40D-FDD380BB9DB6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {7F713B83-1256-4108-B40D-FDD380BB9DB6}.Checked|Any CPU.Build.0 = Debug|Any CPU
{7F713B83-1256-4108-B40D-FDD380BB9DB6}.Checked|x64.ActiveCfg = Debug|Any CPU
- {7F713B83-1256-4108-B40D-FDD380BB9DB6}.Checked|x64.Build.0 = Debug|Any CPU
{7F713B83-1256-4108-B40D-FDD380BB9DB6}.Checked|x86.ActiveCfg = Debug|Any CPU
- {7F713B83-1256-4108-B40D-FDD380BB9DB6}.Checked|x86.Build.0 = Debug|Any CPU
{4BA09CF8-2B90-43E1-AB35-8A48FF8ECEC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4BA09CF8-2B90-43E1-AB35-8A48FF8ECEC6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4BA09CF8-2B90-43E1-AB35-8A48FF8ECEC6}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -105,11 +101,8 @@ Global
{4BA09CF8-2B90-43E1-AB35-8A48FF8ECEC6}.Release|x86.ActiveCfg = Release|Any CPU
{4BA09CF8-2B90-43E1-AB35-8A48FF8ECEC6}.Release|x86.Build.0 = Release|Any CPU
{4BA09CF8-2B90-43E1-AB35-8A48FF8ECEC6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {4BA09CF8-2B90-43E1-AB35-8A48FF8ECEC6}.Checked|Any CPU.Build.0 = Debug|Any CPU
{4BA09CF8-2B90-43E1-AB35-8A48FF8ECEC6}.Checked|x64.ActiveCfg = Debug|Any CPU
- {4BA09CF8-2B90-43E1-AB35-8A48FF8ECEC6}.Checked|x64.Build.0 = Debug|Any CPU
{4BA09CF8-2B90-43E1-AB35-8A48FF8ECEC6}.Checked|x86.ActiveCfg = Debug|Any CPU
- {4BA09CF8-2B90-43E1-AB35-8A48FF8ECEC6}.Checked|x86.Build.0 = Debug|Any CPU
{FF86CB73-2E54-4E89-9491-258324F291D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FF86CB73-2E54-4E89-9491-258324F291D0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FF86CB73-2E54-4E89-9491-258324F291D0}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -123,11 +116,8 @@ Global
{FF86CB73-2E54-4E89-9491-258324F291D0}.Release|x86.ActiveCfg = Release|Any CPU
{FF86CB73-2E54-4E89-9491-258324F291D0}.Release|x86.Build.0 = Release|Any CPU
{FF86CB73-2E54-4E89-9491-258324F291D0}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {FF86CB73-2E54-4E89-9491-258324F291D0}.Checked|Any CPU.Build.0 = Debug|Any CPU
{FF86CB73-2E54-4E89-9491-258324F291D0}.Checked|x64.ActiveCfg = Debug|Any CPU
- {FF86CB73-2E54-4E89-9491-258324F291D0}.Checked|x64.Build.0 = Debug|Any CPU
{FF86CB73-2E54-4E89-9491-258324F291D0}.Checked|x86.ActiveCfg = Debug|Any CPU
- {FF86CB73-2E54-4E89-9491-258324F291D0}.Checked|x86.Build.0 = Debug|Any CPU
{AA1510B5-19AF-488B-A390-AFFDA0109571}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AA1510B5-19AF-488B-A390-AFFDA0109571}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AA1510B5-19AF-488B-A390-AFFDA0109571}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -141,11 +131,23 @@ Global
{AA1510B5-19AF-488B-A390-AFFDA0109571}.Release|x86.ActiveCfg = Release|Any CPU
{AA1510B5-19AF-488B-A390-AFFDA0109571}.Release|x86.Build.0 = Release|Any CPU
{AA1510B5-19AF-488B-A390-AFFDA0109571}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {AA1510B5-19AF-488B-A390-AFFDA0109571}.Checked|Any CPU.Build.0 = Debug|Any CPU
{AA1510B5-19AF-488B-A390-AFFDA0109571}.Checked|x64.ActiveCfg = Debug|Any CPU
- {AA1510B5-19AF-488B-A390-AFFDA0109571}.Checked|x64.Build.0 = Debug|Any CPU
{AA1510B5-19AF-488B-A390-AFFDA0109571}.Checked|x86.ActiveCfg = Debug|Any CPU
- {AA1510B5-19AF-488B-A390-AFFDA0109571}.Checked|x86.Build.0 = Debug|Any CPU
+ {E80848F6-2107-4A1F-901D-DC053474FDCC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E80848F6-2107-4A1F-901D-DC053474FDCC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E80848F6-2107-4A1F-901D-DC053474FDCC}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {E80848F6-2107-4A1F-901D-DC053474FDCC}.Debug|x64.Build.0 = Debug|Any CPU
+ {E80848F6-2107-4A1F-901D-DC053474FDCC}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {E80848F6-2107-4A1F-901D-DC053474FDCC}.Debug|x86.Build.0 = Debug|Any CPU
+ {E80848F6-2107-4A1F-901D-DC053474FDCC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E80848F6-2107-4A1F-901D-DC053474FDCC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E80848F6-2107-4A1F-901D-DC053474FDCC}.Release|x64.ActiveCfg = Release|Any CPU
+ {E80848F6-2107-4A1F-901D-DC053474FDCC}.Release|x64.Build.0 = Release|Any CPU
+ {E80848F6-2107-4A1F-901D-DC053474FDCC}.Release|x86.ActiveCfg = Release|Any CPU
+ {E80848F6-2107-4A1F-901D-DC053474FDCC}.Release|x86.Build.0 = Release|Any CPU
+ {E80848F6-2107-4A1F-901D-DC053474FDCC}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {E80848F6-2107-4A1F-901D-DC053474FDCC}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {E80848F6-2107-4A1F-901D-DC053474FDCC}.Checked|x86.ActiveCfg = Debug|Any CPU
{6CBC6ECE-606C-4784-AB3E-88D040E1DF30}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6CBC6ECE-606C-4784-AB3E-88D040E1DF30}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6CBC6ECE-606C-4784-AB3E-88D040E1DF30}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -159,11 +161,8 @@ Global
{6CBC6ECE-606C-4784-AB3E-88D040E1DF30}.Release|x86.ActiveCfg = Release|Any CPU
{6CBC6ECE-606C-4784-AB3E-88D040E1DF30}.Release|x86.Build.0 = Release|Any CPU
{6CBC6ECE-606C-4784-AB3E-88D040E1DF30}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {6CBC6ECE-606C-4784-AB3E-88D040E1DF30}.Checked|Any CPU.Build.0 = Debug|Any CPU
{6CBC6ECE-606C-4784-AB3E-88D040E1DF30}.Checked|x64.ActiveCfg = Debug|Any CPU
- {6CBC6ECE-606C-4784-AB3E-88D040E1DF30}.Checked|x64.Build.0 = Debug|Any CPU
{6CBC6ECE-606C-4784-AB3E-88D040E1DF30}.Checked|x86.ActiveCfg = Debug|Any CPU
- {6CBC6ECE-606C-4784-AB3E-88D040E1DF30}.Checked|x86.Build.0 = Debug|Any CPU
{A0F803EB-E5D5-429A-A0C6-6A997BCB0128}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A0F803EB-E5D5-429A-A0C6-6A997BCB0128}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A0F803EB-E5D5-429A-A0C6-6A997BCB0128}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -177,11 +176,8 @@ Global
{A0F803EB-E5D5-429A-A0C6-6A997BCB0128}.Release|x86.ActiveCfg = Release|Any CPU
{A0F803EB-E5D5-429A-A0C6-6A997BCB0128}.Release|x86.Build.0 = Release|Any CPU
{A0F803EB-E5D5-429A-A0C6-6A997BCB0128}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {A0F803EB-E5D5-429A-A0C6-6A997BCB0128}.Checked|Any CPU.Build.0 = Debug|Any CPU
{A0F803EB-E5D5-429A-A0C6-6A997BCB0128}.Checked|x64.ActiveCfg = Debug|Any CPU
- {A0F803EB-E5D5-429A-A0C6-6A997BCB0128}.Checked|x64.Build.0 = Debug|Any CPU
{A0F803EB-E5D5-429A-A0C6-6A997BCB0128}.Checked|x86.ActiveCfg = Debug|Any CPU
- {A0F803EB-E5D5-429A-A0C6-6A997BCB0128}.Checked|x86.Build.0 = Debug|Any CPU
{D2374051-7DC6-4742-9680-0C6C4FA1A976}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D2374051-7DC6-4742-9680-0C6C4FA1A976}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D2374051-7DC6-4742-9680-0C6C4FA1A976}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -195,11 +191,8 @@ Global
{D2374051-7DC6-4742-9680-0C6C4FA1A976}.Release|x86.ActiveCfg = Release|Any CPU
{D2374051-7DC6-4742-9680-0C6C4FA1A976}.Release|x86.Build.0 = Release|Any CPU
{D2374051-7DC6-4742-9680-0C6C4FA1A976}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {D2374051-7DC6-4742-9680-0C6C4FA1A976}.Checked|Any CPU.Build.0 = Debug|Any CPU
{D2374051-7DC6-4742-9680-0C6C4FA1A976}.Checked|x64.ActiveCfg = Debug|Any CPU
- {D2374051-7DC6-4742-9680-0C6C4FA1A976}.Checked|x64.Build.0 = Debug|Any CPU
{D2374051-7DC6-4742-9680-0C6C4FA1A976}.Checked|x86.ActiveCfg = Debug|Any CPU
- {D2374051-7DC6-4742-9680-0C6C4FA1A976}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -210,6 +203,7 @@ Global
{350A679C-F690-49B3-AB97-340AF05E1250} = {A11072BB-28A6-44B6-A0A3-CAFE5E5309E5}
{FF86CB73-2E54-4E89-9491-258324F291D0} = {A11072BB-28A6-44B6-A0A3-CAFE5E5309E5}
{7F713B83-1256-4108-B40D-FDD380BB9DB6} = {914126D6-2C5E-49E9-B9BF-F94749FB2329}
+ {E80848F6-2107-4A1F-901D-DC053474FDCC} = {914126D6-2C5E-49E9-B9BF-F94749FB2329}
{D2374051-7DC6-4742-9680-0C6C4FA1A976} = {914126D6-2C5E-49E9-B9BF-F94749FB2329}
{AA1510B5-19AF-488B-A390-AFFDA0109571} = {C91D3A73-7AC3-413D-8E90-A9B48E6B0540}
{6CBC6ECE-606C-4784-AB3E-88D040E1DF30} = {C91D3A73-7AC3-413D-8E90-A9B48E6B0540}
diff --git a/src/libraries/System.Collections.Concurrent/System.Collections.Concurrent.sln b/src/libraries/System.Collections.Concurrent/System.Collections.Concurrent.sln
index 8a3afc4f99b..82a4b41c02a 100644
--- a/src/libraries/System.Collections.Concurrent/System.Collections.Concurrent.sln
+++ b/src/libraries/System.Collections.Concurrent/System.Collections.Concurrent.sln
@@ -19,6 +19,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.Tracing"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{431D18E4-4464-45C0-BBF2-1834B73E8095}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{6C5BE0DF-C0E1-4971-9E4A-01105A4A013A}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{1E072489-1073-4526-8C5D-64AC2A97BF9B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{2DB3F8FB-BDD7-471E-BF8F-D3C4D6A2BDC3}"
@@ -81,11 +83,8 @@ Global
{7C2B8279-F7BB-4AD4-BA44-B9071090AF46}.Release|x86.ActiveCfg = Release|Any CPU
{7C2B8279-F7BB-4AD4-BA44-B9071090AF46}.Release|x86.Build.0 = Release|Any CPU
{7C2B8279-F7BB-4AD4-BA44-B9071090AF46}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {7C2B8279-F7BB-4AD4-BA44-B9071090AF46}.Checked|Any CPU.Build.0 = Debug|Any CPU
{7C2B8279-F7BB-4AD4-BA44-B9071090AF46}.Checked|x64.ActiveCfg = Debug|Any CPU
- {7C2B8279-F7BB-4AD4-BA44-B9071090AF46}.Checked|x64.Build.0 = Debug|Any CPU
{7C2B8279-F7BB-4AD4-BA44-B9071090AF46}.Checked|x86.ActiveCfg = Debug|Any CPU
- {7C2B8279-F7BB-4AD4-BA44-B9071090AF46}.Checked|x86.Build.0 = Debug|Any CPU
{ADA6D062-1E28-47D8-A058-FE1F4551AA20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ADA6D062-1E28-47D8-A058-FE1F4551AA20}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ADA6D062-1E28-47D8-A058-FE1F4551AA20}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -99,11 +98,8 @@ Global
{ADA6D062-1E28-47D8-A058-FE1F4551AA20}.Release|x86.ActiveCfg = Release|Any CPU
{ADA6D062-1E28-47D8-A058-FE1F4551AA20}.Release|x86.Build.0 = Release|Any CPU
{ADA6D062-1E28-47D8-A058-FE1F4551AA20}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {ADA6D062-1E28-47D8-A058-FE1F4551AA20}.Checked|Any CPU.Build.0 = Debug|Any CPU
{ADA6D062-1E28-47D8-A058-FE1F4551AA20}.Checked|x64.ActiveCfg = Debug|Any CPU
- {ADA6D062-1E28-47D8-A058-FE1F4551AA20}.Checked|x64.Build.0 = Debug|Any CPU
{ADA6D062-1E28-47D8-A058-FE1F4551AA20}.Checked|x86.ActiveCfg = Debug|Any CPU
- {ADA6D062-1E28-47D8-A058-FE1F4551AA20}.Checked|x86.Build.0 = Debug|Any CPU
{BFA1A52C-48B4-45C7-8595-B98236A11ED1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BFA1A52C-48B4-45C7-8595-B98236A11ED1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BFA1A52C-48B4-45C7-8595-B98236A11ED1}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -117,11 +113,8 @@ Global
{BFA1A52C-48B4-45C7-8595-B98236A11ED1}.Release|x86.ActiveCfg = Release|Any CPU
{BFA1A52C-48B4-45C7-8595-B98236A11ED1}.Release|x86.Build.0 = Release|Any CPU
{BFA1A52C-48B4-45C7-8595-B98236A11ED1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {BFA1A52C-48B4-45C7-8595-B98236A11ED1}.Checked|Any CPU.Build.0 = Debug|Any CPU
{BFA1A52C-48B4-45C7-8595-B98236A11ED1}.Checked|x64.ActiveCfg = Debug|Any CPU
- {BFA1A52C-48B4-45C7-8595-B98236A11ED1}.Checked|x64.Build.0 = Debug|Any CPU
{BFA1A52C-48B4-45C7-8595-B98236A11ED1}.Checked|x86.ActiveCfg = Debug|Any CPU
- {BFA1A52C-48B4-45C7-8595-B98236A11ED1}.Checked|x86.Build.0 = Debug|Any CPU
{C391ADBE-DD23-4F4A-B3EC-011974CC6CE8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C391ADBE-DD23-4F4A-B3EC-011974CC6CE8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C391ADBE-DD23-4F4A-B3EC-011974CC6CE8}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -135,11 +128,8 @@ Global
{C391ADBE-DD23-4F4A-B3EC-011974CC6CE8}.Release|x86.ActiveCfg = Release|Any CPU
{C391ADBE-DD23-4F4A-B3EC-011974CC6CE8}.Release|x86.Build.0 = Release|Any CPU
{C391ADBE-DD23-4F4A-B3EC-011974CC6CE8}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {C391ADBE-DD23-4F4A-B3EC-011974CC6CE8}.Checked|Any CPU.Build.0 = Debug|Any CPU
{C391ADBE-DD23-4F4A-B3EC-011974CC6CE8}.Checked|x64.ActiveCfg = Debug|Any CPU
- {C391ADBE-DD23-4F4A-B3EC-011974CC6CE8}.Checked|x64.Build.0 = Debug|Any CPU
{C391ADBE-DD23-4F4A-B3EC-011974CC6CE8}.Checked|x86.ActiveCfg = Debug|Any CPU
- {C391ADBE-DD23-4F4A-B3EC-011974CC6CE8}.Checked|x86.Build.0 = Debug|Any CPU
{994A4967-489F-4DDC-88EE-1BEFBFBF830A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{994A4967-489F-4DDC-88EE-1BEFBFBF830A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{994A4967-489F-4DDC-88EE-1BEFBFBF830A}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -153,11 +143,8 @@ Global
{994A4967-489F-4DDC-88EE-1BEFBFBF830A}.Release|x86.ActiveCfg = Release|Any CPU
{994A4967-489F-4DDC-88EE-1BEFBFBF830A}.Release|x86.Build.0 = Release|Any CPU
{994A4967-489F-4DDC-88EE-1BEFBFBF830A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {994A4967-489F-4DDC-88EE-1BEFBFBF830A}.Checked|Any CPU.Build.0 = Debug|Any CPU
{994A4967-489F-4DDC-88EE-1BEFBFBF830A}.Checked|x64.ActiveCfg = Debug|Any CPU
- {994A4967-489F-4DDC-88EE-1BEFBFBF830A}.Checked|x64.Build.0 = Debug|Any CPU
{994A4967-489F-4DDC-88EE-1BEFBFBF830A}.Checked|x86.ActiveCfg = Debug|Any CPU
- {994A4967-489F-4DDC-88EE-1BEFBFBF830A}.Checked|x86.Build.0 = Debug|Any CPU
{34C59132-692C-45D7-87BD-869A18F09E2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{34C59132-692C-45D7-87BD-869A18F09E2C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{34C59132-692C-45D7-87BD-869A18F09E2C}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -171,11 +158,8 @@ Global
{34C59132-692C-45D7-87BD-869A18F09E2C}.Release|x86.ActiveCfg = Release|Any CPU
{34C59132-692C-45D7-87BD-869A18F09E2C}.Release|x86.Build.0 = Release|Any CPU
{34C59132-692C-45D7-87BD-869A18F09E2C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {34C59132-692C-45D7-87BD-869A18F09E2C}.Checked|Any CPU.Build.0 = Debug|Any CPU
{34C59132-692C-45D7-87BD-869A18F09E2C}.Checked|x64.ActiveCfg = Debug|Any CPU
- {34C59132-692C-45D7-87BD-869A18F09E2C}.Checked|x64.Build.0 = Debug|Any CPU
{34C59132-692C-45D7-87BD-869A18F09E2C}.Checked|x86.ActiveCfg = Debug|Any CPU
- {34C59132-692C-45D7-87BD-869A18F09E2C}.Checked|x86.Build.0 = Debug|Any CPU
{61B535DC-4E61-43F3-AB75-CD260D8816D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{61B535DC-4E61-43F3-AB75-CD260D8816D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{61B535DC-4E61-43F3-AB75-CD260D8816D3}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -189,11 +173,8 @@ Global
{61B535DC-4E61-43F3-AB75-CD260D8816D3}.Release|x86.ActiveCfg = Release|Any CPU
{61B535DC-4E61-43F3-AB75-CD260D8816D3}.Release|x86.Build.0 = Release|Any CPU
{61B535DC-4E61-43F3-AB75-CD260D8816D3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {61B535DC-4E61-43F3-AB75-CD260D8816D3}.Checked|Any CPU.Build.0 = Debug|Any CPU
{61B535DC-4E61-43F3-AB75-CD260D8816D3}.Checked|x64.ActiveCfg = Debug|Any CPU
- {61B535DC-4E61-43F3-AB75-CD260D8816D3}.Checked|x64.Build.0 = Debug|Any CPU
{61B535DC-4E61-43F3-AB75-CD260D8816D3}.Checked|x86.ActiveCfg = Debug|Any CPU
- {61B535DC-4E61-43F3-AB75-CD260D8816D3}.Checked|x86.Build.0 = Debug|Any CPU
{93FB3527-B9E6-4ECA-8F36-56835F4F9236}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{93FB3527-B9E6-4ECA-8F36-56835F4F9236}.Debug|Any CPU.Build.0 = Debug|Any CPU
{93FB3527-B9E6-4ECA-8F36-56835F4F9236}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -207,11 +188,8 @@ Global
{93FB3527-B9E6-4ECA-8F36-56835F4F9236}.Release|x86.ActiveCfg = Release|Any CPU
{93FB3527-B9E6-4ECA-8F36-56835F4F9236}.Release|x86.Build.0 = Release|Any CPU
{93FB3527-B9E6-4ECA-8F36-56835F4F9236}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {93FB3527-B9E6-4ECA-8F36-56835F4F9236}.Checked|Any CPU.Build.0 = Debug|Any CPU
{93FB3527-B9E6-4ECA-8F36-56835F4F9236}.Checked|x64.ActiveCfg = Debug|Any CPU
- {93FB3527-B9E6-4ECA-8F36-56835F4F9236}.Checked|x64.Build.0 = Debug|Any CPU
{93FB3527-B9E6-4ECA-8F36-56835F4F9236}.Checked|x86.ActiveCfg = Debug|Any CPU
- {93FB3527-B9E6-4ECA-8F36-56835F4F9236}.Checked|x86.Build.0 = Debug|Any CPU
{431D18E4-4464-45C0-BBF2-1834B73E8095}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{431D18E4-4464-45C0-BBF2-1834B73E8095}.Debug|Any CPU.Build.0 = Debug|Any CPU
{431D18E4-4464-45C0-BBF2-1834B73E8095}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -225,11 +203,23 @@ Global
{431D18E4-4464-45C0-BBF2-1834B73E8095}.Release|x86.ActiveCfg = Release|Any CPU
{431D18E4-4464-45C0-BBF2-1834B73E8095}.Release|x86.Build.0 = Release|Any CPU
{431D18E4-4464-45C0-BBF2-1834B73E8095}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {431D18E4-4464-45C0-BBF2-1834B73E8095}.Checked|Any CPU.Build.0 = Debug|Any CPU
{431D18E4-4464-45C0-BBF2-1834B73E8095}.Checked|x64.ActiveCfg = Debug|Any CPU
- {431D18E4-4464-45C0-BBF2-1834B73E8095}.Checked|x64.Build.0 = Debug|Any CPU
{431D18E4-4464-45C0-BBF2-1834B73E8095}.Checked|x86.ActiveCfg = Debug|Any CPU
- {431D18E4-4464-45C0-BBF2-1834B73E8095}.Checked|x86.Build.0 = Debug|Any CPU
+ {6C5BE0DF-C0E1-4971-9E4A-01105A4A013A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6C5BE0DF-C0E1-4971-9E4A-01105A4A013A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6C5BE0DF-C0E1-4971-9E4A-01105A4A013A}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {6C5BE0DF-C0E1-4971-9E4A-01105A4A013A}.Debug|x64.Build.0 = Debug|Any CPU
+ {6C5BE0DF-C0E1-4971-9E4A-01105A4A013A}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {6C5BE0DF-C0E1-4971-9E4A-01105A4A013A}.Debug|x86.Build.0 = Debug|Any CPU
+ {6C5BE0DF-C0E1-4971-9E4A-01105A4A013A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6C5BE0DF-C0E1-4971-9E4A-01105A4A013A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6C5BE0DF-C0E1-4971-9E4A-01105A4A013A}.Release|x64.ActiveCfg = Release|Any CPU
+ {6C5BE0DF-C0E1-4971-9E4A-01105A4A013A}.Release|x64.Build.0 = Release|Any CPU
+ {6C5BE0DF-C0E1-4971-9E4A-01105A4A013A}.Release|x86.ActiveCfg = Release|Any CPU
+ {6C5BE0DF-C0E1-4971-9E4A-01105A4A013A}.Release|x86.Build.0 = Release|Any CPU
+ {6C5BE0DF-C0E1-4971-9E4A-01105A4A013A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {6C5BE0DF-C0E1-4971-9E4A-01105A4A013A}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {6C5BE0DF-C0E1-4971-9E4A-01105A4A013A}.Checked|x86.ActiveCfg = Debug|Any CPU
{1E072489-1073-4526-8C5D-64AC2A97BF9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1E072489-1073-4526-8C5D-64AC2A97BF9B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1E072489-1073-4526-8C5D-64AC2A97BF9B}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -243,11 +233,8 @@ Global
{1E072489-1073-4526-8C5D-64AC2A97BF9B}.Release|x86.ActiveCfg = Release|Any CPU
{1E072489-1073-4526-8C5D-64AC2A97BF9B}.Release|x86.Build.0 = Release|Any CPU
{1E072489-1073-4526-8C5D-64AC2A97BF9B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {1E072489-1073-4526-8C5D-64AC2A97BF9B}.Checked|Any CPU.Build.0 = Debug|Any CPU
{1E072489-1073-4526-8C5D-64AC2A97BF9B}.Checked|x64.ActiveCfg = Debug|Any CPU
- {1E072489-1073-4526-8C5D-64AC2A97BF9B}.Checked|x64.Build.0 = Debug|Any CPU
{1E072489-1073-4526-8C5D-64AC2A97BF9B}.Checked|x86.ActiveCfg = Debug|Any CPU
- {1E072489-1073-4526-8C5D-64AC2A97BF9B}.Checked|x86.Build.0 = Debug|Any CPU
{2DB3F8FB-BDD7-471E-BF8F-D3C4D6A2BDC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2DB3F8FB-BDD7-471E-BF8F-D3C4D6A2BDC3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2DB3F8FB-BDD7-471E-BF8F-D3C4D6A2BDC3}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -261,11 +248,8 @@ Global
{2DB3F8FB-BDD7-471E-BF8F-D3C4D6A2BDC3}.Release|x86.ActiveCfg = Release|Any CPU
{2DB3F8FB-BDD7-471E-BF8F-D3C4D6A2BDC3}.Release|x86.Build.0 = Release|Any CPU
{2DB3F8FB-BDD7-471E-BF8F-D3C4D6A2BDC3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {2DB3F8FB-BDD7-471E-BF8F-D3C4D6A2BDC3}.Checked|Any CPU.Build.0 = Debug|Any CPU
{2DB3F8FB-BDD7-471E-BF8F-D3C4D6A2BDC3}.Checked|x64.ActiveCfg = Debug|Any CPU
- {2DB3F8FB-BDD7-471E-BF8F-D3C4D6A2BDC3}.Checked|x64.Build.0 = Debug|Any CPU
{2DB3F8FB-BDD7-471E-BF8F-D3C4D6A2BDC3}.Checked|x86.ActiveCfg = Debug|Any CPU
- {2DB3F8FB-BDD7-471E-BF8F-D3C4D6A2BDC3}.Checked|x86.Build.0 = Debug|Any CPU
{BE035215-7EB5-4B56-9DD2-67519A631A89}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BE035215-7EB5-4B56-9DD2-67519A631A89}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BE035215-7EB5-4B56-9DD2-67519A631A89}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -279,11 +263,8 @@ Global
{BE035215-7EB5-4B56-9DD2-67519A631A89}.Release|x86.ActiveCfg = Release|Any CPU
{BE035215-7EB5-4B56-9DD2-67519A631A89}.Release|x86.Build.0 = Release|Any CPU
{BE035215-7EB5-4B56-9DD2-67519A631A89}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {BE035215-7EB5-4B56-9DD2-67519A631A89}.Checked|Any CPU.Build.0 = Debug|Any CPU
{BE035215-7EB5-4B56-9DD2-67519A631A89}.Checked|x64.ActiveCfg = Debug|Any CPU
- {BE035215-7EB5-4B56-9DD2-67519A631A89}.Checked|x64.Build.0 = Debug|Any CPU
{BE035215-7EB5-4B56-9DD2-67519A631A89}.Checked|x86.ActiveCfg = Debug|Any CPU
- {BE035215-7EB5-4B56-9DD2-67519A631A89}.Checked|x86.Build.0 = Debug|Any CPU
{36F808C9-93D1-41D2-A2F8-E0F113B3F10F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{36F808C9-93D1-41D2-A2F8-E0F113B3F10F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{36F808C9-93D1-41D2-A2F8-E0F113B3F10F}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -297,11 +278,8 @@ Global
{36F808C9-93D1-41D2-A2F8-E0F113B3F10F}.Release|x86.ActiveCfg = Release|Any CPU
{36F808C9-93D1-41D2-A2F8-E0F113B3F10F}.Release|x86.Build.0 = Release|Any CPU
{36F808C9-93D1-41D2-A2F8-E0F113B3F10F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {36F808C9-93D1-41D2-A2F8-E0F113B3F10F}.Checked|Any CPU.Build.0 = Debug|Any CPU
{36F808C9-93D1-41D2-A2F8-E0F113B3F10F}.Checked|x64.ActiveCfg = Debug|Any CPU
- {36F808C9-93D1-41D2-A2F8-E0F113B3F10F}.Checked|x64.Build.0 = Debug|Any CPU
{36F808C9-93D1-41D2-A2F8-E0F113B3F10F}.Checked|x86.ActiveCfg = Debug|Any CPU
- {36F808C9-93D1-41D2-A2F8-E0F113B3F10F}.Checked|x86.Build.0 = Debug|Any CPU
{FA6BD4D3-8D9B-4CA2-B8C6-A1A21F946AC2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FA6BD4D3-8D9B-4CA2-B8C6-A1A21F946AC2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FA6BD4D3-8D9B-4CA2-B8C6-A1A21F946AC2}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -315,11 +293,8 @@ Global
{FA6BD4D3-8D9B-4CA2-B8C6-A1A21F946AC2}.Release|x86.ActiveCfg = Release|Any CPU
{FA6BD4D3-8D9B-4CA2-B8C6-A1A21F946AC2}.Release|x86.Build.0 = Release|Any CPU
{FA6BD4D3-8D9B-4CA2-B8C6-A1A21F946AC2}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {FA6BD4D3-8D9B-4CA2-B8C6-A1A21F946AC2}.Checked|Any CPU.Build.0 = Debug|Any CPU
{FA6BD4D3-8D9B-4CA2-B8C6-A1A21F946AC2}.Checked|x64.ActiveCfg = Debug|Any CPU
- {FA6BD4D3-8D9B-4CA2-B8C6-A1A21F946AC2}.Checked|x64.Build.0 = Debug|Any CPU
{FA6BD4D3-8D9B-4CA2-B8C6-A1A21F946AC2}.Checked|x86.ActiveCfg = Debug|Any CPU
- {FA6BD4D3-8D9B-4CA2-B8C6-A1A21F946AC2}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -335,6 +310,7 @@ Global
{ADA6D062-1E28-47D8-A058-FE1F4551AA20} = {CA1F4ADE-3F2A-40E3-9242-549F88F0367F}
{994A4967-489F-4DDC-88EE-1BEFBFBF830A} = {CA1F4ADE-3F2A-40E3-9242-549F88F0367F}
{61B535DC-4E61-43F3-AB75-CD260D8816D3} = {CA1F4ADE-3F2A-40E3-9242-549F88F0367F}
+ {6C5BE0DF-C0E1-4971-9E4A-01105A4A013A} = {CA1F4ADE-3F2A-40E3-9242-549F88F0367F}
{BE035215-7EB5-4B56-9DD2-67519A631A89} = {CA1F4ADE-3F2A-40E3-9242-549F88F0367F}
{36F808C9-93D1-41D2-A2F8-E0F113B3F10F} = {CA1F4ADE-3F2A-40E3-9242-549F88F0367F}
{431D18E4-4464-45C0-BBF2-1834B73E8095} = {93EF6213-7FD5-4A26-A8AB-AF8E4DB470FD}
diff --git a/src/libraries/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentDictionary.cs b/src/libraries/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentDictionary.cs
index d69b5cf5e2a..b5edb1e448f 100644
--- a/src/libraries/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentDictionary.cs
+++ b/src/libraries/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentDictionary.cs
@@ -2097,15 +2097,23 @@ namespace System.Collections.Concurrent
ThrowHelper.ThrowOutOfMemoryException();
}
- var keys = new List<TKey>(count);
+ if (count == 0)
+ {
+ // TODO https://github.com/dotnet/runtime/issues/76028: Replace with ReadOnlyCollection<TKey>.Empty.
+ return Array.Empty<TKey>().AsReadOnly();
+ }
+
+ var keys = new TKey[count];
Node?[] buckets = _tables._buckets;
+ int n = 0;
for (int i = 0; i < buckets.Length; i++)
{
for (Node? current = buckets[i]; current != null; current = current._next)
{
- keys.Add(current._key);
+ keys[n++] = current._key;
}
}
+ Debug.Assert(n == count);
return new ReadOnlyCollection<TKey>(keys);
}
@@ -2131,15 +2139,23 @@ namespace System.Collections.Concurrent
ThrowHelper.ThrowOutOfMemoryException();
}
- var values = new List<TValue>(count);
+ if (count == 0)
+ {
+ // TODO https://github.com/dotnet/runtime/pull/76097: Replace with ReadOnlyCollection<TValue>.Empty.
+ return Array.Empty<TValue>().AsReadOnly();
+ }
+
+ var values = new TValue[count];
Node?[] buckets = _tables._buckets;
+ int n = 0;
for (int i = 0; i < buckets.Length; i++)
{
for (Node? current = buckets[i]; current != null; current = current._next)
{
- values.Add(current._value);
+ values[n++] = current._value;
}
}
+ Debug.Assert(n == count);
return new ReadOnlyCollection<TValue>(values);
}
diff --git a/src/libraries/System.Collections.Immutable/tests/System.Collections.Immutable.Tests.csproj b/src/libraries/System.Collections.Immutable/tests/System.Collections.Immutable.Tests.csproj
index 434f70fa32c..fc886aaeaac 100644
--- a/src/libraries/System.Collections.Immutable/tests/System.Collections.Immutable.Tests.csproj
+++ b/src/libraries/System.Collections.Immutable/tests/System.Collections.Immutable.Tests.csproj
@@ -75,8 +75,6 @@
Link="Common\System\Collections\DebugView.Tests.cs" />
<Compile Include="$(CommonTestPath)System\Collections\TestingTypes.cs"
Link="Common\System\Collections\TestingTypes.cs" />
- <Compile Include="$(CommonPath)System\SerializableAttribute.cs"
- Link="Common\System\SerializableAttribute.cs" />
</ItemGroup>
<ItemGroup>
<None Include="ClassDiagram1.cd" />
diff --git a/src/libraries/System.Collections.NonGeneric/tests/QueueTests.cs b/src/libraries/System.Collections.NonGeneric/tests/QueueTests.cs
index e98bb736fd1..2ff12cec242 100644
--- a/src/libraries/System.Collections.NonGeneric/tests/QueueTests.cs
+++ b/src/libraries/System.Collections.NonGeneric/tests/QueueTests.cs
@@ -91,7 +91,7 @@ namespace System.Collections.Tests
AssertExtensions.Throws<ArgumentNullException>("col", () => new Queue(null)); // Collection is null
}
- [Fact]
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsDebuggerTypeProxyAttributeSupported))]
public static void DebuggerAttribute()
{
DebuggerAttributes.ValidateDebuggerDisplayReferences(new Queue());
diff --git a/src/libraries/System.Collections.NonGeneric/tests/SortedListTests.cs b/src/libraries/System.Collections.NonGeneric/tests/SortedListTests.cs
index 63959915e02..d2e2865590b 100644
--- a/src/libraries/System.Collections.NonGeneric/tests/SortedListTests.cs
+++ b/src/libraries/System.Collections.NonGeneric/tests/SortedListTests.cs
@@ -212,7 +212,7 @@ namespace System.Collections.Tests
AssertExtensions.Throws<ArgumentNullException>("d", () => new SortedList(null, new CustomComparer())); // Dictionary is null
}
- [Fact]
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsDebuggerTypeProxyAttributeSupported))]
public void DebuggerAttribute_Empty()
{
Assert.Equal("Count = 0", DebuggerAttributes.ValidateDebuggerDisplayReferences(new SortedList()));
@@ -266,7 +266,7 @@ namespace System.Collections.Tests
const int MinCapacity = InitialCapacity * 2 + 1;
var sortedList = new SortedList(InitialCapacity);
- MethodInfo ensureCapacity = sortedList.GetType().GetMethod("EnsureCapacity", BindingFlags.NonPublic | BindingFlags.Instance);
+ MethodInfo ensureCapacity = typeof(SortedList).GetMethod("EnsureCapacity", BindingFlags.NonPublic | BindingFlags.Instance);
ensureCapacity.Invoke(sortedList, new object[] { MinCapacity });
Assert.Equal(MinCapacity, sortedList.Capacity);
diff --git a/src/libraries/System.Collections.NonGeneric/tests/StackTests.cs b/src/libraries/System.Collections.NonGeneric/tests/StackTests.cs
index a9ecc5d37b0..85380c7b733 100644
--- a/src/libraries/System.Collections.NonGeneric/tests/StackTests.cs
+++ b/src/libraries/System.Collections.NonGeneric/tests/StackTests.cs
@@ -69,7 +69,7 @@ namespace System.Collections.Tests
AssertExtensions.Throws<ArgumentNullException>("col", () => new Stack(null)); // Collection is null
}
- [Fact]
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsDebuggerTypeProxyAttributeSupported))]
public static void DebuggerAttribute()
{
DebuggerAttributes.ValidateDebuggerDisplayReferences(new Stack());
diff --git a/src/libraries/System.Collections.NonGeneric/tests/System.Collections.NonGeneric.Tests.csproj b/src/libraries/System.Collections.NonGeneric/tests/System.Collections.NonGeneric.Tests.csproj
index 892b48394c0..9527a6f551a 100644
--- a/src/libraries/System.Collections.NonGeneric/tests/System.Collections.NonGeneric.Tests.csproj
+++ b/src/libraries/System.Collections.NonGeneric/tests/System.Collections.NonGeneric.Tests.csproj
@@ -3,8 +3,6 @@
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<DebuggerSupport Condition="'$(DebuggerSupport)' == '' and '$(TargetOS)' == 'Browser'">true</DebuggerSupport>
- <!--Remove once this is fixed, https://github.com/dotnet/runtime/issues/71506 -->
- <IlcTrimMetadata>false</IlcTrimMetadata>
</PropertyGroup>
<ItemGroup>
<!-- Common Collections tests -->
diff --git a/src/libraries/System.Collections/System.Collections.sln b/src/libraries/System.Collections/System.Collections.sln
index 45f36f8be14..ed62f0f933d 100644
--- a/src/libraries/System.Collections/System.Collections.sln
+++ b/src/libraries/System.Collections/System.Collections.sln
@@ -1,8 +1,4 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.4.32804.182
-MinimumVisualStudioVersion = 10.0.40219.1
+Microsoft Visual Studio Solution File, Format Version 12.00
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\..\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj", "{4385739F-14A1-4F21-96E3-12EA90580575}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{38D8F258-655E-459B-B2CE-0DED144AFBF7}"
@@ -15,6 +11,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Collections.Tests",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{F2E57833-4968-430D-8149-733DE03A7314}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{2B114AFB-EB05-4615-B0AC-8FFF0D5D0D13}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{389B3CD7-FF7C-4004-A6BA-29B39B4BDF3A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{00398A78-1620-4996-9922-C82D1AF84714}"
@@ -31,23 +29,17 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{B958B834-96D
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Checked|Any CPU = Checked|Any CPU
- Checked|x64 = Checked|x64
- Checked|x86 = Checked|x86
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
+ Checked|Any CPU = Checked|Any CPU
+ Checked|x64 = Checked|x64
+ Checked|x86 = Checked|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {4385739F-14A1-4F21-96E3-12EA90580575}.Checked|Any CPU.ActiveCfg = Checked|x64
- {4385739F-14A1-4F21-96E3-12EA90580575}.Checked|Any CPU.Build.0 = Checked|x64
- {4385739F-14A1-4F21-96E3-12EA90580575}.Checked|x64.ActiveCfg = Checked|x64
- {4385739F-14A1-4F21-96E3-12EA90580575}.Checked|x64.Build.0 = Checked|x64
- {4385739F-14A1-4F21-96E3-12EA90580575}.Checked|x86.ActiveCfg = Checked|x86
- {4385739F-14A1-4F21-96E3-12EA90580575}.Checked|x86.Build.0 = Checked|x86
{4385739F-14A1-4F21-96E3-12EA90580575}.Debug|Any CPU.ActiveCfg = Debug|x64
{4385739F-14A1-4F21-96E3-12EA90580575}.Debug|Any CPU.Build.0 = Debug|x64
{4385739F-14A1-4F21-96E3-12EA90580575}.Debug|x64.ActiveCfg = Debug|x64
@@ -60,12 +52,12 @@ Global
{4385739F-14A1-4F21-96E3-12EA90580575}.Release|x64.Build.0 = Release|x64
{4385739F-14A1-4F21-96E3-12EA90580575}.Release|x86.ActiveCfg = Release|x86
{4385739F-14A1-4F21-96E3-12EA90580575}.Release|x86.Build.0 = Release|x86
- {38D8F258-655E-459B-B2CE-0DED144AFBF7}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {38D8F258-655E-459B-B2CE-0DED144AFBF7}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {38D8F258-655E-459B-B2CE-0DED144AFBF7}.Checked|x64.ActiveCfg = Debug|Any CPU
- {38D8F258-655E-459B-B2CE-0DED144AFBF7}.Checked|x64.Build.0 = Debug|Any CPU
- {38D8F258-655E-459B-B2CE-0DED144AFBF7}.Checked|x86.ActiveCfg = Debug|Any CPU
- {38D8F258-655E-459B-B2CE-0DED144AFBF7}.Checked|x86.Build.0 = Debug|Any CPU
+ {4385739F-14A1-4F21-96E3-12EA90580575}.Checked|Any CPU.ActiveCfg = Checked|x64
+ {4385739F-14A1-4F21-96E3-12EA90580575}.Checked|Any CPU.Build.0 = Checked|x64
+ {4385739F-14A1-4F21-96E3-12EA90580575}.Checked|x64.ActiveCfg = Checked|x64
+ {4385739F-14A1-4F21-96E3-12EA90580575}.Checked|x64.Build.0 = Checked|x64
+ {4385739F-14A1-4F21-96E3-12EA90580575}.Checked|x86.ActiveCfg = Checked|x86
+ {4385739F-14A1-4F21-96E3-12EA90580575}.Checked|x86.Build.0 = Checked|x86
{38D8F258-655E-459B-B2CE-0DED144AFBF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{38D8F258-655E-459B-B2CE-0DED144AFBF7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{38D8F258-655E-459B-B2CE-0DED144AFBF7}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -78,12 +70,9 @@ Global
{38D8F258-655E-459B-B2CE-0DED144AFBF7}.Release|x64.Build.0 = Release|Any CPU
{38D8F258-655E-459B-B2CE-0DED144AFBF7}.Release|x86.ActiveCfg = Release|Any CPU
{38D8F258-655E-459B-B2CE-0DED144AFBF7}.Release|x86.Build.0 = Release|Any CPU
- {77E9C47D-4AC4-4402-8613-40DF427174BD}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {77E9C47D-4AC4-4402-8613-40DF427174BD}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {77E9C47D-4AC4-4402-8613-40DF427174BD}.Checked|x64.ActiveCfg = Debug|Any CPU
- {77E9C47D-4AC4-4402-8613-40DF427174BD}.Checked|x64.Build.0 = Debug|Any CPU
- {77E9C47D-4AC4-4402-8613-40DF427174BD}.Checked|x86.ActiveCfg = Debug|Any CPU
- {77E9C47D-4AC4-4402-8613-40DF427174BD}.Checked|x86.Build.0 = Debug|Any CPU
+ {38D8F258-655E-459B-B2CE-0DED144AFBF7}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {38D8F258-655E-459B-B2CE-0DED144AFBF7}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {38D8F258-655E-459B-B2CE-0DED144AFBF7}.Checked|x86.ActiveCfg = Debug|Any CPU
{77E9C47D-4AC4-4402-8613-40DF427174BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{77E9C47D-4AC4-4402-8613-40DF427174BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{77E9C47D-4AC4-4402-8613-40DF427174BD}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -96,12 +85,9 @@ Global
{77E9C47D-4AC4-4402-8613-40DF427174BD}.Release|x64.Build.0 = Release|Any CPU
{77E9C47D-4AC4-4402-8613-40DF427174BD}.Release|x86.ActiveCfg = Release|Any CPU
{77E9C47D-4AC4-4402-8613-40DF427174BD}.Release|x86.Build.0 = Release|Any CPU
- {DF501250-4105-4F79-A508-90B3A13A975A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {DF501250-4105-4F79-A508-90B3A13A975A}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {DF501250-4105-4F79-A508-90B3A13A975A}.Checked|x64.ActiveCfg = Debug|Any CPU
- {DF501250-4105-4F79-A508-90B3A13A975A}.Checked|x64.Build.0 = Debug|Any CPU
- {DF501250-4105-4F79-A508-90B3A13A975A}.Checked|x86.ActiveCfg = Debug|Any CPU
- {DF501250-4105-4F79-A508-90B3A13A975A}.Checked|x86.Build.0 = Debug|Any CPU
+ {77E9C47D-4AC4-4402-8613-40DF427174BD}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {77E9C47D-4AC4-4402-8613-40DF427174BD}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {77E9C47D-4AC4-4402-8613-40DF427174BD}.Checked|x86.ActiveCfg = Debug|Any CPU
{DF501250-4105-4F79-A508-90B3A13A975A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DF501250-4105-4F79-A508-90B3A13A975A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DF501250-4105-4F79-A508-90B3A13A975A}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -114,12 +100,9 @@ Global
{DF501250-4105-4F79-A508-90B3A13A975A}.Release|x64.Build.0 = Release|Any CPU
{DF501250-4105-4F79-A508-90B3A13A975A}.Release|x86.ActiveCfg = Release|Any CPU
{DF501250-4105-4F79-A508-90B3A13A975A}.Release|x86.Build.0 = Release|Any CPU
- {BB54ED9D-FF71-4D91-B7C0-984AB0976798}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {BB54ED9D-FF71-4D91-B7C0-984AB0976798}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {BB54ED9D-FF71-4D91-B7C0-984AB0976798}.Checked|x64.ActiveCfg = Debug|Any CPU
- {BB54ED9D-FF71-4D91-B7C0-984AB0976798}.Checked|x64.Build.0 = Debug|Any CPU
- {BB54ED9D-FF71-4D91-B7C0-984AB0976798}.Checked|x86.ActiveCfg = Debug|Any CPU
- {BB54ED9D-FF71-4D91-B7C0-984AB0976798}.Checked|x86.Build.0 = Debug|Any CPU
+ {DF501250-4105-4F79-A508-90B3A13A975A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {DF501250-4105-4F79-A508-90B3A13A975A}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {DF501250-4105-4F79-A508-90B3A13A975A}.Checked|x86.ActiveCfg = Debug|Any CPU
{BB54ED9D-FF71-4D91-B7C0-984AB0976798}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BB54ED9D-FF71-4D91-B7C0-984AB0976798}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BB54ED9D-FF71-4D91-B7C0-984AB0976798}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -132,12 +115,9 @@ Global
{BB54ED9D-FF71-4D91-B7C0-984AB0976798}.Release|x64.Build.0 = Release|Any CPU
{BB54ED9D-FF71-4D91-B7C0-984AB0976798}.Release|x86.ActiveCfg = Release|Any CPU
{BB54ED9D-FF71-4D91-B7C0-984AB0976798}.Release|x86.Build.0 = Release|Any CPU
- {F2E57833-4968-430D-8149-733DE03A7314}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {F2E57833-4968-430D-8149-733DE03A7314}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {F2E57833-4968-430D-8149-733DE03A7314}.Checked|x64.ActiveCfg = Debug|Any CPU
- {F2E57833-4968-430D-8149-733DE03A7314}.Checked|x64.Build.0 = Debug|Any CPU
- {F2E57833-4968-430D-8149-733DE03A7314}.Checked|x86.ActiveCfg = Debug|Any CPU
- {F2E57833-4968-430D-8149-733DE03A7314}.Checked|x86.Build.0 = Debug|Any CPU
+ {BB54ED9D-FF71-4D91-B7C0-984AB0976798}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {BB54ED9D-FF71-4D91-B7C0-984AB0976798}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {BB54ED9D-FF71-4D91-B7C0-984AB0976798}.Checked|x86.ActiveCfg = Debug|Any CPU
{F2E57833-4968-430D-8149-733DE03A7314}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F2E57833-4968-430D-8149-733DE03A7314}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F2E57833-4968-430D-8149-733DE03A7314}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -150,12 +130,24 @@ Global
{F2E57833-4968-430D-8149-733DE03A7314}.Release|x64.Build.0 = Release|Any CPU
{F2E57833-4968-430D-8149-733DE03A7314}.Release|x86.ActiveCfg = Release|Any CPU
{F2E57833-4968-430D-8149-733DE03A7314}.Release|x86.Build.0 = Release|Any CPU
- {389B3CD7-FF7C-4004-A6BA-29B39B4BDF3A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {389B3CD7-FF7C-4004-A6BA-29B39B4BDF3A}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {389B3CD7-FF7C-4004-A6BA-29B39B4BDF3A}.Checked|x64.ActiveCfg = Debug|Any CPU
- {389B3CD7-FF7C-4004-A6BA-29B39B4BDF3A}.Checked|x64.Build.0 = Debug|Any CPU
- {389B3CD7-FF7C-4004-A6BA-29B39B4BDF3A}.Checked|x86.ActiveCfg = Debug|Any CPU
- {389B3CD7-FF7C-4004-A6BA-29B39B4BDF3A}.Checked|x86.Build.0 = Debug|Any CPU
+ {F2E57833-4968-430D-8149-733DE03A7314}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {F2E57833-4968-430D-8149-733DE03A7314}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {F2E57833-4968-430D-8149-733DE03A7314}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {2B114AFB-EB05-4615-B0AC-8FFF0D5D0D13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2B114AFB-EB05-4615-B0AC-8FFF0D5D0D13}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2B114AFB-EB05-4615-B0AC-8FFF0D5D0D13}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {2B114AFB-EB05-4615-B0AC-8FFF0D5D0D13}.Debug|x64.Build.0 = Debug|Any CPU
+ {2B114AFB-EB05-4615-B0AC-8FFF0D5D0D13}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {2B114AFB-EB05-4615-B0AC-8FFF0D5D0D13}.Debug|x86.Build.0 = Debug|Any CPU
+ {2B114AFB-EB05-4615-B0AC-8FFF0D5D0D13}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2B114AFB-EB05-4615-B0AC-8FFF0D5D0D13}.Release|Any CPU.Build.0 = Release|Any CPU
+ {2B114AFB-EB05-4615-B0AC-8FFF0D5D0D13}.Release|x64.ActiveCfg = Release|Any CPU
+ {2B114AFB-EB05-4615-B0AC-8FFF0D5D0D13}.Release|x64.Build.0 = Release|Any CPU
+ {2B114AFB-EB05-4615-B0AC-8FFF0D5D0D13}.Release|x86.ActiveCfg = Release|Any CPU
+ {2B114AFB-EB05-4615-B0AC-8FFF0D5D0D13}.Release|x86.Build.0 = Release|Any CPU
+ {2B114AFB-EB05-4615-B0AC-8FFF0D5D0D13}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {2B114AFB-EB05-4615-B0AC-8FFF0D5D0D13}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {2B114AFB-EB05-4615-B0AC-8FFF0D5D0D13}.Checked|x86.ActiveCfg = Debug|Any CPU
{389B3CD7-FF7C-4004-A6BA-29B39B4BDF3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{389B3CD7-FF7C-4004-A6BA-29B39B4BDF3A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{389B3CD7-FF7C-4004-A6BA-29B39B4BDF3A}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -168,12 +160,9 @@ Global
{389B3CD7-FF7C-4004-A6BA-29B39B4BDF3A}.Release|x64.Build.0 = Release|Any CPU
{389B3CD7-FF7C-4004-A6BA-29B39B4BDF3A}.Release|x86.ActiveCfg = Release|Any CPU
{389B3CD7-FF7C-4004-A6BA-29B39B4BDF3A}.Release|x86.Build.0 = Release|Any CPU
- {00398A78-1620-4996-9922-C82D1AF84714}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {00398A78-1620-4996-9922-C82D1AF84714}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {00398A78-1620-4996-9922-C82D1AF84714}.Checked|x64.ActiveCfg = Debug|Any CPU
- {00398A78-1620-4996-9922-C82D1AF84714}.Checked|x64.Build.0 = Debug|Any CPU
- {00398A78-1620-4996-9922-C82D1AF84714}.Checked|x86.ActiveCfg = Debug|Any CPU
- {00398A78-1620-4996-9922-C82D1AF84714}.Checked|x86.Build.0 = Debug|Any CPU
+ {389B3CD7-FF7C-4004-A6BA-29B39B4BDF3A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {389B3CD7-FF7C-4004-A6BA-29B39B4BDF3A}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {389B3CD7-FF7C-4004-A6BA-29B39B4BDF3A}.Checked|x86.ActiveCfg = Debug|Any CPU
{00398A78-1620-4996-9922-C82D1AF84714}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{00398A78-1620-4996-9922-C82D1AF84714}.Debug|Any CPU.Build.0 = Debug|Any CPU
{00398A78-1620-4996-9922-C82D1AF84714}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -186,12 +175,9 @@ Global
{00398A78-1620-4996-9922-C82D1AF84714}.Release|x64.Build.0 = Release|Any CPU
{00398A78-1620-4996-9922-C82D1AF84714}.Release|x86.ActiveCfg = Release|Any CPU
{00398A78-1620-4996-9922-C82D1AF84714}.Release|x86.Build.0 = Release|Any CPU
- {EE21C87C-5515-45E1-9F94-F11BE4CEE2CA}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {EE21C87C-5515-45E1-9F94-F11BE4CEE2CA}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {EE21C87C-5515-45E1-9F94-F11BE4CEE2CA}.Checked|x64.ActiveCfg = Debug|Any CPU
- {EE21C87C-5515-45E1-9F94-F11BE4CEE2CA}.Checked|x64.Build.0 = Debug|Any CPU
- {EE21C87C-5515-45E1-9F94-F11BE4CEE2CA}.Checked|x86.ActiveCfg = Debug|Any CPU
- {EE21C87C-5515-45E1-9F94-F11BE4CEE2CA}.Checked|x86.Build.0 = Debug|Any CPU
+ {00398A78-1620-4996-9922-C82D1AF84714}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {00398A78-1620-4996-9922-C82D1AF84714}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {00398A78-1620-4996-9922-C82D1AF84714}.Checked|x86.ActiveCfg = Debug|Any CPU
{EE21C87C-5515-45E1-9F94-F11BE4CEE2CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EE21C87C-5515-45E1-9F94-F11BE4CEE2CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EE21C87C-5515-45E1-9F94-F11BE4CEE2CA}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -204,25 +190,26 @@ Global
{EE21C87C-5515-45E1-9F94-F11BE4CEE2CA}.Release|x64.Build.0 = Release|Any CPU
{EE21C87C-5515-45E1-9F94-F11BE4CEE2CA}.Release|x86.ActiveCfg = Release|Any CPU
{EE21C87C-5515-45E1-9F94-F11BE4CEE2CA}.Release|x86.Build.0 = Release|Any CPU
+ {EE21C87C-5515-45E1-9F94-F11BE4CEE2CA}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {EE21C87C-5515-45E1-9F94-F11BE4CEE2CA}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {EE21C87C-5515-45E1-9F94-F11BE4CEE2CA}.Checked|x86.ActiveCfg = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{4385739F-14A1-4F21-96E3-12EA90580575} = {C848C534-DD16-4A69-81FF-894456E4B099}
- {38D8F258-655E-459B-B2CE-0DED144AFBF7} = {6CD2C5E3-B5BA-4219-B8EF-9B5D486BF805}
- {77E9C47D-4AC4-4402-8613-40DF427174BD} = {06AE90FB-F007-4E70-BCD2-5CAD106A7C97}
{DF501250-4105-4F79-A508-90B3A13A975A} = {C848C534-DD16-4A69-81FF-894456E4B099}
+ {38D8F258-655E-459B-B2CE-0DED144AFBF7} = {6CD2C5E3-B5BA-4219-B8EF-9B5D486BF805}
{BB54ED9D-FF71-4D91-B7C0-984AB0976798} = {6CD2C5E3-B5BA-4219-B8EF-9B5D486BF805}
+ {77E9C47D-4AC4-4402-8613-40DF427174BD} = {06AE90FB-F007-4E70-BCD2-5CAD106A7C97}
+ {2B114AFB-EB05-4615-B0AC-8FFF0D5D0D13} = {06AE90FB-F007-4E70-BCD2-5CAD106A7C97}
+ {EE21C87C-5515-45E1-9F94-F11BE4CEE2CA} = {06AE90FB-F007-4E70-BCD2-5CAD106A7C97}
{F2E57833-4968-430D-8149-733DE03A7314} = {B958B834-96D2-4B18-AA42-22B312BE9925}
{389B3CD7-FF7C-4004-A6BA-29B39B4BDF3A} = {B958B834-96D2-4B18-AA42-22B312BE9925}
{00398A78-1620-4996-9922-C82D1AF84714} = {B958B834-96D2-4B18-AA42-22B312BE9925}
- {EE21C87C-5515-45E1-9F94-F11BE4CEE2CA} = {06AE90FB-F007-4E70-BCD2-5CAD106A7C97}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {FDD40D53-AF3E-4A20-BE17-7555EB5494F9}
EndGlobalSection
- GlobalSection(SharedMSBuildProjectFiles) = preSolution
- ..\System.Private.CoreLib\src\System.Private.CoreLib.Shared.projitems*{4385739f-14a1-4f21-96e3-12ea90580575}*SharedItemsImports = 5
- EndGlobalSection
EndGlobal
diff --git a/src/libraries/System.Collections/ref/System.Collections.cs b/src/libraries/System.Collections/ref/System.Collections.cs
index 4c5dc875d17..56040f18204 100644
--- a/src/libraries/System.Collections/ref/System.Collections.cs
+++ b/src/libraries/System.Collections/ref/System.Collections.cs
@@ -42,15 +42,6 @@ namespace System.Collections
}
namespace System.Collections.Generic
{
- public static partial class CollectionExtensions
- {
- public static TValue? GetValueOrDefault<TKey, TValue>(this System.Collections.Generic.IReadOnlyDictionary<TKey, TValue> dictionary, TKey key) { throw null; }
- public static TValue GetValueOrDefault<TKey, TValue>(this System.Collections.Generic.IReadOnlyDictionary<TKey, TValue> dictionary, TKey key, TValue defaultValue) { throw null; }
- public static bool Remove<TKey, TValue>(this System.Collections.Generic.IDictionary<TKey, TValue> dictionary, TKey key, [System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out TValue value) { throw null; }
- public static bool TryAdd<TKey, TValue>(this System.Collections.Generic.IDictionary<TKey, TValue> dictionary, TKey key, TValue value) { throw null; }
- public static System.Collections.ObjectModel.ReadOnlyCollection<T> AsReadOnly<T>(this IList<T> list) { throw null; }
- public static System.Collections.ObjectModel.ReadOnlyDictionary<TKey, TValue> AsReadOnly<TKey, TValue>(this IDictionary<TKey, TValue> dictionary) where TKey : notnull { throw null; }
- }
public sealed partial class LinkedListNode<T>
{
public LinkedListNode(T value) { }
@@ -122,6 +113,7 @@ namespace System.Collections.Generic
public System.Collections.Generic.PriorityQueue<TElement, TPriority>.UnorderedItemsCollection UnorderedItems { get { throw null; } }
public void Clear() { }
public TElement Dequeue() { throw null; }
+ public TElement DequeueEnqueue(TElement element, TPriority priority) { throw null; }
public void Enqueue(TElement element, TPriority priority) { }
public TElement EnqueueDequeue(TElement element, TPriority priority) { throw null; }
public void EnqueueRange(System.Collections.Generic.IEnumerable<(TElement Element, TPriority Priority)> items) { }
@@ -217,7 +209,7 @@ namespace System.Collections.Generic
public System.Collections.Generic.SortedDictionary<TKey, TValue>.KeyCollection.Enumerator GetEnumerator() { throw null; }
void System.Collections.Generic.ICollection<TKey>.Add(TKey item) { }
void System.Collections.Generic.ICollection<TKey>.Clear() { }
- bool System.Collections.Generic.ICollection<TKey>.Contains(TKey item) { throw null; }
+ public bool Contains(TKey item) { throw null; }
bool System.Collections.Generic.ICollection<TKey>.Remove(TKey item) { throw null; }
System.Collections.Generic.IEnumerator<TKey> System.Collections.Generic.IEnumerable<TKey>.GetEnumerator() { throw null; }
void System.Collections.ICollection.CopyTo(System.Array array, int index) { }
@@ -411,6 +403,18 @@ namespace System.Collections.Generic
#endif // !BUILDING_CORELIB_REFERENCE
namespace System.Collections.Generic
{
+ public static partial class CollectionExtensions
+ {
+ public static void AddRange<T>(this System.Collections.Generic.List<T> list, System.ReadOnlySpan<T> source) { }
+ public static void CopyTo<T>(this System.Collections.Generic.List<T> list, System.Span<T> destination) { }
+ public static TValue? GetValueOrDefault<TKey, TValue>(this System.Collections.Generic.IReadOnlyDictionary<TKey, TValue> dictionary, TKey key) { throw null; }
+ public static TValue GetValueOrDefault<TKey, TValue>(this System.Collections.Generic.IReadOnlyDictionary<TKey, TValue> dictionary, TKey key, TValue defaultValue) { throw null; }
+ public static void InsertRange<T>(this System.Collections.Generic.List<T> list, int index, System.ReadOnlySpan<T> source) { }
+ public static bool Remove<TKey, TValue>(this System.Collections.Generic.IDictionary<TKey, TValue> dictionary, TKey key, [System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out TValue value) { throw null; }
+ public static bool TryAdd<TKey, TValue>(this System.Collections.Generic.IDictionary<TKey, TValue> dictionary, TKey key, TValue value) { throw null; }
+ public static System.Collections.ObjectModel.ReadOnlyCollection<T> AsReadOnly<T>(this IList<T> list) { throw null; }
+ public static System.Collections.ObjectModel.ReadOnlyDictionary<TKey, TValue> AsReadOnly<TKey, TValue>(this IDictionary<TKey, TValue> dictionary) where TKey : notnull { throw null; }
+ }
public abstract partial class Comparer<T> : System.Collections.Generic.IComparer<T>, System.Collections.IComparer
{
protected Comparer() { }
@@ -496,7 +500,7 @@ namespace System.Collections.Generic
public System.Collections.Generic.Dictionary<TKey, TValue>.KeyCollection.Enumerator GetEnumerator() { throw null; }
void System.Collections.Generic.ICollection<TKey>.Add(TKey item) { }
void System.Collections.Generic.ICollection<TKey>.Clear() { }
- bool System.Collections.Generic.ICollection<TKey>.Contains(TKey item) { throw null; }
+ public bool Contains(TKey item) { throw null; }
bool System.Collections.Generic.ICollection<TKey>.Remove(TKey item) { throw null; }
System.Collections.Generic.IEnumerator<TKey> System.Collections.Generic.IEnumerable<TKey>.GetEnumerator() { throw null; }
void System.Collections.ICollection.CopyTo(System.Array array, int index) { }
diff --git a/src/libraries/System.Collections/src/MatchingRefApiCompatBaseline.txt b/src/libraries/System.Collections/src/MatchingRefApiCompatBaseline.txt
index a8dcfef40cb..ab97ed0345a 100644
--- a/src/libraries/System.Collections/src/MatchingRefApiCompatBaseline.txt
+++ b/src/libraries/System.Collections/src/MatchingRefApiCompatBaseline.txt
@@ -1,6 +1,4 @@
Compat issues with assembly System.Collections:
-CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.TypeDependencyAttribute' exists on 'System.Collections.Generic.Comparer<T>' in the implementation but not the reference.
-CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.TypeDependencyAttribute' exists on 'System.Collections.Generic.EqualityComparer<T>' in the implementation but not the reference.
TypesMustExist : Type 'System.Collections.Generic.SortedDictionary<TKey, TValue>.KeyValuePairComparer' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Collections.Generic.SortedList<TKey, TValue>.KeyList' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Collections.Generic.SortedList<TKey, TValue>.ValueList' does not exist in the reference but it does exist in the implementation.
diff --git a/src/libraries/System.Collections/src/System.Collections.csproj b/src/libraries/System.Collections/src/System.Collections.csproj
index 7c570c8364a..102ab0ee950 100644
--- a/src/libraries/System.Collections/src/System.Collections.csproj
+++ b/src/libraries/System.Collections/src/System.Collections.csproj
@@ -7,7 +7,6 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Collections\BitArray.cs" />
- <Compile Include="System\Collections\Generic\CollectionExtensions.cs" />
<Compile Include="$(CoreLibSharedDir)System\Collections\Generic\ICollectionDebugView.cs"
Link="Common\System\Collections\Generic\ICollectionDebugView.cs" />
<Compile Include="$(CoreLibSharedDir)System\Collections\Generic\IDictionaryDebugView.cs"
diff --git a/src/libraries/System.Collections/src/System/Collections/Generic/CollectionExtensions.cs b/src/libraries/System.Collections/src/System/Collections/Generic/CollectionExtensions.cs
deleted file mode 100644
index d8523aab82d..00000000000
--- a/src/libraries/System.Collections/src/System/Collections/Generic/CollectionExtensions.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.Collections.ObjectModel;
-using System.Diagnostics.CodeAnalysis;
-
-namespace System.Collections.Generic
-{
- public static class CollectionExtensions
- {
- public static TValue? GetValueOrDefault<TKey, TValue>(this IReadOnlyDictionary<TKey, TValue> dictionary, TKey key)
- {
- return dictionary.GetValueOrDefault(key, default!);
- }
-
- public static TValue GetValueOrDefault<TKey, TValue>(this IReadOnlyDictionary<TKey, TValue> dictionary, TKey key, TValue defaultValue)
- {
- ArgumentNullException.ThrowIfNull(dictionary);
-
- TValue? value;
- return dictionary.TryGetValue(key, out value) ? value : defaultValue;
- }
-
- public static bool TryAdd<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key, TValue value)
- {
- ArgumentNullException.ThrowIfNull(dictionary);
-
- if (!dictionary.ContainsKey(key))
- {
- dictionary.Add(key, value);
- return true;
- }
-
- return false;
- }
-
- public static bool Remove<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key, [MaybeNullWhen(false)] out TValue value)
- {
- ArgumentNullException.ThrowIfNull(dictionary);
-
- if (dictionary.TryGetValue(key, out value))
- {
- dictionary.Remove(key);
- return true;
- }
-
- value = default;
- return false;
- }
-
- /// <summary>
- /// Returns a read-only <see cref="ReadOnlyCollection{T}"/> wrapper
- /// for the specified list.
- /// </summary>
- /// <typeparam name="T">The type of elements in the collection.</typeparam>
- /// <param name="list">The list to wrap.</param>
- /// <returns>An object that acts as a read-only wrapper around the current <see cref="IList{T}"/>.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="list"/> is null.</exception>
- public static ReadOnlyCollection<T> AsReadOnly<T>(this IList<T> list)
- {
- return new ReadOnlyCollection<T>(list);
- }
-
- /// <summary>
- /// Returns a read-only <see cref="ReadOnlyDictionary{TKey, TValue}"/> wrapper
- /// for the current dictionary.
- /// </summary>
- /// <typeparam name="TKey">The type of keys in the dictionary.</typeparam>
- /// <typeparam name="TValue">The type of values in the dictionary.</typeparam>
- /// <param name="dictionary">The dictionary to wrap.</param>
- /// <returns>An object that acts as a read-only wrapper around the current <see cref="IDictionary{TKey, TValue}"/>.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="dictionary"/> is null.</exception>
- public static ReadOnlyDictionary<TKey, TValue> AsReadOnly<TKey, TValue>(this IDictionary<TKey, TValue> dictionary) where TKey : notnull
- {
- return new ReadOnlyDictionary<TKey, TValue>(dictionary);
- }
- }
-}
diff --git a/src/libraries/System.Collections/src/System/Collections/Generic/PriorityQueue.cs b/src/libraries/System.Collections/src/System/Collections/Generic/PriorityQueue.cs
index e76dc3c8374..ede54d42b46 100644
--- a/src/libraries/System.Collections/src/System/Collections/Generic/PriorityQueue.cs
+++ b/src/libraries/System.Collections/src/System/Collections/Generic/PriorityQueue.cs
@@ -251,6 +251,54 @@ namespace System.Collections.Generic
}
/// <summary>
+ /// Removes the minimal element and then immediately adds the specified element with associated priority to the <see cref="PriorityQueue{TElement, TPriority}"/>,
+ /// </summary>
+ /// <param name="element">The element to add to the <see cref="PriorityQueue{TElement, TPriority}"/>.</param>
+ /// <param name="priority">The priority with which to associate the new element.</param>
+ /// <exception cref="InvalidOperationException">The queue is empty.</exception>
+ /// <returns>The minimal element removed before performing the enqueue operation.</returns>
+ /// <remarks>
+ /// Implements an extract-then-insert heap operation that is generally more efficient
+ /// than sequencing Dequeue and Enqueue operations: in the worst case scenario only one
+ /// shift-down operation is required.
+ /// </remarks>
+ public TElement DequeueEnqueue(TElement element, TPriority priority)
+ {
+ if (_size == 0)
+ {
+ throw new InvalidOperationException(SR.InvalidOperation_EmptyQueue);
+ }
+
+ (TElement Element, TPriority Priority) root = _nodes[0];
+
+ if (_comparer == null)
+ {
+ if (Comparer<TPriority>.Default.Compare(priority, root.Priority) > 0)
+ {
+ MoveDownDefaultComparer((element, priority), 0);
+ }
+ else
+ {
+ _nodes[0] = (element, priority);
+ }
+ }
+ else
+ {
+ if (_comparer.Compare(priority, root.Priority) > 0)
+ {
+ MoveDownCustomComparer((element, priority), 0);
+ }
+ else
+ {
+ _nodes[0] = (element, priority);
+ }
+ }
+
+ _version++;
+ return root.Element;
+ }
+
+ /// <summary>
/// Removes the minimal element from the <see cref="PriorityQueue{TElement, TPriority}"/>,
/// and copies it to the <paramref name="element"/> parameter,
/// and its associated priority to the <paramref name="priority"/> parameter.
diff --git a/src/libraries/System.Collections/src/System/Collections/Generic/SortedDictionary.cs b/src/libraries/System.Collections/src/System/Collections/Generic/SortedDictionary.cs
index 8925d080f85..ab700e3a88e 100644
--- a/src/libraries/System.Collections/src/System/Collections/Generic/SortedDictionary.cs
+++ b/src/libraries/System.Collections/src/System/Collections/Generic/SortedDictionary.cs
@@ -637,7 +637,7 @@ namespace System.Collections.Generic
throw new NotSupportedException(SR.NotSupported_KeyCollectionSet);
}
- bool ICollection<TKey>.Contains(TKey item)
+ public bool Contains(TKey item)
{
return _dictionary.ContainsKey(item);
}
diff --git a/src/libraries/System.Collections/tests/Generic/Dictionary/Dictionary.Generic.Tests.ConcurrentAccessDetection.cs b/src/libraries/System.Collections/tests/Generic/Dictionary/Dictionary.Generic.Tests.ConcurrentAccessDetection.cs
index 2d5985f2e30..1bfbe361b60 100644
--- a/src/libraries/System.Collections/tests/Generic/Dictionary/Dictionary.Generic.Tests.ConcurrentAccessDetection.cs
+++ b/src/libraries/System.Collections/tests/Generic/Dictionary/Dictionary.Generic.Tests.ConcurrentAccessDetection.cs
@@ -67,7 +67,7 @@ namespace Generic.Dictionary
IEqualityComparer<DummyRefType> customComparer = null;
Dictionary<DummyRefType, DummyRefType> dic = comparerType == null ?
- new Dictionary<DummyRefType, DummyRefType>() :
+ new Dictionary<DummyRefType, DummyRefType>((customComparer = EqualityComparer<DummyRefType>.Default)) :
new Dictionary<DummyRefType, DummyRefType>((customComparer = (IEqualityComparer<DummyRefType>)Activator.CreateInstance(comparerType)));
var keyValueSample = new DummyRefType() { Value = 1 };
diff --git a/src/libraries/System.Collections/tests/Generic/List/List.Generic.Tests.AddRange.cs b/src/libraries/System.Collections/tests/Generic/List/List.Generic.Tests.AddRange.cs
index 0344a57c471..26298c68791 100644
--- a/src/libraries/System.Collections/tests/Generic/List/List.Generic.Tests.AddRange.cs
+++ b/src/libraries/System.Collections/tests/Generic/List/List.Generic.Tests.AddRange.cs
@@ -37,6 +37,35 @@ namespace System.Collections.Tests
}
[Theory]
+ [MemberData(nameof(ListTestData))]
+ public void AddRange_Span(EnumerableType enumerableType, int listLength, int enumerableLength, int numberOfMatchingElements, int numberOfDuplicateElements)
+ {
+ List<T> list = GenericListFactory(listLength);
+ List<T> listBeforeAdd = list.ToList();
+ Span<T> span = CreateEnumerable(enumerableType, list, enumerableLength, numberOfMatchingElements, numberOfDuplicateElements).ToArray();
+ list.AddRange(span);
+
+ // Check that the first section of the List is unchanged
+ Assert.All(Enumerable.Range(0, listLength), index =>
+ {
+ Assert.Equal(listBeforeAdd[index], list[index]);
+ });
+
+ // Check that the added elements are correct
+ for (int i = 0; i < enumerableLength; i++)
+ {
+ Assert.Equal(span[i], list[i + listLength]);
+ };
+ }
+
+ [Fact]
+ public void AddRange_NullList_ThrowsArgumentNullException()
+ {
+ AssertExtensions.Throws<ArgumentNullException>("list", () => CollectionExtensions.AddRange<int>(null, default));
+ AssertExtensions.Throws<ArgumentNullException>("list", () => CollectionExtensions.AddRange<int>(null, new int[1]));
+ }
+
+ [Theory]
[MemberData(nameof(ValidCollectionSizes))]
public void AddRange_NullEnumerable_ThrowsArgumentNullException(int count)
{
diff --git a/src/libraries/System.Collections/tests/Generic/List/List.Generic.Tests.CopyTo.cs b/src/libraries/System.Collections/tests/Generic/List/List.Generic.Tests.CopyTo.cs
new file mode 100644
index 00000000000..70bc155835a
--- /dev/null
+++ b/src/libraries/System.Collections/tests/Generic/List/List.Generic.Tests.CopyTo.cs
@@ -0,0 +1,45 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Collections.Generic;
+using Xunit;
+
+namespace System.Collections.Tests
+{
+ /// <summary>
+ /// Contains tests that ensure the correctness of the List class.
+ /// </summary>
+ public abstract partial class List_Generic_Tests<T> : IList_Generic_Tests<T>
+ {
+ [Fact]
+ public void CopyTo_InvalidArgs_Throws()
+ {
+ AssertExtensions.Throws<ArgumentNullException>("list", () => CollectionExtensions.CopyTo(null, Span<int>.Empty));
+ AssertExtensions.Throws<ArgumentNullException>("list", () => CollectionExtensions.CopyTo(null, new Span<int>(new int[1])));
+
+ var list = new List<int>() { 1, 2, 3 };
+ Assert.Throws<ArgumentException>(() => CollectionExtensions.CopyTo(list, (Span<int>)new int[2]));
+ }
+
+ [Fact]
+ public void CopyTo_ItemsCopiedCorrectly()
+ {
+ List<int> list;
+ Span<int> destination;
+
+ list = new List<int>();
+ destination = Span<int>.Empty;
+ list.CopyTo(destination);
+
+ list = new List<int>() { 1, 2, 3 };
+ destination = new int[3];
+ list.CopyTo(destination);
+ Assert.Equal(new[] { 1, 2, 3 }, destination.ToArray());
+
+ list = new List<int>() { 1, 2, 3 };
+ destination = new int[4];
+ list.CopyTo(destination);
+ Assert.Equal(new[] { 1, 2, 3, 0 }, destination.ToArray());
+ }
+ }
+}
diff --git a/src/libraries/System.Collections/tests/Generic/List/List.Generic.Tests.InsertRange.cs b/src/libraries/System.Collections/tests/Generic/List/List.Generic.Tests.InsertRange.cs
new file mode 100644
index 00000000000..d72fd45dd00
--- /dev/null
+++ b/src/libraries/System.Collections/tests/Generic/List/List.Generic.Tests.InsertRange.cs
@@ -0,0 +1,51 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Collections.Generic;
+using System.Linq;
+using Xunit;
+
+namespace System.Collections.Tests
+{
+ /// <summary>
+ /// Contains tests that ensure the correctness of the List class.
+ /// </summary>
+ public abstract partial class List_Generic_Tests<T> : IList_Generic_Tests<T>
+ {
+ [Fact]
+ public void InsertRange_InvalidArgs_Throws()
+ {
+ AssertExtensions.Throws<ArgumentNullException>("list", () => CollectionExtensions.InsertRange(null, 0, ReadOnlySpan<int>.Empty));
+ AssertExtensions.Throws<ArgumentNullException>("list", () => CollectionExtensions.InsertRange(null, 0, new ReadOnlySpan<int>(new int[1])));
+
+ var list = new List<int>();
+ AssertExtensions.Throws<ArgumentOutOfRangeException>("index", () => CollectionExtensions.InsertRange(list, 1, new int[0]));
+ AssertExtensions.Throws<ArgumentOutOfRangeException>("index", () => CollectionExtensions.InsertRange(list, -1, new int[0]));
+ }
+
+ [Fact]
+ public void InsertRange_MatchesExpectedContents()
+ {
+ var list = new List<int>();
+
+ list.InsertRange(0, ReadOnlySpan<int>.Empty);
+ Assert.Equal(0, list.Count);
+
+ list.InsertRange(0, (ReadOnlySpan<int>)new int[] { 3, 2, 1 });
+ Assert.Equal(3, list.Count);
+ Assert.Equal(new[] { 3, 2, 1 }, list);
+
+ list.InsertRange(0, (ReadOnlySpan<int>)new int[] { 6, 5, 4 });
+ Assert.Equal(6, list.Count);
+ Assert.Equal(new[] { 6, 5, 4, 3, 2, 1 }, list);
+
+ list.InsertRange(6, (ReadOnlySpan<int>)new int[] { 0, -1, -2 });
+ Assert.Equal(9, list.Count);
+ Assert.Equal(new[] { 6, 5, 4, 3, 2, 1, 0, -1, -2 }, list);
+
+ list.InsertRange(3, (ReadOnlySpan<int>)new int[] { 100, 99, 98 });
+ Assert.Equal(12, list.Count);
+ Assert.Equal(new[] { 6, 5, 4, 100, 99, 98, 3, 2, 1, 0, -1, -2 }, list);
+ }
+ }
+}
diff --git a/src/libraries/System.Collections/tests/Generic/List/List.Generic.cs b/src/libraries/System.Collections/tests/Generic/List/List.Generic.cs
index 217052d0346..0a2f1fe239b 100644
--- a/src/libraries/System.Collections/tests/Generic/List/List.Generic.cs
+++ b/src/libraries/System.Collections/tests/Generic/List/List.Generic.cs
@@ -50,6 +50,8 @@ namespace System.Collections.Tests
}
protected override IEnumerable<ModifyEnumerable> GetModifyEnumerables(ModifyOperation operations) => new List<ModifyEnumerable>();
+
+ protected override bool Enumerator_Empty_Current_UndefinedOperation_Throws => true;
}
public class List_Generic_Tests_int_ReadOnly : List_Generic_Tests<int>
@@ -73,5 +75,7 @@ namespace System.Collections.Tests
}
protected override IEnumerable<ModifyEnumerable> GetModifyEnumerables(ModifyOperation operations) => new List<ModifyEnumerable>();
+
+ protected override bool Enumerator_Empty_Current_UndefinedOperation_Throws => true;
}
}
diff --git a/src/libraries/System.Collections/tests/Generic/PriorityQueue/PriorityQueue.Generic.Tests.cs b/src/libraries/System.Collections/tests/Generic/PriorityQueue/PriorityQueue.Generic.Tests.cs
index 72169ac22bd..555fee2ba7d 100644
--- a/src/libraries/System.Collections/tests/Generic/PriorityQueue/PriorityQueue.Generic.Tests.cs
+++ b/src/libraries/System.Collections/tests/Generic/PriorityQueue/PriorityQueue.Generic.Tests.cs
@@ -93,7 +93,7 @@ namespace System.Collections.Tests
#endregion
- #region Enqueue, Dequeue, Peek, EnqueueDequeue
+ #region Enqueue, Dequeue, Peek, EnqueueDequeue, DequeueEnqueue
[Theory]
[MemberData(nameof(ValidCollectionSizes))]
@@ -197,6 +197,28 @@ namespace System.Collections.Tests
AssertExtensions.CollectionEqual(expectedItems, queue.UnorderedItems, EqualityComparer<(TElement, TPriority)>.Default);
}
+ [Theory]
+ [MemberData(nameof(ValidCollectionSizes))]
+ public void PriorityQueue_DequeueEnqueue(int count)
+ {
+ (TElement Element, TPriority Priority)[] itemsToEnqueue = CreateItems(count * 2).ToArray();
+ PriorityQueue<TElement, TPriority> queue = CreateEmptyPriorityQueue();
+ queue.EnqueueRange(itemsToEnqueue.Take(count));
+
+ var dequeuedItems = new List<(TElement Element, TPriority Priority)>();
+ foreach ((TElement element, TPriority priority) in itemsToEnqueue.Skip(count))
+ {
+ queue.TryPeek(out var dequeuedElement, out var dequeuedPriority);
+ dequeuedItems.Add((dequeuedElement, dequeuedPriority));
+ queue.DequeueEnqueue(element, priority);
+ }
+
+ Assert.Equal(dequeuedItems.Count, count);
+
+ IEnumerable<(TElement Element, TPriority Priority)> expectedItems = itemsToEnqueue.Where(item => !dequeuedItems.Contains(item, EqualityComparer<(TElement, TPriority)>.Default));
+ AssertExtensions.CollectionEqual(expectedItems, queue.UnorderedItems, EqualityComparer<(TElement, TPriority)>.Default);
+ }
+
#endregion
#region Clear
diff --git a/src/libraries/System.Collections/tests/Generic/PriorityQueue/PriorityQueue.Tests.cs b/src/libraries/System.Collections/tests/Generic/PriorityQueue/PriorityQueue.Tests.cs
index 12472626c7f..c7de89b2862 100644
--- a/src/libraries/System.Collections/tests/Generic/PriorityQueue/PriorityQueue.Tests.cs
+++ b/src/libraries/System.Collections/tests/Generic/PriorityQueue/PriorityQueue.Tests.cs
@@ -79,6 +79,55 @@ namespace System.Collections.Tests
}
[Fact]
+ public void PriorityQueue_EmptyCollection_DequeueEnqueue_ShouldThrowInvalidOperationException()
+ {
+ var queue = new PriorityQueue<int, int>();
+
+ Assert.Equal(0, queue.Count);
+ Assert.Throws<InvalidOperationException>(() => queue.DequeueEnqueue(1, 1));
+ Assert.Equal(0, queue.Count);
+ }
+
+ [Fact]
+ public void PriorityQueue_Generic_DequeueEnqueue_SmallerThanMin()
+ {
+ PriorityQueue<string, int> queue = CreateSmallPriorityQueue(out HashSet<(string, int)> enqueuedItems);
+
+ string actualElement = queue.DequeueEnqueue("zero", 0);
+
+ Assert.Equal("one", actualElement);
+ Assert.Equal("zero", queue.Dequeue());
+ Assert.Equal("two", queue.Dequeue());
+ Assert.Equal("three", queue.Dequeue());
+ }
+
+ [Fact]
+ public void PriorityQueue_Generic_DequeueEnqueue_LargerThanMin()
+ {
+ PriorityQueue<string, int> queue = CreateSmallPriorityQueue(out HashSet<(string, int)> enqueuedItems);
+
+ string actualElement = queue.DequeueEnqueue("four", 4);
+
+ Assert.Equal("one", actualElement);
+ Assert.Equal("two", queue.Dequeue());
+ Assert.Equal("three", queue.Dequeue());
+ Assert.Equal("four", queue.Dequeue());
+ }
+
+ [Fact]
+ public void PriorityQueue_Generic_DequeueEnqueue_EqualToMin()
+ {
+ PriorityQueue<string, int> queue = CreateSmallPriorityQueue(out HashSet<(string, int)> enqueuedItems);
+
+ string actualElement = queue.DequeueEnqueue("one-to-replace", 1);
+
+ Assert.Equal("one", actualElement);
+ Assert.Equal("one-to-replace", queue.Dequeue());
+ Assert.Equal("two", queue.Dequeue());
+ Assert.Equal("three", queue.Dequeue());
+ }
+
+ [Fact]
public void PriorityQueue_Generic_Constructor_IEnumerable_Null()
{
(string, int)[] itemsToEnqueue = new(string, int)[] { (null, 0), ("one", 1) } ;
diff --git a/src/libraries/System.Collections/tests/System.Collections.Tests.csproj b/src/libraries/System.Collections/tests/System.Collections.Tests.csproj
index 3855b43bfa6..2187dff4f7c 100644
--- a/src/libraries/System.Collections/tests/System.Collections.Tests.csproj
+++ b/src/libraries/System.Collections/tests/System.Collections.Tests.csproj
@@ -1,4 +1,4 @@
-<Project Sdk="Microsoft.NET.Sdk">
+<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<TestRuntime>true</TestRuntime>
@@ -98,8 +98,10 @@
<Compile Include="Generic\List\List.Generic.Tests.BinarySearch.cs" />
<Compile Include="Generic\List\List.Generic.Tests.Constructor.cs" />
<Compile Include="Generic\List\List.Generic.Tests.ConvertAll.cs" />
+ <Compile Include="Generic\List\List.Generic.Tests.CopyTo.cs" />
<Compile Include="Generic\List\List.Generic.Tests.Find.cs" />
<Compile Include="Generic\List\List.Generic.Tests.EnsureCapacity.cs" />
+ <Compile Include="Generic\List\List.Generic.Tests.InsertRange.cs" />
<Compile Include="Generic\List\List.Generic.Tests.Remove.cs" />
<Compile Include="Generic\List\List.Generic.Tests.Sort.cs" />
<Compile Include="Generic\PriorityQueue\PriorityQueue.Generic.cs" />
diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/ReflectTypeDescriptionProvider.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/ReflectTypeDescriptionProvider.cs
index 758c912517c..02787cb44f4 100644
--- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/ReflectTypeDescriptionProvider.cs
+++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/ReflectTypeDescriptionProvider.cs
@@ -157,10 +157,11 @@ namespace System.ComponentModel
[RequiresUnreferencedCode("NullableConverter's UnderlyingType cannot be statically discovered.")]
get
{
- return LazyInitializer.EnsureInitialized(ref s_intrinsicTypeConverters, () => new Dictionary<object, IntrinsicTypeConverterData>(27)
+ return LazyInitializer.EnsureInitialized(ref s_intrinsicTypeConverters, () => new Dictionary<object, IntrinsicTypeConverterData>(32)
{
// Add the intrinsics
//
+ // When modifying this list, be sure to update the initial dictionary capacity above
[typeof(bool)] = new IntrinsicTypeConverterData((type) => new BooleanConverter()),
[typeof(byte)] = new IntrinsicTypeConverterData((type) => new ByteConverter()),
[typeof(sbyte)] = new IntrinsicTypeConverterData((type) => new SByteConverter()),
diff --git a/src/libraries/System.Configuration.ConfigurationManager/System.Configuration.ConfigurationManager.sln b/src/libraries/System.Configuration.ConfigurationManager/System.Configuration.ConfigurationManager.sln
index 1e57b6f6cba..f4d2b17bcf0 100644
--- a/src/libraries/System.Configuration.ConfigurationManager/System.Configuration.ConfigurationManager.sln
+++ b/src/libraries/System.Configuration.ConfigurationManager/System.Configuration.ConfigurationManager.sln
@@ -1,8 +1,4 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.2.32317.152
-MinimumVisualStudioVersion = 10.0.40219.1
+Microsoft Visual Studio Solution File, Format Version 12.00
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{15012FB4-9C7C-4DE0-AB44-83A64654D738}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Win32.SystemEvents", "..\Microsoft.Win32.SystemEvents\ref\Microsoft.Win32.SystemEvents.csproj", "{C7D1410B-8CF0-48DB-A0DF-C8E3A341FD12}"
@@ -15,6 +11,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Configuration.Config
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Configuration.ConfigurationManager.Tests", "tests\System.Configuration.ConfigurationManager.Tests.csproj", "{9476F50F-E44C-4420-96AB-448259A47C4F}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.EventLog", "..\System.Diagnostics.EventLog\ref\System.Diagnostics.EventLog.csproj", "{C70C30E4-56DC-44FA-B621-9BB4C4E365D0}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.EventLog.Messages", "..\System.Diagnostics.EventLog\src\Messages\System.Diagnostics.EventLog.Messages.csproj", "{B9C6FFBB-A992-4402-93DC-254C660CF16A}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.EventLog", "..\System.Diagnostics.EventLog\src\System.Diagnostics.EventLog.csproj", "{808D1F6A-2605-4BEB-A64B-0D09CDE558C8}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Drawing.Common", "..\System.Drawing.Common\ref\System.Drawing.Common.csproj", "{6B586A50-5DFE-4FBE-A65B-9152B992C2E1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Drawing.Common", "..\System.Drawing.Common\src\System.Drawing.Common.csproj", "{E49D2841-A288-4B5F-89FC-857CCE0401F0}"
@@ -43,10 +45,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{A3B7282E-7D6
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{BFBE3E0E-4E75-4665-A373-132D283D366D}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.EventLog", "..\System.Diagnostics.EventLog\ref\System.Diagnostics.EventLog.csproj", "{C70C30E4-56DC-44FA-B621-9BB4C4E365D0}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.EventLog", "..\System.Diagnostics.EventLog\src\System.Diagnostics.EventLog.csproj", "{808D1F6A-2605-4BEB-A64B-0D09CDE558C8}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -77,6 +75,18 @@ Global
{9476F50F-E44C-4420-96AB-448259A47C4F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9476F50F-E44C-4420-96AB-448259A47C4F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9476F50F-E44C-4420-96AB-448259A47C4F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C70C30E4-56DC-44FA-B621-9BB4C4E365D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C70C30E4-56DC-44FA-B621-9BB4C4E365D0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C70C30E4-56DC-44FA-B621-9BB4C4E365D0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C70C30E4-56DC-44FA-B621-9BB4C4E365D0}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B9C6FFBB-A992-4402-93DC-254C660CF16A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B9C6FFBB-A992-4402-93DC-254C660CF16A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B9C6FFBB-A992-4402-93DC-254C660CF16A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B9C6FFBB-A992-4402-93DC-254C660CF16A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {808D1F6A-2605-4BEB-A64B-0D09CDE558C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {808D1F6A-2605-4BEB-A64B-0D09CDE558C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {808D1F6A-2605-4BEB-A64B-0D09CDE558C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {808D1F6A-2605-4BEB-A64B-0D09CDE558C8}.Release|Any CPU.Build.0 = Release|Any CPU
{6B586A50-5DFE-4FBE-A65B-9152B992C2E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6B586A50-5DFE-4FBE-A65B-9152B992C2E1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6B586A50-5DFE-4FBE-A65B-9152B992C2E1}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -117,37 +127,30 @@ Global
{E34EBFC8-D1BC-4ED7-8335-C183A5994EE1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E34EBFC8-D1BC-4ED7-8335-C183A5994EE1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E34EBFC8-D1BC-4ED7-8335-C183A5994EE1}.Release|Any CPU.Build.0 = Release|Any CPU
- {C70C30E4-56DC-44FA-B621-9BB4C4E365D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C70C30E4-56DC-44FA-B621-9BB4C4E365D0}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C70C30E4-56DC-44FA-B621-9BB4C4E365D0}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C70C30E4-56DC-44FA-B621-9BB4C4E365D0}.Release|Any CPU.Build.0 = Release|Any CPU
- {808D1F6A-2605-4BEB-A64B-0D09CDE558C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {808D1F6A-2605-4BEB-A64B-0D09CDE558C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {808D1F6A-2605-4BEB-A64B-0D09CDE558C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {808D1F6A-2605-4BEB-A64B-0D09CDE558C8}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{15012FB4-9C7C-4DE0-AB44-83A64654D738} = {3393D976-CAF0-47D0-850E-7A44DF892122}
+ {9476F50F-E44C-4420-96AB-448259A47C4F} = {3393D976-CAF0-47D0-850E-7A44DF892122}
{C7D1410B-8CF0-48DB-A0DF-C8E3A341FD12} = {751DA007-D916-4F22-AF16-85F343C2992C}
- {D54AFFF7-9BEE-42C8-89C3-96E7228A23FA} = {A3B7282E-7D62-48ED-B5FC-E6AB32DA6F0A}
{6F662E39-BB56-4BCF-B053-B4A1782A33E1} = {751DA007-D916-4F22-AF16-85F343C2992C}
- {7C9D7BE4-BF9C-486C-8ADF-53DE282E018A} = {A3B7282E-7D62-48ED-B5FC-E6AB32DA6F0A}
- {9476F50F-E44C-4420-96AB-448259A47C4F} = {3393D976-CAF0-47D0-850E-7A44DF892122}
+ {C70C30E4-56DC-44FA-B621-9BB4C4E365D0} = {751DA007-D916-4F22-AF16-85F343C2992C}
{6B586A50-5DFE-4FBE-A65B-9152B992C2E1} = {751DA007-D916-4F22-AF16-85F343C2992C}
- {E49D2841-A288-4B5F-89FC-857CCE0401F0} = {A3B7282E-7D62-48ED-B5FC-E6AB32DA6F0A}
- {355B775A-BFE1-4384-BC83-C6B5D1FB77BB} = {BFBE3E0E-4E75-4665-A373-132D283D366D}
- {66EC63BC-99DC-40CA-B53B-B4D8BF6D1630} = {BFBE3E0E-4E75-4665-A373-132D283D366D}
{1C48B652-BA62-4D46-9CDD-24A1670EE3E3} = {751DA007-D916-4F22-AF16-85F343C2992C}
- {7B2CA04A-9DFB-471E-B4CB-1937D0049B96} = {A3B7282E-7D62-48ED-B5FC-E6AB32DA6F0A}
{CFF7519C-4D41-4713-991D-27777DA2DB21} = {751DA007-D916-4F22-AF16-85F343C2992C}
- {2BE20C4A-C20B-4A0C-8E4A-31B681B6967D} = {A3B7282E-7D62-48ED-B5FC-E6AB32DA6F0A}
{3278A0F9-8E0A-42E1-8FE3-1A01851A6248} = {751DA007-D916-4F22-AF16-85F343C2992C}
- {E34EBFC8-D1BC-4ED7-8335-C183A5994EE1} = {A3B7282E-7D62-48ED-B5FC-E6AB32DA6F0A}
- {C70C30E4-56DC-44FA-B621-9BB4C4E365D0} = {751DA007-D916-4F22-AF16-85F343C2992C}
+ {D54AFFF7-9BEE-42C8-89C3-96E7228A23FA} = {A3B7282E-7D62-48ED-B5FC-E6AB32DA6F0A}
+ {7C9D7BE4-BF9C-486C-8ADF-53DE282E018A} = {A3B7282E-7D62-48ED-B5FC-E6AB32DA6F0A}
+ {B9C6FFBB-A992-4402-93DC-254C660CF16A} = {A3B7282E-7D62-48ED-B5FC-E6AB32DA6F0A}
{808D1F6A-2605-4BEB-A64B-0D09CDE558C8} = {A3B7282E-7D62-48ED-B5FC-E6AB32DA6F0A}
+ {E49D2841-A288-4B5F-89FC-857CCE0401F0} = {A3B7282E-7D62-48ED-B5FC-E6AB32DA6F0A}
+ {7B2CA04A-9DFB-471E-B4CB-1937D0049B96} = {A3B7282E-7D62-48ED-B5FC-E6AB32DA6F0A}
+ {2BE20C4A-C20B-4A0C-8E4A-31B681B6967D} = {A3B7282E-7D62-48ED-B5FC-E6AB32DA6F0A}
+ {E34EBFC8-D1BC-4ED7-8335-C183A5994EE1} = {A3B7282E-7D62-48ED-B5FC-E6AB32DA6F0A}
+ {355B775A-BFE1-4384-BC83-C6B5D1FB77BB} = {BFBE3E0E-4E75-4665-A373-132D283D366D}
+ {66EC63BC-99DC-40CA-B53B-B4D8BF6D1630} = {BFBE3E0E-4E75-4665-A373-132D283D366D}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {942CAD8E-C19B-4B9A-BEDE-09B43F45F535}
diff --git a/src/libraries/System.Console/src/System/IO/KeyParser.cs b/src/libraries/System.Console/src/System/IO/KeyParser.cs
index d54e0800a42..1167d00ec81 100644
--- a/src/libraries/System.Console/src/System/IO/KeyParser.cs
+++ b/src/libraries/System.Console/src/System/IO/KeyParser.cs
@@ -333,7 +333,7 @@ internal static class KeyParser
_ when char.IsAsciiLetterLower(single) => ConsoleKey.A + single - 'a',
_ when char.IsAsciiLetterUpper(single) => UppercaseCharacter(single, out isShift),
_ when char.IsAsciiDigit(single) => ConsoleKey.D0 + single - '0', // We can't distinguish DX and Ctrl+DX as they produce same values. Limitation: Ctrl+DX can't be mapped.
- _ when char.IsBetween(single, (char)1, (char)26) => ControlAndLetterPressed(single, out keyChar, out isCtrl),
+ _ when char.IsBetween(single, (char)1, (char)26) => ControlAndLetterPressed(single, isAlt, out keyChar, out isCtrl),
_ when char.IsBetween(single, (char)28, (char)31) => ControlAndDigitPressed(single, out keyChar, out isCtrl),
'\u0000' => ControlAndDigitPressed(single, out keyChar, out isCtrl),
_ => default
@@ -359,7 +359,7 @@ internal static class KeyParser
return ConsoleKey.A + single - 'A';
}
- static ConsoleKey ControlAndLetterPressed(char single, out char keyChar, out bool isCtrl)
+ static ConsoleKey ControlAndLetterPressed(char single, bool isAlt, out char keyChar, out bool isCtrl)
{
// Ctrl+(a-z) characters are mapped to values from 1 to 26.
// Ctrl+H is mapped to 8, which also maps to Ctrl+Backspace.
@@ -370,7 +370,9 @@ internal static class KeyParser
Debug.Assert(single != 'b' && single != '\t' && single != '\n' && single != '\r');
isCtrl = true;
- keyChar = default; // we could use the letter here, but it's impossible to distinguish upper vs lowercase (and Windows doesn't do it as well)
+ // Preserve the original character the same way Windows does (#75795),
+ // but only when Alt was not pressed at the same time.
+ keyChar = isAlt ? default : single;
return ConsoleKey.A + single - 1;
}
diff --git a/src/libraries/System.Console/tests/KeyParserTests.cs b/src/libraries/System.Console/tests/KeyParserTests.cs
index f5cebdeeff1..bf672b6b878 100644
--- a/src/libraries/System.Console/tests/KeyParserTests.cs
+++ b/src/libraries/System.Console/tests/KeyParserTests.cs
@@ -264,6 +264,8 @@ public class KeyParserTests
{
get
{
+ // Control+C
+ yield return (new string((char)3, 1), new[] { new ConsoleKeyInfo((char)3, ConsoleKey.C, false, false, true) });
// Backspace
yield return (new string((char)127, 1), new[] { new ConsoleKeyInfo((char)127, ConsoleKey.Backspace, false, false, false) });
// Ctrl+Backspace
@@ -448,7 +450,7 @@ public class GNOMETerminalData : TerminalData
{
yield return (new byte[] { 90 }, new ConsoleKeyInfo('Z', ConsoleKey.Z, true, false, false));
yield return (new byte[] { 97 }, new ConsoleKeyInfo('a', ConsoleKey.A, false, false, false));
- yield return (new byte[] { 1 }, new ConsoleKeyInfo(default, ConsoleKey.A, false, false, true));
+ yield return (new byte[] { 1 }, new ConsoleKeyInfo((char)1, ConsoleKey.A, false, false, true));
yield return (new byte[] { 27, 97 }, new ConsoleKeyInfo('a', ConsoleKey.A, false, true, false));
yield return (new byte[] { 27, 1 }, new ConsoleKeyInfo(default, ConsoleKey.A, false, true, true));
yield return (new byte[] { 49 }, new ConsoleKeyInfo('1', ConsoleKey.D1, false, false, false));
@@ -613,7 +615,7 @@ public class XTermData : TerminalData
{
yield return (new byte[] { 90 }, new ConsoleKeyInfo('Z', ConsoleKey.Z, true, false, false));
yield return (new byte[] { 97 }, new ConsoleKeyInfo('a', ConsoleKey.A, false, false, false));
- yield return (new byte[] { 1 }, new ConsoleKeyInfo(default, ConsoleKey.A, false, false, true));
+ yield return (new byte[] { 1 }, new ConsoleKeyInfo((char)1, ConsoleKey.A, false, false, true));
yield return (new byte[] { 195, 161 }, new ConsoleKeyInfo('\u00E1', default, false, false, false));
yield return (new byte[] { 194, 129 }, new ConsoleKeyInfo('\u0081', default, false, false, false));
yield return (new byte[] { 49 }, new ConsoleKeyInfo('1', ConsoleKey.D1, false, false, false));
@@ -886,7 +888,7 @@ public class WindowsTerminalData : TerminalData
{
yield return (new byte[] { 90 }, new ConsoleKeyInfo('Z', ConsoleKey.Z, true, false, false));
yield return (new byte[] { 97 }, new ConsoleKeyInfo('a', ConsoleKey.A, false, false, false));
- yield return (new byte[] { 1 }, new ConsoleKeyInfo(default, ConsoleKey.A, false, false, true));
+ yield return (new byte[] { 1 }, new ConsoleKeyInfo((char)1, ConsoleKey.A, false, false, true));
yield return (new byte[] { 27, 97 }, new ConsoleKeyInfo('a', ConsoleKey.A, false, true, false));
yield return (new byte[] { 27, 1 }, new ConsoleKeyInfo(default, ConsoleKey.A, false, true, true));
yield return (new byte[] { 49 }, new ConsoleKeyInfo('1', ConsoleKey.D1, false, false, false));
diff --git a/src/libraries/System.Data.Common/System.Data.Common.sln b/src/libraries/System.Data.Common/System.Data.Common.sln
index 39b354a8573..f79f4449828 100644
--- a/src/libraries/System.Data.Common/System.Data.Common.sln
+++ b/src/libraries/System.Data.Common/System.Data.Common.sln
@@ -33,6 +33,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.ObjectModel", "..\Sy
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{D5A85F0E-509A-424F-BFD0-A7CC38D43CCD}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{6E8DFAF1-C6B8-44A8-B791-051FC8CB3112}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.Uri", "..\System.Private.Uri\src\System.Private.Uri.csproj", "{7AB121D2-0AAC-48E0-A834-6E220ECFEC4D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Resources.Writer", "..\System.Resources.Writer\ref\System.Resources.Writer.csproj", "{D650B25E-578E-4C68-BB87-D63B1E111682}"
@@ -105,11 +107,8 @@ Global
{0BD22D2A-C12C-4641-8F12-73D21AAAFBA3}.Release|x86.ActiveCfg = Release|Any CPU
{0BD22D2A-C12C-4641-8F12-73D21AAAFBA3}.Release|x86.Build.0 = Release|Any CPU
{0BD22D2A-C12C-4641-8F12-73D21AAAFBA3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {0BD22D2A-C12C-4641-8F12-73D21AAAFBA3}.Checked|Any CPU.Build.0 = Debug|Any CPU
{0BD22D2A-C12C-4641-8F12-73D21AAAFBA3}.Checked|x64.ActiveCfg = Debug|Any CPU
- {0BD22D2A-C12C-4641-8F12-73D21AAAFBA3}.Checked|x64.Build.0 = Debug|Any CPU
{0BD22D2A-C12C-4641-8F12-73D21AAAFBA3}.Checked|x86.ActiveCfg = Debug|Any CPU
- {0BD22D2A-C12C-4641-8F12-73D21AAAFBA3}.Checked|x86.Build.0 = Debug|Any CPU
{055E51B6-ACE0-4EE9-97C7-DC37D0FAF5E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{055E51B6-ACE0-4EE9-97C7-DC37D0FAF5E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{055E51B6-ACE0-4EE9-97C7-DC37D0FAF5E8}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -123,11 +122,8 @@ Global
{055E51B6-ACE0-4EE9-97C7-DC37D0FAF5E8}.Release|x86.ActiveCfg = Release|Any CPU
{055E51B6-ACE0-4EE9-97C7-DC37D0FAF5E8}.Release|x86.Build.0 = Release|Any CPU
{055E51B6-ACE0-4EE9-97C7-DC37D0FAF5E8}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {055E51B6-ACE0-4EE9-97C7-DC37D0FAF5E8}.Checked|Any CPU.Build.0 = Debug|Any CPU
{055E51B6-ACE0-4EE9-97C7-DC37D0FAF5E8}.Checked|x64.ActiveCfg = Debug|Any CPU
- {055E51B6-ACE0-4EE9-97C7-DC37D0FAF5E8}.Checked|x64.Build.0 = Debug|Any CPU
{055E51B6-ACE0-4EE9-97C7-DC37D0FAF5E8}.Checked|x86.ActiveCfg = Debug|Any CPU
- {055E51B6-ACE0-4EE9-97C7-DC37D0FAF5E8}.Checked|x86.Build.0 = Debug|Any CPU
{FB0CD622-EA22-4E27-892C-FE2E0BC962AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FB0CD622-EA22-4E27-892C-FE2E0BC962AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FB0CD622-EA22-4E27-892C-FE2E0BC962AF}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -141,11 +137,8 @@ Global
{FB0CD622-EA22-4E27-892C-FE2E0BC962AF}.Release|x86.ActiveCfg = Release|Any CPU
{FB0CD622-EA22-4E27-892C-FE2E0BC962AF}.Release|x86.Build.0 = Release|Any CPU
{FB0CD622-EA22-4E27-892C-FE2E0BC962AF}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {FB0CD622-EA22-4E27-892C-FE2E0BC962AF}.Checked|Any CPU.Build.0 = Debug|Any CPU
{FB0CD622-EA22-4E27-892C-FE2E0BC962AF}.Checked|x64.ActiveCfg = Debug|Any CPU
- {FB0CD622-EA22-4E27-892C-FE2E0BC962AF}.Checked|x64.Build.0 = Debug|Any CPU
{FB0CD622-EA22-4E27-892C-FE2E0BC962AF}.Checked|x86.ActiveCfg = Debug|Any CPU
- {FB0CD622-EA22-4E27-892C-FE2E0BC962AF}.Checked|x86.Build.0 = Debug|Any CPU
{4C5DDB34-2F67-40F2-9D59-A3CEBAE35BE5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4C5DDB34-2F67-40F2-9D59-A3CEBAE35BE5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4C5DDB34-2F67-40F2-9D59-A3CEBAE35BE5}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -159,11 +152,8 @@ Global
{4C5DDB34-2F67-40F2-9D59-A3CEBAE35BE5}.Release|x86.ActiveCfg = Release|Any CPU
{4C5DDB34-2F67-40F2-9D59-A3CEBAE35BE5}.Release|x86.Build.0 = Release|Any CPU
{4C5DDB34-2F67-40F2-9D59-A3CEBAE35BE5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {4C5DDB34-2F67-40F2-9D59-A3CEBAE35BE5}.Checked|Any CPU.Build.0 = Debug|Any CPU
{4C5DDB34-2F67-40F2-9D59-A3CEBAE35BE5}.Checked|x64.ActiveCfg = Debug|Any CPU
- {4C5DDB34-2F67-40F2-9D59-A3CEBAE35BE5}.Checked|x64.Build.0 = Debug|Any CPU
{4C5DDB34-2F67-40F2-9D59-A3CEBAE35BE5}.Checked|x86.ActiveCfg = Debug|Any CPU
- {4C5DDB34-2F67-40F2-9D59-A3CEBAE35BE5}.Checked|x86.Build.0 = Debug|Any CPU
{5A54B7B6-6396-4F08-BA9C-5A1DA119A61F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5A54B7B6-6396-4F08-BA9C-5A1DA119A61F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5A54B7B6-6396-4F08-BA9C-5A1DA119A61F}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -177,11 +167,8 @@ Global
{5A54B7B6-6396-4F08-BA9C-5A1DA119A61F}.Release|x86.ActiveCfg = Release|Any CPU
{5A54B7B6-6396-4F08-BA9C-5A1DA119A61F}.Release|x86.Build.0 = Release|Any CPU
{5A54B7B6-6396-4F08-BA9C-5A1DA119A61F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {5A54B7B6-6396-4F08-BA9C-5A1DA119A61F}.Checked|Any CPU.Build.0 = Debug|Any CPU
{5A54B7B6-6396-4F08-BA9C-5A1DA119A61F}.Checked|x64.ActiveCfg = Debug|Any CPU
- {5A54B7B6-6396-4F08-BA9C-5A1DA119A61F}.Checked|x64.Build.0 = Debug|Any CPU
{5A54B7B6-6396-4F08-BA9C-5A1DA119A61F}.Checked|x86.ActiveCfg = Debug|Any CPU
- {5A54B7B6-6396-4F08-BA9C-5A1DA119A61F}.Checked|x86.Build.0 = Debug|Any CPU
{0FCF2BA6-A5B3-4E1C-A49A-424E77602313}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0FCF2BA6-A5B3-4E1C-A49A-424E77602313}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0FCF2BA6-A5B3-4E1C-A49A-424E77602313}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -195,11 +182,8 @@ Global
{0FCF2BA6-A5B3-4E1C-A49A-424E77602313}.Release|x86.ActiveCfg = Release|Any CPU
{0FCF2BA6-A5B3-4E1C-A49A-424E77602313}.Release|x86.Build.0 = Release|Any CPU
{0FCF2BA6-A5B3-4E1C-A49A-424E77602313}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {0FCF2BA6-A5B3-4E1C-A49A-424E77602313}.Checked|Any CPU.Build.0 = Debug|Any CPU
{0FCF2BA6-A5B3-4E1C-A49A-424E77602313}.Checked|x64.ActiveCfg = Debug|Any CPU
- {0FCF2BA6-A5B3-4E1C-A49A-424E77602313}.Checked|x64.Build.0 = Debug|Any CPU
{0FCF2BA6-A5B3-4E1C-A49A-424E77602313}.Checked|x86.ActiveCfg = Debug|Any CPU
- {0FCF2BA6-A5B3-4E1C-A49A-424E77602313}.Checked|x86.Build.0 = Debug|Any CPU
{2849AE38-47F3-42FA-90C9-2E49D3A2CF29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2849AE38-47F3-42FA-90C9-2E49D3A2CF29}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2849AE38-47F3-42FA-90C9-2E49D3A2CF29}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -213,11 +197,8 @@ Global
{2849AE38-47F3-42FA-90C9-2E49D3A2CF29}.Release|x86.ActiveCfg = Release|Any CPU
{2849AE38-47F3-42FA-90C9-2E49D3A2CF29}.Release|x86.Build.0 = Release|Any CPU
{2849AE38-47F3-42FA-90C9-2E49D3A2CF29}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {2849AE38-47F3-42FA-90C9-2E49D3A2CF29}.Checked|Any CPU.Build.0 = Debug|Any CPU
{2849AE38-47F3-42FA-90C9-2E49D3A2CF29}.Checked|x64.ActiveCfg = Debug|Any CPU
- {2849AE38-47F3-42FA-90C9-2E49D3A2CF29}.Checked|x64.Build.0 = Debug|Any CPU
{2849AE38-47F3-42FA-90C9-2E49D3A2CF29}.Checked|x86.ActiveCfg = Debug|Any CPU
- {2849AE38-47F3-42FA-90C9-2E49D3A2CF29}.Checked|x86.Build.0 = Debug|Any CPU
{23E6B16C-26AC-4C56-A6C2-F055BB77A1ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{23E6B16C-26AC-4C56-A6C2-F055BB77A1ED}.Debug|Any CPU.Build.0 = Debug|Any CPU
{23E6B16C-26AC-4C56-A6C2-F055BB77A1ED}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -231,11 +212,8 @@ Global
{23E6B16C-26AC-4C56-A6C2-F055BB77A1ED}.Release|x86.ActiveCfg = Release|Any CPU
{23E6B16C-26AC-4C56-A6C2-F055BB77A1ED}.Release|x86.Build.0 = Release|Any CPU
{23E6B16C-26AC-4C56-A6C2-F055BB77A1ED}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {23E6B16C-26AC-4C56-A6C2-F055BB77A1ED}.Checked|Any CPU.Build.0 = Debug|Any CPU
{23E6B16C-26AC-4C56-A6C2-F055BB77A1ED}.Checked|x64.ActiveCfg = Debug|Any CPU
- {23E6B16C-26AC-4C56-A6C2-F055BB77A1ED}.Checked|x64.Build.0 = Debug|Any CPU
{23E6B16C-26AC-4C56-A6C2-F055BB77A1ED}.Checked|x86.ActiveCfg = Debug|Any CPU
- {23E6B16C-26AC-4C56-A6C2-F055BB77A1ED}.Checked|x86.Build.0 = Debug|Any CPU
{0AE3ABFE-6284-4119-A5DC-1844E6AB8E02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0AE3ABFE-6284-4119-A5DC-1844E6AB8E02}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0AE3ABFE-6284-4119-A5DC-1844E6AB8E02}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -249,11 +227,8 @@ Global
{0AE3ABFE-6284-4119-A5DC-1844E6AB8E02}.Release|x86.ActiveCfg = Release|Any CPU
{0AE3ABFE-6284-4119-A5DC-1844E6AB8E02}.Release|x86.Build.0 = Release|Any CPU
{0AE3ABFE-6284-4119-A5DC-1844E6AB8E02}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {0AE3ABFE-6284-4119-A5DC-1844E6AB8E02}.Checked|Any CPU.Build.0 = Debug|Any CPU
{0AE3ABFE-6284-4119-A5DC-1844E6AB8E02}.Checked|x64.ActiveCfg = Debug|Any CPU
- {0AE3ABFE-6284-4119-A5DC-1844E6AB8E02}.Checked|x64.Build.0 = Debug|Any CPU
{0AE3ABFE-6284-4119-A5DC-1844E6AB8E02}.Checked|x86.ActiveCfg = Debug|Any CPU
- {0AE3ABFE-6284-4119-A5DC-1844E6AB8E02}.Checked|x86.Build.0 = Debug|Any CPU
{F88CFB45-2EFF-47E5-8537-9DAC0398950D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F88CFB45-2EFF-47E5-8537-9DAC0398950D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F88CFB45-2EFF-47E5-8537-9DAC0398950D}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -267,11 +242,8 @@ Global
{F88CFB45-2EFF-47E5-8537-9DAC0398950D}.Release|x86.ActiveCfg = Release|Any CPU
{F88CFB45-2EFF-47E5-8537-9DAC0398950D}.Release|x86.Build.0 = Release|Any CPU
{F88CFB45-2EFF-47E5-8537-9DAC0398950D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {F88CFB45-2EFF-47E5-8537-9DAC0398950D}.Checked|Any CPU.Build.0 = Debug|Any CPU
{F88CFB45-2EFF-47E5-8537-9DAC0398950D}.Checked|x64.ActiveCfg = Debug|Any CPU
- {F88CFB45-2EFF-47E5-8537-9DAC0398950D}.Checked|x64.Build.0 = Debug|Any CPU
{F88CFB45-2EFF-47E5-8537-9DAC0398950D}.Checked|x86.ActiveCfg = Debug|Any CPU
- {F88CFB45-2EFF-47E5-8537-9DAC0398950D}.Checked|x86.Build.0 = Debug|Any CPU
{F865C526-79F8-403B-B5E4-52A90ECE21E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F865C526-79F8-403B-B5E4-52A90ECE21E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F865C526-79F8-403B-B5E4-52A90ECE21E3}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -285,11 +257,8 @@ Global
{F865C526-79F8-403B-B5E4-52A90ECE21E3}.Release|x86.ActiveCfg = Release|Any CPU
{F865C526-79F8-403B-B5E4-52A90ECE21E3}.Release|x86.Build.0 = Release|Any CPU
{F865C526-79F8-403B-B5E4-52A90ECE21E3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {F865C526-79F8-403B-B5E4-52A90ECE21E3}.Checked|Any CPU.Build.0 = Debug|Any CPU
{F865C526-79F8-403B-B5E4-52A90ECE21E3}.Checked|x64.ActiveCfg = Debug|Any CPU
- {F865C526-79F8-403B-B5E4-52A90ECE21E3}.Checked|x64.Build.0 = Debug|Any CPU
{F865C526-79F8-403B-B5E4-52A90ECE21E3}.Checked|x86.ActiveCfg = Debug|Any CPU
- {F865C526-79F8-403B-B5E4-52A90ECE21E3}.Checked|x86.Build.0 = Debug|Any CPU
{C3F9A601-07D8-43A3-A3CA-7A002358A102}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C3F9A601-07D8-43A3-A3CA-7A002358A102}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C3F9A601-07D8-43A3-A3CA-7A002358A102}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -303,11 +272,8 @@ Global
{C3F9A601-07D8-43A3-A3CA-7A002358A102}.Release|x86.ActiveCfg = Release|Any CPU
{C3F9A601-07D8-43A3-A3CA-7A002358A102}.Release|x86.Build.0 = Release|Any CPU
{C3F9A601-07D8-43A3-A3CA-7A002358A102}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {C3F9A601-07D8-43A3-A3CA-7A002358A102}.Checked|Any CPU.Build.0 = Debug|Any CPU
{C3F9A601-07D8-43A3-A3CA-7A002358A102}.Checked|x64.ActiveCfg = Debug|Any CPU
- {C3F9A601-07D8-43A3-A3CA-7A002358A102}.Checked|x64.Build.0 = Debug|Any CPU
{C3F9A601-07D8-43A3-A3CA-7A002358A102}.Checked|x86.ActiveCfg = Debug|Any CPU
- {C3F9A601-07D8-43A3-A3CA-7A002358A102}.Checked|x86.Build.0 = Debug|Any CPU
{BEBD7B5B-9544-42EB-B878-F009560CAAF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BEBD7B5B-9544-42EB-B878-F009560CAAF4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BEBD7B5B-9544-42EB-B878-F009560CAAF4}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -321,11 +287,8 @@ Global
{BEBD7B5B-9544-42EB-B878-F009560CAAF4}.Release|x86.ActiveCfg = Release|Any CPU
{BEBD7B5B-9544-42EB-B878-F009560CAAF4}.Release|x86.Build.0 = Release|Any CPU
{BEBD7B5B-9544-42EB-B878-F009560CAAF4}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {BEBD7B5B-9544-42EB-B878-F009560CAAF4}.Checked|Any CPU.Build.0 = Debug|Any CPU
{BEBD7B5B-9544-42EB-B878-F009560CAAF4}.Checked|x64.ActiveCfg = Debug|Any CPU
- {BEBD7B5B-9544-42EB-B878-F009560CAAF4}.Checked|x64.Build.0 = Debug|Any CPU
{BEBD7B5B-9544-42EB-B878-F009560CAAF4}.Checked|x86.ActiveCfg = Debug|Any CPU
- {BEBD7B5B-9544-42EB-B878-F009560CAAF4}.Checked|x86.Build.0 = Debug|Any CPU
{88B5FB49-4E8D-4EF9-8DE7-1E35CA10338A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{88B5FB49-4E8D-4EF9-8DE7-1E35CA10338A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{88B5FB49-4E8D-4EF9-8DE7-1E35CA10338A}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -339,11 +302,8 @@ Global
{88B5FB49-4E8D-4EF9-8DE7-1E35CA10338A}.Release|x86.ActiveCfg = Release|Any CPU
{88B5FB49-4E8D-4EF9-8DE7-1E35CA10338A}.Release|x86.Build.0 = Release|Any CPU
{88B5FB49-4E8D-4EF9-8DE7-1E35CA10338A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {88B5FB49-4E8D-4EF9-8DE7-1E35CA10338A}.Checked|Any CPU.Build.0 = Debug|Any CPU
{88B5FB49-4E8D-4EF9-8DE7-1E35CA10338A}.Checked|x64.ActiveCfg = Debug|Any CPU
- {88B5FB49-4E8D-4EF9-8DE7-1E35CA10338A}.Checked|x64.Build.0 = Debug|Any CPU
{88B5FB49-4E8D-4EF9-8DE7-1E35CA10338A}.Checked|x86.ActiveCfg = Debug|Any CPU
- {88B5FB49-4E8D-4EF9-8DE7-1E35CA10338A}.Checked|x86.Build.0 = Debug|Any CPU
{48C26AB9-318C-4425-85F2-7358FC19FEC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{48C26AB9-318C-4425-85F2-7358FC19FEC3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{48C26AB9-318C-4425-85F2-7358FC19FEC3}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -357,11 +317,8 @@ Global
{48C26AB9-318C-4425-85F2-7358FC19FEC3}.Release|x86.ActiveCfg = Release|Any CPU
{48C26AB9-318C-4425-85F2-7358FC19FEC3}.Release|x86.Build.0 = Release|Any CPU
{48C26AB9-318C-4425-85F2-7358FC19FEC3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {48C26AB9-318C-4425-85F2-7358FC19FEC3}.Checked|Any CPU.Build.0 = Debug|Any CPU
{48C26AB9-318C-4425-85F2-7358FC19FEC3}.Checked|x64.ActiveCfg = Debug|Any CPU
- {48C26AB9-318C-4425-85F2-7358FC19FEC3}.Checked|x64.Build.0 = Debug|Any CPU
{48C26AB9-318C-4425-85F2-7358FC19FEC3}.Checked|x86.ActiveCfg = Debug|Any CPU
- {48C26AB9-318C-4425-85F2-7358FC19FEC3}.Checked|x86.Build.0 = Debug|Any CPU
{D5A85F0E-509A-424F-BFD0-A7CC38D43CCD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D5A85F0E-509A-424F-BFD0-A7CC38D43CCD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D5A85F0E-509A-424F-BFD0-A7CC38D43CCD}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -375,11 +332,23 @@ Global
{D5A85F0E-509A-424F-BFD0-A7CC38D43CCD}.Release|x86.ActiveCfg = Release|Any CPU
{D5A85F0E-509A-424F-BFD0-A7CC38D43CCD}.Release|x86.Build.0 = Release|Any CPU
{D5A85F0E-509A-424F-BFD0-A7CC38D43CCD}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {D5A85F0E-509A-424F-BFD0-A7CC38D43CCD}.Checked|Any CPU.Build.0 = Debug|Any CPU
{D5A85F0E-509A-424F-BFD0-A7CC38D43CCD}.Checked|x64.ActiveCfg = Debug|Any CPU
- {D5A85F0E-509A-424F-BFD0-A7CC38D43CCD}.Checked|x64.Build.0 = Debug|Any CPU
{D5A85F0E-509A-424F-BFD0-A7CC38D43CCD}.Checked|x86.ActiveCfg = Debug|Any CPU
- {D5A85F0E-509A-424F-BFD0-A7CC38D43CCD}.Checked|x86.Build.0 = Debug|Any CPU
+ {6E8DFAF1-C6B8-44A8-B791-051FC8CB3112}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6E8DFAF1-C6B8-44A8-B791-051FC8CB3112}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6E8DFAF1-C6B8-44A8-B791-051FC8CB3112}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {6E8DFAF1-C6B8-44A8-B791-051FC8CB3112}.Debug|x64.Build.0 = Debug|Any CPU
+ {6E8DFAF1-C6B8-44A8-B791-051FC8CB3112}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {6E8DFAF1-C6B8-44A8-B791-051FC8CB3112}.Debug|x86.Build.0 = Debug|Any CPU
+ {6E8DFAF1-C6B8-44A8-B791-051FC8CB3112}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6E8DFAF1-C6B8-44A8-B791-051FC8CB3112}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6E8DFAF1-C6B8-44A8-B791-051FC8CB3112}.Release|x64.ActiveCfg = Release|Any CPU
+ {6E8DFAF1-C6B8-44A8-B791-051FC8CB3112}.Release|x64.Build.0 = Release|Any CPU
+ {6E8DFAF1-C6B8-44A8-B791-051FC8CB3112}.Release|x86.ActiveCfg = Release|Any CPU
+ {6E8DFAF1-C6B8-44A8-B791-051FC8CB3112}.Release|x86.Build.0 = Release|Any CPU
+ {6E8DFAF1-C6B8-44A8-B791-051FC8CB3112}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {6E8DFAF1-C6B8-44A8-B791-051FC8CB3112}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {6E8DFAF1-C6B8-44A8-B791-051FC8CB3112}.Checked|x86.ActiveCfg = Debug|Any CPU
{7AB121D2-0AAC-48E0-A834-6E220ECFEC4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7AB121D2-0AAC-48E0-A834-6E220ECFEC4D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7AB121D2-0AAC-48E0-A834-6E220ECFEC4D}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -393,11 +362,8 @@ Global
{7AB121D2-0AAC-48E0-A834-6E220ECFEC4D}.Release|x86.ActiveCfg = Release|Any CPU
{7AB121D2-0AAC-48E0-A834-6E220ECFEC4D}.Release|x86.Build.0 = Release|Any CPU
{7AB121D2-0AAC-48E0-A834-6E220ECFEC4D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {7AB121D2-0AAC-48E0-A834-6E220ECFEC4D}.Checked|Any CPU.Build.0 = Debug|Any CPU
{7AB121D2-0AAC-48E0-A834-6E220ECFEC4D}.Checked|x64.ActiveCfg = Debug|Any CPU
- {7AB121D2-0AAC-48E0-A834-6E220ECFEC4D}.Checked|x64.Build.0 = Debug|Any CPU
{7AB121D2-0AAC-48E0-A834-6E220ECFEC4D}.Checked|x86.ActiveCfg = Debug|Any CPU
- {7AB121D2-0AAC-48E0-A834-6E220ECFEC4D}.Checked|x86.Build.0 = Debug|Any CPU
{D650B25E-578E-4C68-BB87-D63B1E111682}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D650B25E-578E-4C68-BB87-D63B1E111682}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D650B25E-578E-4C68-BB87-D63B1E111682}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -411,11 +377,8 @@ Global
{D650B25E-578E-4C68-BB87-D63B1E111682}.Release|x86.ActiveCfg = Release|Any CPU
{D650B25E-578E-4C68-BB87-D63B1E111682}.Release|x86.Build.0 = Release|Any CPU
{D650B25E-578E-4C68-BB87-D63B1E111682}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {D650B25E-578E-4C68-BB87-D63B1E111682}.Checked|Any CPU.Build.0 = Debug|Any CPU
{D650B25E-578E-4C68-BB87-D63B1E111682}.Checked|x64.ActiveCfg = Debug|Any CPU
- {D650B25E-578E-4C68-BB87-D63B1E111682}.Checked|x64.Build.0 = Debug|Any CPU
{D650B25E-578E-4C68-BB87-D63B1E111682}.Checked|x86.ActiveCfg = Debug|Any CPU
- {D650B25E-578E-4C68-BB87-D63B1E111682}.Checked|x86.Build.0 = Debug|Any CPU
{44DCA516-EEB1-4976-9794-9D6A26A952E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{44DCA516-EEB1-4976-9794-9D6A26A952E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{44DCA516-EEB1-4976-9794-9D6A26A952E9}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -429,11 +392,8 @@ Global
{44DCA516-EEB1-4976-9794-9D6A26A952E9}.Release|x86.ActiveCfg = Release|Any CPU
{44DCA516-EEB1-4976-9794-9D6A26A952E9}.Release|x86.Build.0 = Release|Any CPU
{44DCA516-EEB1-4976-9794-9D6A26A952E9}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {44DCA516-EEB1-4976-9794-9D6A26A952E9}.Checked|Any CPU.Build.0 = Debug|Any CPU
{44DCA516-EEB1-4976-9794-9D6A26A952E9}.Checked|x64.ActiveCfg = Debug|Any CPU
- {44DCA516-EEB1-4976-9794-9D6A26A952E9}.Checked|x64.Build.0 = Debug|Any CPU
{44DCA516-EEB1-4976-9794-9D6A26A952E9}.Checked|x86.ActiveCfg = Debug|Any CPU
- {44DCA516-EEB1-4976-9794-9D6A26A952E9}.Checked|x86.Build.0 = Debug|Any CPU
{D291982D-1FC0-4CA2-A39F-4B490F809F01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D291982D-1FC0-4CA2-A39F-4B490F809F01}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D291982D-1FC0-4CA2-A39F-4B490F809F01}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -447,11 +407,8 @@ Global
{D291982D-1FC0-4CA2-A39F-4B490F809F01}.Release|x86.ActiveCfg = Release|Any CPU
{D291982D-1FC0-4CA2-A39F-4B490F809F01}.Release|x86.Build.0 = Release|Any CPU
{D291982D-1FC0-4CA2-A39F-4B490F809F01}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {D291982D-1FC0-4CA2-A39F-4B490F809F01}.Checked|Any CPU.Build.0 = Debug|Any CPU
{D291982D-1FC0-4CA2-A39F-4B490F809F01}.Checked|x64.ActiveCfg = Debug|Any CPU
- {D291982D-1FC0-4CA2-A39F-4B490F809F01}.Checked|x64.Build.0 = Debug|Any CPU
{D291982D-1FC0-4CA2-A39F-4B490F809F01}.Checked|x86.ActiveCfg = Debug|Any CPU
- {D291982D-1FC0-4CA2-A39F-4B490F809F01}.Checked|x86.Build.0 = Debug|Any CPU
{D986E1E9-85ED-4F08-A1CC-AD6A07358886}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D986E1E9-85ED-4F08-A1CC-AD6A07358886}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D986E1E9-85ED-4F08-A1CC-AD6A07358886}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -465,11 +422,8 @@ Global
{D986E1E9-85ED-4F08-A1CC-AD6A07358886}.Release|x86.ActiveCfg = Release|Any CPU
{D986E1E9-85ED-4F08-A1CC-AD6A07358886}.Release|x86.Build.0 = Release|Any CPU
{D986E1E9-85ED-4F08-A1CC-AD6A07358886}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {D986E1E9-85ED-4F08-A1CC-AD6A07358886}.Checked|Any CPU.Build.0 = Debug|Any CPU
{D986E1E9-85ED-4F08-A1CC-AD6A07358886}.Checked|x64.ActiveCfg = Debug|Any CPU
- {D986E1E9-85ED-4F08-A1CC-AD6A07358886}.Checked|x64.Build.0 = Debug|Any CPU
{D986E1E9-85ED-4F08-A1CC-AD6A07358886}.Checked|x86.ActiveCfg = Debug|Any CPU
- {D986E1E9-85ED-4F08-A1CC-AD6A07358886}.Checked|x86.Build.0 = Debug|Any CPU
{7E7FA8BC-C1F8-44D3-82BB-82D204B7BEA6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7E7FA8BC-C1F8-44D3-82BB-82D204B7BEA6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7E7FA8BC-C1F8-44D3-82BB-82D204B7BEA6}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -483,11 +437,8 @@ Global
{7E7FA8BC-C1F8-44D3-82BB-82D204B7BEA6}.Release|x86.ActiveCfg = Release|Any CPU
{7E7FA8BC-C1F8-44D3-82BB-82D204B7BEA6}.Release|x86.Build.0 = Release|Any CPU
{7E7FA8BC-C1F8-44D3-82BB-82D204B7BEA6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {7E7FA8BC-C1F8-44D3-82BB-82D204B7BEA6}.Checked|Any CPU.Build.0 = Debug|Any CPU
{7E7FA8BC-C1F8-44D3-82BB-82D204B7BEA6}.Checked|x64.ActiveCfg = Debug|Any CPU
- {7E7FA8BC-C1F8-44D3-82BB-82D204B7BEA6}.Checked|x64.Build.0 = Debug|Any CPU
{7E7FA8BC-C1F8-44D3-82BB-82D204B7BEA6}.Checked|x86.ActiveCfg = Debug|Any CPU
- {7E7FA8BC-C1F8-44D3-82BB-82D204B7BEA6}.Checked|x86.Build.0 = Debug|Any CPU
{09129981-6B0D-44C7-9F0A-AD2426106332}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{09129981-6B0D-44C7-9F0A-AD2426106332}.Debug|Any CPU.Build.0 = Debug|Any CPU
{09129981-6B0D-44C7-9F0A-AD2426106332}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -501,11 +452,8 @@ Global
{09129981-6B0D-44C7-9F0A-AD2426106332}.Release|x86.ActiveCfg = Release|Any CPU
{09129981-6B0D-44C7-9F0A-AD2426106332}.Release|x86.Build.0 = Release|Any CPU
{09129981-6B0D-44C7-9F0A-AD2426106332}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {09129981-6B0D-44C7-9F0A-AD2426106332}.Checked|Any CPU.Build.0 = Debug|Any CPU
{09129981-6B0D-44C7-9F0A-AD2426106332}.Checked|x64.ActiveCfg = Debug|Any CPU
- {09129981-6B0D-44C7-9F0A-AD2426106332}.Checked|x64.Build.0 = Debug|Any CPU
{09129981-6B0D-44C7-9F0A-AD2426106332}.Checked|x86.ActiveCfg = Debug|Any CPU
- {09129981-6B0D-44C7-9F0A-AD2426106332}.Checked|x86.Build.0 = Debug|Any CPU
{EDDAE59E-8700-49DC-8E46-534037F7F476}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EDDAE59E-8700-49DC-8E46-534037F7F476}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EDDAE59E-8700-49DC-8E46-534037F7F476}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -519,11 +467,8 @@ Global
{EDDAE59E-8700-49DC-8E46-534037F7F476}.Release|x86.ActiveCfg = Release|Any CPU
{EDDAE59E-8700-49DC-8E46-534037F7F476}.Release|x86.Build.0 = Release|Any CPU
{EDDAE59E-8700-49DC-8E46-534037F7F476}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {EDDAE59E-8700-49DC-8E46-534037F7F476}.Checked|Any CPU.Build.0 = Debug|Any CPU
{EDDAE59E-8700-49DC-8E46-534037F7F476}.Checked|x64.ActiveCfg = Debug|Any CPU
- {EDDAE59E-8700-49DC-8E46-534037F7F476}.Checked|x64.Build.0 = Debug|Any CPU
{EDDAE59E-8700-49DC-8E46-534037F7F476}.Checked|x86.ActiveCfg = Debug|Any CPU
- {EDDAE59E-8700-49DC-8E46-534037F7F476}.Checked|x86.Build.0 = Debug|Any CPU
{5AD0D9CB-C773-4BBC-87BD-9BDFF172936E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5AD0D9CB-C773-4BBC-87BD-9BDFF172936E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5AD0D9CB-C773-4BBC-87BD-9BDFF172936E}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -537,11 +482,8 @@ Global
{5AD0D9CB-C773-4BBC-87BD-9BDFF172936E}.Release|x86.ActiveCfg = Release|Any CPU
{5AD0D9CB-C773-4BBC-87BD-9BDFF172936E}.Release|x86.Build.0 = Release|Any CPU
{5AD0D9CB-C773-4BBC-87BD-9BDFF172936E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {5AD0D9CB-C773-4BBC-87BD-9BDFF172936E}.Checked|Any CPU.Build.0 = Debug|Any CPU
{5AD0D9CB-C773-4BBC-87BD-9BDFF172936E}.Checked|x64.ActiveCfg = Debug|Any CPU
- {5AD0D9CB-C773-4BBC-87BD-9BDFF172936E}.Checked|x64.Build.0 = Debug|Any CPU
{5AD0D9CB-C773-4BBC-87BD-9BDFF172936E}.Checked|x86.ActiveCfg = Debug|Any CPU
- {5AD0D9CB-C773-4BBC-87BD-9BDFF172936E}.Checked|x86.Build.0 = Debug|Any CPU
{521CFFC1-DB45-4FB2-87EF-6BF4F413A011}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{521CFFC1-DB45-4FB2-87EF-6BF4F413A011}.Debug|Any CPU.Build.0 = Debug|Any CPU
{521CFFC1-DB45-4FB2-87EF-6BF4F413A011}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -555,11 +497,8 @@ Global
{521CFFC1-DB45-4FB2-87EF-6BF4F413A011}.Release|x86.ActiveCfg = Release|Any CPU
{521CFFC1-DB45-4FB2-87EF-6BF4F413A011}.Release|x86.Build.0 = Release|Any CPU
{521CFFC1-DB45-4FB2-87EF-6BF4F413A011}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {521CFFC1-DB45-4FB2-87EF-6BF4F413A011}.Checked|Any CPU.Build.0 = Debug|Any CPU
{521CFFC1-DB45-4FB2-87EF-6BF4F413A011}.Checked|x64.ActiveCfg = Debug|Any CPU
- {521CFFC1-DB45-4FB2-87EF-6BF4F413A011}.Checked|x64.Build.0 = Debug|Any CPU
{521CFFC1-DB45-4FB2-87EF-6BF4F413A011}.Checked|x86.ActiveCfg = Debug|Any CPU
- {521CFFC1-DB45-4FB2-87EF-6BF4F413A011}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -583,6 +522,7 @@ Global
{F865C526-79F8-403B-B5E4-52A90ECE21E3} = {79588763-C99B-4C1B-88D3-181A92A98364}
{88B5FB49-4E8D-4EF9-8DE7-1E35CA10338A} = {79588763-C99B-4C1B-88D3-181A92A98364}
{48C26AB9-318C-4425-85F2-7358FC19FEC3} = {79588763-C99B-4C1B-88D3-181A92A98364}
+ {6E8DFAF1-C6B8-44A8-B791-051FC8CB3112} = {79588763-C99B-4C1B-88D3-181A92A98364}
{D650B25E-578E-4C68-BB87-D63B1E111682} = {79588763-C99B-4C1B-88D3-181A92A98364}
{D986E1E9-85ED-4F08-A1CC-AD6A07358886} = {79588763-C99B-4C1B-88D3-181A92A98364}
{7E7FA8BC-C1F8-44D3-82BB-82D204B7BEA6} = {79588763-C99B-4C1B-88D3-181A92A98364}
diff --git a/src/libraries/System.Data.Common/ref/System.Data.Common.cs b/src/libraries/System.Data.Common/ref/System.Data.Common.cs
index b15070d6e17..75bfb650d68 100644
--- a/src/libraries/System.Data.Common/ref/System.Data.Common.cs
+++ b/src/libraries/System.Data.Common/ref/System.Data.Common.cs
@@ -940,6 +940,7 @@ namespace System.Data
public override decimal GetDecimal(int ordinal) { throw null; }
public override double GetDouble(int ordinal) { throw null; }
public override System.Collections.IEnumerator GetEnumerator() { throw null; }
+ [return: System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicFields)]
public override System.Type GetFieldType(int ordinal) { throw null; }
public override float GetFloat(int ordinal) { throw null; }
public override System.Guid GetGuid(int ordinal) { throw null; }
@@ -948,6 +949,7 @@ namespace System.Data
public override long GetInt64(int ordinal) { throw null; }
public override string GetName(int ordinal) { throw null; }
public override int GetOrdinal(string name) { throw null; }
+ [return: System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicFields)]
public override System.Type GetProviderSpecificFieldType(int ordinal) { throw null; }
public override object GetProviderSpecificValue(int ordinal) { throw null; }
public override int GetProviderSpecificValues(object[] values) { throw null; }
@@ -2318,6 +2320,7 @@ namespace System.Data.Common
public abstract double GetDouble(int ordinal);
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public abstract System.Collections.IEnumerator GetEnumerator();
+ [return: System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicFields)]
public abstract System.Type GetFieldType(int ordinal);
public System.Threading.Tasks.Task<T> GetFieldValueAsync<T>(int ordinal) { throw null; }
public virtual System.Threading.Tasks.Task<T> GetFieldValueAsync<T>(int ordinal, System.Threading.CancellationToken cancellationToken) { throw null; }
@@ -2330,6 +2333,7 @@ namespace System.Data.Common
public abstract string GetName(int ordinal);
public abstract int GetOrdinal(string name);
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ [return: System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicFields)]
public virtual System.Type GetProviderSpecificFieldType(int ordinal) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public virtual object GetProviderSpecificValue(int ordinal) { throw null; }
@@ -2376,6 +2380,7 @@ namespace System.Data.Common
protected virtual System.Data.Common.DbDataReader GetDbDataReader(int i) { throw null; }
public abstract decimal GetDecimal(int i);
public abstract double GetDouble(int i);
+ [return: System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicFields)]
public abstract System.Type GetFieldType(int i);
public abstract float GetFloat(int i);
public abstract System.Guid GetGuid(int i);
diff --git a/src/libraries/System.Data.OleDb/System.Data.Oledb.sln b/src/libraries/System.Data.OleDb/System.Data.Oledb.sln
index 6305461fc56..8e41c6517b8 100644
--- a/src/libraries/System.Data.OleDb/System.Data.Oledb.sln
+++ b/src/libraries/System.Data.OleDb/System.Data.Oledb.sln
@@ -15,6 +15,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Data.OleDb", "src\Sy
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Data.OleDb.Tests", "tests\System.Data.OleDb.Tests.csproj", "{84CF0BC6-CFDF-4A19-AA48-0F28FB11BC3A}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.EventLog", "..\System.Diagnostics.EventLog\ref\System.Diagnostics.EventLog.csproj", "{F7379254-05CC-4F91-B230-4DD992502C75}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.EventLog.Messages", "..\System.Diagnostics.EventLog\src\Messages\System.Diagnostics.EventLog.Messages.csproj", "{CE5ACEBD-8B25-4523-842C-1BF961044C17}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.EventLog", "..\System.Diagnostics.EventLog\src\System.Diagnostics.EventLog.csproj", "{3F0940D6-1697-4468-A2D6-8AC3891C4FB7}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.PerformanceCounter", "..\System.Diagnostics.PerformanceCounter\ref\System.Diagnostics.PerformanceCounter.csproj", "{F5BFD2E9-5399-4D16-901A-554E1DF2D6E1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.PerformanceCounter", "..\System.Diagnostics.PerformanceCounter\src\System.Diagnostics.PerformanceCounter.csproj", "{362A9152-D46A-4DD0-8EB7-D36FC95D1AF1}"
@@ -85,6 +91,18 @@ Global
{84CF0BC6-CFDF-4A19-AA48-0F28FB11BC3A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{84CF0BC6-CFDF-4A19-AA48-0F28FB11BC3A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{84CF0BC6-CFDF-4A19-AA48-0F28FB11BC3A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F7379254-05CC-4F91-B230-4DD992502C75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F7379254-05CC-4F91-B230-4DD992502C75}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F7379254-05CC-4F91-B230-4DD992502C75}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F7379254-05CC-4F91-B230-4DD992502C75}.Release|Any CPU.Build.0 = Release|Any CPU
+ {CE5ACEBD-8B25-4523-842C-1BF961044C17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {CE5ACEBD-8B25-4523-842C-1BF961044C17}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {CE5ACEBD-8B25-4523-842C-1BF961044C17}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {CE5ACEBD-8B25-4523-842C-1BF961044C17}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3F0940D6-1697-4468-A2D6-8AC3891C4FB7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3F0940D6-1697-4468-A2D6-8AC3891C4FB7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3F0940D6-1697-4468-A2D6-8AC3891C4FB7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3F0940D6-1697-4468-A2D6-8AC3891C4FB7}.Release|Any CPU.Build.0 = Release|Any CPU
{F5BFD2E9-5399-4D16-901A-554E1DF2D6E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F5BFD2E9-5399-4D16-901A-554E1DF2D6E1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F5BFD2E9-5399-4D16-901A-554E1DF2D6E1}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -143,6 +161,7 @@ Global
{DBE4704C-861A-4C10-9F75-4326462386E8} = {9AB0B44D-9A64-449F-A0CD-07D39ABEF343}
{048AD79E-A0A9-4C0E-8942-4778BBE4B2F1} = {9AB0B44D-9A64-449F-A0CD-07D39ABEF343}
{55F3CDEC-EA5D-4483-AD1A-47A0DC4B5222} = {9AB0B44D-9A64-449F-A0CD-07D39ABEF343}
+ {F7379254-05CC-4F91-B230-4DD992502C75} = {9AB0B44D-9A64-449F-A0CD-07D39ABEF343}
{F5BFD2E9-5399-4D16-901A-554E1DF2D6E1} = {9AB0B44D-9A64-449F-A0CD-07D39ABEF343}
{C4B1668A-2512-4832-A298-3A10230C8B82} = {9AB0B44D-9A64-449F-A0CD-07D39ABEF343}
{EF8D1526-9463-401B-9EAE-D4B98C86E046} = {9AB0B44D-9A64-449F-A0CD-07D39ABEF343}
@@ -151,6 +170,8 @@ Global
{28FEB4E5-90D5-423B-86FF-6B65589EFA0C} = {4B964147-AE9C-454F-B971-4F4BD9541280}
{636E099B-BFAB-4C0E-B9D8-09BB1FE85B45} = {4B964147-AE9C-454F-B971-4F4BD9541280}
{9C557B87-DEE3-4B28-A82D-796418B3F608} = {4B964147-AE9C-454F-B971-4F4BD9541280}
+ {CE5ACEBD-8B25-4523-842C-1BF961044C17} = {4B964147-AE9C-454F-B971-4F4BD9541280}
+ {3F0940D6-1697-4468-A2D6-8AC3891C4FB7} = {4B964147-AE9C-454F-B971-4F4BD9541280}
{362A9152-D46A-4DD0-8EB7-D36FC95D1AF1} = {4B964147-AE9C-454F-B971-4F4BD9541280}
{23D4BAFD-851B-4718-A3FA-B30631F87F91} = {4B964147-AE9C-454F-B971-4F4BD9541280}
{15628477-9D25-41FA-81B0-59D43D1363F4} = {4B964147-AE9C-454F-B971-4F4BD9541280}
diff --git a/src/libraries/System.Diagnostics.Contracts/System.Diagnostics.Contracts.sln b/src/libraries/System.Diagnostics.Contracts/System.Diagnostics.Contracts.sln
index c6d81c37437..319927c75a2 100644
--- a/src/libraries/System.Diagnostics.Contracts/System.Diagnostics.Contracts.sln
+++ b/src/libraries/System.Diagnostics.Contracts/System.Diagnostics.Contracts.sln
@@ -11,6 +11,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.Contract
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{452B9C44-BE4A-4D0E-9412-07280582D3BB}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{B0B27299-653F-4B2C-A69B-81056AC2FE46}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{B1366F4C-E5CC-4AF3-A67F-C28216E570B3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{9C3EAF3C-A96C-4D5F-95FE-BBCB1580DECA}"
@@ -69,11 +71,8 @@ Global
{E4B95B10-EC2A-4874-8E71-858A90A4BDFE}.Release|x86.ActiveCfg = Release|Any CPU
{E4B95B10-EC2A-4874-8E71-858A90A4BDFE}.Release|x86.Build.0 = Release|Any CPU
{E4B95B10-EC2A-4874-8E71-858A90A4BDFE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {E4B95B10-EC2A-4874-8E71-858A90A4BDFE}.Checked|Any CPU.Build.0 = Debug|Any CPU
{E4B95B10-EC2A-4874-8E71-858A90A4BDFE}.Checked|x64.ActiveCfg = Debug|Any CPU
- {E4B95B10-EC2A-4874-8E71-858A90A4BDFE}.Checked|x64.Build.0 = Debug|Any CPU
{E4B95B10-EC2A-4874-8E71-858A90A4BDFE}.Checked|x86.ActiveCfg = Debug|Any CPU
- {E4B95B10-EC2A-4874-8E71-858A90A4BDFE}.Checked|x86.Build.0 = Debug|Any CPU
{DD15B8D0-013A-43B3-AC3D-1B0D626B35E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DD15B8D0-013A-43B3-AC3D-1B0D626B35E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DD15B8D0-013A-43B3-AC3D-1B0D626B35E0}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -87,11 +86,8 @@ Global
{DD15B8D0-013A-43B3-AC3D-1B0D626B35E0}.Release|x86.ActiveCfg = Release|Any CPU
{DD15B8D0-013A-43B3-AC3D-1B0D626B35E0}.Release|x86.Build.0 = Release|Any CPU
{DD15B8D0-013A-43B3-AC3D-1B0D626B35E0}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {DD15B8D0-013A-43B3-AC3D-1B0D626B35E0}.Checked|Any CPU.Build.0 = Debug|Any CPU
{DD15B8D0-013A-43B3-AC3D-1B0D626B35E0}.Checked|x64.ActiveCfg = Debug|Any CPU
- {DD15B8D0-013A-43B3-AC3D-1B0D626B35E0}.Checked|x64.Build.0 = Debug|Any CPU
{DD15B8D0-013A-43B3-AC3D-1B0D626B35E0}.Checked|x86.ActiveCfg = Debug|Any CPU
- {DD15B8D0-013A-43B3-AC3D-1B0D626B35E0}.Checked|x86.Build.0 = Debug|Any CPU
{158DD2BA-5789-49B8-A801-77EF5D4FD324}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{158DD2BA-5789-49B8-A801-77EF5D4FD324}.Debug|Any CPU.Build.0 = Debug|Any CPU
{158DD2BA-5789-49B8-A801-77EF5D4FD324}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -105,11 +101,8 @@ Global
{158DD2BA-5789-49B8-A801-77EF5D4FD324}.Release|x86.ActiveCfg = Release|Any CPU
{158DD2BA-5789-49B8-A801-77EF5D4FD324}.Release|x86.Build.0 = Release|Any CPU
{158DD2BA-5789-49B8-A801-77EF5D4FD324}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {158DD2BA-5789-49B8-A801-77EF5D4FD324}.Checked|Any CPU.Build.0 = Debug|Any CPU
{158DD2BA-5789-49B8-A801-77EF5D4FD324}.Checked|x64.ActiveCfg = Debug|Any CPU
- {158DD2BA-5789-49B8-A801-77EF5D4FD324}.Checked|x64.Build.0 = Debug|Any CPU
{158DD2BA-5789-49B8-A801-77EF5D4FD324}.Checked|x86.ActiveCfg = Debug|Any CPU
- {158DD2BA-5789-49B8-A801-77EF5D4FD324}.Checked|x86.Build.0 = Debug|Any CPU
{2F113EAD-602B-4EBD-97E4-24C97CDFEB50}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2F113EAD-602B-4EBD-97E4-24C97CDFEB50}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2F113EAD-602B-4EBD-97E4-24C97CDFEB50}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -123,11 +116,8 @@ Global
{2F113EAD-602B-4EBD-97E4-24C97CDFEB50}.Release|x86.ActiveCfg = Release|Any CPU
{2F113EAD-602B-4EBD-97E4-24C97CDFEB50}.Release|x86.Build.0 = Release|Any CPU
{2F113EAD-602B-4EBD-97E4-24C97CDFEB50}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {2F113EAD-602B-4EBD-97E4-24C97CDFEB50}.Checked|Any CPU.Build.0 = Debug|Any CPU
{2F113EAD-602B-4EBD-97E4-24C97CDFEB50}.Checked|x64.ActiveCfg = Debug|Any CPU
- {2F113EAD-602B-4EBD-97E4-24C97CDFEB50}.Checked|x64.Build.0 = Debug|Any CPU
{2F113EAD-602B-4EBD-97E4-24C97CDFEB50}.Checked|x86.ActiveCfg = Debug|Any CPU
- {2F113EAD-602B-4EBD-97E4-24C97CDFEB50}.Checked|x86.Build.0 = Debug|Any CPU
{452B9C44-BE4A-4D0E-9412-07280582D3BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{452B9C44-BE4A-4D0E-9412-07280582D3BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{452B9C44-BE4A-4D0E-9412-07280582D3BB}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -141,11 +131,23 @@ Global
{452B9C44-BE4A-4D0E-9412-07280582D3BB}.Release|x86.ActiveCfg = Release|Any CPU
{452B9C44-BE4A-4D0E-9412-07280582D3BB}.Release|x86.Build.0 = Release|Any CPU
{452B9C44-BE4A-4D0E-9412-07280582D3BB}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {452B9C44-BE4A-4D0E-9412-07280582D3BB}.Checked|Any CPU.Build.0 = Debug|Any CPU
{452B9C44-BE4A-4D0E-9412-07280582D3BB}.Checked|x64.ActiveCfg = Debug|Any CPU
- {452B9C44-BE4A-4D0E-9412-07280582D3BB}.Checked|x64.Build.0 = Debug|Any CPU
{452B9C44-BE4A-4D0E-9412-07280582D3BB}.Checked|x86.ActiveCfg = Debug|Any CPU
- {452B9C44-BE4A-4D0E-9412-07280582D3BB}.Checked|x86.Build.0 = Debug|Any CPU
+ {B0B27299-653F-4B2C-A69B-81056AC2FE46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B0B27299-653F-4B2C-A69B-81056AC2FE46}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B0B27299-653F-4B2C-A69B-81056AC2FE46}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {B0B27299-653F-4B2C-A69B-81056AC2FE46}.Debug|x64.Build.0 = Debug|Any CPU
+ {B0B27299-653F-4B2C-A69B-81056AC2FE46}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {B0B27299-653F-4B2C-A69B-81056AC2FE46}.Debug|x86.Build.0 = Debug|Any CPU
+ {B0B27299-653F-4B2C-A69B-81056AC2FE46}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B0B27299-653F-4B2C-A69B-81056AC2FE46}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B0B27299-653F-4B2C-A69B-81056AC2FE46}.Release|x64.ActiveCfg = Release|Any CPU
+ {B0B27299-653F-4B2C-A69B-81056AC2FE46}.Release|x64.Build.0 = Release|Any CPU
+ {B0B27299-653F-4B2C-A69B-81056AC2FE46}.Release|x86.ActiveCfg = Release|Any CPU
+ {B0B27299-653F-4B2C-A69B-81056AC2FE46}.Release|x86.Build.0 = Release|Any CPU
+ {B0B27299-653F-4B2C-A69B-81056AC2FE46}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {B0B27299-653F-4B2C-A69B-81056AC2FE46}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {B0B27299-653F-4B2C-A69B-81056AC2FE46}.Checked|x86.ActiveCfg = Debug|Any CPU
{B1366F4C-E5CC-4AF3-A67F-C28216E570B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B1366F4C-E5CC-4AF3-A67F-C28216E570B3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B1366F4C-E5CC-4AF3-A67F-C28216E570B3}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -159,11 +161,8 @@ Global
{B1366F4C-E5CC-4AF3-A67F-C28216E570B3}.Release|x86.ActiveCfg = Release|Any CPU
{B1366F4C-E5CC-4AF3-A67F-C28216E570B3}.Release|x86.Build.0 = Release|Any CPU
{B1366F4C-E5CC-4AF3-A67F-C28216E570B3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {B1366F4C-E5CC-4AF3-A67F-C28216E570B3}.Checked|Any CPU.Build.0 = Debug|Any CPU
{B1366F4C-E5CC-4AF3-A67F-C28216E570B3}.Checked|x64.ActiveCfg = Debug|Any CPU
- {B1366F4C-E5CC-4AF3-A67F-C28216E570B3}.Checked|x64.Build.0 = Debug|Any CPU
{B1366F4C-E5CC-4AF3-A67F-C28216E570B3}.Checked|x86.ActiveCfg = Debug|Any CPU
- {B1366F4C-E5CC-4AF3-A67F-C28216E570B3}.Checked|x86.Build.0 = Debug|Any CPU
{9C3EAF3C-A96C-4D5F-95FE-BBCB1580DECA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9C3EAF3C-A96C-4D5F-95FE-BBCB1580DECA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9C3EAF3C-A96C-4D5F-95FE-BBCB1580DECA}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -177,11 +176,8 @@ Global
{9C3EAF3C-A96C-4D5F-95FE-BBCB1580DECA}.Release|x86.ActiveCfg = Release|Any CPU
{9C3EAF3C-A96C-4D5F-95FE-BBCB1580DECA}.Release|x86.Build.0 = Release|Any CPU
{9C3EAF3C-A96C-4D5F-95FE-BBCB1580DECA}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {9C3EAF3C-A96C-4D5F-95FE-BBCB1580DECA}.Checked|Any CPU.Build.0 = Debug|Any CPU
{9C3EAF3C-A96C-4D5F-95FE-BBCB1580DECA}.Checked|x64.ActiveCfg = Debug|Any CPU
- {9C3EAF3C-A96C-4D5F-95FE-BBCB1580DECA}.Checked|x64.Build.0 = Debug|Any CPU
{9C3EAF3C-A96C-4D5F-95FE-BBCB1580DECA}.Checked|x86.ActiveCfg = Debug|Any CPU
- {9C3EAF3C-A96C-4D5F-95FE-BBCB1580DECA}.Checked|x86.Build.0 = Debug|Any CPU
{CA4E8737-E42F-4524-A1A0-D2673B7B7AAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CA4E8737-E42F-4524-A1A0-D2673B7B7AAF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CA4E8737-E42F-4524-A1A0-D2673B7B7AAF}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -195,11 +191,8 @@ Global
{CA4E8737-E42F-4524-A1A0-D2673B7B7AAF}.Release|x86.ActiveCfg = Release|Any CPU
{CA4E8737-E42F-4524-A1A0-D2673B7B7AAF}.Release|x86.Build.0 = Release|Any CPU
{CA4E8737-E42F-4524-A1A0-D2673B7B7AAF}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {CA4E8737-E42F-4524-A1A0-D2673B7B7AAF}.Checked|Any CPU.Build.0 = Debug|Any CPU
{CA4E8737-E42F-4524-A1A0-D2673B7B7AAF}.Checked|x64.ActiveCfg = Debug|Any CPU
- {CA4E8737-E42F-4524-A1A0-D2673B7B7AAF}.Checked|x64.Build.0 = Debug|Any CPU
{CA4E8737-E42F-4524-A1A0-D2673B7B7AAF}.Checked|x86.ActiveCfg = Debug|Any CPU
- {CA4E8737-E42F-4524-A1A0-D2673B7B7AAF}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -210,6 +203,7 @@ Global
{E4B95B10-EC2A-4874-8E71-858A90A4BDFE} = {56A31E71-2D11-484D-A9D0-97E4A2AD9354}
{2F113EAD-602B-4EBD-97E4-24C97CDFEB50} = {56A31E71-2D11-484D-A9D0-97E4A2AD9354}
{DD15B8D0-013A-43B3-AC3D-1B0D626B35E0} = {8B71FA04-1D67-4607-94A4-E2A85977B1FA}
+ {B0B27299-653F-4B2C-A69B-81056AC2FE46} = {8B71FA04-1D67-4607-94A4-E2A85977B1FA}
{CA4E8737-E42F-4524-A1A0-D2673B7B7AAF} = {8B71FA04-1D67-4607-94A4-E2A85977B1FA}
{452B9C44-BE4A-4D0E-9412-07280582D3BB} = {24204C7B-8FCC-4D46-8E72-BB7128DB5572}
{B1366F4C-E5CC-4AF3-A67F-C28216E570B3} = {24204C7B-8FCC-4D46-8E72-BB7128DB5572}
diff --git a/src/libraries/System.Diagnostics.Debug/System.Diagnostics.Debug.sln b/src/libraries/System.Diagnostics.Debug/System.Diagnostics.Debug.sln
index a34d6a76a71..8910eab3e0c 100644
--- a/src/libraries/System.Diagnostics.Debug/System.Diagnostics.Debug.sln
+++ b/src/libraries/System.Diagnostics.Debug/System.Diagnostics.Debug.sln
@@ -15,6 +15,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.Debug.Te
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{6ED522FD-D0B0-4574-8F1A-82D339C7D0D3}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{6F3A9E91-34B5-4656-B74E-7D97D190357F}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.Uri", "..\System.Private.Uri\src\System.Private.Uri.csproj", "{8CCE7756-F004-4EF2-ABCE-0DDD03D5BE04}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{99BC2F73-199C-4E97-B247-FA99AEC9E24A}"
@@ -81,11 +83,8 @@ Global
{1C01EFBD-2332-4392-BB4A-918178861EDC}.Release|x86.ActiveCfg = Release|Any CPU
{1C01EFBD-2332-4392-BB4A-918178861EDC}.Release|x86.Build.0 = Release|Any CPU
{1C01EFBD-2332-4392-BB4A-918178861EDC}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {1C01EFBD-2332-4392-BB4A-918178861EDC}.Checked|Any CPU.Build.0 = Debug|Any CPU
{1C01EFBD-2332-4392-BB4A-918178861EDC}.Checked|x64.ActiveCfg = Debug|Any CPU
- {1C01EFBD-2332-4392-BB4A-918178861EDC}.Checked|x64.Build.0 = Debug|Any CPU
{1C01EFBD-2332-4392-BB4A-918178861EDC}.Checked|x86.ActiveCfg = Debug|Any CPU
- {1C01EFBD-2332-4392-BB4A-918178861EDC}.Checked|x86.Build.0 = Debug|Any CPU
{56152EDC-93D5-4065-BBAC-C844BA02D1B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{56152EDC-93D5-4065-BBAC-C844BA02D1B3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{56152EDC-93D5-4065-BBAC-C844BA02D1B3}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -99,11 +98,8 @@ Global
{56152EDC-93D5-4065-BBAC-C844BA02D1B3}.Release|x86.ActiveCfg = Release|Any CPU
{56152EDC-93D5-4065-BBAC-C844BA02D1B3}.Release|x86.Build.0 = Release|Any CPU
{56152EDC-93D5-4065-BBAC-C844BA02D1B3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {56152EDC-93D5-4065-BBAC-C844BA02D1B3}.Checked|Any CPU.Build.0 = Debug|Any CPU
{56152EDC-93D5-4065-BBAC-C844BA02D1B3}.Checked|x64.ActiveCfg = Debug|Any CPU
- {56152EDC-93D5-4065-BBAC-C844BA02D1B3}.Checked|x64.Build.0 = Debug|Any CPU
{56152EDC-93D5-4065-BBAC-C844BA02D1B3}.Checked|x86.ActiveCfg = Debug|Any CPU
- {56152EDC-93D5-4065-BBAC-C844BA02D1B3}.Checked|x86.Build.0 = Debug|Any CPU
{05D13C55-8D66-4E71-B645-49795DFEF2A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{05D13C55-8D66-4E71-B645-49795DFEF2A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{05D13C55-8D66-4E71-B645-49795DFEF2A9}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -117,11 +113,8 @@ Global
{05D13C55-8D66-4E71-B645-49795DFEF2A9}.Release|x86.ActiveCfg = Release|Any CPU
{05D13C55-8D66-4E71-B645-49795DFEF2A9}.Release|x86.Build.0 = Release|Any CPU
{05D13C55-8D66-4E71-B645-49795DFEF2A9}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {05D13C55-8D66-4E71-B645-49795DFEF2A9}.Checked|Any CPU.Build.0 = Debug|Any CPU
{05D13C55-8D66-4E71-B645-49795DFEF2A9}.Checked|x64.ActiveCfg = Debug|Any CPU
- {05D13C55-8D66-4E71-B645-49795DFEF2A9}.Checked|x64.Build.0 = Debug|Any CPU
{05D13C55-8D66-4E71-B645-49795DFEF2A9}.Checked|x86.ActiveCfg = Debug|Any CPU
- {05D13C55-8D66-4E71-B645-49795DFEF2A9}.Checked|x86.Build.0 = Debug|Any CPU
{2B2AFDCB-BD41-4855-BCB0-B675B8E6CD0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2B2AFDCB-BD41-4855-BCB0-B675B8E6CD0D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2B2AFDCB-BD41-4855-BCB0-B675B8E6CD0D}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -135,11 +128,8 @@ Global
{2B2AFDCB-BD41-4855-BCB0-B675B8E6CD0D}.Release|x86.ActiveCfg = Release|Any CPU
{2B2AFDCB-BD41-4855-BCB0-B675B8E6CD0D}.Release|x86.Build.0 = Release|Any CPU
{2B2AFDCB-BD41-4855-BCB0-B675B8E6CD0D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {2B2AFDCB-BD41-4855-BCB0-B675B8E6CD0D}.Checked|Any CPU.Build.0 = Debug|Any CPU
{2B2AFDCB-BD41-4855-BCB0-B675B8E6CD0D}.Checked|x64.ActiveCfg = Debug|Any CPU
- {2B2AFDCB-BD41-4855-BCB0-B675B8E6CD0D}.Checked|x64.Build.0 = Debug|Any CPU
{2B2AFDCB-BD41-4855-BCB0-B675B8E6CD0D}.Checked|x86.ActiveCfg = Debug|Any CPU
- {2B2AFDCB-BD41-4855-BCB0-B675B8E6CD0D}.Checked|x86.Build.0 = Debug|Any CPU
{05AA43B5-733A-43EF-8CE5-8BF4A18BD516}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{05AA43B5-733A-43EF-8CE5-8BF4A18BD516}.Debug|Any CPU.Build.0 = Debug|Any CPU
{05AA43B5-733A-43EF-8CE5-8BF4A18BD516}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -153,11 +143,8 @@ Global
{05AA43B5-733A-43EF-8CE5-8BF4A18BD516}.Release|x86.ActiveCfg = Release|Any CPU
{05AA43B5-733A-43EF-8CE5-8BF4A18BD516}.Release|x86.Build.0 = Release|Any CPU
{05AA43B5-733A-43EF-8CE5-8BF4A18BD516}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {05AA43B5-733A-43EF-8CE5-8BF4A18BD516}.Checked|Any CPU.Build.0 = Debug|Any CPU
{05AA43B5-733A-43EF-8CE5-8BF4A18BD516}.Checked|x64.ActiveCfg = Debug|Any CPU
- {05AA43B5-733A-43EF-8CE5-8BF4A18BD516}.Checked|x64.Build.0 = Debug|Any CPU
{05AA43B5-733A-43EF-8CE5-8BF4A18BD516}.Checked|x86.ActiveCfg = Debug|Any CPU
- {05AA43B5-733A-43EF-8CE5-8BF4A18BD516}.Checked|x86.Build.0 = Debug|Any CPU
{5B121A9E-061D-4FED-AA3A-26054F41E2B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5B121A9E-061D-4FED-AA3A-26054F41E2B4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5B121A9E-061D-4FED-AA3A-26054F41E2B4}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -171,11 +158,8 @@ Global
{5B121A9E-061D-4FED-AA3A-26054F41E2B4}.Release|x86.ActiveCfg = Release|Any CPU
{5B121A9E-061D-4FED-AA3A-26054F41E2B4}.Release|x86.Build.0 = Release|Any CPU
{5B121A9E-061D-4FED-AA3A-26054F41E2B4}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {5B121A9E-061D-4FED-AA3A-26054F41E2B4}.Checked|Any CPU.Build.0 = Debug|Any CPU
{5B121A9E-061D-4FED-AA3A-26054F41E2B4}.Checked|x64.ActiveCfg = Debug|Any CPU
- {5B121A9E-061D-4FED-AA3A-26054F41E2B4}.Checked|x64.Build.0 = Debug|Any CPU
{5B121A9E-061D-4FED-AA3A-26054F41E2B4}.Checked|x86.ActiveCfg = Debug|Any CPU
- {5B121A9E-061D-4FED-AA3A-26054F41E2B4}.Checked|x86.Build.0 = Debug|Any CPU
{6ED522FD-D0B0-4574-8F1A-82D339C7D0D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6ED522FD-D0B0-4574-8F1A-82D339C7D0D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6ED522FD-D0B0-4574-8F1A-82D339C7D0D3}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -189,11 +173,23 @@ Global
{6ED522FD-D0B0-4574-8F1A-82D339C7D0D3}.Release|x86.ActiveCfg = Release|Any CPU
{6ED522FD-D0B0-4574-8F1A-82D339C7D0D3}.Release|x86.Build.0 = Release|Any CPU
{6ED522FD-D0B0-4574-8F1A-82D339C7D0D3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {6ED522FD-D0B0-4574-8F1A-82D339C7D0D3}.Checked|Any CPU.Build.0 = Debug|Any CPU
{6ED522FD-D0B0-4574-8F1A-82D339C7D0D3}.Checked|x64.ActiveCfg = Debug|Any CPU
- {6ED522FD-D0B0-4574-8F1A-82D339C7D0D3}.Checked|x64.Build.0 = Debug|Any CPU
{6ED522FD-D0B0-4574-8F1A-82D339C7D0D3}.Checked|x86.ActiveCfg = Debug|Any CPU
- {6ED522FD-D0B0-4574-8F1A-82D339C7D0D3}.Checked|x86.Build.0 = Debug|Any CPU
+ {6F3A9E91-34B5-4656-B74E-7D97D190357F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6F3A9E91-34B5-4656-B74E-7D97D190357F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6F3A9E91-34B5-4656-B74E-7D97D190357F}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {6F3A9E91-34B5-4656-B74E-7D97D190357F}.Debug|x64.Build.0 = Debug|Any CPU
+ {6F3A9E91-34B5-4656-B74E-7D97D190357F}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {6F3A9E91-34B5-4656-B74E-7D97D190357F}.Debug|x86.Build.0 = Debug|Any CPU
+ {6F3A9E91-34B5-4656-B74E-7D97D190357F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6F3A9E91-34B5-4656-B74E-7D97D190357F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6F3A9E91-34B5-4656-B74E-7D97D190357F}.Release|x64.ActiveCfg = Release|Any CPU
+ {6F3A9E91-34B5-4656-B74E-7D97D190357F}.Release|x64.Build.0 = Release|Any CPU
+ {6F3A9E91-34B5-4656-B74E-7D97D190357F}.Release|x86.ActiveCfg = Release|Any CPU
+ {6F3A9E91-34B5-4656-B74E-7D97D190357F}.Release|x86.Build.0 = Release|Any CPU
+ {6F3A9E91-34B5-4656-B74E-7D97D190357F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {6F3A9E91-34B5-4656-B74E-7D97D190357F}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {6F3A9E91-34B5-4656-B74E-7D97D190357F}.Checked|x86.ActiveCfg = Debug|Any CPU
{8CCE7756-F004-4EF2-ABCE-0DDD03D5BE04}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8CCE7756-F004-4EF2-ABCE-0DDD03D5BE04}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8CCE7756-F004-4EF2-ABCE-0DDD03D5BE04}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -207,11 +203,8 @@ Global
{8CCE7756-F004-4EF2-ABCE-0DDD03D5BE04}.Release|x86.ActiveCfg = Release|Any CPU
{8CCE7756-F004-4EF2-ABCE-0DDD03D5BE04}.Release|x86.Build.0 = Release|Any CPU
{8CCE7756-F004-4EF2-ABCE-0DDD03D5BE04}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {8CCE7756-F004-4EF2-ABCE-0DDD03D5BE04}.Checked|Any CPU.Build.0 = Debug|Any CPU
{8CCE7756-F004-4EF2-ABCE-0DDD03D5BE04}.Checked|x64.ActiveCfg = Debug|Any CPU
- {8CCE7756-F004-4EF2-ABCE-0DDD03D5BE04}.Checked|x64.Build.0 = Debug|Any CPU
{8CCE7756-F004-4EF2-ABCE-0DDD03D5BE04}.Checked|x86.ActiveCfg = Debug|Any CPU
- {8CCE7756-F004-4EF2-ABCE-0DDD03D5BE04}.Checked|x86.Build.0 = Debug|Any CPU
{99BC2F73-199C-4E97-B247-FA99AEC9E24A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{99BC2F73-199C-4E97-B247-FA99AEC9E24A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{99BC2F73-199C-4E97-B247-FA99AEC9E24A}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -225,11 +218,8 @@ Global
{99BC2F73-199C-4E97-B247-FA99AEC9E24A}.Release|x86.ActiveCfg = Release|Any CPU
{99BC2F73-199C-4E97-B247-FA99AEC9E24A}.Release|x86.Build.0 = Release|Any CPU
{99BC2F73-199C-4E97-B247-FA99AEC9E24A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {99BC2F73-199C-4E97-B247-FA99AEC9E24A}.Checked|Any CPU.Build.0 = Debug|Any CPU
{99BC2F73-199C-4E97-B247-FA99AEC9E24A}.Checked|x64.ActiveCfg = Debug|Any CPU
- {99BC2F73-199C-4E97-B247-FA99AEC9E24A}.Checked|x64.Build.0 = Debug|Any CPU
{99BC2F73-199C-4E97-B247-FA99AEC9E24A}.Checked|x86.ActiveCfg = Debug|Any CPU
- {99BC2F73-199C-4E97-B247-FA99AEC9E24A}.Checked|x86.Build.0 = Debug|Any CPU
{BEE502AC-7208-4289-BAFD-57EBE4A4F188}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BEE502AC-7208-4289-BAFD-57EBE4A4F188}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BEE502AC-7208-4289-BAFD-57EBE4A4F188}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -243,11 +233,8 @@ Global
{BEE502AC-7208-4289-BAFD-57EBE4A4F188}.Release|x86.ActiveCfg = Release|Any CPU
{BEE502AC-7208-4289-BAFD-57EBE4A4F188}.Release|x86.Build.0 = Release|Any CPU
{BEE502AC-7208-4289-BAFD-57EBE4A4F188}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {BEE502AC-7208-4289-BAFD-57EBE4A4F188}.Checked|Any CPU.Build.0 = Debug|Any CPU
{BEE502AC-7208-4289-BAFD-57EBE4A4F188}.Checked|x64.ActiveCfg = Debug|Any CPU
- {BEE502AC-7208-4289-BAFD-57EBE4A4F188}.Checked|x64.Build.0 = Debug|Any CPU
{BEE502AC-7208-4289-BAFD-57EBE4A4F188}.Checked|x86.ActiveCfg = Debug|Any CPU
- {BEE502AC-7208-4289-BAFD-57EBE4A4F188}.Checked|x86.Build.0 = Debug|Any CPU
{4A78077F-DE68-42B4-8C95-A6254A4F4194}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4A78077F-DE68-42B4-8C95-A6254A4F4194}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4A78077F-DE68-42B4-8C95-A6254A4F4194}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -261,11 +248,8 @@ Global
{4A78077F-DE68-42B4-8C95-A6254A4F4194}.Release|x86.ActiveCfg = Release|Any CPU
{4A78077F-DE68-42B4-8C95-A6254A4F4194}.Release|x86.Build.0 = Release|Any CPU
{4A78077F-DE68-42B4-8C95-A6254A4F4194}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {4A78077F-DE68-42B4-8C95-A6254A4F4194}.Checked|Any CPU.Build.0 = Debug|Any CPU
{4A78077F-DE68-42B4-8C95-A6254A4F4194}.Checked|x64.ActiveCfg = Debug|Any CPU
- {4A78077F-DE68-42B4-8C95-A6254A4F4194}.Checked|x64.Build.0 = Debug|Any CPU
{4A78077F-DE68-42B4-8C95-A6254A4F4194}.Checked|x86.ActiveCfg = Debug|Any CPU
- {4A78077F-DE68-42B4-8C95-A6254A4F4194}.Checked|x86.Build.0 = Debug|Any CPU
{C4E264C7-91E7-4100-BA47-47CB12964025}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C4E264C7-91E7-4100-BA47-47CB12964025}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C4E264C7-91E7-4100-BA47-47CB12964025}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -279,11 +263,8 @@ Global
{C4E264C7-91E7-4100-BA47-47CB12964025}.Release|x86.ActiveCfg = Release|Any CPU
{C4E264C7-91E7-4100-BA47-47CB12964025}.Release|x86.Build.0 = Release|Any CPU
{C4E264C7-91E7-4100-BA47-47CB12964025}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {C4E264C7-91E7-4100-BA47-47CB12964025}.Checked|Any CPU.Build.0 = Debug|Any CPU
{C4E264C7-91E7-4100-BA47-47CB12964025}.Checked|x64.ActiveCfg = Debug|Any CPU
- {C4E264C7-91E7-4100-BA47-47CB12964025}.Checked|x64.Build.0 = Debug|Any CPU
{C4E264C7-91E7-4100-BA47-47CB12964025}.Checked|x86.ActiveCfg = Debug|Any CPU
- {C4E264C7-91E7-4100-BA47-47CB12964025}.Checked|x86.Build.0 = Debug|Any CPU
{4CC07275-112D-416B-BEAA-106DA64D5B35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4CC07275-112D-416B-BEAA-106DA64D5B35}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4CC07275-112D-416B-BEAA-106DA64D5B35}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -297,11 +278,8 @@ Global
{4CC07275-112D-416B-BEAA-106DA64D5B35}.Release|x86.ActiveCfg = Release|Any CPU
{4CC07275-112D-416B-BEAA-106DA64D5B35}.Release|x86.Build.0 = Release|Any CPU
{4CC07275-112D-416B-BEAA-106DA64D5B35}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {4CC07275-112D-416B-BEAA-106DA64D5B35}.Checked|Any CPU.Build.0 = Debug|Any CPU
{4CC07275-112D-416B-BEAA-106DA64D5B35}.Checked|x64.ActiveCfg = Debug|Any CPU
- {4CC07275-112D-416B-BEAA-106DA64D5B35}.Checked|x64.Build.0 = Debug|Any CPU
{4CC07275-112D-416B-BEAA-106DA64D5B35}.Checked|x86.ActiveCfg = Debug|Any CPU
- {4CC07275-112D-416B-BEAA-106DA64D5B35}.Checked|x86.Build.0 = Debug|Any CPU
{C61770DF-C267-4B18-8822-D9C062FE806E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C61770DF-C267-4B18-8822-D9C062FE806E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C61770DF-C267-4B18-8822-D9C062FE806E}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -315,11 +293,8 @@ Global
{C61770DF-C267-4B18-8822-D9C062FE806E}.Release|x86.ActiveCfg = Release|Any CPU
{C61770DF-C267-4B18-8822-D9C062FE806E}.Release|x86.Build.0 = Release|Any CPU
{C61770DF-C267-4B18-8822-D9C062FE806E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {C61770DF-C267-4B18-8822-D9C062FE806E}.Checked|Any CPU.Build.0 = Debug|Any CPU
{C61770DF-C267-4B18-8822-D9C062FE806E}.Checked|x64.ActiveCfg = Debug|Any CPU
- {C61770DF-C267-4B18-8822-D9C062FE806E}.Checked|x64.Build.0 = Debug|Any CPU
{C61770DF-C267-4B18-8822-D9C062FE806E}.Checked|x86.ActiveCfg = Debug|Any CPU
- {C61770DF-C267-4B18-8822-D9C062FE806E}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -335,6 +310,7 @@ Global
{5B121A9E-061D-4FED-AA3A-26054F41E2B4} = {8D1E1DF1-BE04-43F9-8D9D-E73AAB20C311}
{56152EDC-93D5-4065-BBAC-C844BA02D1B3} = {E1E2C99D-07AE-4C22-A2E1-B807B1AE61AF}
{2B2AFDCB-BD41-4855-BCB0-B675B8E6CD0D} = {E1E2C99D-07AE-4C22-A2E1-B807B1AE61AF}
+ {6F3A9E91-34B5-4656-B74E-7D97D190357F} = {E1E2C99D-07AE-4C22-A2E1-B807B1AE61AF}
{4A78077F-DE68-42B4-8C95-A6254A4F4194} = {E1E2C99D-07AE-4C22-A2E1-B807B1AE61AF}
{4CC07275-112D-416B-BEAA-106DA64D5B35} = {E1E2C99D-07AE-4C22-A2E1-B807B1AE61AF}
{6ED522FD-D0B0-4574-8F1A-82D339C7D0D3} = {A2474395-2701-4B91-A097-985495EFE750}
diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/ref/System.Diagnostics.DiagnosticSource.cs b/src/libraries/System.Diagnostics.DiagnosticSource/ref/System.Diagnostics.DiagnosticSource.cs
index 75b85af1913..1b08291cccd 100644
--- a/src/libraries/System.Diagnostics.DiagnosticSource/ref/System.Diagnostics.DiagnosticSource.cs
+++ b/src/libraries/System.Diagnostics.DiagnosticSource/ref/System.Diagnostics.DiagnosticSource.cs
@@ -20,7 +20,6 @@ namespace System.Diagnostics
public virtual System.IDisposable Subscribe(System.IObserver<System.Collections.Generic.KeyValuePair<string, object?>> observer, System.Predicate<string>? isEnabled) { throw null; }
public override string ToString() { throw null; }
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The type of object being written to DiagnosticSource cannot be discovered statically.")]
- [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("DiagnosticSource may require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")]
public override void Write(string name, object? value) { }
}
public abstract partial class DiagnosticSource
@@ -29,7 +28,6 @@ namespace System.Diagnostics
public abstract bool IsEnabled(string name);
public virtual bool IsEnabled(string name, object? arg1, object? arg2 = null) { throw null; }
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The type of object being written to DiagnosticSource cannot be discovered statically.")]
- [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("DiagnosticSource may require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")]
public abstract void Write(string name, object? value);
}
}
diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/ref/System.Diagnostics.DiagnosticSourceActivity.cs b/src/libraries/System.Diagnostics.DiagnosticSource/ref/System.Diagnostics.DiagnosticSourceActivity.cs
index 5177cb52339..488e6c39224 100644
--- a/src/libraries/System.Diagnostics.DiagnosticSource/ref/System.Diagnostics.DiagnosticSourceActivity.cs
+++ b/src/libraries/System.Diagnostics.DiagnosticSource/ref/System.Diagnostics.DiagnosticSourceActivity.cs
@@ -197,10 +197,8 @@ namespace System.Diagnostics
public virtual void OnActivityExport(System.Diagnostics.Activity activity, object? payload) { }
public virtual void OnActivityImport(System.Diagnostics.Activity activity, object? payload) { }
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The type of object being written to DiagnosticSource cannot be discovered statically.")]
- [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("DiagnosticSource may require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")]
public System.Diagnostics.Activity StartActivity(System.Diagnostics.Activity activity, object? args) { throw null; }
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The type of object being written to DiagnosticSource cannot be discovered statically.")]
- [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("DiagnosticSource may require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")]
public void StopActivity(System.Diagnostics.Activity activity, object? args) { }
}
public enum ActivitySamplingResult
diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System.Diagnostics.DiagnosticSource.csproj b/src/libraries/System.Diagnostics.DiagnosticSource/src/System.Diagnostics.DiagnosticSource.csproj
index 9c22bce30da..4c20a734699 100644
--- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System.Diagnostics.DiagnosticSource.csproj
+++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System.Diagnostics.DiagnosticSource.csproj
@@ -6,8 +6,6 @@
<NoWarn>$(NoWarn);SA1205;CA1845</NoWarn>
<EnableTrimAnalyzer Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) == '.NETFramework'">false</EnableTrimAnalyzer>
<IsPackable>true</IsPackable>
- <!-- Lifetime rules introduced in C# 11 impact scenarios in net6 framework -->
- <LangVersion Condition="'$(TargetFramework)' == 'net6.0'">10</LangVersion>
<EnableAOTAnalyzer>true</EnableAOTAnalyzer>
<PackageDescription>Provides Classes that allow you to decouple code logging rich (unserializable) diagnostics/telemetry (e.g. framework) from code that consumes it (e.g. tools)
@@ -87,6 +85,8 @@ System.Diagnostics.DiagnosticSource</PackageDescription>
<Compile Include="System\Diagnostics\System.Diagnostics.DiagnosticSource.Typeforwards.netcoreapp.cs" />
<Compile Include="$(CommonPath)System\LocalAppContextSwitches.Common.cs"
Link="Common\System\LocalAppContextSwitches.Common.cs" />
+ <Compile Include="$(CommonPath)System\Text\ValueStringBuilder.cs"
+ Link="Common\System\Text\ValueStringBuilder.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticListener.cs b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticListener.cs
index 75a7116c58f..c1677307acb 100644
--- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticListener.cs
+++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticListener.cs
@@ -34,8 +34,6 @@ namespace System.Diagnostics
/// </summary>
public static IObservable<DiagnosticListener> AllListeners
{
- [UnconditionalSuppressMessage("AotAnalysis", "IL3050:RequiresDynamicCode",
- Justification = "ENABLE_HTTP_HANDLER is not enabled in the .NET current version")]
get
{
#if ENABLE_HTTP_HANDLER
@@ -255,7 +253,6 @@ namespace System.Diagnostics
/// Override abstract method
/// </summary>
[RequiresUnreferencedCode(WriteRequiresUnreferencedCode)]
- [RequiresDynamicCode(WriteRequiresDynamicCode)]
public override void Write(string name, object? value)
{
for (DiagnosticSubscription? curSubscription = _subscriptions; curSubscription != null; curSubscription = curSubscription.Next)
diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticSource.cs b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticSource.cs
index 47fad270bab..89e62d4102c 100644
--- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticSource.cs
+++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticSource.cs
@@ -17,7 +17,6 @@ namespace System.Diagnostics
public abstract partial class DiagnosticSource
{
internal const string WriteRequiresUnreferencedCode = "The type of object being written to DiagnosticSource cannot be discovered statically.";
- internal const string WriteRequiresDynamicCode = "DiagnosticSource may require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.";
/// <summary>
/// Write is a generic way of logging complex payloads. Each notification
@@ -36,7 +35,6 @@ namespace System.Diagnostics
/// <param name="value">An object that represent the value being passed as a payload for the event.
/// This is often an anonymous type which contains several sub-values.</param>
[RequiresUnreferencedCode(WriteRequiresUnreferencedCode)]
- [RequiresDynamicCode(WriteRequiresDynamicCode)]
public abstract void Write(string name, object? value);
/// <summary>
diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticSourceActivity.cs b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticSourceActivity.cs
index 1156ed5fe3e..5bf9fa66916 100644
--- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticSourceActivity.cs
+++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticSourceActivity.cs
@@ -26,7 +26,6 @@ namespace System.Diagnostics
/// <returns>Started Activity for convenient chaining</returns>
/// <seealso cref="Activity"/>
[RequiresUnreferencedCode(WriteRequiresUnreferencedCode)]
- [RequiresDynamicCode(WriteRequiresDynamicCode)]
public Activity StartActivity(Activity activity, object? args)
{
activity.Start();
@@ -45,7 +44,6 @@ namespace System.Diagnostics
/// <param name="args">An object that represent the value being passed as a payload for the event.</param>
/// <seealso cref="Activity"/>
[RequiresUnreferencedCode(WriteRequiresUnreferencedCode)]
- [RequiresDynamicCode(WriteRequiresDynamicCode)]
public void StopActivity(Activity activity, object? args)
{
// Stop sets the end time if it was unset, but we want it set before we issue the write
diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticSourceEventSource.cs b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticSourceEventSource.cs
index b1b78fedc80..73b3ed529f0 100644
--- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticSourceEventSource.cs
+++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticSourceEventSource.cs
@@ -1,5 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
@@ -234,7 +235,8 @@ namespace System.Diagnostics
/// Events from DiagnosticSource can be forwarded to EventSource using this event.
/// </summary>
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode",
- Justification = "Arguments parameter is trimmer safe")]
+ Justification = "Arguments parameter is preserved by DynamicDependency")]
+ [DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties, typeof(KeyValuePair<,>))]
[Event(2, Keywords = Keywords.Events)]
private void Event(string SourceName, string EventName, IEnumerable<KeyValuePair<string, string?>>? Arguments)
{
@@ -255,7 +257,8 @@ namespace System.Diagnostics
/// Used to mark the beginning of an activity
/// </summary>
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode",
- Justification = "Arguments parameter is trimmer safe")]
+ Justification = "Arguments parameter is preserved by DynamicDependency")]
+ [DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties, typeof(KeyValuePair<,>))]
[Event(4, Keywords = Keywords.Events)]
private void Activity1Start(string SourceName, string EventName, IEnumerable<KeyValuePair<string, string?>> Arguments)
{
@@ -266,7 +269,8 @@ namespace System.Diagnostics
/// Used to mark the end of an activity
/// </summary>
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode",
- Justification = "Arguments parameter is trimmer safe")]
+ Justification = "Arguments parameter is preserved by DynamicDependency")]
+ [DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties, typeof(KeyValuePair<,>))]
[Event(5, Keywords = Keywords.Events)]
private void Activity1Stop(string SourceName, string EventName, IEnumerable<KeyValuePair<string, string?>> Arguments)
{
@@ -277,7 +281,8 @@ namespace System.Diagnostics
/// Used to mark the beginning of an activity
/// </summary>
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode",
- Justification = "Arguments parameter is trimmer safe")]
+ Justification = "Arguments parameter is preserved by DynamicDependency")]
+ [DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties, typeof(KeyValuePair<,>))]
[Event(6, Keywords = Keywords.Events)]
private void Activity2Start(string SourceName, string EventName, IEnumerable<KeyValuePair<string, string?>> Arguments)
{
@@ -288,7 +293,8 @@ namespace System.Diagnostics
/// Used to mark the end of an activity that can be recursive.
/// </summary>
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode",
- Justification = "Arguments parameter is trimmer safe")]
+ Justification = "Arguments parameter is preserved by DynamicDependency")]
+ [DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties, typeof(KeyValuePair<,>))]
[Event(7, Keywords = Keywords.Events)]
private void Activity2Stop(string SourceName, string EventName, IEnumerable<KeyValuePair<string, string?>> Arguments)
{
@@ -299,7 +305,8 @@ namespace System.Diagnostics
/// Used to mark the beginning of an activity
/// </summary>
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode",
- Justification = "Arguments parameter is trimmer safe")]
+ Justification = "Arguments parameter is preserved by DynamicDependency")]
+ [DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties, typeof(KeyValuePair<,>))]
[Event(8, Keywords = Keywords.Events, ActivityOptions = EventActivityOptions.Recursive)]
private void RecursiveActivity1Start(string SourceName, string EventName, IEnumerable<KeyValuePair<string, string?>> Arguments)
{
@@ -310,7 +317,8 @@ namespace System.Diagnostics
/// Used to mark the end of an activity that can be recursive.
/// </summary>
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode",
- Justification = "Arguments parameter is trimmer safe")]
+ Justification = "Arguments parameter is preserved by DynamicDependency")]
+ [DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties, typeof(KeyValuePair<,>))]
[Event(9, Keywords = Keywords.Events, ActivityOptions = EventActivityOptions.Recursive)]
private void RecursiveActivity1Stop(string SourceName, string EventName, IEnumerable<KeyValuePair<string, string?>> Arguments)
{
@@ -334,7 +342,8 @@ namespace System.Diagnostics
/// <param name="ActivityName">The Activity name</param>
/// <param name="Arguments">Name and value pairs of the Activity properties</param>
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode",
- Justification = "Arguments parameter is trimmer safe")]
+ Justification = "Arguments parameter is preserved by DynamicDependency")]
+ [DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties, typeof(KeyValuePair<,>))]
[Event(11, Keywords = Keywords.Events, ActivityOptions = EventActivityOptions.Recursive)]
private void ActivityStart(string SourceName, string ActivityName, IEnumerable<KeyValuePair<string, string?>> Arguments) =>
WriteEvent(11, SourceName, ActivityName, Arguments);
@@ -346,7 +355,8 @@ namespace System.Diagnostics
/// <param name="ActivityName">The Activity name</param>
/// <param name="Arguments">Name and value pairs of the Activity properties</param>
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode",
- Justification = "Arguments parameter is trimmer safe")]
+ Justification = "Arguments parameter is preserved by DynamicDependency")]
+ [DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties, typeof(KeyValuePair<,>))]
[Event(12, Keywords = Keywords.Events, ActivityOptions = EventActivityOptions.Recursive)]
private void ActivityStop(string SourceName, string ActivityName, IEnumerable<KeyValuePair<string, string?>> Arguments) =>
WriteEvent(12, SourceName, ActivityName, Arguments);
@@ -641,8 +651,6 @@ namespace System.Diagnostics
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2119",
Justification = "DAM on EventSource references this compiler-generated local function which calls a " +
"method that requires unreferenced code. EventSource will not access this local function.")]
- [UnconditionalSuppressMessage("AotAnalysis", "IL3050:RequiresDynamicCode",
- Justification = "DiagnosticSource.Write is marked with RequiresDynamicCode.")]
void OnEventWritten(KeyValuePair<string, object?> evnt)
{
// The filter given to the DiagnosticSource may not work if users don't is 'IsEnabled' as expected.
@@ -890,8 +898,6 @@ namespace System.Diagnostics
[DynamicDependency(nameof(TimeSpan.Ticks), typeof(TimeSpan))]
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode",
Justification = "Activity's properties are being preserved with the DynamicDependencies on OnActivityStarted.")]
- [UnconditionalSuppressMessage("AotAnalysis", "IL3050:RequiresDynamicCode",
- Justification = "Activity is a reference type and is safe in aot.")]
private static void OnActivityStarted(DiagnosticSourceEventSource eventSource, Activity activity)
{
FilterAndTransform? list = eventSource._activitySourceSpecs;
@@ -911,8 +917,6 @@ namespace System.Diagnostics
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode",
Justification = "Activity's properties are being preserved with the DynamicDependencies on OnActivityStarted.")]
- [UnconditionalSuppressMessage("AotAnalysis", "IL3050:RequiresDynamicCode",
- Justification = "Activity is a reference type and is safe with aot.")]
private static void OnActivityStopped(DiagnosticSourceEventSource eventSource, Activity activity)
{
FilterAndTransform? list = eventSource._activitySourceSpecs;
@@ -1015,7 +1019,6 @@ namespace System.Diagnostics
Justification = "In EventSource, EnsureDescriptorsInitialized's use of GetType preserves this method which " +
"requires unreferenced code, but EnsureDescriptorsInitialized does not access this member and is safe to call.")]
[RequiresUnreferencedCode(DiagnosticSource.WriteRequiresUnreferencedCode)]
- [RequiresDynamicCode(DiagnosticSource.WriteRequiresDynamicCode)]
public List<KeyValuePair<string, string?>> Morph(object? args)
{
// Transform the args into a bag of key-value strings.
@@ -1193,7 +1196,6 @@ namespace System.Diagnostics
Justification = "In EventSource, EnsureDescriptorsInitialized's use of GetType preserves this method which " +
"requires unreferenced code, but EnsureDescriptorsInitialized does not access this member and is safe to call.")]
[RequiresUnreferencedCode(DiagnosticSource.WriteRequiresUnreferencedCode)]
- [RequiresDynamicCode(DiagnosticSource.WriteRequiresDynamicCode)]
public KeyValuePair<string, string?> Morph(object? obj)
{
for (PropertySpec? cur = _fetches; cur != null; cur = cur.Next)
@@ -1248,7 +1250,6 @@ namespace System.Diagnostics
Justification = "In EventSource, EnsureDescriptorsInitialized's use of GetType preserves this method which " +
"requires unreferenced code, but EnsureDescriptorsInitialized does not access this member and is safe to call.")]
[RequiresUnreferencedCode(DiagnosticSource.WriteRequiresUnreferencedCode)]
- [RequiresDynamicCode(DiagnosticSource.WriteRequiresDynamicCode)]
public object? Fetch(object? obj)
{
PropertyFetch? fetch = _fetchForExpectedType;
@@ -1295,7 +1296,6 @@ namespace System.Diagnostics
Justification = "In EventSource, EnsureDescriptorsInitialized's use of GetType preserves this method which " +
"requires unreferenced code, but EnsureDescriptorsInitialized does not access this member and is safe to call.")]
[RequiresUnreferencedCode(DiagnosticSource.WriteRequiresUnreferencedCode)]
- [RequiresDynamicCode(DiagnosticSource.WriteRequiresDynamicCode)]
public static PropertyFetch FetcherForProperty(Type? type, string propertyName)
{
if (propertyName == null)
@@ -1319,10 +1319,7 @@ namespace System.Diagnostics
continue;
}
- Type elemType = iFaceTypeInfo.GetGenericArguments()[0];
- Type instantiatedTypedPropertyFetcher = typeof(EnumeratePropertyFetch<>)
- .GetTypeInfo().MakeGenericType(elemType);
- return (PropertyFetch)Activator.CreateInstance(instantiatedTypedPropertyFetcher, type)!;
+ return CreateEnumeratePropertyFetch(type, iFaceTypeInfo);
}
// no implementation of IEnumerable<T> found, return a null fetcher
@@ -1355,20 +1352,50 @@ namespace System.Diagnostics
Log.Message($"Property {propertyName} is static.");
return new PropertyFetch(type);
}
- Type typedPropertyFetcher = typeInfo.IsValueType ?
- typeof(ValueTypedFetchProperty<,>) : typeof(RefTypedFetchProperty<,>);
- Type instantiatedTypedPropertyFetcher = typedPropertyFetcher.GetTypeInfo().MakeGenericType(
- propertyInfo.DeclaringType!, propertyInfo.PropertyType);
- return (PropertyFetch)Activator.CreateInstance(instantiatedTypedPropertyFetcher, type, propertyInfo)!;
+
+ return CreatePropertyFetch(typeInfo, propertyInfo);
}
}
+ [UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode",
+ Justification = "MakeGenericType is only called when IsDynamicCodeSupported is true or only with ref types.")]
+ private static PropertyFetch CreateEnumeratePropertyFetch(Type type, Type enumerableOfTType)
+ {
+ Type elemType = enumerableOfTType.GetGenericArguments()[0];
+#if NETCOREAPP
+ if (!RuntimeFeature.IsDynamicCodeSupported && elemType.IsValueType)
+ {
+ return new EnumeratePropertyFetch(type);
+ }
+#endif
+ Type instantiatedTypedPropertyFetcher = typeof(EnumeratePropertyFetch<>)
+ .GetTypeInfo().MakeGenericType(elemType);
+ return (PropertyFetch)Activator.CreateInstance(instantiatedTypedPropertyFetcher, type)!;
+ }
+
+ [UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode",
+ Justification = "MakeGenericType is only called when IsDynamicCodeSupported is true or only with ref types.")]
+ private static PropertyFetch CreatePropertyFetch(Type type, PropertyInfo propertyInfo)
+ {
+#if NETCOREAPP
+ if (!RuntimeFeature.IsDynamicCodeSupported && (propertyInfo.DeclaringType!.IsValueType || propertyInfo.PropertyType.IsValueType))
+ {
+ return new ReflectionPropertyFetch(type, propertyInfo);
+ }
+#endif
+ Type typedPropertyFetcher = type.IsValueType ?
+ typeof(ValueTypedFetchProperty<,>) : typeof(RefTypedFetchProperty<,>);
+ Type instantiatedTypedPropertyFetcher = typedPropertyFetcher.GetTypeInfo().MakeGenericType(
+ propertyInfo.DeclaringType!, propertyInfo.PropertyType);
+ return (PropertyFetch)Activator.CreateInstance(instantiatedTypedPropertyFetcher, type, propertyInfo)!;
+ }
+
/// <summary>
/// Given an object, fetch the property that this propertyFech represents.
/// </summary>
public virtual object? Fetch(object? obj) { return null; }
- #region private
+#region private
private sealed class RefTypedFetchProperty<TObject, TProperty> : PropertyFetch
{
@@ -1407,6 +1434,74 @@ namespace System.Diagnostics
private readonly StructFunc<TStruct, TProperty> _propertyFetch;
}
+#if NETCOREAPP
+ /// <summary>
+ /// A fetcher that can be used when MakeGenericType isn't available.
+ /// </summary>
+ private sealed class ReflectionPropertyFetch : PropertyFetch
+ {
+ private readonly PropertyInfo _property;
+ public ReflectionPropertyFetch(Type type, PropertyInfo property) : base(type)
+ {
+ _property = property;
+ }
+
+ public override object? Fetch(object? obj) => _property.GetValue(obj);
+ }
+
+ /// <summary>
+ /// A fetcher that enumerates and formats an IEnumerable when MakeGenericType isn't available.
+ /// </summary>
+ private sealed class EnumeratePropertyFetch : PropertyFetch
+ {
+ public EnumeratePropertyFetch(Type type) : base(type) { }
+
+ public override object? Fetch(object? obj)
+ {
+ IEnumerable? enumerable = obj as IEnumerable;
+ Debug.Assert(enumerable is not null);
+
+ // string.Join for a non-generic IEnumerable
+ IEnumerator en = enumerable.GetEnumerator();
+ using (IDisposable? disposable = en as IDisposable)
+ {
+ if (!en.MoveNext())
+ {
+ return string.Empty;
+ }
+
+ object? currentValue = en.Current;
+ string? firstString = currentValue?.ToString();
+
+ // If there's only 1 item, simply return the ToString of that
+ if (!en.MoveNext())
+ {
+ // Only one value available
+ return firstString ?? string.Empty;
+ }
+
+ var result = new ValueStringBuilder(stackalloc char[256]);
+
+ result.Append(firstString);
+
+ do
+ {
+ currentValue = en.Current;
+
+ result.Append(",");
+ if (currentValue != null)
+ {
+ result.Append(currentValue.ToString());
+ }
+ }
+ while (en.MoveNext());
+
+ return result.ToString();
+ }
+ }
+ }
+#endif
+
/// <summary>
/// A fetcher that returns the result of Activity.Current
/// </summary>
@@ -1431,17 +1526,17 @@ namespace System.Diagnostics
return string.Join(",", (IEnumerable<ElementType>)obj);
}
}
- #endregion
+#endregion
}
private readonly string _propertyName;
private volatile PropertyFetch? _fetchForExpectedType;
- #endregion
+#endregion
}
private readonly string _outputName = null!;
private readonly PropertySpec? _fetches;
- #endregion
+#endregion
}
/// <summary>
@@ -1454,13 +1549,13 @@ namespace System.Diagnostics
{
public CallbackObserver(Action<T> callback) { _callback = callback; }
- #region private
+#region private
public void OnCompleted() { }
public void OnError(Exception error) { }
public void OnNext(T value) { _callback(value); }
private readonly Action<T> _callback;
- #endregion
+#endregion
}
// A linked list of IObservable subscriptions (which are IDisposable).
@@ -1477,11 +1572,11 @@ namespace System.Diagnostics
public Subscriptions? Next;
}
- #endregion
+#endregion
private FilterAndTransform? _specs; // Transformation specifications that indicate which sources/events are forwarded.
private FilterAndTransform? _activitySourceSpecs; // ActivitySource Transformation specifications that indicate which sources/events are forwarded.
private ActivityListener? _activityListener;
- #endregion
+#endregion
}
}
diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/HttpHandlerDiagnosticListener.cs b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/HttpHandlerDiagnosticListener.cs
index a35ea9ce580..94d4192721c 100644
--- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/HttpHandlerDiagnosticListener.cs
+++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/HttpHandlerDiagnosticListener.cs
@@ -25,7 +25,6 @@ namespace System.Diagnostics
/// when it sees the System.Net.Http.Desktop source, subscribe to it. This will trigger the
/// initialization of this DiagnosticListener.
/// </summary>
- [RequiresDynamicCode(WriteRequiresDynamicCode)]
internal sealed class HttpHandlerDiagnosticListener : DiagnosticListener
{
/// <summary>
@@ -204,7 +203,6 @@ namespace System.Diagnostics
/// intercept each new ServicePoint object being added to ServicePointManager.s_ServicePointTable
/// and replace its ConnectionGroupList hashtable field.
/// </summary>
- [RequiresDynamicCode(WriteRequiresDynamicCode)]
private sealed class ServicePointHashtable : HashtableWrapper
{
public ServicePointHashtable(Hashtable table) : base(table)
@@ -245,7 +243,6 @@ namespace System.Diagnostics
/// intercept each new ConnectionGroup object being added to ServicePoint.m_ConnectionGroupList
/// and replace its m_ConnectionList arraylist field.
/// </summary>
- [RequiresDynamicCode(WriteRequiresDynamicCode)]
private sealed class ConnectionGroupHashtable : HashtableWrapper
{
public ConnectionGroupHashtable(Hashtable table) : base(table)
@@ -485,7 +482,6 @@ namespace System.Diagnostics
/// intercept each new Connection object being added to ConnectionGroup.m_ConnectionList
/// and replace its m_WriteList arraylist field.
/// </summary>
- [RequiresDynamicCode(WriteRequiresDynamicCode)]
private sealed class ConnectionArrayList : ArrayListWrapper
{
public ConnectionArrayList(ArrayList list) : base(list)
@@ -516,7 +512,6 @@ namespace System.Diagnostics
/// It also intercepts all HttpWebRequest objects that are about to get removed from
/// Connection.m_WriteList as they have completed the request.
/// </summary>
- [RequiresDynamicCode(WriteRequiresDynamicCode)]
private sealed class HttpWebRequestArrayList : ArrayListWrapper
{
public HttpWebRequestArrayList(ArrayList list) : base(list)
diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/tests/NativeAotTests/DiagnosticSourceEventSourceTests.cs b/src/libraries/System.Diagnostics.DiagnosticSource/tests/NativeAotTests/DiagnosticSourceEventSourceTests.cs
new file mode 100644
index 00000000000..fab21b5a7b7
--- /dev/null
+++ b/src/libraries/System.Diagnostics.DiagnosticSource/tests/NativeAotTests/DiagnosticSourceEventSourceTests.cs
@@ -0,0 +1,110 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Diagnostics.Tracing;
+
+/// <summary>
+/// Tests that using writing to a DiagnosticSource writes the correct payloads
+/// to the DiagnosticSourceEventSource.
+/// </summary>
+internal class Program
+{
+ private class TestEventListener : EventListener
+ {
+ public ReadOnlyCollection<object> LogDataPayload { get; set; }
+
+ protected override void OnEventSourceCreated(EventSource eventSource)
+ {
+ if (eventSource.Name == "Microsoft-Diagnostics-DiagnosticSource")
+ {
+ EnableEvents(eventSource, EventLevel.Verbose, EventKeywords.All, new Dictionary<string, string>
+ {
+ { "FilterAndPayloadSpecs", "TestDiagnosticListener/Test.Start@Activity2Start:-Id;Ints.*Enumerate"}
+ });
+ }
+
+ base.OnEventSourceCreated(eventSource);
+ }
+
+ protected override void OnEventWritten(EventWrittenEventArgs eventData)
+ {
+ if (eventData.EventName == "Activity2Start")
+ {
+ LogDataPayload = eventData.Payload;
+ }
+
+ base.OnEventWritten(eventData);
+ }
+ }
+
+ public static int Main()
+ {
+ DiagnosticSource diagnosticSource = new DiagnosticListener("TestDiagnosticListener");
+ using (var listener = new TestEventListener())
+ {
+ var data = new EventData()
+ {
+ Id = Guid.NewGuid(),
+ };
+
+ Write(diagnosticSource, "Test.Start", data);
+
+ if (!(listener.LogDataPayload?.Count == 3 &&
+ (string)listener.LogDataPayload[0] == "TestDiagnosticListener" &&
+ (string)listener.LogDataPayload[1] == "Test.Start"))
+ {
+ return -1;
+ }
+
+ object[] args = (object[])listener.LogDataPayload[2];
+ if (args.Length != 2)
+ {
+ return -2;
+ }
+
+ IDictionary<string, object> arg = (IDictionary<string, object>)args[0];
+ if (!((string)arg["Key"] == "Id" && (string)arg["Value"] == data.Id.ToString()))
+ {
+ return -3;
+ }
+
+ arg = (IDictionary<string, object>)args[1];
+ if (!((string)arg["Key"] == "*Enumerate" && (string)arg["Value"] == "1,2,3"))
+ {
+ return -4;
+ }
+
+ return 100;
+ }
+ }
+
+ [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode",
+ Justification = "The value being passed into Write has the necessary properties being preserved with DynamicallyAccessedMembers.")]
+ private static void Write<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] T>(
+ DiagnosticSource diagnosticSource,
+ string name,
+ T value)
+ {
+ diagnosticSource.Write(name, value);
+ }
+
+ public class EventData
+ {
+ public Guid Id { get; set; }
+
+ public IEnumerable<int> Ints
+ {
+ get
+ {
+ yield return 1;
+ yield return 2;
+ yield return 3;
+ }
+ }
+ }
+}
diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/tests/NativeAotTests/System.Diagnostics.DiagnosticSource.NativeAotTests.proj b/src/libraries/System.Diagnostics.DiagnosticSource/tests/NativeAotTests/System.Diagnostics.DiagnosticSource.NativeAotTests.proj
new file mode 100644
index 00000000000..8001203352b
--- /dev/null
+++ b/src/libraries/System.Diagnostics.DiagnosticSource/tests/NativeAotTests/System.Diagnostics.DiagnosticSource.NativeAotTests.proj
@@ -0,0 +1,10 @@
+<Project DefaultTargets="Build">
+ <Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />
+
+ <ItemGroup>
+ <TestConsoleAppSourceFiles Include="DiagnosticSourceEventSourceTests.cs"
+ EnabledProperties="EventSourceSupport" />
+ </ItemGroup>
+
+ <Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" />
+</Project>
diff --git a/src/libraries/System.Diagnostics.PerformanceCounter/System.Diagnostics.PerformanceCounter.sln b/src/libraries/System.Diagnostics.PerformanceCounter/System.Diagnostics.PerformanceCounter.sln
index 749af9b640f..e2a13f61271 100644
--- a/src/libraries/System.Diagnostics.PerformanceCounter/System.Diagnostics.PerformanceCounter.sln
+++ b/src/libraries/System.Diagnostics.PerformanceCounter/System.Diagnostics.PerformanceCounter.sln
@@ -9,6 +9,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Configuration.Config
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Configuration.ConfigurationManager", "..\System.Configuration.ConfigurationManager\src\System.Configuration.ConfigurationManager.csproj", "{96328529-3EB5-4BA4-9998-CB85E279E7F2}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.EventLog", "..\System.Diagnostics.EventLog\ref\System.Diagnostics.EventLog.csproj", "{084CF5E8-1BD4-4AD3-A80F-FD9E1C269826}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.EventLog.Messages", "..\System.Diagnostics.EventLog\src\Messages\System.Diagnostics.EventLog.Messages.csproj", "{4D35D50B-936F-4867-A600-8D3A9A0CD0B5}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.EventLog", "..\System.Diagnostics.EventLog\src\System.Diagnostics.EventLog.csproj", "{E9DA420E-43B7-4A00-99A7-7DBDE3FF3F20}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.PerformanceCounter", "ref\System.Diagnostics.PerformanceCounter.csproj", "{D0C681EE-D578-4CD6-AA62-33874FCE3E37}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.PerformanceCounter", "src\System.Diagnostics.PerformanceCounter.csproj", "{2B7C465F-44E2-4D0B-9A9F-30F20FA49A16}"
@@ -69,6 +75,18 @@ Global
{96328529-3EB5-4BA4-9998-CB85E279E7F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{96328529-3EB5-4BA4-9998-CB85E279E7F2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{96328529-3EB5-4BA4-9998-CB85E279E7F2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {084CF5E8-1BD4-4AD3-A80F-FD9E1C269826}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {084CF5E8-1BD4-4AD3-A80F-FD9E1C269826}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {084CF5E8-1BD4-4AD3-A80F-FD9E1C269826}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {084CF5E8-1BD4-4AD3-A80F-FD9E1C269826}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4D35D50B-936F-4867-A600-8D3A9A0CD0B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4D35D50B-936F-4867-A600-8D3A9A0CD0B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4D35D50B-936F-4867-A600-8D3A9A0CD0B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4D35D50B-936F-4867-A600-8D3A9A0CD0B5}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E9DA420E-43B7-4A00-99A7-7DBDE3FF3F20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E9DA420E-43B7-4A00-99A7-7DBDE3FF3F20}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E9DA420E-43B7-4A00-99A7-7DBDE3FF3F20}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E9DA420E-43B7-4A00-99A7-7DBDE3FF3F20}.Release|Any CPU.Build.0 = Release|Any CPU
{D0C681EE-D578-4CD6-AA62-33874FCE3E37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D0C681EE-D578-4CD6-AA62-33874FCE3E37}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D0C681EE-D578-4CD6-AA62-33874FCE3E37}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -130,6 +148,7 @@ Global
{EB8EF358-4028-4272-B71E-523F8D0A73F0} = {B9925565-A803-4F7E-BABC-377A5DE41344}
{4EB44DE6-4E5A-4D48-9102-8F8374339027} = {BFF04E9C-277E-4CE3-8D38-FAFCA9B2D872}
{067570A0-D55A-4ECC-A478-B1CBC676E9F3} = {BFF04E9C-277E-4CE3-8D38-FAFCA9B2D872}
+ {084CF5E8-1BD4-4AD3-A80F-FD9E1C269826} = {BFF04E9C-277E-4CE3-8D38-FAFCA9B2D872}
{D0C681EE-D578-4CD6-AA62-33874FCE3E37} = {BFF04E9C-277E-4CE3-8D38-FAFCA9B2D872}
{F237AE76-582E-45B8-AC46-B0CE8C65780B} = {BFF04E9C-277E-4CE3-8D38-FAFCA9B2D872}
{2C707BFF-6BA9-4EB8-BC75-5341391B5FC6} = {BFF04E9C-277E-4CE3-8D38-FAFCA9B2D872}
@@ -137,6 +156,8 @@ Global
{97932D09-4DF9-4836-ADEF-C52DBC0661CD} = {BFF04E9C-277E-4CE3-8D38-FAFCA9B2D872}
{40390BE3-0615-4803-AF69-B2D5FA27951F} = {F2408438-D7E0-4D89-97B1-EDCC83EA8442}
{96328529-3EB5-4BA4-9998-CB85E279E7F2} = {F2408438-D7E0-4D89-97B1-EDCC83EA8442}
+ {4D35D50B-936F-4867-A600-8D3A9A0CD0B5} = {F2408438-D7E0-4D89-97B1-EDCC83EA8442}
+ {E9DA420E-43B7-4A00-99A7-7DBDE3FF3F20} = {F2408438-D7E0-4D89-97B1-EDCC83EA8442}
{2B7C465F-44E2-4D0B-9A9F-30F20FA49A16} = {F2408438-D7E0-4D89-97B1-EDCC83EA8442}
{A6AC1A1B-F02F-4F0B-8C6B-1A004EE79893} = {F2408438-D7E0-4D89-97B1-EDCC83EA8442}
{43214093-FA08-4699-A62B-D7BC858BAC78} = {F2408438-D7E0-4D89-97B1-EDCC83EA8442}
diff --git a/src/libraries/System.Diagnostics.StackTrace/System.Diagnostics.StackTrace.sln b/src/libraries/System.Diagnostics.StackTrace/System.Diagnostics.StackTrace.sln
index 0c1e67161ff..3c284446fca 100644
--- a/src/libraries/System.Diagnostics.StackTrace/System.Diagnostics.StackTrace.sln
+++ b/src/libraries/System.Diagnostics.StackTrace/System.Diagnostics.StackTrace.sln
@@ -29,6 +29,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.Tracing"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{0269FFAF-E680-4BC8-A1B4-0333D77911BC}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{CB9D812D-E941-4E35-96DD-B6AC3AA31DA8}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.Uri", "..\System.Private.Uri\src\System.Private.Uri.csproj", "{E6DD9860-2824-43D3-BD9D-87ED396B4E46}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reflection.Metadata", "..\System.Reflection.Metadata\ref\System.Reflection.Metadata.csproj", "{1885EF4C-6A85-4170-8E5B-7C158C4BECDB}"
@@ -99,11 +101,8 @@ Global
{65FFFD20-CE5D-4FC0-A525-1C308186A16F}.Release|x86.ActiveCfg = Release|Any CPU
{65FFFD20-CE5D-4FC0-A525-1C308186A16F}.Release|x86.Build.0 = Release|Any CPU
{65FFFD20-CE5D-4FC0-A525-1C308186A16F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {65FFFD20-CE5D-4FC0-A525-1C308186A16F}.Checked|Any CPU.Build.0 = Debug|Any CPU
{65FFFD20-CE5D-4FC0-A525-1C308186A16F}.Checked|x64.ActiveCfg = Debug|Any CPU
- {65FFFD20-CE5D-4FC0-A525-1C308186A16F}.Checked|x64.Build.0 = Debug|Any CPU
{65FFFD20-CE5D-4FC0-A525-1C308186A16F}.Checked|x86.ActiveCfg = Debug|Any CPU
- {65FFFD20-CE5D-4FC0-A525-1C308186A16F}.Checked|x86.Build.0 = Debug|Any CPU
{CC4C2E67-70CD-49B6-BD74-908BAE01160E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CC4C2E67-70CD-49B6-BD74-908BAE01160E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CC4C2E67-70CD-49B6-BD74-908BAE01160E}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -117,11 +116,8 @@ Global
{CC4C2E67-70CD-49B6-BD74-908BAE01160E}.Release|x86.ActiveCfg = Release|Any CPU
{CC4C2E67-70CD-49B6-BD74-908BAE01160E}.Release|x86.Build.0 = Release|Any CPU
{CC4C2E67-70CD-49B6-BD74-908BAE01160E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {CC4C2E67-70CD-49B6-BD74-908BAE01160E}.Checked|Any CPU.Build.0 = Debug|Any CPU
{CC4C2E67-70CD-49B6-BD74-908BAE01160E}.Checked|x64.ActiveCfg = Debug|Any CPU
- {CC4C2E67-70CD-49B6-BD74-908BAE01160E}.Checked|x64.Build.0 = Debug|Any CPU
{CC4C2E67-70CD-49B6-BD74-908BAE01160E}.Checked|x86.ActiveCfg = Debug|Any CPU
- {CC4C2E67-70CD-49B6-BD74-908BAE01160E}.Checked|x86.Build.0 = Debug|Any CPU
{26367C54-C1A4-462F-AA71-E48644208AE9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{26367C54-C1A4-462F-AA71-E48644208AE9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{26367C54-C1A4-462F-AA71-E48644208AE9}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -135,11 +131,8 @@ Global
{26367C54-C1A4-462F-AA71-E48644208AE9}.Release|x86.ActiveCfg = Release|Any CPU
{26367C54-C1A4-462F-AA71-E48644208AE9}.Release|x86.Build.0 = Release|Any CPU
{26367C54-C1A4-462F-AA71-E48644208AE9}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {26367C54-C1A4-462F-AA71-E48644208AE9}.Checked|Any CPU.Build.0 = Debug|Any CPU
{26367C54-C1A4-462F-AA71-E48644208AE9}.Checked|x64.ActiveCfg = Debug|Any CPU
- {26367C54-C1A4-462F-AA71-E48644208AE9}.Checked|x64.Build.0 = Debug|Any CPU
{26367C54-C1A4-462F-AA71-E48644208AE9}.Checked|x86.ActiveCfg = Debug|Any CPU
- {26367C54-C1A4-462F-AA71-E48644208AE9}.Checked|x86.Build.0 = Debug|Any CPU
{D8A82D01-BD1F-4437-8649-362A5270E533}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D8A82D01-BD1F-4437-8649-362A5270E533}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D8A82D01-BD1F-4437-8649-362A5270E533}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -153,11 +146,8 @@ Global
{D8A82D01-BD1F-4437-8649-362A5270E533}.Release|x86.ActiveCfg = Release|Any CPU
{D8A82D01-BD1F-4437-8649-362A5270E533}.Release|x86.Build.0 = Release|Any CPU
{D8A82D01-BD1F-4437-8649-362A5270E533}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {D8A82D01-BD1F-4437-8649-362A5270E533}.Checked|Any CPU.Build.0 = Debug|Any CPU
{D8A82D01-BD1F-4437-8649-362A5270E533}.Checked|x64.ActiveCfg = Debug|Any CPU
- {D8A82D01-BD1F-4437-8649-362A5270E533}.Checked|x64.Build.0 = Debug|Any CPU
{D8A82D01-BD1F-4437-8649-362A5270E533}.Checked|x86.ActiveCfg = Debug|Any CPU
- {D8A82D01-BD1F-4437-8649-362A5270E533}.Checked|x86.Build.0 = Debug|Any CPU
{E3D6317B-BEDD-41D2-A7B4-01A8D050C9C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E3D6317B-BEDD-41D2-A7B4-01A8D050C9C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E3D6317B-BEDD-41D2-A7B4-01A8D050C9C8}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -171,11 +161,8 @@ Global
{E3D6317B-BEDD-41D2-A7B4-01A8D050C9C8}.Release|x86.ActiveCfg = Release|Any CPU
{E3D6317B-BEDD-41D2-A7B4-01A8D050C9C8}.Release|x86.Build.0 = Release|Any CPU
{E3D6317B-BEDD-41D2-A7B4-01A8D050C9C8}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {E3D6317B-BEDD-41D2-A7B4-01A8D050C9C8}.Checked|Any CPU.Build.0 = Debug|Any CPU
{E3D6317B-BEDD-41D2-A7B4-01A8D050C9C8}.Checked|x64.ActiveCfg = Debug|Any CPU
- {E3D6317B-BEDD-41D2-A7B4-01A8D050C9C8}.Checked|x64.Build.0 = Debug|Any CPU
{E3D6317B-BEDD-41D2-A7B4-01A8D050C9C8}.Checked|x86.ActiveCfg = Debug|Any CPU
- {E3D6317B-BEDD-41D2-A7B4-01A8D050C9C8}.Checked|x86.Build.0 = Debug|Any CPU
{5C69A41A-0B21-4F2C-B4CB-438F5FDE9C44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5C69A41A-0B21-4F2C-B4CB-438F5FDE9C44}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5C69A41A-0B21-4F2C-B4CB-438F5FDE9C44}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -189,11 +176,8 @@ Global
{5C69A41A-0B21-4F2C-B4CB-438F5FDE9C44}.Release|x86.ActiveCfg = Release|Any CPU
{5C69A41A-0B21-4F2C-B4CB-438F5FDE9C44}.Release|x86.Build.0 = Release|Any CPU
{5C69A41A-0B21-4F2C-B4CB-438F5FDE9C44}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {5C69A41A-0B21-4F2C-B4CB-438F5FDE9C44}.Checked|Any CPU.Build.0 = Debug|Any CPU
{5C69A41A-0B21-4F2C-B4CB-438F5FDE9C44}.Checked|x64.ActiveCfg = Debug|Any CPU
- {5C69A41A-0B21-4F2C-B4CB-438F5FDE9C44}.Checked|x64.Build.0 = Debug|Any CPU
{5C69A41A-0B21-4F2C-B4CB-438F5FDE9C44}.Checked|x86.ActiveCfg = Debug|Any CPU
- {5C69A41A-0B21-4F2C-B4CB-438F5FDE9C44}.Checked|x86.Build.0 = Debug|Any CPU
{1A44729F-AFB5-4BB0-8348-58833378AE55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1A44729F-AFB5-4BB0-8348-58833378AE55}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1A44729F-AFB5-4BB0-8348-58833378AE55}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -207,11 +191,8 @@ Global
{1A44729F-AFB5-4BB0-8348-58833378AE55}.Release|x86.ActiveCfg = Release|Any CPU
{1A44729F-AFB5-4BB0-8348-58833378AE55}.Release|x86.Build.0 = Release|Any CPU
{1A44729F-AFB5-4BB0-8348-58833378AE55}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {1A44729F-AFB5-4BB0-8348-58833378AE55}.Checked|Any CPU.Build.0 = Debug|Any CPU
{1A44729F-AFB5-4BB0-8348-58833378AE55}.Checked|x64.ActiveCfg = Debug|Any CPU
- {1A44729F-AFB5-4BB0-8348-58833378AE55}.Checked|x64.Build.0 = Debug|Any CPU
{1A44729F-AFB5-4BB0-8348-58833378AE55}.Checked|x86.ActiveCfg = Debug|Any CPU
- {1A44729F-AFB5-4BB0-8348-58833378AE55}.Checked|x86.Build.0 = Debug|Any CPU
{A8BB1002-C4B3-4B77-9A99-908FC6C84811}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A8BB1002-C4B3-4B77-9A99-908FC6C84811}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A8BB1002-C4B3-4B77-9A99-908FC6C84811}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -225,11 +206,8 @@ Global
{A8BB1002-C4B3-4B77-9A99-908FC6C84811}.Release|x86.ActiveCfg = Release|Any CPU
{A8BB1002-C4B3-4B77-9A99-908FC6C84811}.Release|x86.Build.0 = Release|Any CPU
{A8BB1002-C4B3-4B77-9A99-908FC6C84811}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {A8BB1002-C4B3-4B77-9A99-908FC6C84811}.Checked|Any CPU.Build.0 = Debug|Any CPU
{A8BB1002-C4B3-4B77-9A99-908FC6C84811}.Checked|x64.ActiveCfg = Debug|Any CPU
- {A8BB1002-C4B3-4B77-9A99-908FC6C84811}.Checked|x64.Build.0 = Debug|Any CPU
{A8BB1002-C4B3-4B77-9A99-908FC6C84811}.Checked|x86.ActiveCfg = Debug|Any CPU
- {A8BB1002-C4B3-4B77-9A99-908FC6C84811}.Checked|x86.Build.0 = Debug|Any CPU
{B1632FA3-4F01-4B41-BB61-F7676A25EDA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B1632FA3-4F01-4B41-BB61-F7676A25EDA0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B1632FA3-4F01-4B41-BB61-F7676A25EDA0}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -243,11 +221,8 @@ Global
{B1632FA3-4F01-4B41-BB61-F7676A25EDA0}.Release|x86.ActiveCfg = Release|Any CPU
{B1632FA3-4F01-4B41-BB61-F7676A25EDA0}.Release|x86.Build.0 = Release|Any CPU
{B1632FA3-4F01-4B41-BB61-F7676A25EDA0}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {B1632FA3-4F01-4B41-BB61-F7676A25EDA0}.Checked|Any CPU.Build.0 = Debug|Any CPU
{B1632FA3-4F01-4B41-BB61-F7676A25EDA0}.Checked|x64.ActiveCfg = Debug|Any CPU
- {B1632FA3-4F01-4B41-BB61-F7676A25EDA0}.Checked|x64.Build.0 = Debug|Any CPU
{B1632FA3-4F01-4B41-BB61-F7676A25EDA0}.Checked|x86.ActiveCfg = Debug|Any CPU
- {B1632FA3-4F01-4B41-BB61-F7676A25EDA0}.Checked|x86.Build.0 = Debug|Any CPU
{63860D71-D351-4285-9154-9864DC883647}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{63860D71-D351-4285-9154-9864DC883647}.Debug|Any CPU.Build.0 = Debug|Any CPU
{63860D71-D351-4285-9154-9864DC883647}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -261,11 +236,8 @@ Global
{63860D71-D351-4285-9154-9864DC883647}.Release|x86.ActiveCfg = Release|Any CPU
{63860D71-D351-4285-9154-9864DC883647}.Release|x86.Build.0 = Release|Any CPU
{63860D71-D351-4285-9154-9864DC883647}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {63860D71-D351-4285-9154-9864DC883647}.Checked|Any CPU.Build.0 = Debug|Any CPU
{63860D71-D351-4285-9154-9864DC883647}.Checked|x64.ActiveCfg = Debug|Any CPU
- {63860D71-D351-4285-9154-9864DC883647}.Checked|x64.Build.0 = Debug|Any CPU
{63860D71-D351-4285-9154-9864DC883647}.Checked|x86.ActiveCfg = Debug|Any CPU
- {63860D71-D351-4285-9154-9864DC883647}.Checked|x86.Build.0 = Debug|Any CPU
{956E53A2-5A41-44A7-900A-49044376B2BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{956E53A2-5A41-44A7-900A-49044376B2BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{956E53A2-5A41-44A7-900A-49044376B2BD}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -279,11 +251,8 @@ Global
{956E53A2-5A41-44A7-900A-49044376B2BD}.Release|x86.ActiveCfg = Release|Any CPU
{956E53A2-5A41-44A7-900A-49044376B2BD}.Release|x86.Build.0 = Release|Any CPU
{956E53A2-5A41-44A7-900A-49044376B2BD}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {956E53A2-5A41-44A7-900A-49044376B2BD}.Checked|Any CPU.Build.0 = Debug|Any CPU
{956E53A2-5A41-44A7-900A-49044376B2BD}.Checked|x64.ActiveCfg = Debug|Any CPU
- {956E53A2-5A41-44A7-900A-49044376B2BD}.Checked|x64.Build.0 = Debug|Any CPU
{956E53A2-5A41-44A7-900A-49044376B2BD}.Checked|x86.ActiveCfg = Debug|Any CPU
- {956E53A2-5A41-44A7-900A-49044376B2BD}.Checked|x86.Build.0 = Debug|Any CPU
{E675E507-7080-44FB-BAF5-80E37A54B2B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E675E507-7080-44FB-BAF5-80E37A54B2B9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E675E507-7080-44FB-BAF5-80E37A54B2B9}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -297,11 +266,8 @@ Global
{E675E507-7080-44FB-BAF5-80E37A54B2B9}.Release|x86.ActiveCfg = Release|Any CPU
{E675E507-7080-44FB-BAF5-80E37A54B2B9}.Release|x86.Build.0 = Release|Any CPU
{E675E507-7080-44FB-BAF5-80E37A54B2B9}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {E675E507-7080-44FB-BAF5-80E37A54B2B9}.Checked|Any CPU.Build.0 = Debug|Any CPU
{E675E507-7080-44FB-BAF5-80E37A54B2B9}.Checked|x64.ActiveCfg = Debug|Any CPU
- {E675E507-7080-44FB-BAF5-80E37A54B2B9}.Checked|x64.Build.0 = Debug|Any CPU
{E675E507-7080-44FB-BAF5-80E37A54B2B9}.Checked|x86.ActiveCfg = Debug|Any CPU
- {E675E507-7080-44FB-BAF5-80E37A54B2B9}.Checked|x86.Build.0 = Debug|Any CPU
{96501106-36D0-4093-8FEE-AF90713D09ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{96501106-36D0-4093-8FEE-AF90713D09ED}.Debug|Any CPU.Build.0 = Debug|Any CPU
{96501106-36D0-4093-8FEE-AF90713D09ED}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -315,11 +281,8 @@ Global
{96501106-36D0-4093-8FEE-AF90713D09ED}.Release|x86.ActiveCfg = Release|Any CPU
{96501106-36D0-4093-8FEE-AF90713D09ED}.Release|x86.Build.0 = Release|Any CPU
{96501106-36D0-4093-8FEE-AF90713D09ED}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {96501106-36D0-4093-8FEE-AF90713D09ED}.Checked|Any CPU.Build.0 = Debug|Any CPU
{96501106-36D0-4093-8FEE-AF90713D09ED}.Checked|x64.ActiveCfg = Debug|Any CPU
- {96501106-36D0-4093-8FEE-AF90713D09ED}.Checked|x64.Build.0 = Debug|Any CPU
{96501106-36D0-4093-8FEE-AF90713D09ED}.Checked|x86.ActiveCfg = Debug|Any CPU
- {96501106-36D0-4093-8FEE-AF90713D09ED}.Checked|x86.Build.0 = Debug|Any CPU
{0269FFAF-E680-4BC8-A1B4-0333D77911BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0269FFAF-E680-4BC8-A1B4-0333D77911BC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0269FFAF-E680-4BC8-A1B4-0333D77911BC}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -333,11 +296,23 @@ Global
{0269FFAF-E680-4BC8-A1B4-0333D77911BC}.Release|x86.ActiveCfg = Release|Any CPU
{0269FFAF-E680-4BC8-A1B4-0333D77911BC}.Release|x86.Build.0 = Release|Any CPU
{0269FFAF-E680-4BC8-A1B4-0333D77911BC}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {0269FFAF-E680-4BC8-A1B4-0333D77911BC}.Checked|Any CPU.Build.0 = Debug|Any CPU
{0269FFAF-E680-4BC8-A1B4-0333D77911BC}.Checked|x64.ActiveCfg = Debug|Any CPU
- {0269FFAF-E680-4BC8-A1B4-0333D77911BC}.Checked|x64.Build.0 = Debug|Any CPU
{0269FFAF-E680-4BC8-A1B4-0333D77911BC}.Checked|x86.ActiveCfg = Debug|Any CPU
- {0269FFAF-E680-4BC8-A1B4-0333D77911BC}.Checked|x86.Build.0 = Debug|Any CPU
+ {CB9D812D-E941-4E35-96DD-B6AC3AA31DA8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {CB9D812D-E941-4E35-96DD-B6AC3AA31DA8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {CB9D812D-E941-4E35-96DD-B6AC3AA31DA8}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {CB9D812D-E941-4E35-96DD-B6AC3AA31DA8}.Debug|x64.Build.0 = Debug|Any CPU
+ {CB9D812D-E941-4E35-96DD-B6AC3AA31DA8}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {CB9D812D-E941-4E35-96DD-B6AC3AA31DA8}.Debug|x86.Build.0 = Debug|Any CPU
+ {CB9D812D-E941-4E35-96DD-B6AC3AA31DA8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {CB9D812D-E941-4E35-96DD-B6AC3AA31DA8}.Release|Any CPU.Build.0 = Release|Any CPU
+ {CB9D812D-E941-4E35-96DD-B6AC3AA31DA8}.Release|x64.ActiveCfg = Release|Any CPU
+ {CB9D812D-E941-4E35-96DD-B6AC3AA31DA8}.Release|x64.Build.0 = Release|Any CPU
+ {CB9D812D-E941-4E35-96DD-B6AC3AA31DA8}.Release|x86.ActiveCfg = Release|Any CPU
+ {CB9D812D-E941-4E35-96DD-B6AC3AA31DA8}.Release|x86.Build.0 = Release|Any CPU
+ {CB9D812D-E941-4E35-96DD-B6AC3AA31DA8}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {CB9D812D-E941-4E35-96DD-B6AC3AA31DA8}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {CB9D812D-E941-4E35-96DD-B6AC3AA31DA8}.Checked|x86.ActiveCfg = Debug|Any CPU
{E6DD9860-2824-43D3-BD9D-87ED396B4E46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E6DD9860-2824-43D3-BD9D-87ED396B4E46}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E6DD9860-2824-43D3-BD9D-87ED396B4E46}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -351,11 +326,8 @@ Global
{E6DD9860-2824-43D3-BD9D-87ED396B4E46}.Release|x86.ActiveCfg = Release|Any CPU
{E6DD9860-2824-43D3-BD9D-87ED396B4E46}.Release|x86.Build.0 = Release|Any CPU
{E6DD9860-2824-43D3-BD9D-87ED396B4E46}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {E6DD9860-2824-43D3-BD9D-87ED396B4E46}.Checked|Any CPU.Build.0 = Debug|Any CPU
{E6DD9860-2824-43D3-BD9D-87ED396B4E46}.Checked|x64.ActiveCfg = Debug|Any CPU
- {E6DD9860-2824-43D3-BD9D-87ED396B4E46}.Checked|x64.Build.0 = Debug|Any CPU
{E6DD9860-2824-43D3-BD9D-87ED396B4E46}.Checked|x86.ActiveCfg = Debug|Any CPU
- {E6DD9860-2824-43D3-BD9D-87ED396B4E46}.Checked|x86.Build.0 = Debug|Any CPU
{1885EF4C-6A85-4170-8E5B-7C158C4BECDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1885EF4C-6A85-4170-8E5B-7C158C4BECDB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1885EF4C-6A85-4170-8E5B-7C158C4BECDB}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -369,11 +341,8 @@ Global
{1885EF4C-6A85-4170-8E5B-7C158C4BECDB}.Release|x86.ActiveCfg = Release|Any CPU
{1885EF4C-6A85-4170-8E5B-7C158C4BECDB}.Release|x86.Build.0 = Release|Any CPU
{1885EF4C-6A85-4170-8E5B-7C158C4BECDB}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {1885EF4C-6A85-4170-8E5B-7C158C4BECDB}.Checked|Any CPU.Build.0 = Debug|Any CPU
{1885EF4C-6A85-4170-8E5B-7C158C4BECDB}.Checked|x64.ActiveCfg = Debug|Any CPU
- {1885EF4C-6A85-4170-8E5B-7C158C4BECDB}.Checked|x64.Build.0 = Debug|Any CPU
{1885EF4C-6A85-4170-8E5B-7C158C4BECDB}.Checked|x86.ActiveCfg = Debug|Any CPU
- {1885EF4C-6A85-4170-8E5B-7C158C4BECDB}.Checked|x86.Build.0 = Debug|Any CPU
{E5EB0B0B-FFAC-4C1B-AD59-292849F847FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E5EB0B0B-FFAC-4C1B-AD59-292849F847FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E5EB0B0B-FFAC-4C1B-AD59-292849F847FE}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -387,11 +356,8 @@ Global
{E5EB0B0B-FFAC-4C1B-AD59-292849F847FE}.Release|x86.ActiveCfg = Release|Any CPU
{E5EB0B0B-FFAC-4C1B-AD59-292849F847FE}.Release|x86.Build.0 = Release|Any CPU
{E5EB0B0B-FFAC-4C1B-AD59-292849F847FE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {E5EB0B0B-FFAC-4C1B-AD59-292849F847FE}.Checked|Any CPU.Build.0 = Debug|Any CPU
{E5EB0B0B-FFAC-4C1B-AD59-292849F847FE}.Checked|x64.ActiveCfg = Debug|Any CPU
- {E5EB0B0B-FFAC-4C1B-AD59-292849F847FE}.Checked|x64.Build.0 = Debug|Any CPU
{E5EB0B0B-FFAC-4C1B-AD59-292849F847FE}.Checked|x86.ActiveCfg = Debug|Any CPU
- {E5EB0B0B-FFAC-4C1B-AD59-292849F847FE}.Checked|x86.Build.0 = Debug|Any CPU
{56B120CF-EBB5-4422-A7B5-5216FE4F71E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{56B120CF-EBB5-4422-A7B5-5216FE4F71E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{56B120CF-EBB5-4422-A7B5-5216FE4F71E3}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -405,11 +371,8 @@ Global
{56B120CF-EBB5-4422-A7B5-5216FE4F71E3}.Release|x86.ActiveCfg = Release|Any CPU
{56B120CF-EBB5-4422-A7B5-5216FE4F71E3}.Release|x86.Build.0 = Release|Any CPU
{56B120CF-EBB5-4422-A7B5-5216FE4F71E3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {56B120CF-EBB5-4422-A7B5-5216FE4F71E3}.Checked|Any CPU.Build.0 = Debug|Any CPU
{56B120CF-EBB5-4422-A7B5-5216FE4F71E3}.Checked|x64.ActiveCfg = Debug|Any CPU
- {56B120CF-EBB5-4422-A7B5-5216FE4F71E3}.Checked|x64.Build.0 = Debug|Any CPU
{56B120CF-EBB5-4422-A7B5-5216FE4F71E3}.Checked|x86.ActiveCfg = Debug|Any CPU
- {56B120CF-EBB5-4422-A7B5-5216FE4F71E3}.Checked|x86.Build.0 = Debug|Any CPU
{C0FDA629-485A-4795-80D1-BC228F610163}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C0FDA629-485A-4795-80D1-BC228F610163}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C0FDA629-485A-4795-80D1-BC228F610163}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -423,11 +386,8 @@ Global
{C0FDA629-485A-4795-80D1-BC228F610163}.Release|x86.ActiveCfg = Release|Any CPU
{C0FDA629-485A-4795-80D1-BC228F610163}.Release|x86.Build.0 = Release|Any CPU
{C0FDA629-485A-4795-80D1-BC228F610163}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {C0FDA629-485A-4795-80D1-BC228F610163}.Checked|Any CPU.Build.0 = Debug|Any CPU
{C0FDA629-485A-4795-80D1-BC228F610163}.Checked|x64.ActiveCfg = Debug|Any CPU
- {C0FDA629-485A-4795-80D1-BC228F610163}.Checked|x64.Build.0 = Debug|Any CPU
{C0FDA629-485A-4795-80D1-BC228F610163}.Checked|x86.ActiveCfg = Debug|Any CPU
- {C0FDA629-485A-4795-80D1-BC228F610163}.Checked|x86.Build.0 = Debug|Any CPU
{A311F690-FBE4-4102-849A-ABCCAC63805A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A311F690-FBE4-4102-849A-ABCCAC63805A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A311F690-FBE4-4102-849A-ABCCAC63805A}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -441,11 +401,8 @@ Global
{A311F690-FBE4-4102-849A-ABCCAC63805A}.Release|x86.ActiveCfg = Release|Any CPU
{A311F690-FBE4-4102-849A-ABCCAC63805A}.Release|x86.Build.0 = Release|Any CPU
{A311F690-FBE4-4102-849A-ABCCAC63805A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {A311F690-FBE4-4102-849A-ABCCAC63805A}.Checked|Any CPU.Build.0 = Debug|Any CPU
{A311F690-FBE4-4102-849A-ABCCAC63805A}.Checked|x64.ActiveCfg = Debug|Any CPU
- {A311F690-FBE4-4102-849A-ABCCAC63805A}.Checked|x64.Build.0 = Debug|Any CPU
{A311F690-FBE4-4102-849A-ABCCAC63805A}.Checked|x86.ActiveCfg = Debug|Any CPU
- {A311F690-FBE4-4102-849A-ABCCAC63805A}.Checked|x86.Build.0 = Debug|Any CPU
{623D46A5-8ED4-43CF-A01B-528F0A505090}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{623D46A5-8ED4-43CF-A01B-528F0A505090}.Debug|Any CPU.Build.0 = Debug|Any CPU
{623D46A5-8ED4-43CF-A01B-528F0A505090}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -459,11 +416,8 @@ Global
{623D46A5-8ED4-43CF-A01B-528F0A505090}.Release|x86.ActiveCfg = Release|Any CPU
{623D46A5-8ED4-43CF-A01B-528F0A505090}.Release|x86.Build.0 = Release|Any CPU
{623D46A5-8ED4-43CF-A01B-528F0A505090}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {623D46A5-8ED4-43CF-A01B-528F0A505090}.Checked|Any CPU.Build.0 = Debug|Any CPU
{623D46A5-8ED4-43CF-A01B-528F0A505090}.Checked|x64.ActiveCfg = Debug|Any CPU
- {623D46A5-8ED4-43CF-A01B-528F0A505090}.Checked|x64.Build.0 = Debug|Any CPU
{623D46A5-8ED4-43CF-A01B-528F0A505090}.Checked|x86.ActiveCfg = Debug|Any CPU
- {623D46A5-8ED4-43CF-A01B-528F0A505090}.Checked|x86.Build.0 = Debug|Any CPU
{E93A6617-A6C4-4886-BADB-4D52690ACE8E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E93A6617-A6C4-4886-BADB-4D52690ACE8E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E93A6617-A6C4-4886-BADB-4D52690ACE8E}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -477,11 +431,8 @@ Global
{E93A6617-A6C4-4886-BADB-4D52690ACE8E}.Release|x86.ActiveCfg = Release|Any CPU
{E93A6617-A6C4-4886-BADB-4D52690ACE8E}.Release|x86.Build.0 = Release|Any CPU
{E93A6617-A6C4-4886-BADB-4D52690ACE8E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {E93A6617-A6C4-4886-BADB-4D52690ACE8E}.Checked|Any CPU.Build.0 = Debug|Any CPU
{E93A6617-A6C4-4886-BADB-4D52690ACE8E}.Checked|x64.ActiveCfg = Debug|Any CPU
- {E93A6617-A6C4-4886-BADB-4D52690ACE8E}.Checked|x64.Build.0 = Debug|Any CPU
{E93A6617-A6C4-4886-BADB-4D52690ACE8E}.Checked|x86.ActiveCfg = Debug|Any CPU
- {E93A6617-A6C4-4886-BADB-4D52690ACE8E}.Checked|x86.Build.0 = Debug|Any CPU
{039BB256-1BCF-4398-B586-C05F7C5225C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{039BB256-1BCF-4398-B586-C05F7C5225C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{039BB256-1BCF-4398-B586-C05F7C5225C4}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -495,11 +446,8 @@ Global
{039BB256-1BCF-4398-B586-C05F7C5225C4}.Release|x86.ActiveCfg = Release|Any CPU
{039BB256-1BCF-4398-B586-C05F7C5225C4}.Release|x86.Build.0 = Release|Any CPU
{039BB256-1BCF-4398-B586-C05F7C5225C4}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {039BB256-1BCF-4398-B586-C05F7C5225C4}.Checked|Any CPU.Build.0 = Debug|Any CPU
{039BB256-1BCF-4398-B586-C05F7C5225C4}.Checked|x64.ActiveCfg = Debug|Any CPU
- {039BB256-1BCF-4398-B586-C05F7C5225C4}.Checked|x64.Build.0 = Debug|Any CPU
{039BB256-1BCF-4398-B586-C05F7C5225C4}.Checked|x86.ActiveCfg = Debug|Any CPU
- {039BB256-1BCF-4398-B586-C05F7C5225C4}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -523,6 +471,7 @@ Global
{5C69A41A-0B21-4F2C-B4CB-438F5FDE9C44} = {ED3F0225-44AC-415A-80C8-18D9CAD10A64}
{A8BB1002-C4B3-4B77-9A99-908FC6C84811} = {ED3F0225-44AC-415A-80C8-18D9CAD10A64}
{E675E507-7080-44FB-BAF5-80E37A54B2B9} = {ED3F0225-44AC-415A-80C8-18D9CAD10A64}
+ {CB9D812D-E941-4E35-96DD-B6AC3AA31DA8} = {ED3F0225-44AC-415A-80C8-18D9CAD10A64}
{1885EF4C-6A85-4170-8E5B-7C158C4BECDB} = {ED3F0225-44AC-415A-80C8-18D9CAD10A64}
{A311F690-FBE4-4102-849A-ABCCAC63805A} = {ED3F0225-44AC-415A-80C8-18D9CAD10A64}
{E93A6617-A6C4-4886-BADB-4D52690ACE8E} = {ED3F0225-44AC-415A-80C8-18D9CAD10A64}
diff --git a/src/libraries/System.Diagnostics.Tools/System.Diagnostics.Tools.sln b/src/libraries/System.Diagnostics.Tools/System.Diagnostics.Tools.sln
index 3c783c7c9c5..86d2fef89f1 100644
--- a/src/libraries/System.Diagnostics.Tools/System.Diagnostics.Tools.sln
+++ b/src/libraries/System.Diagnostics.Tools/System.Diagnostics.Tools.sln
@@ -11,6 +11,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.Tools.Te
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{103898BF-8D8F-4A35-A943-027A47E4BD36}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{76694004-FD05-411B-91A1-D74C7AFFD669}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{EDA8C760-7617-4CD5-9320-CDE02AB6FDEE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{78C30412-0737-4680-AC94-CBD44DBDFCB9}"
@@ -69,11 +71,8 @@ Global
{6FF6D8F0-403D-40DF-9D75-895E2AF22B88}.Release|x86.ActiveCfg = Release|Any CPU
{6FF6D8F0-403D-40DF-9D75-895E2AF22B88}.Release|x86.Build.0 = Release|Any CPU
{6FF6D8F0-403D-40DF-9D75-895E2AF22B88}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {6FF6D8F0-403D-40DF-9D75-895E2AF22B88}.Checked|Any CPU.Build.0 = Debug|Any CPU
{6FF6D8F0-403D-40DF-9D75-895E2AF22B88}.Checked|x64.ActiveCfg = Debug|Any CPU
- {6FF6D8F0-403D-40DF-9D75-895E2AF22B88}.Checked|x64.Build.0 = Debug|Any CPU
{6FF6D8F0-403D-40DF-9D75-895E2AF22B88}.Checked|x86.ActiveCfg = Debug|Any CPU
- {6FF6D8F0-403D-40DF-9D75-895E2AF22B88}.Checked|x86.Build.0 = Debug|Any CPU
{E5F5CCFF-4DBA-4323-82A6-8D472C488C0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E5F5CCFF-4DBA-4323-82A6-8D472C488C0B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E5F5CCFF-4DBA-4323-82A6-8D472C488C0B}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -87,11 +86,8 @@ Global
{E5F5CCFF-4DBA-4323-82A6-8D472C488C0B}.Release|x86.ActiveCfg = Release|Any CPU
{E5F5CCFF-4DBA-4323-82A6-8D472C488C0B}.Release|x86.Build.0 = Release|Any CPU
{E5F5CCFF-4DBA-4323-82A6-8D472C488C0B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {E5F5CCFF-4DBA-4323-82A6-8D472C488C0B}.Checked|Any CPU.Build.0 = Debug|Any CPU
{E5F5CCFF-4DBA-4323-82A6-8D472C488C0B}.Checked|x64.ActiveCfg = Debug|Any CPU
- {E5F5CCFF-4DBA-4323-82A6-8D472C488C0B}.Checked|x64.Build.0 = Debug|Any CPU
{E5F5CCFF-4DBA-4323-82A6-8D472C488C0B}.Checked|x86.ActiveCfg = Debug|Any CPU
- {E5F5CCFF-4DBA-4323-82A6-8D472C488C0B}.Checked|x86.Build.0 = Debug|Any CPU
{566DC861-7C05-45AE-8F59-83D1A175A619}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{566DC861-7C05-45AE-8F59-83D1A175A619}.Debug|Any CPU.Build.0 = Debug|Any CPU
{566DC861-7C05-45AE-8F59-83D1A175A619}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -105,11 +101,8 @@ Global
{566DC861-7C05-45AE-8F59-83D1A175A619}.Release|x86.ActiveCfg = Release|Any CPU
{566DC861-7C05-45AE-8F59-83D1A175A619}.Release|x86.Build.0 = Release|Any CPU
{566DC861-7C05-45AE-8F59-83D1A175A619}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {566DC861-7C05-45AE-8F59-83D1A175A619}.Checked|Any CPU.Build.0 = Debug|Any CPU
{566DC861-7C05-45AE-8F59-83D1A175A619}.Checked|x64.ActiveCfg = Debug|Any CPU
- {566DC861-7C05-45AE-8F59-83D1A175A619}.Checked|x64.Build.0 = Debug|Any CPU
{566DC861-7C05-45AE-8F59-83D1A175A619}.Checked|x86.ActiveCfg = Debug|Any CPU
- {566DC861-7C05-45AE-8F59-83D1A175A619}.Checked|x86.Build.0 = Debug|Any CPU
{A63F3AEA-F4ED-4047-A11F-490325530D92}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A63F3AEA-F4ED-4047-A11F-490325530D92}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A63F3AEA-F4ED-4047-A11F-490325530D92}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -123,11 +116,8 @@ Global
{A63F3AEA-F4ED-4047-A11F-490325530D92}.Release|x86.ActiveCfg = Release|Any CPU
{A63F3AEA-F4ED-4047-A11F-490325530D92}.Release|x86.Build.0 = Release|Any CPU
{A63F3AEA-F4ED-4047-A11F-490325530D92}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {A63F3AEA-F4ED-4047-A11F-490325530D92}.Checked|Any CPU.Build.0 = Debug|Any CPU
{A63F3AEA-F4ED-4047-A11F-490325530D92}.Checked|x64.ActiveCfg = Debug|Any CPU
- {A63F3AEA-F4ED-4047-A11F-490325530D92}.Checked|x64.Build.0 = Debug|Any CPU
{A63F3AEA-F4ED-4047-A11F-490325530D92}.Checked|x86.ActiveCfg = Debug|Any CPU
- {A63F3AEA-F4ED-4047-A11F-490325530D92}.Checked|x86.Build.0 = Debug|Any CPU
{103898BF-8D8F-4A35-A943-027A47E4BD36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{103898BF-8D8F-4A35-A943-027A47E4BD36}.Debug|Any CPU.Build.0 = Debug|Any CPU
{103898BF-8D8F-4A35-A943-027A47E4BD36}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -141,11 +131,23 @@ Global
{103898BF-8D8F-4A35-A943-027A47E4BD36}.Release|x86.ActiveCfg = Release|Any CPU
{103898BF-8D8F-4A35-A943-027A47E4BD36}.Release|x86.Build.0 = Release|Any CPU
{103898BF-8D8F-4A35-A943-027A47E4BD36}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {103898BF-8D8F-4A35-A943-027A47E4BD36}.Checked|Any CPU.Build.0 = Debug|Any CPU
{103898BF-8D8F-4A35-A943-027A47E4BD36}.Checked|x64.ActiveCfg = Debug|Any CPU
- {103898BF-8D8F-4A35-A943-027A47E4BD36}.Checked|x64.Build.0 = Debug|Any CPU
{103898BF-8D8F-4A35-A943-027A47E4BD36}.Checked|x86.ActiveCfg = Debug|Any CPU
- {103898BF-8D8F-4A35-A943-027A47E4BD36}.Checked|x86.Build.0 = Debug|Any CPU
+ {76694004-FD05-411B-91A1-D74C7AFFD669}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {76694004-FD05-411B-91A1-D74C7AFFD669}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {76694004-FD05-411B-91A1-D74C7AFFD669}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {76694004-FD05-411B-91A1-D74C7AFFD669}.Debug|x64.Build.0 = Debug|Any CPU
+ {76694004-FD05-411B-91A1-D74C7AFFD669}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {76694004-FD05-411B-91A1-D74C7AFFD669}.Debug|x86.Build.0 = Debug|Any CPU
+ {76694004-FD05-411B-91A1-D74C7AFFD669}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {76694004-FD05-411B-91A1-D74C7AFFD669}.Release|Any CPU.Build.0 = Release|Any CPU
+ {76694004-FD05-411B-91A1-D74C7AFFD669}.Release|x64.ActiveCfg = Release|Any CPU
+ {76694004-FD05-411B-91A1-D74C7AFFD669}.Release|x64.Build.0 = Release|Any CPU
+ {76694004-FD05-411B-91A1-D74C7AFFD669}.Release|x86.ActiveCfg = Release|Any CPU
+ {76694004-FD05-411B-91A1-D74C7AFFD669}.Release|x86.Build.0 = Release|Any CPU
+ {76694004-FD05-411B-91A1-D74C7AFFD669}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {76694004-FD05-411B-91A1-D74C7AFFD669}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {76694004-FD05-411B-91A1-D74C7AFFD669}.Checked|x86.ActiveCfg = Debug|Any CPU
{EDA8C760-7617-4CD5-9320-CDE02AB6FDEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EDA8C760-7617-4CD5-9320-CDE02AB6FDEE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EDA8C760-7617-4CD5-9320-CDE02AB6FDEE}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -159,11 +161,8 @@ Global
{EDA8C760-7617-4CD5-9320-CDE02AB6FDEE}.Release|x86.ActiveCfg = Release|Any CPU
{EDA8C760-7617-4CD5-9320-CDE02AB6FDEE}.Release|x86.Build.0 = Release|Any CPU
{EDA8C760-7617-4CD5-9320-CDE02AB6FDEE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {EDA8C760-7617-4CD5-9320-CDE02AB6FDEE}.Checked|Any CPU.Build.0 = Debug|Any CPU
{EDA8C760-7617-4CD5-9320-CDE02AB6FDEE}.Checked|x64.ActiveCfg = Debug|Any CPU
- {EDA8C760-7617-4CD5-9320-CDE02AB6FDEE}.Checked|x64.Build.0 = Debug|Any CPU
{EDA8C760-7617-4CD5-9320-CDE02AB6FDEE}.Checked|x86.ActiveCfg = Debug|Any CPU
- {EDA8C760-7617-4CD5-9320-CDE02AB6FDEE}.Checked|x86.Build.0 = Debug|Any CPU
{78C30412-0737-4680-AC94-CBD44DBDFCB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{78C30412-0737-4680-AC94-CBD44DBDFCB9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{78C30412-0737-4680-AC94-CBD44DBDFCB9}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -177,11 +176,8 @@ Global
{78C30412-0737-4680-AC94-CBD44DBDFCB9}.Release|x86.ActiveCfg = Release|Any CPU
{78C30412-0737-4680-AC94-CBD44DBDFCB9}.Release|x86.Build.0 = Release|Any CPU
{78C30412-0737-4680-AC94-CBD44DBDFCB9}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {78C30412-0737-4680-AC94-CBD44DBDFCB9}.Checked|Any CPU.Build.0 = Debug|Any CPU
{78C30412-0737-4680-AC94-CBD44DBDFCB9}.Checked|x64.ActiveCfg = Debug|Any CPU
- {78C30412-0737-4680-AC94-CBD44DBDFCB9}.Checked|x64.Build.0 = Debug|Any CPU
{78C30412-0737-4680-AC94-CBD44DBDFCB9}.Checked|x86.ActiveCfg = Debug|Any CPU
- {78C30412-0737-4680-AC94-CBD44DBDFCB9}.Checked|x86.Build.0 = Debug|Any CPU
{B3280C75-8776-466B-B79E-F78954CD286A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B3280C75-8776-466B-B79E-F78954CD286A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B3280C75-8776-466B-B79E-F78954CD286A}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -195,11 +191,8 @@ Global
{B3280C75-8776-466B-B79E-F78954CD286A}.Release|x86.ActiveCfg = Release|Any CPU
{B3280C75-8776-466B-B79E-F78954CD286A}.Release|x86.Build.0 = Release|Any CPU
{B3280C75-8776-466B-B79E-F78954CD286A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {B3280C75-8776-466B-B79E-F78954CD286A}.Checked|Any CPU.Build.0 = Debug|Any CPU
{B3280C75-8776-466B-B79E-F78954CD286A}.Checked|x64.ActiveCfg = Debug|Any CPU
- {B3280C75-8776-466B-B79E-F78954CD286A}.Checked|x64.Build.0 = Debug|Any CPU
{B3280C75-8776-466B-B79E-F78954CD286A}.Checked|x86.ActiveCfg = Debug|Any CPU
- {B3280C75-8776-466B-B79E-F78954CD286A}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -210,6 +203,7 @@ Global
{6FF6D8F0-403D-40DF-9D75-895E2AF22B88} = {0EFD8A36-ACB0-4451-800E-DA867389324D}
{A63F3AEA-F4ED-4047-A11F-490325530D92} = {0EFD8A36-ACB0-4451-800E-DA867389324D}
{E5F5CCFF-4DBA-4323-82A6-8D472C488C0B} = {F8D19CA8-D65B-4C4B-9851-8E2836CFD72E}
+ {76694004-FD05-411B-91A1-D74C7AFFD669} = {F8D19CA8-D65B-4C4B-9851-8E2836CFD72E}
{B3280C75-8776-466B-B79E-F78954CD286A} = {F8D19CA8-D65B-4C4B-9851-8E2836CFD72E}
{103898BF-8D8F-4A35-A943-027A47E4BD36} = {F5CD84BD-2A56-47BD-A14E-531D0391918A}
{EDA8C760-7617-4CD5-9320-CDE02AB6FDEE} = {F5CD84BD-2A56-47BD-A14E-531D0391918A}
diff --git a/src/libraries/System.Diagnostics.TraceSource/System.Diagnostics.TraceSource.sln b/src/libraries/System.Diagnostics.TraceSource/System.Diagnostics.TraceSource.sln
index 0de93374190..32aed65c874 100644
--- a/src/libraries/System.Diagnostics.TraceSource/System.Diagnostics.TraceSource.sln
+++ b/src/libraries/System.Diagnostics.TraceSource/System.Diagnostics.TraceSource.sln
@@ -1,12 +1,12 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.3.32714.290
-MinimumVisualStudioVersion = 10.0.40219.1
+Microsoft Visual Studio Solution File, Format Version 12.00
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\..\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj", "{89B01AF7-F0CE-4168-8C4A-33FCDCF33B73}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{F6BCA6EF-777E-408B-B49B-B055B5A0BA19}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Win32.SystemEvents", "..\Microsoft.Win32.SystemEvents\ref\Microsoft.Win32.SystemEvents.csproj", "{99068253-1705-4736-8287-16A1D8CB4899}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Win32.SystemEvents", "..\Microsoft.Win32.SystemEvents\src\Microsoft.Win32.SystemEvents.csproj", "{95310F95-26B4-4B33-836E-1B85BCF017D5}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Collections.NonGeneric", "..\System.Collections.NonGeneric\ref\System.Collections.NonGeneric.csproj", "{A26E9B9C-AFE7-4740-AC73-626D9823E515}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Collections.NonGeneric", "..\System.Collections.NonGeneric\src\System.Collections.NonGeneric.csproj", "{89C01491-2BE8-438C-8F1D-24DE9AFD7A86}"
@@ -25,16 +25,34 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.ComponentModel.Primi
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.ComponentModel", "..\System.ComponentModel\ref\System.ComponentModel.csproj", "{83696A63-CF89-4DE4-8F79-96F5B830A4B6}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Configuration.ConfigurationManager", "..\System.Configuration.ConfigurationManager\ref\System.Configuration.ConfigurationManager.csproj", "{EBC92D9F-C33D-47F6-877C-999E3F7995A6}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Configuration.ConfigurationManager", "..\System.Configuration.ConfigurationManager\src\System.Configuration.ConfigurationManager.csproj", "{B2A1DCFB-E2F2-4ECD-AB62-E04653F14DC6}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.EventLog", "..\System.Diagnostics.EventLog\ref\System.Diagnostics.EventLog.csproj", "{B6AAF07C-2420-4A03-9A8A-ACD824FBE7C0}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.EventLog.Messages", "..\System.Diagnostics.EventLog\src\Messages\System.Diagnostics.EventLog.Messages.csproj", "{73AAB58B-BA4C-47B4-90A7-363EAEC6E35F}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.EventLog", "..\System.Diagnostics.EventLog\src\System.Diagnostics.EventLog.csproj", "{35E0C7A5-DA20-4882-8865-74581F180685}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.TraceSource", "ref\System.Diagnostics.TraceSource.csproj", "{2F00396E-003A-4385-92DC-69FDBEF330D8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.TraceSource", "src\System.Diagnostics.TraceSource.csproj", "{48CC1460-B1E7-4DE9-A4E7-2206F7FD54CF}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.TraceSource.Config.Tests", "tests\System.Diagnostics.TraceSource.Config.Tests\System.Diagnostics.TraceSource.Config.Tests.csproj", "{422C9340-E720-4554-B6AC-560A19FE16B1}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.TraceSource.Tests", "tests\System.Diagnostics.TraceSource.Tests\System.Diagnostics.TraceSource.Tests.csproj", "{0C126AE9-C858-4AC8-9DB1-B8E228BD2DB0}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Drawing.Common", "..\System.Drawing.Common\ref\System.Drawing.Common.csproj", "{DBE77318-482B-42AB-9912-A1D769A77312}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Drawing.Common", "..\System.Drawing.Common\src\System.Drawing.Common.csproj", "{A92A8311-3A5B-42DF-9454-23CB869A2574}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.ObjectModel", "..\System.ObjectModel\ref\System.ObjectModel.csproj", "{535A9671-08A0-46DD-8191-DC9B995DF425}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{8EAD8906-AF4E-42CA-983E-28CFE2224AEE}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{A9948CC3-4082-4F9C-AB77-81EE3B0A4C14}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.Uri", "..\System.Private.Uri\src\System.Private.Uri.csproj", "{4DAA5CFC-C59D-4C1B-A12A-BC9863F38C0C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{2F5DA438-6CBA-42AA-818A-64C633A56D55}"
@@ -45,10 +63,22 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\src\System.Runtime.csproj", "{637E7769-42D2-4541-9A63-32301113FA5A}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptography.ProtectedData", "..\System.Security.Cryptography.ProtectedData\ref\System.Security.Cryptography.ProtectedData.csproj", "{39AD2F59-DA98-4CAF-A1B5-5BD1345C3E4E}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptography.ProtectedData", "..\System.Security.Cryptography.ProtectedData\src\System.Security.Cryptography.ProtectedData.csproj", "{BC918AFF-9E94-4C65-9FEE-B0A9BC2CC9F2}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Permissions", "..\System.Security.Permissions\ref\System.Security.Permissions.csproj", "{3190A59F-EAF1-44FD-ABEF-BBCC3DB81493}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Permissions", "..\System.Security.Permissions\src\System.Security.Permissions.csproj", "{51055F1B-B97E-46DE-8D94-9EB885D22D20}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading", "..\System.Threading\ref\System.Threading.csproj", "{7D404296-72F5-4F99-931F-73791FAB3E14}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading", "..\System.Threading\src\System.Threading.csproj", "{7C0A6923-A9BC-4F10-81E0-C535EEF537BB}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", "..\System.Windows.Extensions\ref\System.Windows.Extensions.csproj", "{8D689F55-88E3-4EF3-9554-9230409A63FB}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", "..\System.Windows.Extensions\src\System.Windows.Extensions.csproj", "{7492A8FA-F70F-4B7F-8514-8C9B7BE6D4CA}"
+EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{315BC231-270B-456C-919A-3E9BB50CDD7A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{6BA02609-AE23-4E80-8B4B-9C6548AA147A}"
@@ -57,27 +87,19 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{1826CD8D-A5E
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{BDABB39C-A9FF-4A9B-8BA2-EF873C5EEB16}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.TraceSource.Config.Tests", "tests\System.Diagnostics.TraceSource.Config.Tests\System.Diagnostics.TraceSource.Config.Tests.csproj", "{422C9340-E720-4554-B6AC-560A19FE16B1}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Checked|Any CPU = Checked|Any CPU
- Checked|x64 = Checked|x64
- Checked|x86 = Checked|x86
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
+ Checked|Any CPU = Checked|Any CPU
+ Checked|x64 = Checked|x64
+ Checked|x86 = Checked|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {89B01AF7-F0CE-4168-8C4A-33FCDCF33B73}.Checked|Any CPU.ActiveCfg = Checked|x64
- {89B01AF7-F0CE-4168-8C4A-33FCDCF33B73}.Checked|Any CPU.Build.0 = Checked|x64
- {89B01AF7-F0CE-4168-8C4A-33FCDCF33B73}.Checked|x64.ActiveCfg = Checked|x64
- {89B01AF7-F0CE-4168-8C4A-33FCDCF33B73}.Checked|x64.Build.0 = Checked|x64
- {89B01AF7-F0CE-4168-8C4A-33FCDCF33B73}.Checked|x86.ActiveCfg = Checked|x86
- {89B01AF7-F0CE-4168-8C4A-33FCDCF33B73}.Checked|x86.Build.0 = Checked|x86
{89B01AF7-F0CE-4168-8C4A-33FCDCF33B73}.Debug|Any CPU.ActiveCfg = Debug|x64
{89B01AF7-F0CE-4168-8C4A-33FCDCF33B73}.Debug|Any CPU.Build.0 = Debug|x64
{89B01AF7-F0CE-4168-8C4A-33FCDCF33B73}.Debug|x64.ActiveCfg = Debug|x64
@@ -90,12 +112,12 @@ Global
{89B01AF7-F0CE-4168-8C4A-33FCDCF33B73}.Release|x64.Build.0 = Release|x64
{89B01AF7-F0CE-4168-8C4A-33FCDCF33B73}.Release|x86.ActiveCfg = Release|x86
{89B01AF7-F0CE-4168-8C4A-33FCDCF33B73}.Release|x86.Build.0 = Release|x86
- {F6BCA6EF-777E-408B-B49B-B055B5A0BA19}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {F6BCA6EF-777E-408B-B49B-B055B5A0BA19}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {F6BCA6EF-777E-408B-B49B-B055B5A0BA19}.Checked|x64.ActiveCfg = Debug|Any CPU
- {F6BCA6EF-777E-408B-B49B-B055B5A0BA19}.Checked|x64.Build.0 = Debug|Any CPU
- {F6BCA6EF-777E-408B-B49B-B055B5A0BA19}.Checked|x86.ActiveCfg = Debug|Any CPU
- {F6BCA6EF-777E-408B-B49B-B055B5A0BA19}.Checked|x86.Build.0 = Debug|Any CPU
+ {89B01AF7-F0CE-4168-8C4A-33FCDCF33B73}.Checked|Any CPU.ActiveCfg = Checked|x64
+ {89B01AF7-F0CE-4168-8C4A-33FCDCF33B73}.Checked|Any CPU.Build.0 = Checked|x64
+ {89B01AF7-F0CE-4168-8C4A-33FCDCF33B73}.Checked|x64.ActiveCfg = Checked|x64
+ {89B01AF7-F0CE-4168-8C4A-33FCDCF33B73}.Checked|x64.Build.0 = Checked|x64
+ {89B01AF7-F0CE-4168-8C4A-33FCDCF33B73}.Checked|x86.ActiveCfg = Checked|x86
+ {89B01AF7-F0CE-4168-8C4A-33FCDCF33B73}.Checked|x86.Build.0 = Checked|x86
{F6BCA6EF-777E-408B-B49B-B055B5A0BA19}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F6BCA6EF-777E-408B-B49B-B055B5A0BA19}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F6BCA6EF-777E-408B-B49B-B055B5A0BA19}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -108,12 +130,39 @@ Global
{F6BCA6EF-777E-408B-B49B-B055B5A0BA19}.Release|x64.Build.0 = Release|Any CPU
{F6BCA6EF-777E-408B-B49B-B055B5A0BA19}.Release|x86.ActiveCfg = Release|Any CPU
{F6BCA6EF-777E-408B-B49B-B055B5A0BA19}.Release|x86.Build.0 = Release|Any CPU
- {A26E9B9C-AFE7-4740-AC73-626D9823E515}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {A26E9B9C-AFE7-4740-AC73-626D9823E515}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {A26E9B9C-AFE7-4740-AC73-626D9823E515}.Checked|x64.ActiveCfg = Debug|Any CPU
- {A26E9B9C-AFE7-4740-AC73-626D9823E515}.Checked|x64.Build.0 = Debug|Any CPU
- {A26E9B9C-AFE7-4740-AC73-626D9823E515}.Checked|x86.ActiveCfg = Debug|Any CPU
- {A26E9B9C-AFE7-4740-AC73-626D9823E515}.Checked|x86.Build.0 = Debug|Any CPU
+ {F6BCA6EF-777E-408B-B49B-B055B5A0BA19}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {F6BCA6EF-777E-408B-B49B-B055B5A0BA19}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {F6BCA6EF-777E-408B-B49B-B055B5A0BA19}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {99068253-1705-4736-8287-16A1D8CB4899}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {99068253-1705-4736-8287-16A1D8CB4899}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {99068253-1705-4736-8287-16A1D8CB4899}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {99068253-1705-4736-8287-16A1D8CB4899}.Debug|x64.Build.0 = Debug|Any CPU
+ {99068253-1705-4736-8287-16A1D8CB4899}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {99068253-1705-4736-8287-16A1D8CB4899}.Debug|x86.Build.0 = Debug|Any CPU
+ {99068253-1705-4736-8287-16A1D8CB4899}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {99068253-1705-4736-8287-16A1D8CB4899}.Release|Any CPU.Build.0 = Release|Any CPU
+ {99068253-1705-4736-8287-16A1D8CB4899}.Release|x64.ActiveCfg = Release|Any CPU
+ {99068253-1705-4736-8287-16A1D8CB4899}.Release|x64.Build.0 = Release|Any CPU
+ {99068253-1705-4736-8287-16A1D8CB4899}.Release|x86.ActiveCfg = Release|Any CPU
+ {99068253-1705-4736-8287-16A1D8CB4899}.Release|x86.Build.0 = Release|Any CPU
+ {99068253-1705-4736-8287-16A1D8CB4899}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {99068253-1705-4736-8287-16A1D8CB4899}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {99068253-1705-4736-8287-16A1D8CB4899}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {95310F95-26B4-4B33-836E-1B85BCF017D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {95310F95-26B4-4B33-836E-1B85BCF017D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {95310F95-26B4-4B33-836E-1B85BCF017D5}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {95310F95-26B4-4B33-836E-1B85BCF017D5}.Debug|x64.Build.0 = Debug|Any CPU
+ {95310F95-26B4-4B33-836E-1B85BCF017D5}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {95310F95-26B4-4B33-836E-1B85BCF017D5}.Debug|x86.Build.0 = Debug|Any CPU
+ {95310F95-26B4-4B33-836E-1B85BCF017D5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {95310F95-26B4-4B33-836E-1B85BCF017D5}.Release|Any CPU.Build.0 = Release|Any CPU
+ {95310F95-26B4-4B33-836E-1B85BCF017D5}.Release|x64.ActiveCfg = Release|Any CPU
+ {95310F95-26B4-4B33-836E-1B85BCF017D5}.Release|x64.Build.0 = Release|Any CPU
+ {95310F95-26B4-4B33-836E-1B85BCF017D5}.Release|x86.ActiveCfg = Release|Any CPU
+ {95310F95-26B4-4B33-836E-1B85BCF017D5}.Release|x86.Build.0 = Release|Any CPU
+ {95310F95-26B4-4B33-836E-1B85BCF017D5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {95310F95-26B4-4B33-836E-1B85BCF017D5}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {95310F95-26B4-4B33-836E-1B85BCF017D5}.Checked|x86.ActiveCfg = Debug|Any CPU
{A26E9B9C-AFE7-4740-AC73-626D9823E515}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A26E9B9C-AFE7-4740-AC73-626D9823E515}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A26E9B9C-AFE7-4740-AC73-626D9823E515}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -126,12 +175,9 @@ Global
{A26E9B9C-AFE7-4740-AC73-626D9823E515}.Release|x64.Build.0 = Release|Any CPU
{A26E9B9C-AFE7-4740-AC73-626D9823E515}.Release|x86.ActiveCfg = Release|Any CPU
{A26E9B9C-AFE7-4740-AC73-626D9823E515}.Release|x86.Build.0 = Release|Any CPU
- {89C01491-2BE8-438C-8F1D-24DE9AFD7A86}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {89C01491-2BE8-438C-8F1D-24DE9AFD7A86}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {89C01491-2BE8-438C-8F1D-24DE9AFD7A86}.Checked|x64.ActiveCfg = Debug|Any CPU
- {89C01491-2BE8-438C-8F1D-24DE9AFD7A86}.Checked|x64.Build.0 = Debug|Any CPU
- {89C01491-2BE8-438C-8F1D-24DE9AFD7A86}.Checked|x86.ActiveCfg = Debug|Any CPU
- {89C01491-2BE8-438C-8F1D-24DE9AFD7A86}.Checked|x86.Build.0 = Debug|Any CPU
+ {A26E9B9C-AFE7-4740-AC73-626D9823E515}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {A26E9B9C-AFE7-4740-AC73-626D9823E515}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {A26E9B9C-AFE7-4740-AC73-626D9823E515}.Checked|x86.ActiveCfg = Debug|Any CPU
{89C01491-2BE8-438C-8F1D-24DE9AFD7A86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{89C01491-2BE8-438C-8F1D-24DE9AFD7A86}.Debug|Any CPU.Build.0 = Debug|Any CPU
{89C01491-2BE8-438C-8F1D-24DE9AFD7A86}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -144,12 +190,9 @@ Global
{89C01491-2BE8-438C-8F1D-24DE9AFD7A86}.Release|x64.Build.0 = Release|Any CPU
{89C01491-2BE8-438C-8F1D-24DE9AFD7A86}.Release|x86.ActiveCfg = Release|Any CPU
{89C01491-2BE8-438C-8F1D-24DE9AFD7A86}.Release|x86.Build.0 = Release|Any CPU
- {51AEBD0E-0A93-4532-A010-CAAF8E320D6C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {51AEBD0E-0A93-4532-A010-CAAF8E320D6C}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {51AEBD0E-0A93-4532-A010-CAAF8E320D6C}.Checked|x64.ActiveCfg = Debug|Any CPU
- {51AEBD0E-0A93-4532-A010-CAAF8E320D6C}.Checked|x64.Build.0 = Debug|Any CPU
- {51AEBD0E-0A93-4532-A010-CAAF8E320D6C}.Checked|x86.ActiveCfg = Debug|Any CPU
- {51AEBD0E-0A93-4532-A010-CAAF8E320D6C}.Checked|x86.Build.0 = Debug|Any CPU
+ {89C01491-2BE8-438C-8F1D-24DE9AFD7A86}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {89C01491-2BE8-438C-8F1D-24DE9AFD7A86}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {89C01491-2BE8-438C-8F1D-24DE9AFD7A86}.Checked|x86.ActiveCfg = Debug|Any CPU
{51AEBD0E-0A93-4532-A010-CAAF8E320D6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{51AEBD0E-0A93-4532-A010-CAAF8E320D6C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{51AEBD0E-0A93-4532-A010-CAAF8E320D6C}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -162,12 +205,9 @@ Global
{51AEBD0E-0A93-4532-A010-CAAF8E320D6C}.Release|x64.Build.0 = Release|Any CPU
{51AEBD0E-0A93-4532-A010-CAAF8E320D6C}.Release|x86.ActiveCfg = Release|Any CPU
{51AEBD0E-0A93-4532-A010-CAAF8E320D6C}.Release|x86.Build.0 = Release|Any CPU
- {64F83961-AECA-4D5C-B467-A1A94AE6FFB4}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {64F83961-AECA-4D5C-B467-A1A94AE6FFB4}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {64F83961-AECA-4D5C-B467-A1A94AE6FFB4}.Checked|x64.ActiveCfg = Debug|Any CPU
- {64F83961-AECA-4D5C-B467-A1A94AE6FFB4}.Checked|x64.Build.0 = Debug|Any CPU
- {64F83961-AECA-4D5C-B467-A1A94AE6FFB4}.Checked|x86.ActiveCfg = Debug|Any CPU
- {64F83961-AECA-4D5C-B467-A1A94AE6FFB4}.Checked|x86.Build.0 = Debug|Any CPU
+ {51AEBD0E-0A93-4532-A010-CAAF8E320D6C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {51AEBD0E-0A93-4532-A010-CAAF8E320D6C}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {51AEBD0E-0A93-4532-A010-CAAF8E320D6C}.Checked|x86.ActiveCfg = Debug|Any CPU
{64F83961-AECA-4D5C-B467-A1A94AE6FFB4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{64F83961-AECA-4D5C-B467-A1A94AE6FFB4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{64F83961-AECA-4D5C-B467-A1A94AE6FFB4}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -180,12 +220,9 @@ Global
{64F83961-AECA-4D5C-B467-A1A94AE6FFB4}.Release|x64.Build.0 = Release|Any CPU
{64F83961-AECA-4D5C-B467-A1A94AE6FFB4}.Release|x86.ActiveCfg = Release|Any CPU
{64F83961-AECA-4D5C-B467-A1A94AE6FFB4}.Release|x86.Build.0 = Release|Any CPU
- {279066F9-4DB9-4897-8CE4-66BC31118323}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {279066F9-4DB9-4897-8CE4-66BC31118323}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {279066F9-4DB9-4897-8CE4-66BC31118323}.Checked|x64.ActiveCfg = Debug|Any CPU
- {279066F9-4DB9-4897-8CE4-66BC31118323}.Checked|x64.Build.0 = Debug|Any CPU
- {279066F9-4DB9-4897-8CE4-66BC31118323}.Checked|x86.ActiveCfg = Debug|Any CPU
- {279066F9-4DB9-4897-8CE4-66BC31118323}.Checked|x86.Build.0 = Debug|Any CPU
+ {64F83961-AECA-4D5C-B467-A1A94AE6FFB4}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {64F83961-AECA-4D5C-B467-A1A94AE6FFB4}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {64F83961-AECA-4D5C-B467-A1A94AE6FFB4}.Checked|x86.ActiveCfg = Debug|Any CPU
{279066F9-4DB9-4897-8CE4-66BC31118323}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{279066F9-4DB9-4897-8CE4-66BC31118323}.Debug|Any CPU.Build.0 = Debug|Any CPU
{279066F9-4DB9-4897-8CE4-66BC31118323}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -198,12 +235,9 @@ Global
{279066F9-4DB9-4897-8CE4-66BC31118323}.Release|x64.Build.0 = Release|Any CPU
{279066F9-4DB9-4897-8CE4-66BC31118323}.Release|x86.ActiveCfg = Release|Any CPU
{279066F9-4DB9-4897-8CE4-66BC31118323}.Release|x86.Build.0 = Release|Any CPU
- {95F843FE-38B4-4ED5-81FF-605DE38155F6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {95F843FE-38B4-4ED5-81FF-605DE38155F6}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {95F843FE-38B4-4ED5-81FF-605DE38155F6}.Checked|x64.ActiveCfg = Debug|Any CPU
- {95F843FE-38B4-4ED5-81FF-605DE38155F6}.Checked|x64.Build.0 = Debug|Any CPU
- {95F843FE-38B4-4ED5-81FF-605DE38155F6}.Checked|x86.ActiveCfg = Debug|Any CPU
- {95F843FE-38B4-4ED5-81FF-605DE38155F6}.Checked|x86.Build.0 = Debug|Any CPU
+ {279066F9-4DB9-4897-8CE4-66BC31118323}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {279066F9-4DB9-4897-8CE4-66BC31118323}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {279066F9-4DB9-4897-8CE4-66BC31118323}.Checked|x86.ActiveCfg = Debug|Any CPU
{95F843FE-38B4-4ED5-81FF-605DE38155F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{95F843FE-38B4-4ED5-81FF-605DE38155F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{95F843FE-38B4-4ED5-81FF-605DE38155F6}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -216,12 +250,9 @@ Global
{95F843FE-38B4-4ED5-81FF-605DE38155F6}.Release|x64.Build.0 = Release|Any CPU
{95F843FE-38B4-4ED5-81FF-605DE38155F6}.Release|x86.ActiveCfg = Release|Any CPU
{95F843FE-38B4-4ED5-81FF-605DE38155F6}.Release|x86.Build.0 = Release|Any CPU
- {ED544AD5-41C5-4445-BC0F-EFA1553C881A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {ED544AD5-41C5-4445-BC0F-EFA1553C881A}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {ED544AD5-41C5-4445-BC0F-EFA1553C881A}.Checked|x64.ActiveCfg = Debug|Any CPU
- {ED544AD5-41C5-4445-BC0F-EFA1553C881A}.Checked|x64.Build.0 = Debug|Any CPU
- {ED544AD5-41C5-4445-BC0F-EFA1553C881A}.Checked|x86.ActiveCfg = Debug|Any CPU
- {ED544AD5-41C5-4445-BC0F-EFA1553C881A}.Checked|x86.Build.0 = Debug|Any CPU
+ {95F843FE-38B4-4ED5-81FF-605DE38155F6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {95F843FE-38B4-4ED5-81FF-605DE38155F6}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {95F843FE-38B4-4ED5-81FF-605DE38155F6}.Checked|x86.ActiveCfg = Debug|Any CPU
{ED544AD5-41C5-4445-BC0F-EFA1553C881A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ED544AD5-41C5-4445-BC0F-EFA1553C881A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ED544AD5-41C5-4445-BC0F-EFA1553C881A}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -234,12 +265,9 @@ Global
{ED544AD5-41C5-4445-BC0F-EFA1553C881A}.Release|x64.Build.0 = Release|Any CPU
{ED544AD5-41C5-4445-BC0F-EFA1553C881A}.Release|x86.ActiveCfg = Release|Any CPU
{ED544AD5-41C5-4445-BC0F-EFA1553C881A}.Release|x86.Build.0 = Release|Any CPU
- {97D756D3-8ECA-45F5-A9F5-DBF659D87BC4}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {97D756D3-8ECA-45F5-A9F5-DBF659D87BC4}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {97D756D3-8ECA-45F5-A9F5-DBF659D87BC4}.Checked|x64.ActiveCfg = Debug|Any CPU
- {97D756D3-8ECA-45F5-A9F5-DBF659D87BC4}.Checked|x64.Build.0 = Debug|Any CPU
- {97D756D3-8ECA-45F5-A9F5-DBF659D87BC4}.Checked|x86.ActiveCfg = Debug|Any CPU
- {97D756D3-8ECA-45F5-A9F5-DBF659D87BC4}.Checked|x86.Build.0 = Debug|Any CPU
+ {ED544AD5-41C5-4445-BC0F-EFA1553C881A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {ED544AD5-41C5-4445-BC0F-EFA1553C881A}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {ED544AD5-41C5-4445-BC0F-EFA1553C881A}.Checked|x86.ActiveCfg = Debug|Any CPU
{97D756D3-8ECA-45F5-A9F5-DBF659D87BC4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{97D756D3-8ECA-45F5-A9F5-DBF659D87BC4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{97D756D3-8ECA-45F5-A9F5-DBF659D87BC4}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -252,12 +280,9 @@ Global
{97D756D3-8ECA-45F5-A9F5-DBF659D87BC4}.Release|x64.Build.0 = Release|Any CPU
{97D756D3-8ECA-45F5-A9F5-DBF659D87BC4}.Release|x86.ActiveCfg = Release|Any CPU
{97D756D3-8ECA-45F5-A9F5-DBF659D87BC4}.Release|x86.Build.0 = Release|Any CPU
- {83696A63-CF89-4DE4-8F79-96F5B830A4B6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {83696A63-CF89-4DE4-8F79-96F5B830A4B6}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {83696A63-CF89-4DE4-8F79-96F5B830A4B6}.Checked|x64.ActiveCfg = Debug|Any CPU
- {83696A63-CF89-4DE4-8F79-96F5B830A4B6}.Checked|x64.Build.0 = Debug|Any CPU
- {83696A63-CF89-4DE4-8F79-96F5B830A4B6}.Checked|x86.ActiveCfg = Debug|Any CPU
- {83696A63-CF89-4DE4-8F79-96F5B830A4B6}.Checked|x86.Build.0 = Debug|Any CPU
+ {97D756D3-8ECA-45F5-A9F5-DBF659D87BC4}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {97D756D3-8ECA-45F5-A9F5-DBF659D87BC4}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {97D756D3-8ECA-45F5-A9F5-DBF659D87BC4}.Checked|x86.ActiveCfg = Debug|Any CPU
{83696A63-CF89-4DE4-8F79-96F5B830A4B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{83696A63-CF89-4DE4-8F79-96F5B830A4B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{83696A63-CF89-4DE4-8F79-96F5B830A4B6}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -270,12 +295,84 @@ Global
{83696A63-CF89-4DE4-8F79-96F5B830A4B6}.Release|x64.Build.0 = Release|Any CPU
{83696A63-CF89-4DE4-8F79-96F5B830A4B6}.Release|x86.ActiveCfg = Release|Any CPU
{83696A63-CF89-4DE4-8F79-96F5B830A4B6}.Release|x86.Build.0 = Release|Any CPU
- {2F00396E-003A-4385-92DC-69FDBEF330D8}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {2F00396E-003A-4385-92DC-69FDBEF330D8}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {2F00396E-003A-4385-92DC-69FDBEF330D8}.Checked|x64.ActiveCfg = Debug|Any CPU
- {2F00396E-003A-4385-92DC-69FDBEF330D8}.Checked|x64.Build.0 = Debug|Any CPU
- {2F00396E-003A-4385-92DC-69FDBEF330D8}.Checked|x86.ActiveCfg = Debug|Any CPU
- {2F00396E-003A-4385-92DC-69FDBEF330D8}.Checked|x86.Build.0 = Debug|Any CPU
+ {83696A63-CF89-4DE4-8F79-96F5B830A4B6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {83696A63-CF89-4DE4-8F79-96F5B830A4B6}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {83696A63-CF89-4DE4-8F79-96F5B830A4B6}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {EBC92D9F-C33D-47F6-877C-999E3F7995A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {EBC92D9F-C33D-47F6-877C-999E3F7995A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {EBC92D9F-C33D-47F6-877C-999E3F7995A6}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {EBC92D9F-C33D-47F6-877C-999E3F7995A6}.Debug|x64.Build.0 = Debug|Any CPU
+ {EBC92D9F-C33D-47F6-877C-999E3F7995A6}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {EBC92D9F-C33D-47F6-877C-999E3F7995A6}.Debug|x86.Build.0 = Debug|Any CPU
+ {EBC92D9F-C33D-47F6-877C-999E3F7995A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {EBC92D9F-C33D-47F6-877C-999E3F7995A6}.Release|Any CPU.Build.0 = Release|Any CPU
+ {EBC92D9F-C33D-47F6-877C-999E3F7995A6}.Release|x64.ActiveCfg = Release|Any CPU
+ {EBC92D9F-C33D-47F6-877C-999E3F7995A6}.Release|x64.Build.0 = Release|Any CPU
+ {EBC92D9F-C33D-47F6-877C-999E3F7995A6}.Release|x86.ActiveCfg = Release|Any CPU
+ {EBC92D9F-C33D-47F6-877C-999E3F7995A6}.Release|x86.Build.0 = Release|Any CPU
+ {EBC92D9F-C33D-47F6-877C-999E3F7995A6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {EBC92D9F-C33D-47F6-877C-999E3F7995A6}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {EBC92D9F-C33D-47F6-877C-999E3F7995A6}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {B2A1DCFB-E2F2-4ECD-AB62-E04653F14DC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B2A1DCFB-E2F2-4ECD-AB62-E04653F14DC6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B2A1DCFB-E2F2-4ECD-AB62-E04653F14DC6}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {B2A1DCFB-E2F2-4ECD-AB62-E04653F14DC6}.Debug|x64.Build.0 = Debug|Any CPU
+ {B2A1DCFB-E2F2-4ECD-AB62-E04653F14DC6}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {B2A1DCFB-E2F2-4ECD-AB62-E04653F14DC6}.Debug|x86.Build.0 = Debug|Any CPU
+ {B2A1DCFB-E2F2-4ECD-AB62-E04653F14DC6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B2A1DCFB-E2F2-4ECD-AB62-E04653F14DC6}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B2A1DCFB-E2F2-4ECD-AB62-E04653F14DC6}.Release|x64.ActiveCfg = Release|Any CPU
+ {B2A1DCFB-E2F2-4ECD-AB62-E04653F14DC6}.Release|x64.Build.0 = Release|Any CPU
+ {B2A1DCFB-E2F2-4ECD-AB62-E04653F14DC6}.Release|x86.ActiveCfg = Release|Any CPU
+ {B2A1DCFB-E2F2-4ECD-AB62-E04653F14DC6}.Release|x86.Build.0 = Release|Any CPU
+ {B2A1DCFB-E2F2-4ECD-AB62-E04653F14DC6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {B2A1DCFB-E2F2-4ECD-AB62-E04653F14DC6}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {B2A1DCFB-E2F2-4ECD-AB62-E04653F14DC6}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {B6AAF07C-2420-4A03-9A8A-ACD824FBE7C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B6AAF07C-2420-4A03-9A8A-ACD824FBE7C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B6AAF07C-2420-4A03-9A8A-ACD824FBE7C0}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {B6AAF07C-2420-4A03-9A8A-ACD824FBE7C0}.Debug|x64.Build.0 = Debug|Any CPU
+ {B6AAF07C-2420-4A03-9A8A-ACD824FBE7C0}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {B6AAF07C-2420-4A03-9A8A-ACD824FBE7C0}.Debug|x86.Build.0 = Debug|Any CPU
+ {B6AAF07C-2420-4A03-9A8A-ACD824FBE7C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B6AAF07C-2420-4A03-9A8A-ACD824FBE7C0}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B6AAF07C-2420-4A03-9A8A-ACD824FBE7C0}.Release|x64.ActiveCfg = Release|Any CPU
+ {B6AAF07C-2420-4A03-9A8A-ACD824FBE7C0}.Release|x64.Build.0 = Release|Any CPU
+ {B6AAF07C-2420-4A03-9A8A-ACD824FBE7C0}.Release|x86.ActiveCfg = Release|Any CPU
+ {B6AAF07C-2420-4A03-9A8A-ACD824FBE7C0}.Release|x86.Build.0 = Release|Any CPU
+ {B6AAF07C-2420-4A03-9A8A-ACD824FBE7C0}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {B6AAF07C-2420-4A03-9A8A-ACD824FBE7C0}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {B6AAF07C-2420-4A03-9A8A-ACD824FBE7C0}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {73AAB58B-BA4C-47B4-90A7-363EAEC6E35F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {73AAB58B-BA4C-47B4-90A7-363EAEC6E35F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {73AAB58B-BA4C-47B4-90A7-363EAEC6E35F}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {73AAB58B-BA4C-47B4-90A7-363EAEC6E35F}.Debug|x64.Build.0 = Debug|Any CPU
+ {73AAB58B-BA4C-47B4-90A7-363EAEC6E35F}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {73AAB58B-BA4C-47B4-90A7-363EAEC6E35F}.Debug|x86.Build.0 = Debug|Any CPU
+ {73AAB58B-BA4C-47B4-90A7-363EAEC6E35F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {73AAB58B-BA4C-47B4-90A7-363EAEC6E35F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {73AAB58B-BA4C-47B4-90A7-363EAEC6E35F}.Release|x64.ActiveCfg = Release|Any CPU
+ {73AAB58B-BA4C-47B4-90A7-363EAEC6E35F}.Release|x64.Build.0 = Release|Any CPU
+ {73AAB58B-BA4C-47B4-90A7-363EAEC6E35F}.Release|x86.ActiveCfg = Release|Any CPU
+ {73AAB58B-BA4C-47B4-90A7-363EAEC6E35F}.Release|x86.Build.0 = Release|Any CPU
+ {73AAB58B-BA4C-47B4-90A7-363EAEC6E35F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {73AAB58B-BA4C-47B4-90A7-363EAEC6E35F}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {73AAB58B-BA4C-47B4-90A7-363EAEC6E35F}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {35E0C7A5-DA20-4882-8865-74581F180685}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {35E0C7A5-DA20-4882-8865-74581F180685}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {35E0C7A5-DA20-4882-8865-74581F180685}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {35E0C7A5-DA20-4882-8865-74581F180685}.Debug|x64.Build.0 = Debug|Any CPU
+ {35E0C7A5-DA20-4882-8865-74581F180685}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {35E0C7A5-DA20-4882-8865-74581F180685}.Debug|x86.Build.0 = Debug|Any CPU
+ {35E0C7A5-DA20-4882-8865-74581F180685}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {35E0C7A5-DA20-4882-8865-74581F180685}.Release|Any CPU.Build.0 = Release|Any CPU
+ {35E0C7A5-DA20-4882-8865-74581F180685}.Release|x64.ActiveCfg = Release|Any CPU
+ {35E0C7A5-DA20-4882-8865-74581F180685}.Release|x64.Build.0 = Release|Any CPU
+ {35E0C7A5-DA20-4882-8865-74581F180685}.Release|x86.ActiveCfg = Release|Any CPU
+ {35E0C7A5-DA20-4882-8865-74581F180685}.Release|x86.Build.0 = Release|Any CPU
+ {35E0C7A5-DA20-4882-8865-74581F180685}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {35E0C7A5-DA20-4882-8865-74581F180685}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {35E0C7A5-DA20-4882-8865-74581F180685}.Checked|x86.ActiveCfg = Debug|Any CPU
{2F00396E-003A-4385-92DC-69FDBEF330D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2F00396E-003A-4385-92DC-69FDBEF330D8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2F00396E-003A-4385-92DC-69FDBEF330D8}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -288,12 +385,9 @@ Global
{2F00396E-003A-4385-92DC-69FDBEF330D8}.Release|x64.Build.0 = Release|Any CPU
{2F00396E-003A-4385-92DC-69FDBEF330D8}.Release|x86.ActiveCfg = Release|Any CPU
{2F00396E-003A-4385-92DC-69FDBEF330D8}.Release|x86.Build.0 = Release|Any CPU
- {48CC1460-B1E7-4DE9-A4E7-2206F7FD54CF}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {48CC1460-B1E7-4DE9-A4E7-2206F7FD54CF}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {48CC1460-B1E7-4DE9-A4E7-2206F7FD54CF}.Checked|x64.ActiveCfg = Debug|Any CPU
- {48CC1460-B1E7-4DE9-A4E7-2206F7FD54CF}.Checked|x64.Build.0 = Debug|Any CPU
- {48CC1460-B1E7-4DE9-A4E7-2206F7FD54CF}.Checked|x86.ActiveCfg = Debug|Any CPU
- {48CC1460-B1E7-4DE9-A4E7-2206F7FD54CF}.Checked|x86.Build.0 = Debug|Any CPU
+ {2F00396E-003A-4385-92DC-69FDBEF330D8}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {2F00396E-003A-4385-92DC-69FDBEF330D8}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {2F00396E-003A-4385-92DC-69FDBEF330D8}.Checked|x86.ActiveCfg = Debug|Any CPU
{48CC1460-B1E7-4DE9-A4E7-2206F7FD54CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{48CC1460-B1E7-4DE9-A4E7-2206F7FD54CF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{48CC1460-B1E7-4DE9-A4E7-2206F7FD54CF}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -306,12 +400,24 @@ Global
{48CC1460-B1E7-4DE9-A4E7-2206F7FD54CF}.Release|x64.Build.0 = Release|Any CPU
{48CC1460-B1E7-4DE9-A4E7-2206F7FD54CF}.Release|x86.ActiveCfg = Release|Any CPU
{48CC1460-B1E7-4DE9-A4E7-2206F7FD54CF}.Release|x86.Build.0 = Release|Any CPU
- {0C126AE9-C858-4AC8-9DB1-B8E228BD2DB0}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {0C126AE9-C858-4AC8-9DB1-B8E228BD2DB0}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {0C126AE9-C858-4AC8-9DB1-B8E228BD2DB0}.Checked|x64.ActiveCfg = Debug|Any CPU
- {0C126AE9-C858-4AC8-9DB1-B8E228BD2DB0}.Checked|x64.Build.0 = Debug|Any CPU
- {0C126AE9-C858-4AC8-9DB1-B8E228BD2DB0}.Checked|x86.ActiveCfg = Debug|Any CPU
- {0C126AE9-C858-4AC8-9DB1-B8E228BD2DB0}.Checked|x86.Build.0 = Debug|Any CPU
+ {48CC1460-B1E7-4DE9-A4E7-2206F7FD54CF}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {48CC1460-B1E7-4DE9-A4E7-2206F7FD54CF}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {48CC1460-B1E7-4DE9-A4E7-2206F7FD54CF}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {422C9340-E720-4554-B6AC-560A19FE16B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {422C9340-E720-4554-B6AC-560A19FE16B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {422C9340-E720-4554-B6AC-560A19FE16B1}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {422C9340-E720-4554-B6AC-560A19FE16B1}.Debug|x64.Build.0 = Debug|Any CPU
+ {422C9340-E720-4554-B6AC-560A19FE16B1}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {422C9340-E720-4554-B6AC-560A19FE16B1}.Debug|x86.Build.0 = Debug|Any CPU
+ {422C9340-E720-4554-B6AC-560A19FE16B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {422C9340-E720-4554-B6AC-560A19FE16B1}.Release|Any CPU.Build.0 = Release|Any CPU
+ {422C9340-E720-4554-B6AC-560A19FE16B1}.Release|x64.ActiveCfg = Release|Any CPU
+ {422C9340-E720-4554-B6AC-560A19FE16B1}.Release|x64.Build.0 = Release|Any CPU
+ {422C9340-E720-4554-B6AC-560A19FE16B1}.Release|x86.ActiveCfg = Release|Any CPU
+ {422C9340-E720-4554-B6AC-560A19FE16B1}.Release|x86.Build.0 = Release|Any CPU
+ {422C9340-E720-4554-B6AC-560A19FE16B1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {422C9340-E720-4554-B6AC-560A19FE16B1}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {422C9340-E720-4554-B6AC-560A19FE16B1}.Checked|x86.ActiveCfg = Debug|Any CPU
{0C126AE9-C858-4AC8-9DB1-B8E228BD2DB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0C126AE9-C858-4AC8-9DB1-B8E228BD2DB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0C126AE9-C858-4AC8-9DB1-B8E228BD2DB0}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -324,12 +430,39 @@ Global
{0C126AE9-C858-4AC8-9DB1-B8E228BD2DB0}.Release|x64.Build.0 = Release|Any CPU
{0C126AE9-C858-4AC8-9DB1-B8E228BD2DB0}.Release|x86.ActiveCfg = Release|Any CPU
{0C126AE9-C858-4AC8-9DB1-B8E228BD2DB0}.Release|x86.Build.0 = Release|Any CPU
- {535A9671-08A0-46DD-8191-DC9B995DF425}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {535A9671-08A0-46DD-8191-DC9B995DF425}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {535A9671-08A0-46DD-8191-DC9B995DF425}.Checked|x64.ActiveCfg = Debug|Any CPU
- {535A9671-08A0-46DD-8191-DC9B995DF425}.Checked|x64.Build.0 = Debug|Any CPU
- {535A9671-08A0-46DD-8191-DC9B995DF425}.Checked|x86.ActiveCfg = Debug|Any CPU
- {535A9671-08A0-46DD-8191-DC9B995DF425}.Checked|x86.Build.0 = Debug|Any CPU
+ {0C126AE9-C858-4AC8-9DB1-B8E228BD2DB0}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {0C126AE9-C858-4AC8-9DB1-B8E228BD2DB0}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {0C126AE9-C858-4AC8-9DB1-B8E228BD2DB0}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {DBE77318-482B-42AB-9912-A1D769A77312}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DBE77318-482B-42AB-9912-A1D769A77312}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DBE77318-482B-42AB-9912-A1D769A77312}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {DBE77318-482B-42AB-9912-A1D769A77312}.Debug|x64.Build.0 = Debug|Any CPU
+ {DBE77318-482B-42AB-9912-A1D769A77312}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {DBE77318-482B-42AB-9912-A1D769A77312}.Debug|x86.Build.0 = Debug|Any CPU
+ {DBE77318-482B-42AB-9912-A1D769A77312}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {DBE77318-482B-42AB-9912-A1D769A77312}.Release|Any CPU.Build.0 = Release|Any CPU
+ {DBE77318-482B-42AB-9912-A1D769A77312}.Release|x64.ActiveCfg = Release|Any CPU
+ {DBE77318-482B-42AB-9912-A1D769A77312}.Release|x64.Build.0 = Release|Any CPU
+ {DBE77318-482B-42AB-9912-A1D769A77312}.Release|x86.ActiveCfg = Release|Any CPU
+ {DBE77318-482B-42AB-9912-A1D769A77312}.Release|x86.Build.0 = Release|Any CPU
+ {DBE77318-482B-42AB-9912-A1D769A77312}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {DBE77318-482B-42AB-9912-A1D769A77312}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {DBE77318-482B-42AB-9912-A1D769A77312}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {A92A8311-3A5B-42DF-9454-23CB869A2574}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A92A8311-3A5B-42DF-9454-23CB869A2574}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A92A8311-3A5B-42DF-9454-23CB869A2574}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {A92A8311-3A5B-42DF-9454-23CB869A2574}.Debug|x64.Build.0 = Debug|Any CPU
+ {A92A8311-3A5B-42DF-9454-23CB869A2574}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {A92A8311-3A5B-42DF-9454-23CB869A2574}.Debug|x86.Build.0 = Debug|Any CPU
+ {A92A8311-3A5B-42DF-9454-23CB869A2574}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A92A8311-3A5B-42DF-9454-23CB869A2574}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A92A8311-3A5B-42DF-9454-23CB869A2574}.Release|x64.ActiveCfg = Release|Any CPU
+ {A92A8311-3A5B-42DF-9454-23CB869A2574}.Release|x64.Build.0 = Release|Any CPU
+ {A92A8311-3A5B-42DF-9454-23CB869A2574}.Release|x86.ActiveCfg = Release|Any CPU
+ {A92A8311-3A5B-42DF-9454-23CB869A2574}.Release|x86.Build.0 = Release|Any CPU
+ {A92A8311-3A5B-42DF-9454-23CB869A2574}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {A92A8311-3A5B-42DF-9454-23CB869A2574}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {A92A8311-3A5B-42DF-9454-23CB869A2574}.Checked|x86.ActiveCfg = Debug|Any CPU
{535A9671-08A0-46DD-8191-DC9B995DF425}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{535A9671-08A0-46DD-8191-DC9B995DF425}.Debug|Any CPU.Build.0 = Debug|Any CPU
{535A9671-08A0-46DD-8191-DC9B995DF425}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -342,12 +475,9 @@ Global
{535A9671-08A0-46DD-8191-DC9B995DF425}.Release|x64.Build.0 = Release|Any CPU
{535A9671-08A0-46DD-8191-DC9B995DF425}.Release|x86.ActiveCfg = Release|Any CPU
{535A9671-08A0-46DD-8191-DC9B995DF425}.Release|x86.Build.0 = Release|Any CPU
- {8EAD8906-AF4E-42CA-983E-28CFE2224AEE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {8EAD8906-AF4E-42CA-983E-28CFE2224AEE}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {8EAD8906-AF4E-42CA-983E-28CFE2224AEE}.Checked|x64.ActiveCfg = Debug|Any CPU
- {8EAD8906-AF4E-42CA-983E-28CFE2224AEE}.Checked|x64.Build.0 = Debug|Any CPU
- {8EAD8906-AF4E-42CA-983E-28CFE2224AEE}.Checked|x86.ActiveCfg = Debug|Any CPU
- {8EAD8906-AF4E-42CA-983E-28CFE2224AEE}.Checked|x86.Build.0 = Debug|Any CPU
+ {535A9671-08A0-46DD-8191-DC9B995DF425}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {535A9671-08A0-46DD-8191-DC9B995DF425}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {535A9671-08A0-46DD-8191-DC9B995DF425}.Checked|x86.ActiveCfg = Debug|Any CPU
{8EAD8906-AF4E-42CA-983E-28CFE2224AEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8EAD8906-AF4E-42CA-983E-28CFE2224AEE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8EAD8906-AF4E-42CA-983E-28CFE2224AEE}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -360,12 +490,24 @@ Global
{8EAD8906-AF4E-42CA-983E-28CFE2224AEE}.Release|x64.Build.0 = Release|Any CPU
{8EAD8906-AF4E-42CA-983E-28CFE2224AEE}.Release|x86.ActiveCfg = Release|Any CPU
{8EAD8906-AF4E-42CA-983E-28CFE2224AEE}.Release|x86.Build.0 = Release|Any CPU
- {4DAA5CFC-C59D-4C1B-A12A-BC9863F38C0C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {4DAA5CFC-C59D-4C1B-A12A-BC9863F38C0C}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {4DAA5CFC-C59D-4C1B-A12A-BC9863F38C0C}.Checked|x64.ActiveCfg = Debug|Any CPU
- {4DAA5CFC-C59D-4C1B-A12A-BC9863F38C0C}.Checked|x64.Build.0 = Debug|Any CPU
- {4DAA5CFC-C59D-4C1B-A12A-BC9863F38C0C}.Checked|x86.ActiveCfg = Debug|Any CPU
- {4DAA5CFC-C59D-4C1B-A12A-BC9863F38C0C}.Checked|x86.Build.0 = Debug|Any CPU
+ {8EAD8906-AF4E-42CA-983E-28CFE2224AEE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {8EAD8906-AF4E-42CA-983E-28CFE2224AEE}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {8EAD8906-AF4E-42CA-983E-28CFE2224AEE}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {A9948CC3-4082-4F9C-AB77-81EE3B0A4C14}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A9948CC3-4082-4F9C-AB77-81EE3B0A4C14}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A9948CC3-4082-4F9C-AB77-81EE3B0A4C14}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {A9948CC3-4082-4F9C-AB77-81EE3B0A4C14}.Debug|x64.Build.0 = Debug|Any CPU
+ {A9948CC3-4082-4F9C-AB77-81EE3B0A4C14}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {A9948CC3-4082-4F9C-AB77-81EE3B0A4C14}.Debug|x86.Build.0 = Debug|Any CPU
+ {A9948CC3-4082-4F9C-AB77-81EE3B0A4C14}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A9948CC3-4082-4F9C-AB77-81EE3B0A4C14}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A9948CC3-4082-4F9C-AB77-81EE3B0A4C14}.Release|x64.ActiveCfg = Release|Any CPU
+ {A9948CC3-4082-4F9C-AB77-81EE3B0A4C14}.Release|x64.Build.0 = Release|Any CPU
+ {A9948CC3-4082-4F9C-AB77-81EE3B0A4C14}.Release|x86.ActiveCfg = Release|Any CPU
+ {A9948CC3-4082-4F9C-AB77-81EE3B0A4C14}.Release|x86.Build.0 = Release|Any CPU
+ {A9948CC3-4082-4F9C-AB77-81EE3B0A4C14}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {A9948CC3-4082-4F9C-AB77-81EE3B0A4C14}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {A9948CC3-4082-4F9C-AB77-81EE3B0A4C14}.Checked|x86.ActiveCfg = Debug|Any CPU
{4DAA5CFC-C59D-4C1B-A12A-BC9863F38C0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4DAA5CFC-C59D-4C1B-A12A-BC9863F38C0C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4DAA5CFC-C59D-4C1B-A12A-BC9863F38C0C}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -378,12 +520,9 @@ Global
{4DAA5CFC-C59D-4C1B-A12A-BC9863F38C0C}.Release|x64.Build.0 = Release|Any CPU
{4DAA5CFC-C59D-4C1B-A12A-BC9863F38C0C}.Release|x86.ActiveCfg = Release|Any CPU
{4DAA5CFC-C59D-4C1B-A12A-BC9863F38C0C}.Release|x86.Build.0 = Release|Any CPU
- {2F5DA438-6CBA-42AA-818A-64C633A56D55}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {2F5DA438-6CBA-42AA-818A-64C633A56D55}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {2F5DA438-6CBA-42AA-818A-64C633A56D55}.Checked|x64.ActiveCfg = Debug|Any CPU
- {2F5DA438-6CBA-42AA-818A-64C633A56D55}.Checked|x64.Build.0 = Debug|Any CPU
- {2F5DA438-6CBA-42AA-818A-64C633A56D55}.Checked|x86.ActiveCfg = Debug|Any CPU
- {2F5DA438-6CBA-42AA-818A-64C633A56D55}.Checked|x86.Build.0 = Debug|Any CPU
+ {4DAA5CFC-C59D-4C1B-A12A-BC9863F38C0C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {4DAA5CFC-C59D-4C1B-A12A-BC9863F38C0C}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {4DAA5CFC-C59D-4C1B-A12A-BC9863F38C0C}.Checked|x86.ActiveCfg = Debug|Any CPU
{2F5DA438-6CBA-42AA-818A-64C633A56D55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2F5DA438-6CBA-42AA-818A-64C633A56D55}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2F5DA438-6CBA-42AA-818A-64C633A56D55}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -396,12 +535,9 @@ Global
{2F5DA438-6CBA-42AA-818A-64C633A56D55}.Release|x64.Build.0 = Release|Any CPU
{2F5DA438-6CBA-42AA-818A-64C633A56D55}.Release|x86.ActiveCfg = Release|Any CPU
{2F5DA438-6CBA-42AA-818A-64C633A56D55}.Release|x86.Build.0 = Release|Any CPU
- {A17B970B-41B2-4C78-BA05-2B954357E46A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {A17B970B-41B2-4C78-BA05-2B954357E46A}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {A17B970B-41B2-4C78-BA05-2B954357E46A}.Checked|x64.ActiveCfg = Debug|Any CPU
- {A17B970B-41B2-4C78-BA05-2B954357E46A}.Checked|x64.Build.0 = Debug|Any CPU
- {A17B970B-41B2-4C78-BA05-2B954357E46A}.Checked|x86.ActiveCfg = Debug|Any CPU
- {A17B970B-41B2-4C78-BA05-2B954357E46A}.Checked|x86.Build.0 = Debug|Any CPU
+ {2F5DA438-6CBA-42AA-818A-64C633A56D55}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {2F5DA438-6CBA-42AA-818A-64C633A56D55}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {2F5DA438-6CBA-42AA-818A-64C633A56D55}.Checked|x86.ActiveCfg = Debug|Any CPU
{A17B970B-41B2-4C78-BA05-2B954357E46A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A17B970B-41B2-4C78-BA05-2B954357E46A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A17B970B-41B2-4C78-BA05-2B954357E46A}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -414,12 +550,9 @@ Global
{A17B970B-41B2-4C78-BA05-2B954357E46A}.Release|x64.Build.0 = Release|Any CPU
{A17B970B-41B2-4C78-BA05-2B954357E46A}.Release|x86.ActiveCfg = Release|Any CPU
{A17B970B-41B2-4C78-BA05-2B954357E46A}.Release|x86.Build.0 = Release|Any CPU
- {3D4EEB00-D4E0-4581-A144-51EFF8319FFB}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {3D4EEB00-D4E0-4581-A144-51EFF8319FFB}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {3D4EEB00-D4E0-4581-A144-51EFF8319FFB}.Checked|x64.ActiveCfg = Debug|Any CPU
- {3D4EEB00-D4E0-4581-A144-51EFF8319FFB}.Checked|x64.Build.0 = Debug|Any CPU
- {3D4EEB00-D4E0-4581-A144-51EFF8319FFB}.Checked|x86.ActiveCfg = Debug|Any CPU
- {3D4EEB00-D4E0-4581-A144-51EFF8319FFB}.Checked|x86.Build.0 = Debug|Any CPU
+ {A17B970B-41B2-4C78-BA05-2B954357E46A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {A17B970B-41B2-4C78-BA05-2B954357E46A}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {A17B970B-41B2-4C78-BA05-2B954357E46A}.Checked|x86.ActiveCfg = Debug|Any CPU
{3D4EEB00-D4E0-4581-A144-51EFF8319FFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3D4EEB00-D4E0-4581-A144-51EFF8319FFB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3D4EEB00-D4E0-4581-A144-51EFF8319FFB}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -432,12 +565,9 @@ Global
{3D4EEB00-D4E0-4581-A144-51EFF8319FFB}.Release|x64.Build.0 = Release|Any CPU
{3D4EEB00-D4E0-4581-A144-51EFF8319FFB}.Release|x86.ActiveCfg = Release|Any CPU
{3D4EEB00-D4E0-4581-A144-51EFF8319FFB}.Release|x86.Build.0 = Release|Any CPU
- {637E7769-42D2-4541-9A63-32301113FA5A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {637E7769-42D2-4541-9A63-32301113FA5A}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {637E7769-42D2-4541-9A63-32301113FA5A}.Checked|x64.ActiveCfg = Debug|Any CPU
- {637E7769-42D2-4541-9A63-32301113FA5A}.Checked|x64.Build.0 = Debug|Any CPU
- {637E7769-42D2-4541-9A63-32301113FA5A}.Checked|x86.ActiveCfg = Debug|Any CPU
- {637E7769-42D2-4541-9A63-32301113FA5A}.Checked|x86.Build.0 = Debug|Any CPU
+ {3D4EEB00-D4E0-4581-A144-51EFF8319FFB}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {3D4EEB00-D4E0-4581-A144-51EFF8319FFB}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {3D4EEB00-D4E0-4581-A144-51EFF8319FFB}.Checked|x86.ActiveCfg = Debug|Any CPU
{637E7769-42D2-4541-9A63-32301113FA5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{637E7769-42D2-4541-9A63-32301113FA5A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{637E7769-42D2-4541-9A63-32301113FA5A}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -450,12 +580,69 @@ Global
{637E7769-42D2-4541-9A63-32301113FA5A}.Release|x64.Build.0 = Release|Any CPU
{637E7769-42D2-4541-9A63-32301113FA5A}.Release|x86.ActiveCfg = Release|Any CPU
{637E7769-42D2-4541-9A63-32301113FA5A}.Release|x86.Build.0 = Release|Any CPU
- {7D404296-72F5-4F99-931F-73791FAB3E14}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {7D404296-72F5-4F99-931F-73791FAB3E14}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {7D404296-72F5-4F99-931F-73791FAB3E14}.Checked|x64.ActiveCfg = Debug|Any CPU
- {7D404296-72F5-4F99-931F-73791FAB3E14}.Checked|x64.Build.0 = Debug|Any CPU
- {7D404296-72F5-4F99-931F-73791FAB3E14}.Checked|x86.ActiveCfg = Debug|Any CPU
- {7D404296-72F5-4F99-931F-73791FAB3E14}.Checked|x86.Build.0 = Debug|Any CPU
+ {637E7769-42D2-4541-9A63-32301113FA5A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {637E7769-42D2-4541-9A63-32301113FA5A}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {637E7769-42D2-4541-9A63-32301113FA5A}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {39AD2F59-DA98-4CAF-A1B5-5BD1345C3E4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {39AD2F59-DA98-4CAF-A1B5-5BD1345C3E4E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {39AD2F59-DA98-4CAF-A1B5-5BD1345C3E4E}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {39AD2F59-DA98-4CAF-A1B5-5BD1345C3E4E}.Debug|x64.Build.0 = Debug|Any CPU
+ {39AD2F59-DA98-4CAF-A1B5-5BD1345C3E4E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {39AD2F59-DA98-4CAF-A1B5-5BD1345C3E4E}.Debug|x86.Build.0 = Debug|Any CPU
+ {39AD2F59-DA98-4CAF-A1B5-5BD1345C3E4E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {39AD2F59-DA98-4CAF-A1B5-5BD1345C3E4E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {39AD2F59-DA98-4CAF-A1B5-5BD1345C3E4E}.Release|x64.ActiveCfg = Release|Any CPU
+ {39AD2F59-DA98-4CAF-A1B5-5BD1345C3E4E}.Release|x64.Build.0 = Release|Any CPU
+ {39AD2F59-DA98-4CAF-A1B5-5BD1345C3E4E}.Release|x86.ActiveCfg = Release|Any CPU
+ {39AD2F59-DA98-4CAF-A1B5-5BD1345C3E4E}.Release|x86.Build.0 = Release|Any CPU
+ {39AD2F59-DA98-4CAF-A1B5-5BD1345C3E4E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {39AD2F59-DA98-4CAF-A1B5-5BD1345C3E4E}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {39AD2F59-DA98-4CAF-A1B5-5BD1345C3E4E}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {BC918AFF-9E94-4C65-9FEE-B0A9BC2CC9F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BC918AFF-9E94-4C65-9FEE-B0A9BC2CC9F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BC918AFF-9E94-4C65-9FEE-B0A9BC2CC9F2}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {BC918AFF-9E94-4C65-9FEE-B0A9BC2CC9F2}.Debug|x64.Build.0 = Debug|Any CPU
+ {BC918AFF-9E94-4C65-9FEE-B0A9BC2CC9F2}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {BC918AFF-9E94-4C65-9FEE-B0A9BC2CC9F2}.Debug|x86.Build.0 = Debug|Any CPU
+ {BC918AFF-9E94-4C65-9FEE-B0A9BC2CC9F2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BC918AFF-9E94-4C65-9FEE-B0A9BC2CC9F2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BC918AFF-9E94-4C65-9FEE-B0A9BC2CC9F2}.Release|x64.ActiveCfg = Release|Any CPU
+ {BC918AFF-9E94-4C65-9FEE-B0A9BC2CC9F2}.Release|x64.Build.0 = Release|Any CPU
+ {BC918AFF-9E94-4C65-9FEE-B0A9BC2CC9F2}.Release|x86.ActiveCfg = Release|Any CPU
+ {BC918AFF-9E94-4C65-9FEE-B0A9BC2CC9F2}.Release|x86.Build.0 = Release|Any CPU
+ {BC918AFF-9E94-4C65-9FEE-B0A9BC2CC9F2}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {BC918AFF-9E94-4C65-9FEE-B0A9BC2CC9F2}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {BC918AFF-9E94-4C65-9FEE-B0A9BC2CC9F2}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {3190A59F-EAF1-44FD-ABEF-BBCC3DB81493}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3190A59F-EAF1-44FD-ABEF-BBCC3DB81493}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3190A59F-EAF1-44FD-ABEF-BBCC3DB81493}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {3190A59F-EAF1-44FD-ABEF-BBCC3DB81493}.Debug|x64.Build.0 = Debug|Any CPU
+ {3190A59F-EAF1-44FD-ABEF-BBCC3DB81493}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {3190A59F-EAF1-44FD-ABEF-BBCC3DB81493}.Debug|x86.Build.0 = Debug|Any CPU
+ {3190A59F-EAF1-44FD-ABEF-BBCC3DB81493}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3190A59F-EAF1-44FD-ABEF-BBCC3DB81493}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3190A59F-EAF1-44FD-ABEF-BBCC3DB81493}.Release|x64.ActiveCfg = Release|Any CPU
+ {3190A59F-EAF1-44FD-ABEF-BBCC3DB81493}.Release|x64.Build.0 = Release|Any CPU
+ {3190A59F-EAF1-44FD-ABEF-BBCC3DB81493}.Release|x86.ActiveCfg = Release|Any CPU
+ {3190A59F-EAF1-44FD-ABEF-BBCC3DB81493}.Release|x86.Build.0 = Release|Any CPU
+ {3190A59F-EAF1-44FD-ABEF-BBCC3DB81493}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {3190A59F-EAF1-44FD-ABEF-BBCC3DB81493}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {3190A59F-EAF1-44FD-ABEF-BBCC3DB81493}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {51055F1B-B97E-46DE-8D94-9EB885D22D20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {51055F1B-B97E-46DE-8D94-9EB885D22D20}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {51055F1B-B97E-46DE-8D94-9EB885D22D20}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {51055F1B-B97E-46DE-8D94-9EB885D22D20}.Debug|x64.Build.0 = Debug|Any CPU
+ {51055F1B-B97E-46DE-8D94-9EB885D22D20}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {51055F1B-B97E-46DE-8D94-9EB885D22D20}.Debug|x86.Build.0 = Debug|Any CPU
+ {51055F1B-B97E-46DE-8D94-9EB885D22D20}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {51055F1B-B97E-46DE-8D94-9EB885D22D20}.Release|Any CPU.Build.0 = Release|Any CPU
+ {51055F1B-B97E-46DE-8D94-9EB885D22D20}.Release|x64.ActiveCfg = Release|Any CPU
+ {51055F1B-B97E-46DE-8D94-9EB885D22D20}.Release|x64.Build.0 = Release|Any CPU
+ {51055F1B-B97E-46DE-8D94-9EB885D22D20}.Release|x86.ActiveCfg = Release|Any CPU
+ {51055F1B-B97E-46DE-8D94-9EB885D22D20}.Release|x86.Build.0 = Release|Any CPU
+ {51055F1B-B97E-46DE-8D94-9EB885D22D20}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {51055F1B-B97E-46DE-8D94-9EB885D22D20}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {51055F1B-B97E-46DE-8D94-9EB885D22D20}.Checked|x86.ActiveCfg = Debug|Any CPU
{7D404296-72F5-4F99-931F-73791FAB3E14}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7D404296-72F5-4F99-931F-73791FAB3E14}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7D404296-72F5-4F99-931F-73791FAB3E14}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -468,12 +655,9 @@ Global
{7D404296-72F5-4F99-931F-73791FAB3E14}.Release|x64.Build.0 = Release|Any CPU
{7D404296-72F5-4F99-931F-73791FAB3E14}.Release|x86.ActiveCfg = Release|Any CPU
{7D404296-72F5-4F99-931F-73791FAB3E14}.Release|x86.Build.0 = Release|Any CPU
- {7C0A6923-A9BC-4F10-81E0-C535EEF537BB}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {7C0A6923-A9BC-4F10-81E0-C535EEF537BB}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {7C0A6923-A9BC-4F10-81E0-C535EEF537BB}.Checked|x64.ActiveCfg = Debug|Any CPU
- {7C0A6923-A9BC-4F10-81E0-C535EEF537BB}.Checked|x64.Build.0 = Debug|Any CPU
- {7C0A6923-A9BC-4F10-81E0-C535EEF537BB}.Checked|x86.ActiveCfg = Debug|Any CPU
- {7C0A6923-A9BC-4F10-81E0-C535EEF537BB}.Checked|x86.Build.0 = Debug|Any CPU
+ {7D404296-72F5-4F99-931F-73791FAB3E14}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {7D404296-72F5-4F99-931F-73791FAB3E14}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {7D404296-72F5-4F99-931F-73791FAB3E14}.Checked|x86.ActiveCfg = Debug|Any CPU
{7C0A6923-A9BC-4F10-81E0-C535EEF537BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7C0A6923-A9BC-4F10-81E0-C535EEF537BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7C0A6923-A9BC-4F10-81E0-C535EEF537BB}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -486,58 +670,86 @@ Global
{7C0A6923-A9BC-4F10-81E0-C535EEF537BB}.Release|x64.Build.0 = Release|Any CPU
{7C0A6923-A9BC-4F10-81E0-C535EEF537BB}.Release|x86.ActiveCfg = Release|Any CPU
{7C0A6923-A9BC-4F10-81E0-C535EEF537BB}.Release|x86.Build.0 = Release|Any CPU
- {422C9340-E720-4554-B6AC-560A19FE16B1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {422C9340-E720-4554-B6AC-560A19FE16B1}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {422C9340-E720-4554-B6AC-560A19FE16B1}.Checked|x64.ActiveCfg = Debug|Any CPU
- {422C9340-E720-4554-B6AC-560A19FE16B1}.Checked|x64.Build.0 = Debug|Any CPU
- {422C9340-E720-4554-B6AC-560A19FE16B1}.Checked|x86.ActiveCfg = Debug|Any CPU
- {422C9340-E720-4554-B6AC-560A19FE16B1}.Checked|x86.Build.0 = Debug|Any CPU
- {422C9340-E720-4554-B6AC-560A19FE16B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {422C9340-E720-4554-B6AC-560A19FE16B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {422C9340-E720-4554-B6AC-560A19FE16B1}.Debug|x64.ActiveCfg = Debug|Any CPU
- {422C9340-E720-4554-B6AC-560A19FE16B1}.Debug|x64.Build.0 = Debug|Any CPU
- {422C9340-E720-4554-B6AC-560A19FE16B1}.Debug|x86.ActiveCfg = Debug|Any CPU
- {422C9340-E720-4554-B6AC-560A19FE16B1}.Debug|x86.Build.0 = Debug|Any CPU
- {422C9340-E720-4554-B6AC-560A19FE16B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {422C9340-E720-4554-B6AC-560A19FE16B1}.Release|Any CPU.Build.0 = Release|Any CPU
- {422C9340-E720-4554-B6AC-560A19FE16B1}.Release|x64.ActiveCfg = Release|Any CPU
- {422C9340-E720-4554-B6AC-560A19FE16B1}.Release|x64.Build.0 = Release|Any CPU
- {422C9340-E720-4554-B6AC-560A19FE16B1}.Release|x86.ActiveCfg = Release|Any CPU
- {422C9340-E720-4554-B6AC-560A19FE16B1}.Release|x86.Build.0 = Release|Any CPU
+ {7C0A6923-A9BC-4F10-81E0-C535EEF537BB}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {7C0A6923-A9BC-4F10-81E0-C535EEF537BB}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {7C0A6923-A9BC-4F10-81E0-C535EEF537BB}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {8D689F55-88E3-4EF3-9554-9230409A63FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8D689F55-88E3-4EF3-9554-9230409A63FB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8D689F55-88E3-4EF3-9554-9230409A63FB}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {8D689F55-88E3-4EF3-9554-9230409A63FB}.Debug|x64.Build.0 = Debug|Any CPU
+ {8D689F55-88E3-4EF3-9554-9230409A63FB}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {8D689F55-88E3-4EF3-9554-9230409A63FB}.Debug|x86.Build.0 = Debug|Any CPU
+ {8D689F55-88E3-4EF3-9554-9230409A63FB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8D689F55-88E3-4EF3-9554-9230409A63FB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8D689F55-88E3-4EF3-9554-9230409A63FB}.Release|x64.ActiveCfg = Release|Any CPU
+ {8D689F55-88E3-4EF3-9554-9230409A63FB}.Release|x64.Build.0 = Release|Any CPU
+ {8D689F55-88E3-4EF3-9554-9230409A63FB}.Release|x86.ActiveCfg = Release|Any CPU
+ {8D689F55-88E3-4EF3-9554-9230409A63FB}.Release|x86.Build.0 = Release|Any CPU
+ {8D689F55-88E3-4EF3-9554-9230409A63FB}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {8D689F55-88E3-4EF3-9554-9230409A63FB}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {8D689F55-88E3-4EF3-9554-9230409A63FB}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {7492A8FA-F70F-4B7F-8514-8C9B7BE6D4CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7492A8FA-F70F-4B7F-8514-8C9B7BE6D4CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7492A8FA-F70F-4B7F-8514-8C9B7BE6D4CA}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {7492A8FA-F70F-4B7F-8514-8C9B7BE6D4CA}.Debug|x64.Build.0 = Debug|Any CPU
+ {7492A8FA-F70F-4B7F-8514-8C9B7BE6D4CA}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {7492A8FA-F70F-4B7F-8514-8C9B7BE6D4CA}.Debug|x86.Build.0 = Debug|Any CPU
+ {7492A8FA-F70F-4B7F-8514-8C9B7BE6D4CA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7492A8FA-F70F-4B7F-8514-8C9B7BE6D4CA}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7492A8FA-F70F-4B7F-8514-8C9B7BE6D4CA}.Release|x64.ActiveCfg = Release|Any CPU
+ {7492A8FA-F70F-4B7F-8514-8C9B7BE6D4CA}.Release|x64.Build.0 = Release|Any CPU
+ {7492A8FA-F70F-4B7F-8514-8C9B7BE6D4CA}.Release|x86.ActiveCfg = Release|Any CPU
+ {7492A8FA-F70F-4B7F-8514-8C9B7BE6D4CA}.Release|x86.Build.0 = Release|Any CPU
+ {7492A8FA-F70F-4B7F-8514-8C9B7BE6D4CA}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {7492A8FA-F70F-4B7F-8514-8C9B7BE6D4CA}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {7492A8FA-F70F-4B7F-8514-8C9B7BE6D4CA}.Checked|x86.ActiveCfg = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{89B01AF7-F0CE-4168-8C4A-33FCDCF33B73} = {315BC231-270B-456C-919A-3E9BB50CDD7A}
+ {95310F95-26B4-4B33-836E-1B85BCF017D5} = {315BC231-270B-456C-919A-3E9BB50CDD7A}
+ {89C01491-2BE8-438C-8F1D-24DE9AFD7A86} = {315BC231-270B-456C-919A-3E9BB50CDD7A}
+ {64F83961-AECA-4D5C-B467-A1A94AE6FFB4} = {315BC231-270B-456C-919A-3E9BB50CDD7A}
+ {95F843FE-38B4-4ED5-81FF-605DE38155F6} = {315BC231-270B-456C-919A-3E9BB50CDD7A}
+ {97D756D3-8ECA-45F5-A9F5-DBF659D87BC4} = {315BC231-270B-456C-919A-3E9BB50CDD7A}
+ {B2A1DCFB-E2F2-4ECD-AB62-E04653F14DC6} = {315BC231-270B-456C-919A-3E9BB50CDD7A}
+ {73AAB58B-BA4C-47B4-90A7-363EAEC6E35F} = {315BC231-270B-456C-919A-3E9BB50CDD7A}
+ {35E0C7A5-DA20-4882-8865-74581F180685} = {315BC231-270B-456C-919A-3E9BB50CDD7A}
+ {48CC1460-B1E7-4DE9-A4E7-2206F7FD54CF} = {315BC231-270B-456C-919A-3E9BB50CDD7A}
+ {A92A8311-3A5B-42DF-9454-23CB869A2574} = {315BC231-270B-456C-919A-3E9BB50CDD7A}
+ {4DAA5CFC-C59D-4C1B-A12A-BC9863F38C0C} = {315BC231-270B-456C-919A-3E9BB50CDD7A}
+ {637E7769-42D2-4541-9A63-32301113FA5A} = {315BC231-270B-456C-919A-3E9BB50CDD7A}
+ {BC918AFF-9E94-4C65-9FEE-B0A9BC2CC9F2} = {315BC231-270B-456C-919A-3E9BB50CDD7A}
+ {51055F1B-B97E-46DE-8D94-9EB885D22D20} = {315BC231-270B-456C-919A-3E9BB50CDD7A}
+ {7C0A6923-A9BC-4F10-81E0-C535EEF537BB} = {315BC231-270B-456C-919A-3E9BB50CDD7A}
+ {7492A8FA-F70F-4B7F-8514-8C9B7BE6D4CA} = {315BC231-270B-456C-919A-3E9BB50CDD7A}
{F6BCA6EF-777E-408B-B49B-B055B5A0BA19} = {6BA02609-AE23-4E80-8B4B-9C6548AA147A}
+ {422C9340-E720-4554-B6AC-560A19FE16B1} = {6BA02609-AE23-4E80-8B4B-9C6548AA147A}
+ {0C126AE9-C858-4AC8-9DB1-B8E228BD2DB0} = {6BA02609-AE23-4E80-8B4B-9C6548AA147A}
+ {99068253-1705-4736-8287-16A1D8CB4899} = {1826CD8D-A5E3-4C8E-A49A-E746D9682B87}
{A26E9B9C-AFE7-4740-AC73-626D9823E515} = {1826CD8D-A5E3-4C8E-A49A-E746D9682B87}
- {89C01491-2BE8-438C-8F1D-24DE9AFD7A86} = {315BC231-270B-456C-919A-3E9BB50CDD7A}
{51AEBD0E-0A93-4532-A010-CAAF8E320D6C} = {1826CD8D-A5E3-4C8E-A49A-E746D9682B87}
- {64F83961-AECA-4D5C-B467-A1A94AE6FFB4} = {315BC231-270B-456C-919A-3E9BB50CDD7A}
{279066F9-4DB9-4897-8CE4-66BC31118323} = {1826CD8D-A5E3-4C8E-A49A-E746D9682B87}
- {95F843FE-38B4-4ED5-81FF-605DE38155F6} = {315BC231-270B-456C-919A-3E9BB50CDD7A}
{ED544AD5-41C5-4445-BC0F-EFA1553C881A} = {1826CD8D-A5E3-4C8E-A49A-E746D9682B87}
- {97D756D3-8ECA-45F5-A9F5-DBF659D87BC4} = {315BC231-270B-456C-919A-3E9BB50CDD7A}
{83696A63-CF89-4DE4-8F79-96F5B830A4B6} = {1826CD8D-A5E3-4C8E-A49A-E746D9682B87}
+ {EBC92D9F-C33D-47F6-877C-999E3F7995A6} = {1826CD8D-A5E3-4C8E-A49A-E746D9682B87}
+ {B6AAF07C-2420-4A03-9A8A-ACD824FBE7C0} = {1826CD8D-A5E3-4C8E-A49A-E746D9682B87}
{2F00396E-003A-4385-92DC-69FDBEF330D8} = {1826CD8D-A5E3-4C8E-A49A-E746D9682B87}
- {48CC1460-B1E7-4DE9-A4E7-2206F7FD54CF} = {315BC231-270B-456C-919A-3E9BB50CDD7A}
- {0C126AE9-C858-4AC8-9DB1-B8E228BD2DB0} = {6BA02609-AE23-4E80-8B4B-9C6548AA147A}
+ {DBE77318-482B-42AB-9912-A1D769A77312} = {1826CD8D-A5E3-4C8E-A49A-E746D9682B87}
{535A9671-08A0-46DD-8191-DC9B995DF425} = {1826CD8D-A5E3-4C8E-A49A-E746D9682B87}
+ {A9948CC3-4082-4F9C-AB77-81EE3B0A4C14} = {1826CD8D-A5E3-4C8E-A49A-E746D9682B87}
+ {3D4EEB00-D4E0-4581-A144-51EFF8319FFB} = {1826CD8D-A5E3-4C8E-A49A-E746D9682B87}
+ {39AD2F59-DA98-4CAF-A1B5-5BD1345C3E4E} = {1826CD8D-A5E3-4C8E-A49A-E746D9682B87}
+ {3190A59F-EAF1-44FD-ABEF-BBCC3DB81493} = {1826CD8D-A5E3-4C8E-A49A-E746D9682B87}
+ {7D404296-72F5-4F99-931F-73791FAB3E14} = {1826CD8D-A5E3-4C8E-A49A-E746D9682B87}
+ {8D689F55-88E3-4EF3-9554-9230409A63FB} = {1826CD8D-A5E3-4C8E-A49A-E746D9682B87}
{8EAD8906-AF4E-42CA-983E-28CFE2224AEE} = {BDABB39C-A9FF-4A9B-8BA2-EF873C5EEB16}
- {4DAA5CFC-C59D-4C1B-A12A-BC9863F38C0C} = {315BC231-270B-456C-919A-3E9BB50CDD7A}
{2F5DA438-6CBA-42AA-818A-64C633A56D55} = {BDABB39C-A9FF-4A9B-8BA2-EF873C5EEB16}
{A17B970B-41B2-4C78-BA05-2B954357E46A} = {BDABB39C-A9FF-4A9B-8BA2-EF873C5EEB16}
- {3D4EEB00-D4E0-4581-A144-51EFF8319FFB} = {1826CD8D-A5E3-4C8E-A49A-E746D9682B87}
- {637E7769-42D2-4541-9A63-32301113FA5A} = {315BC231-270B-456C-919A-3E9BB50CDD7A}
- {7D404296-72F5-4F99-931F-73791FAB3E14} = {1826CD8D-A5E3-4C8E-A49A-E746D9682B87}
- {7C0A6923-A9BC-4F10-81E0-C535EEF537BB} = {315BC231-270B-456C-919A-3E9BB50CDD7A}
- {422C9340-E720-4554-B6AC-560A19FE16B1} = {6BA02609-AE23-4E80-8B4B-9C6548AA147A}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {52B54BB6-271E-45BD-A7A4-D4CEDC973704}
EndGlobalSection
- GlobalSection(SharedMSBuildProjectFiles) = preSolution
- ..\System.Private.CoreLib\src\System.Private.CoreLib.Shared.projitems*{89b01af7-f0ce-4168-8c4a-33fcdcf33b73}*SharedItemsImports = 5
- EndGlobalSection
EndGlobal
diff --git a/src/libraries/System.Diagnostics.Tracing/System.Diagnostics.Tracing.sln b/src/libraries/System.Diagnostics.Tracing/System.Diagnostics.Tracing.sln
index 9276506e9d2..edeb585f4b5 100644
--- a/src/libraries/System.Diagnostics.Tracing/System.Diagnostics.Tracing.sln
+++ b/src/libraries/System.Diagnostics.Tracing/System.Diagnostics.Tracing.sln
@@ -11,6 +11,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.Tracing.
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{3969DA9E-6C7D-421D-ABCC-BD02DFA36DA4}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{79F03506-0B08-46BB-B99D-ABDBA8CFFFAC}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{7D67652E-7840-42AF-A830-F9A336AD8CBE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{38416350-0E7B-4201-8B7E-3FA80FCFA81A}"
@@ -69,11 +71,8 @@ Global
{6E159831-C97C-40FD-AD1A-E8B1EE3E7168}.Release|x86.ActiveCfg = Release|Any CPU
{6E159831-C97C-40FD-AD1A-E8B1EE3E7168}.Release|x86.Build.0 = Release|Any CPU
{6E159831-C97C-40FD-AD1A-E8B1EE3E7168}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {6E159831-C97C-40FD-AD1A-E8B1EE3E7168}.Checked|Any CPU.Build.0 = Debug|Any CPU
{6E159831-C97C-40FD-AD1A-E8B1EE3E7168}.Checked|x64.ActiveCfg = Debug|Any CPU
- {6E159831-C97C-40FD-AD1A-E8B1EE3E7168}.Checked|x64.Build.0 = Debug|Any CPU
{6E159831-C97C-40FD-AD1A-E8B1EE3E7168}.Checked|x86.ActiveCfg = Debug|Any CPU
- {6E159831-C97C-40FD-AD1A-E8B1EE3E7168}.Checked|x86.Build.0 = Debug|Any CPU
{D7C16DED-127A-4CBB-BBCF-DF133816413B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D7C16DED-127A-4CBB-BBCF-DF133816413B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D7C16DED-127A-4CBB-BBCF-DF133816413B}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -87,11 +86,8 @@ Global
{D7C16DED-127A-4CBB-BBCF-DF133816413B}.Release|x86.ActiveCfg = Release|Any CPU
{D7C16DED-127A-4CBB-BBCF-DF133816413B}.Release|x86.Build.0 = Release|Any CPU
{D7C16DED-127A-4CBB-BBCF-DF133816413B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {D7C16DED-127A-4CBB-BBCF-DF133816413B}.Checked|Any CPU.Build.0 = Debug|Any CPU
{D7C16DED-127A-4CBB-BBCF-DF133816413B}.Checked|x64.ActiveCfg = Debug|Any CPU
- {D7C16DED-127A-4CBB-BBCF-DF133816413B}.Checked|x64.Build.0 = Debug|Any CPU
{D7C16DED-127A-4CBB-BBCF-DF133816413B}.Checked|x86.ActiveCfg = Debug|Any CPU
- {D7C16DED-127A-4CBB-BBCF-DF133816413B}.Checked|x86.Build.0 = Debug|Any CPU
{63783D6D-0848-4303-8E7A-BBB7F65DCE9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{63783D6D-0848-4303-8E7A-BBB7F65DCE9E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{63783D6D-0848-4303-8E7A-BBB7F65DCE9E}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -105,11 +101,8 @@ Global
{63783D6D-0848-4303-8E7A-BBB7F65DCE9E}.Release|x86.ActiveCfg = Release|Any CPU
{63783D6D-0848-4303-8E7A-BBB7F65DCE9E}.Release|x86.Build.0 = Release|Any CPU
{63783D6D-0848-4303-8E7A-BBB7F65DCE9E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {63783D6D-0848-4303-8E7A-BBB7F65DCE9E}.Checked|Any CPU.Build.0 = Debug|Any CPU
{63783D6D-0848-4303-8E7A-BBB7F65DCE9E}.Checked|x64.ActiveCfg = Debug|Any CPU
- {63783D6D-0848-4303-8E7A-BBB7F65DCE9E}.Checked|x64.Build.0 = Debug|Any CPU
{63783D6D-0848-4303-8E7A-BBB7F65DCE9E}.Checked|x86.ActiveCfg = Debug|Any CPU
- {63783D6D-0848-4303-8E7A-BBB7F65DCE9E}.Checked|x86.Build.0 = Debug|Any CPU
{24605C4D-2465-433D-A393-45CB950E0834}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{24605C4D-2465-433D-A393-45CB950E0834}.Debug|Any CPU.Build.0 = Debug|Any CPU
{24605C4D-2465-433D-A393-45CB950E0834}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -123,11 +116,8 @@ Global
{24605C4D-2465-433D-A393-45CB950E0834}.Release|x86.ActiveCfg = Release|Any CPU
{24605C4D-2465-433D-A393-45CB950E0834}.Release|x86.Build.0 = Release|Any CPU
{24605C4D-2465-433D-A393-45CB950E0834}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {24605C4D-2465-433D-A393-45CB950E0834}.Checked|Any CPU.Build.0 = Debug|Any CPU
{24605C4D-2465-433D-A393-45CB950E0834}.Checked|x64.ActiveCfg = Debug|Any CPU
- {24605C4D-2465-433D-A393-45CB950E0834}.Checked|x64.Build.0 = Debug|Any CPU
{24605C4D-2465-433D-A393-45CB950E0834}.Checked|x86.ActiveCfg = Debug|Any CPU
- {24605C4D-2465-433D-A393-45CB950E0834}.Checked|x86.Build.0 = Debug|Any CPU
{3969DA9E-6C7D-421D-ABCC-BD02DFA36DA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3969DA9E-6C7D-421D-ABCC-BD02DFA36DA4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3969DA9E-6C7D-421D-ABCC-BD02DFA36DA4}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -141,11 +131,23 @@ Global
{3969DA9E-6C7D-421D-ABCC-BD02DFA36DA4}.Release|x86.ActiveCfg = Release|Any CPU
{3969DA9E-6C7D-421D-ABCC-BD02DFA36DA4}.Release|x86.Build.0 = Release|Any CPU
{3969DA9E-6C7D-421D-ABCC-BD02DFA36DA4}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {3969DA9E-6C7D-421D-ABCC-BD02DFA36DA4}.Checked|Any CPU.Build.0 = Debug|Any CPU
{3969DA9E-6C7D-421D-ABCC-BD02DFA36DA4}.Checked|x64.ActiveCfg = Debug|Any CPU
- {3969DA9E-6C7D-421D-ABCC-BD02DFA36DA4}.Checked|x64.Build.0 = Debug|Any CPU
{3969DA9E-6C7D-421D-ABCC-BD02DFA36DA4}.Checked|x86.ActiveCfg = Debug|Any CPU
- {3969DA9E-6C7D-421D-ABCC-BD02DFA36DA4}.Checked|x86.Build.0 = Debug|Any CPU
+ {79F03506-0B08-46BB-B99D-ABDBA8CFFFAC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {79F03506-0B08-46BB-B99D-ABDBA8CFFFAC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {79F03506-0B08-46BB-B99D-ABDBA8CFFFAC}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {79F03506-0B08-46BB-B99D-ABDBA8CFFFAC}.Debug|x64.Build.0 = Debug|Any CPU
+ {79F03506-0B08-46BB-B99D-ABDBA8CFFFAC}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {79F03506-0B08-46BB-B99D-ABDBA8CFFFAC}.Debug|x86.Build.0 = Debug|Any CPU
+ {79F03506-0B08-46BB-B99D-ABDBA8CFFFAC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {79F03506-0B08-46BB-B99D-ABDBA8CFFFAC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {79F03506-0B08-46BB-B99D-ABDBA8CFFFAC}.Release|x64.ActiveCfg = Release|Any CPU
+ {79F03506-0B08-46BB-B99D-ABDBA8CFFFAC}.Release|x64.Build.0 = Release|Any CPU
+ {79F03506-0B08-46BB-B99D-ABDBA8CFFFAC}.Release|x86.ActiveCfg = Release|Any CPU
+ {79F03506-0B08-46BB-B99D-ABDBA8CFFFAC}.Release|x86.Build.0 = Release|Any CPU
+ {79F03506-0B08-46BB-B99D-ABDBA8CFFFAC}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {79F03506-0B08-46BB-B99D-ABDBA8CFFFAC}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {79F03506-0B08-46BB-B99D-ABDBA8CFFFAC}.Checked|x86.ActiveCfg = Debug|Any CPU
{7D67652E-7840-42AF-A830-F9A336AD8CBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7D67652E-7840-42AF-A830-F9A336AD8CBE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7D67652E-7840-42AF-A830-F9A336AD8CBE}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -159,11 +161,8 @@ Global
{7D67652E-7840-42AF-A830-F9A336AD8CBE}.Release|x86.ActiveCfg = Release|Any CPU
{7D67652E-7840-42AF-A830-F9A336AD8CBE}.Release|x86.Build.0 = Release|Any CPU
{7D67652E-7840-42AF-A830-F9A336AD8CBE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {7D67652E-7840-42AF-A830-F9A336AD8CBE}.Checked|Any CPU.Build.0 = Debug|Any CPU
{7D67652E-7840-42AF-A830-F9A336AD8CBE}.Checked|x64.ActiveCfg = Debug|Any CPU
- {7D67652E-7840-42AF-A830-F9A336AD8CBE}.Checked|x64.Build.0 = Debug|Any CPU
{7D67652E-7840-42AF-A830-F9A336AD8CBE}.Checked|x86.ActiveCfg = Debug|Any CPU
- {7D67652E-7840-42AF-A830-F9A336AD8CBE}.Checked|x86.Build.0 = Debug|Any CPU
{38416350-0E7B-4201-8B7E-3FA80FCFA81A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{38416350-0E7B-4201-8B7E-3FA80FCFA81A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{38416350-0E7B-4201-8B7E-3FA80FCFA81A}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -177,11 +176,8 @@ Global
{38416350-0E7B-4201-8B7E-3FA80FCFA81A}.Release|x86.ActiveCfg = Release|Any CPU
{38416350-0E7B-4201-8B7E-3FA80FCFA81A}.Release|x86.Build.0 = Release|Any CPU
{38416350-0E7B-4201-8B7E-3FA80FCFA81A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {38416350-0E7B-4201-8B7E-3FA80FCFA81A}.Checked|Any CPU.Build.0 = Debug|Any CPU
{38416350-0E7B-4201-8B7E-3FA80FCFA81A}.Checked|x64.ActiveCfg = Debug|Any CPU
- {38416350-0E7B-4201-8B7E-3FA80FCFA81A}.Checked|x64.Build.0 = Debug|Any CPU
{38416350-0E7B-4201-8B7E-3FA80FCFA81A}.Checked|x86.ActiveCfg = Debug|Any CPU
- {38416350-0E7B-4201-8B7E-3FA80FCFA81A}.Checked|x86.Build.0 = Debug|Any CPU
{58E24DB7-4207-49F8-BC73-A665A2A961A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{58E24DB7-4207-49F8-BC73-A665A2A961A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{58E24DB7-4207-49F8-BC73-A665A2A961A6}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -195,11 +191,8 @@ Global
{58E24DB7-4207-49F8-BC73-A665A2A961A6}.Release|x86.ActiveCfg = Release|Any CPU
{58E24DB7-4207-49F8-BC73-A665A2A961A6}.Release|x86.Build.0 = Release|Any CPU
{58E24DB7-4207-49F8-BC73-A665A2A961A6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {58E24DB7-4207-49F8-BC73-A665A2A961A6}.Checked|Any CPU.Build.0 = Debug|Any CPU
{58E24DB7-4207-49F8-BC73-A665A2A961A6}.Checked|x64.ActiveCfg = Debug|Any CPU
- {58E24DB7-4207-49F8-BC73-A665A2A961A6}.Checked|x64.Build.0 = Debug|Any CPU
{58E24DB7-4207-49F8-BC73-A665A2A961A6}.Checked|x86.ActiveCfg = Debug|Any CPU
- {58E24DB7-4207-49F8-BC73-A665A2A961A6}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -210,6 +203,7 @@ Global
{6E159831-C97C-40FD-AD1A-E8B1EE3E7168} = {21E11D21-3706-49C7-ACA7-10BA9A021908}
{24605C4D-2465-433D-A393-45CB950E0834} = {21E11D21-3706-49C7-ACA7-10BA9A021908}
{D7C16DED-127A-4CBB-BBCF-DF133816413B} = {61AC03AE-7090-458C-A3AB-5A4CCFF6AD08}
+ {79F03506-0B08-46BB-B99D-ABDBA8CFFFAC} = {61AC03AE-7090-458C-A3AB-5A4CCFF6AD08}
{58E24DB7-4207-49F8-BC73-A665A2A961A6} = {61AC03AE-7090-458C-A3AB-5A4CCFF6AD08}
{3969DA9E-6C7D-421D-ABCC-BD02DFA36DA4} = {F2FD3769-35C6-481A-AF35-9BDDEE550B54}
{7D67652E-7840-42AF-A830-F9A336AD8CBE} = {F2FD3769-35C6-481A-AF35-9BDDEE550B54}
diff --git a/src/libraries/System.DirectoryServices.AccountManagement/System.DirectoryServices.AccountManagement.sln b/src/libraries/System.DirectoryServices.AccountManagement/System.DirectoryServices.AccountManagement.sln
index c30c71ec014..b00115eb670 100644
--- a/src/libraries/System.DirectoryServices.AccountManagement/System.DirectoryServices.AccountManagement.sln
+++ b/src/libraries/System.DirectoryServices.AccountManagement/System.DirectoryServices.AccountManagement.sln
@@ -9,6 +9,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Configuration.Config
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Configuration.ConfigurationManager", "..\System.Configuration.ConfigurationManager\src\System.Configuration.ConfigurationManager.csproj", "{A62FC401-7B8B-4CDE-8D46-3776980C94F0}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.EventLog", "..\System.Diagnostics.EventLog\ref\System.Diagnostics.EventLog.csproj", "{8710F08A-F3C3-4E92-B0ED-E787C4523EC0}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.EventLog.Messages", "..\System.Diagnostics.EventLog\src\Messages\System.Diagnostics.EventLog.Messages.csproj", "{82747414-420A-47A9-886A-A042E46780B6}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.EventLog", "..\System.Diagnostics.EventLog\src\System.Diagnostics.EventLog.csproj", "{EA3C3FD4-EE85-4F25-A787-12EECA3529B0}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.DirectoryServices.AccountManagement", "ref\System.DirectoryServices.AccountManagement.csproj", "{7BC4C9CF-F8E4-424B-9F30-237B801F435D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.DirectoryServices.AccountManagement", "src\System.DirectoryServices.AccountManagement.csproj", "{7DCEDAE6-45FC-402B-AAE4-14AD66B73D30}"
@@ -77,6 +83,18 @@ Global
{A62FC401-7B8B-4CDE-8D46-3776980C94F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A62FC401-7B8B-4CDE-8D46-3776980C94F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A62FC401-7B8B-4CDE-8D46-3776980C94F0}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8710F08A-F3C3-4E92-B0ED-E787C4523EC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8710F08A-F3C3-4E92-B0ED-E787C4523EC0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8710F08A-F3C3-4E92-B0ED-E787C4523EC0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8710F08A-F3C3-4E92-B0ED-E787C4523EC0}.Release|Any CPU.Build.0 = Release|Any CPU
+ {82747414-420A-47A9-886A-A042E46780B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {82747414-420A-47A9-886A-A042E46780B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {82747414-420A-47A9-886A-A042E46780B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {82747414-420A-47A9-886A-A042E46780B6}.Release|Any CPU.Build.0 = Release|Any CPU
+ {EA3C3FD4-EE85-4F25-A787-12EECA3529B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {EA3C3FD4-EE85-4F25-A787-12EECA3529B0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {EA3C3FD4-EE85-4F25-A787-12EECA3529B0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {EA3C3FD4-EE85-4F25-A787-12EECA3529B0}.Release|Any CPU.Build.0 = Release|Any CPU
{7BC4C9CF-F8E4-424B-9F30-237B801F435D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7BC4C9CF-F8E4-424B-9F30-237B801F435D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7BC4C9CF-F8E4-424B-9F30-237B801F435D}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -154,6 +172,7 @@ Global
{44080626-DF98-470B-BCA1-CC3DFFCB94E3} = {DE91E835-DB5D-4FAD-B992-1A98B24B87E9}
{E659DDCB-A12C-4907-A750-CE601DBEF450} = {51C4F716-E3A7-4DBC-BC81-CAC8D2D33F14}
{33637A81-A335-474A-814D-648881BB403B} = {51C4F716-E3A7-4DBC-BC81-CAC8D2D33F14}
+ {8710F08A-F3C3-4E92-B0ED-E787C4523EC0} = {51C4F716-E3A7-4DBC-BC81-CAC8D2D33F14}
{7BC4C9CF-F8E4-424B-9F30-237B801F435D} = {51C4F716-E3A7-4DBC-BC81-CAC8D2D33F14}
{469EBD55-AEA1-4AF5-BBC6-F9938C7DAAC3} = {51C4F716-E3A7-4DBC-BC81-CAC8D2D33F14}
{8D48B49B-398F-4536-B436-AAD50A7F54B1} = {51C4F716-E3A7-4DBC-BC81-CAC8D2D33F14}
@@ -163,6 +182,8 @@ Global
{CDF9EADE-78CA-4775-8961-D52E066432C9} = {51C4F716-E3A7-4DBC-BC81-CAC8D2D33F14}
{F7BA3E1E-2BF4-4127-B26D-5392D3111365} = {C2159C53-1E91-486D-A66C-E658FB73A87F}
{A62FC401-7B8B-4CDE-8D46-3776980C94F0} = {C2159C53-1E91-486D-A66C-E658FB73A87F}
+ {82747414-420A-47A9-886A-A042E46780B6} = {C2159C53-1E91-486D-A66C-E658FB73A87F}
+ {EA3C3FD4-EE85-4F25-A787-12EECA3529B0} = {C2159C53-1E91-486D-A66C-E658FB73A87F}
{7DCEDAE6-45FC-402B-AAE4-14AD66B73D30} = {C2159C53-1E91-486D-A66C-E658FB73A87F}
{DBE4B576-2E74-4A45-87E6-CCF652F6ADE1} = {C2159C53-1E91-486D-A66C-E658FB73A87F}
{6F8B3E04-A81F-4AD1-B82A-3E58F030D52A} = {C2159C53-1E91-486D-A66C-E658FB73A87F}
diff --git a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/Interop/LdapPal.Linux.cs b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/Interop/LdapPal.Linux.cs
index c751636ac85..e2fd327a91f 100644
--- a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/Interop/LdapPal.Linux.cs
+++ b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/Interop/LdapPal.Linux.cs
@@ -120,7 +120,7 @@ namespace System.DirectoryServices.Protocols
// This option is not supported in Linux, so it would most likely throw.
internal static int SetServerCertOption(ConnectionHandle ldapHandle, LdapOption option, VERIFYSERVERCERT outValue) => Interop.Ldap.ldap_set_option_servercert(ldapHandle, option, outValue);
- internal static int BindToDirectory(ConnectionHandle ld, string who, string passwd)
+ internal static unsafe int BindToDirectory(ConnectionHandle ld, string who, string passwd)
{
IntPtr passwordPtr = IntPtr.Zero;
try
@@ -128,7 +128,7 @@ namespace System.DirectoryServices.Protocols
passwordPtr = LdapPal.StringToPtr(passwd);
BerVal passwordBerval = new BerVal
{
- bv_len = passwd?.Length ?? 0,
+ bv_len = MemoryMarshal.CreateReadOnlySpanFromNullTerminated((byte*)passwordPtr).Length,
bv_val = passwordPtr,
};
diff --git a/src/libraries/System.Formats.Asn1/src/System/Formats/Asn1/AsnWriter.cs b/src/libraries/System.Formats.Asn1/src/System/Formats/Asn1/AsnWriter.cs
index efe0423c441..4a724870586 100644
--- a/src/libraries/System.Formats.Asn1/src/System/Formats/Asn1/AsnWriter.cs
+++ b/src/libraries/System.Formats.Asn1/src/System/Formats/Asn1/AsnWriter.cs
@@ -607,17 +607,26 @@ namespace System.Formats.Asn1
// Since it's not mutating, any restrictions imposed by CER or DER will
// still be maintained.
var reader = new AsnReader(new ReadOnlyMemory<byte>(buffer, start, len), AsnEncodingRules.BER);
+ int pos = start;
+ ReadOnlyMemory<byte> encoded = reader.ReadEncodedValue();
- List<(int, int)> positions = new List<(int, int)>();
+ if (!reader.HasData)
+ {
+ // If there is no more data, then there was only one value, so we don't need to sort anything.
+ return;
+ }
- int pos = start;
+ List<(int, int)> positions = new List<(int, int)>();
+ positions.Add((pos, encoded.Length));
+ pos += encoded.Length;
- while (reader.HasData)
+ do
{
- ReadOnlyMemory<byte> encoded = reader.ReadEncodedValue();
+ encoded = reader.ReadEncodedValue();
positions.Add((pos, encoded.Length));
pos += encoded.Length;
}
+ while (reader.HasData);
Debug.Assert(pos == end);
diff --git a/src/libraries/System.Formats.Asn1/src/System/Formats/Asn1/SetOfValueComparer.cs b/src/libraries/System.Formats.Asn1/src/System/Formats/Asn1/SetOfValueComparer.cs
index e85db7683c9..44b6c303095 100644
--- a/src/libraries/System.Formats.Asn1/src/System/Formats/Asn1/SetOfValueComparer.cs
+++ b/src/libraries/System.Formats.Asn1/src/System/Formats/Asn1/SetOfValueComparer.cs
@@ -17,6 +17,14 @@ namespace System.Formats.Asn1
int min = Math.Min(x.Length, y.Length);
int diff;
+#if NET7_0_OR_GREATER
+ int diffIndex = x.CommonPrefixLength(y);
+
+ if (diffIndex != min)
+ {
+ return (int)x[diffIndex] - y[diffIndex];
+ }
+#else
for (int i = 0; i < min; i++)
{
int xVal = x[i];
@@ -28,6 +36,7 @@ namespace System.Formats.Asn1
return diff;
}
}
+#endif
// The sorting rules (T-REC-X.690-201508 sec 11.6) say that the shorter one
// counts as if it are padded with as many 0x00s on the right as required for
diff --git a/src/libraries/System.Formats.Tar/System.Formats.Tar.sln b/src/libraries/System.Formats.Tar/System.Formats.Tar.sln
index 51dae38354b..1c66f44ce39 100644
--- a/src/libraries/System.Formats.Tar/System.Formats.Tar.sln
+++ b/src/libraries/System.Formats.Tar/System.Formats.Tar.sln
@@ -1,4 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StreamConformanceTests", "..\Common\tests\StreamConformanceTests\StreamConformanceTests.csproj", "{BE259E6E-B4F5-47DC-93D5-204297098A8C}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{45972587-B4BF-4F09-94DC-20E2D460FAA8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Formats.Tar", "ref\System.Formats.Tar.csproj", "{E0B882C6-2082-45F2-806E-568461A61975}"
@@ -27,6 +29,10 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {BE259E6E-B4F5-47DC-93D5-204297098A8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BE259E6E-B4F5-47DC-93D5-204297098A8C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BE259E6E-B4F5-47DC-93D5-204297098A8C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BE259E6E-B4F5-47DC-93D5-204297098A8C}.Release|Any CPU.Build.0 = Release|Any CPU
{45972587-B4BF-4F09-94DC-20E2D460FAA8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{45972587-B4BF-4F09-94DC-20E2D460FAA8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{45972587-B4BF-4F09-94DC-20E2D460FAA8}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -60,6 +66,7 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
+ {BE259E6E-B4F5-47DC-93D5-204297098A8C} = {6CF0D830-3EE9-44B1-B548-EA8750AD7B3E}
{45972587-B4BF-4F09-94DC-20E2D460FAA8} = {6CF0D830-3EE9-44B1-B548-EA8750AD7B3E}
{6FD1E284-7B50-4077-B73A-5B31CB0E3577} = {6CF0D830-3EE9-44B1-B548-EA8750AD7B3E}
{E0B882C6-2082-45F2-806E-568461A61975} = {9BE8AFF4-D37B-49AF-AFD3-A15E514AC8AE}
diff --git a/src/libraries/System.Formats.Tar/src/Resources/Strings.resx b/src/libraries/System.Formats.Tar/src/Resources/Strings.resx
index 5308e9153c9..90001cf8bcc 100644
--- a/src/libraries/System.Formats.Tar/src/Resources/Strings.resx
+++ b/src/libraries/System.Formats.Tar/src/Resources/Strings.resx
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
- <!--
- Microsoft ResX Schema
-
+ <!--
+ Microsoft ResX Schema
+
Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
associated with the data types.
-
+
Example:
-
+
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
@@ -26,36 +26,36 @@
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
-
- There are any number of "resheader" rows that contain simple
+
+ There are any number of "resheader" rows that contain simple
name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
-
+
mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
+ value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
-
+
mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
+ value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
+ value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
@@ -261,4 +261,7 @@
<data name="TarInvalidNumber" xml:space="preserve">
<value>Unable to parse number.</value>
</data>
-</root>
+ <data name="TarEntryFieldExceedsMaxLength" xml:space="preserve">
+ <value>The field '{0}' exceeds the maximum allowed length for this format.</value>
+ </data>
+</root> \ No newline at end of file
diff --git a/src/libraries/System.Formats.Tar/src/System.Formats.Tar.csproj b/src/libraries/System.Formats.Tar/src/System.Formats.Tar.csproj
index c0487caf280..33a9aa8c1dc 100644
--- a/src/libraries/System.Formats.Tar/src/System.Formats.Tar.csproj
+++ b/src/libraries/System.Formats.Tar/src/System.Formats.Tar.csproj
@@ -65,6 +65,7 @@
<Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.MkFifo.cs" Link="Common\Interop\Unix\System.Native\Interop.MkFifo.cs" />
<Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.Stat.cs" Link="Common\Interop\Unix\Interop.Stat.cs" />
<Compile Include="$(CommonPath)System\IO\Archiving.Utils.Unix.cs" Link="Common\System\IO\Archiving.Utils.Unix.cs" />
+ <Compile Include="$(CommonPath)System\IO\PathInternal.Unix.cs" Link="Common\System\IO\PathInternal.Unix.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Collections" />
diff --git a/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarHeader.Read.cs b/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarHeader.Read.cs
index ce37a74c304..c1eacf8da7c 100644
--- a/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarHeader.Read.cs
+++ b/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarHeader.Read.cs
@@ -517,8 +517,8 @@ namespace System.Formats.Tar
private void ReadPosixAndGnuSharedAttributes(Span<byte> buffer)
{
// Convert the byte arrays
- _uName = TarHelpers.GetTrimmedAsciiString(buffer.Slice(FieldLocations.UName, FieldLengths.UName));
- _gName = TarHelpers.GetTrimmedAsciiString(buffer.Slice(FieldLocations.GName, FieldLengths.GName));
+ _uName = TarHelpers.GetTrimmedUtf8String(buffer.Slice(FieldLocations.UName, FieldLengths.UName));
+ _gName = TarHelpers.GetTrimmedUtf8String(buffer.Slice(FieldLocations.GName, FieldLengths.GName));
// DevMajor and DevMinor only have values with character devices and block devices.
// For all other typeflags, the values in these fields are irrelevant.
diff --git a/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarHeader.Write.cs b/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarHeader.Write.cs
index 43fe79ce7dc..32fe09310ae 100644
--- a/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarHeader.Write.cs
+++ b/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarHeader.Write.cs
@@ -5,9 +5,7 @@ using System.Buffers;
using System.Buffers.Text;
using System.Collections.Generic;
using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
using System.IO;
-using System.Numerics;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
@@ -25,6 +23,7 @@ namespace System.Formats.Tar
// Predefined text for the Name field of a GNU long metadata entry. Applies for both LongPath ('L') and LongLink ('K').
private const string GnuLongMetadataName = "././@LongLink";
+ private const string ArgNameEntry = "entry";
// Writes the current header as a V7 entry into the archive stream.
internal void WriteAsV7(Stream archiveStream, Span<byte> buffer)
@@ -101,7 +100,7 @@ namespace System.Formats.Tar
long actualLength = GetTotalDataBytesToWrite();
TarEntryType actualEntryType = TarHelpers.GetCorrectTypeFlagForFormat(TarEntryFormat.Ustar, _typeFlag);
- int tmpChecksum = WritePosixName(buffer);
+ int tmpChecksum = WriteUstarName(buffer);
tmpChecksum += WriteCommonFields(buffer, actualLength, actualEntryType);
tmpChecksum += WritePosixMagicAndVersion(buffer);
tmpChecksum += WritePosixAndGnuSharedFields(buffer);
@@ -178,7 +177,7 @@ namespace System.Formats.Tar
internal void WriteAsGnu(Stream archiveStream, Span<byte> buffer)
{
// First, we determine if we need a preceding LongLink, and write it if needed
- if (_linkName?.Length > FieldLengths.LinkName)
+ if (_linkName != null && Encoding.UTF8.GetByteCount(_linkName) > FieldLengths.LinkName)
{
TarHeader longLinkHeader = GetGnuLongMetadataHeader(TarEntryType.LongLink, _linkName);
longLinkHeader.WriteAsGnuInternal(archiveStream, buffer);
@@ -186,7 +185,7 @@ namespace System.Formats.Tar
}
// Second, we determine if we need a preceding LongPath, and write it if needed
- if (_name.Length > FieldLengths.Name)
+ if (Encoding.UTF8.GetByteCount(_name) > FieldLengths.Name)
{
TarHeader longPathHeader = GetGnuLongMetadataHeader(TarEntryType.LongPath, _name);
longPathHeader.WriteAsGnuInternal(archiveStream, buffer);
@@ -204,7 +203,7 @@ namespace System.Formats.Tar
cancellationToken.ThrowIfCancellationRequested();
// First, we determine if we need a preceding LongLink, and write it if needed
- if (_linkName?.Length > FieldLengths.LinkName)
+ if (_linkName != null && Encoding.UTF8.GetByteCount(_linkName) > FieldLengths.LinkName)
{
TarHeader longLinkHeader = GetGnuLongMetadataHeader(TarEntryType.LongLink, _linkName);
await longLinkHeader.WriteAsGnuInternalAsync(archiveStream, buffer, cancellationToken).ConfigureAwait(false);
@@ -212,7 +211,7 @@ namespace System.Formats.Tar
}
// Second, we determine if we need a preceding LongPath, and write it if needed
- if (_name.Length > FieldLengths.Name)
+ if (Encoding.UTF8.GetByteCount(_name) > FieldLengths.Name)
{
TarHeader longPathHeader = GetGnuLongMetadataHeader(TarEntryType.LongPath, _name);
await longPathHeader.WriteAsGnuInternalAsync(archiveStream, buffer, cancellationToken).ConfigureAwait(false);
@@ -226,8 +225,7 @@ namespace System.Formats.Tar
// Creates and returns a GNU long metadata header, with the specified long text written into its data stream.
private static TarHeader GetGnuLongMetadataHeader(TarEntryType entryType, string longText)
{
- Debug.Assert((entryType is TarEntryType.LongPath && longText.Length > FieldLengths.Name) ||
- (entryType is TarEntryType.LongLink && longText.Length > FieldLengths.LinkName));
+ Debug.Assert(entryType is TarEntryType.LongPath or TarEntryType.LongLink);
TarHeader longMetadataHeader = new(TarEntryFormat.Gnu);
@@ -350,7 +348,7 @@ namespace System.Formats.Tar
{
actualLength = GetTotalDataBytesToWrite();
- int tmpChecksum = WritePosixName(buffer);
+ int tmpChecksum = WriteName(buffer);
tmpChecksum += WriteCommonFields(buffer, actualLength, TarHelpers.GetCorrectTypeFlagForFormat(TarEntryFormat.Pax, _typeFlag));
tmpChecksum += WritePosixMagicAndVersion(buffer);
tmpChecksum += WritePosixAndGnuSharedFields(buffer);
@@ -358,31 +356,93 @@ namespace System.Formats.Tar
_checksum = WriteChecksum(tmpChecksum, buffer);
}
- // All formats save in the name byte array only the ASCII bytes that fit.
+ // Gnu and pax save in the name byte array only the UTF8 bytes that fit.
+ // V7 does not support more than 100 bytes so it throws.
private int WriteName(Span<byte> buffer)
{
- ReadOnlySpan<char> src = _name.AsSpan(0, Math.Min(_name.Length, FieldLengths.Name));
- Span<byte> dest = buffer.Slice(FieldLocations.Name, FieldLengths.Name);
- int encoded = Encoding.ASCII.GetBytes(src, dest);
- return Checksum(dest.Slice(0, encoded));
+ ReadOnlySpan<char> name = _name;
+ int encodedLength = GetUtf8TextLength(name);
+
+ if (encodedLength > FieldLengths.Name)
+ {
+ if (_format is TarEntryFormat.V7)
+ {
+ throw new ArgumentException(SR.Format(SR.TarEntryFieldExceedsMaxLength, nameof(TarEntry.Name)), ArgNameEntry);
+ }
+
+ int utf16NameTruncatedLength = GetUtf16TruncatedTextLength(name, FieldLengths.Name);
+ name = name.Slice(0, utf16NameTruncatedLength);
+ }
+
+ return WriteAsUtf8String(name, buffer.Slice(FieldLocations.Name, FieldLengths.Name));
}
- // Ustar and PAX save in the name byte array only the ASCII bytes that fit, and the rest of that string is saved in the prefix field.
- private int WritePosixName(Span<byte> buffer)
+ // 'https://www.freebsd.org/cgi/man.cgi?tar(5)'
+ // If the path name is too long to fit in the 100 bytes provided by the standard format,
+ // it can be split at any / character with the first portion going into the prefix field.
+ private int WriteUstarName(Span<byte> buffer)
{
- int checksum = WriteName(buffer);
+ // We can have a path name as big as 256, prefix + '/' + name,
+ // the separator in between can be neglected as the reader will append it when it joins both fields.
+ const int MaxPathName = FieldLengths.Prefix + 1 + FieldLengths.Name;
- if (_name.Length > FieldLengths.Name)
+ if (GetUtf8TextLength(_name) > MaxPathName)
{
- int prefixBytesLength = Math.Min(_name.Length - FieldLengths.Name, FieldLengths.Prefix);
- Span<byte> remaining = stackalloc byte[prefixBytesLength];
- int encoded = Encoding.ASCII.GetBytes(_name.AsSpan(FieldLengths.Name, prefixBytesLength), remaining);
- Debug.Assert(encoded == remaining.Length);
+ throw new ArgumentException(SR.Format(SR.TarEntryFieldExceedsMaxLength, nameof(TarEntry.Name)), ArgNameEntry);
+ }
- checksum += WriteLeftAlignedBytesAndGetChecksum(remaining, buffer.Slice(FieldLocations.Prefix, FieldLengths.Prefix));
+ Span<byte> encodingBuffer = stackalloc byte[MaxPathName];
+ int encoded = Encoding.UTF8.GetBytes(_name, encodingBuffer);
+ ReadOnlySpan<byte> pathNameBytes = encodingBuffer.Slice(0, encoded);
+
+ // If the pathname is able to fit in Name, we can write it down there and avoid calculating Prefix.
+ if (pathNameBytes.Length <= FieldLengths.Name)
+ {
+ return WriteLeftAlignedBytesAndGetChecksum(pathNameBytes, buffer.Slice(FieldLocations.Name, FieldLengths.Name));
}
- return checksum;
+ int lastIdx = pathNameBytes.LastIndexOfAny(PathInternal.Utf8DirectorySeparators);
+ scoped ReadOnlySpan<byte> name;
+ scoped ReadOnlySpan<byte> prefix;
+
+ if (lastIdx < 1) // splitting at the root is not allowed.
+ {
+ name = pathNameBytes;
+ prefix = default;
+ }
+ else
+ {
+ name = pathNameBytes.Slice(lastIdx + 1);
+ prefix = pathNameBytes.Slice(0, lastIdx);
+ }
+
+ // At this point path name is > 100.
+ // Attempt to split it in a way it can use prefix.
+ while (prefix.Length - name.Length > FieldLengths.Prefix)
+ {
+ lastIdx = prefix.LastIndexOfAny(PathInternal.Utf8DirectorySeparators);
+ if (lastIdx < 1)
+ {
+ break;
+ }
+
+ name = pathNameBytes.Slice(lastIdx + 1);
+ prefix = pathNameBytes.Slice(0, lastIdx);
+ }
+
+ if (prefix.Length <= FieldLengths.Prefix && name.Length <= FieldLengths.Name)
+ {
+ Debug.Assert(prefix.Length != 1 || !PathInternal.Utf8DirectorySeparators.Contains(prefix[0]));
+
+ int checksum = WriteLeftAlignedBytesAndGetChecksum(prefix, buffer.Slice(FieldLocations.Prefix, FieldLengths.Prefix));
+ checksum += WriteLeftAlignedBytesAndGetChecksum(name, buffer.Slice(FieldLocations.Name, FieldLengths.Name));
+
+ return checksum;
+ }
+ else
+ {
+ throw new ArgumentException(SR.Format(SR.TarEntryFieldExceedsMaxLength, nameof(TarEntry.Name)), ArgNameEntry);
+ }
}
// Writes all the common fields shared by all formats into the specified spans.
@@ -423,7 +483,20 @@ namespace System.Formats.Tar
if (!string.IsNullOrEmpty(_linkName))
{
- checksum += WriteAsAsciiString(_linkName, buffer.Slice(FieldLocations.LinkName, FieldLengths.LinkName));
+ ReadOnlySpan<char> linkName = _linkName;
+
+ if (GetUtf8TextLength(linkName) > FieldLengths.LinkName)
+ {
+ if (_format is not TarEntryFormat.Pax and not TarEntryFormat.Gnu)
+ {
+ throw new ArgumentException(SR.Format(SR.TarEntryFieldExceedsMaxLength, nameof(TarEntry.LinkName)), ArgNameEntry);
+ }
+
+ int truncatedLength = GetUtf16TruncatedTextLength(linkName, FieldLengths.LinkName);
+ linkName = linkName.Slice(0, truncatedLength);
+ }
+
+ checksum += WriteAsUtf8String(linkName, buffer.Slice(FieldLocations.LinkName, FieldLengths.LinkName));
}
return checksum;
@@ -467,12 +540,38 @@ namespace System.Formats.Tar
if (!string.IsNullOrEmpty(_uName))
{
- checksum += WriteAsAsciiString(_uName, buffer.Slice(FieldLocations.UName, FieldLengths.UName));
+ ReadOnlySpan<char> uName = _uName;
+
+ if (GetUtf8TextLength(uName) > FieldLengths.UName)
+ {
+ if (_format is not TarEntryFormat.Pax)
+ {
+ throw new ArgumentException(SR.Format(SR.TarEntryFieldExceedsMaxLength, nameof(PaxTarEntry.UserName)), ArgNameEntry);
+ }
+
+ int truncatedLength = GetUtf16TruncatedTextLength(uName, FieldLengths.UName);
+ uName = uName.Slice(0, truncatedLength);
+ }
+
+ checksum += WriteAsUtf8String(uName, buffer.Slice(FieldLocations.UName, FieldLengths.UName));
}
if (!string.IsNullOrEmpty(_gName))
{
- checksum += WriteAsAsciiString(_gName, buffer.Slice(FieldLocations.GName, FieldLengths.GName));
+ ReadOnlySpan<char> gName = _gName;
+
+ if (GetUtf8TextLength(gName) > FieldLengths.GName)
+ {
+ if (_format is not TarEntryFormat.Pax)
+ {
+ throw new ArgumentException(SR.Format(SR.TarEntryFieldExceedsMaxLength, nameof(PaxTarEntry.GroupName)), ArgNameEntry);
+ }
+
+ int truncatedLength = GetUtf16TruncatedTextLength(gName, FieldLengths.GName);
+ gName = gName.Slice(0, truncatedLength);
+ }
+
+ checksum += WriteAsUtf8String(gName, buffer.Slice(FieldLocations.GName, FieldLengths.GName));
}
if (_devMajor > 0)
@@ -766,11 +865,11 @@ namespace System.Formats.Tar
return FormatOctal(unixTimeSeconds, destination);
}
- // Writes the specified text as an ASCII string aligned to the left, and returns its checksum.
- private static int WriteAsAsciiString(string str, Span<byte> buffer)
+ // Writes the specified text as an UTF8 string aligned to the left, and returns its checksum.
+ private static int WriteAsUtf8String(ReadOnlySpan<char> text, Span<byte> buffer)
{
- byte[] bytes = Encoding.ASCII.GetBytes(str);
- return WriteLeftAlignedBytesAndGetChecksum(bytes.AsSpan(), buffer);
+ int encoded = Encoding.UTF8.GetBytes(text, buffer);
+ return WriteLeftAlignedBytesAndGetChecksum(buffer.Slice(0, encoded), buffer);
}
// Gets the special name for the 'name' field in an extended attribute entry.
@@ -819,5 +918,32 @@ namespace System.Formats.Tar
return result;
}
+
+ private static int GetUtf8TextLength(ReadOnlySpan<char> text)
+ => Encoding.UTF8.GetByteCount(text);
+
+ // Returns the text's utf16 length truncated at the specified utf8 max length.
+ private static int GetUtf16TruncatedTextLength(ReadOnlySpan<char> text, int utf8MaxLength)
+ {
+ Debug.Assert(GetUtf8TextLength(text) > utf8MaxLength);
+
+ int utf8Length = 0;
+ int utf16TruncatedLength = 0;
+
+ foreach (Rune rune in text.EnumerateRunes())
+ {
+ utf8Length += rune.Utf8SequenceLength;
+ if (utf8Length <= utf8MaxLength)
+ {
+ utf16TruncatedLength += rune.Utf16SequenceLength;
+ }
+ else
+ {
+ break;
+ }
+ }
+
+ return utf16TruncatedLength;
+ }
}
}
diff --git a/src/libraries/System.Formats.Tar/tests/System.Formats.Tar.Tests.csproj b/src/libraries/System.Formats.Tar/tests/System.Formats.Tar.Tests.csproj
index c43c8dff343..d4741850029 100644
--- a/src/libraries/System.Formats.Tar/tests/System.Formats.Tar.Tests.csproj
+++ b/src/libraries/System.Formats.Tar/tests/System.Formats.Tar.Tests.csproj
@@ -47,9 +47,11 @@
<Compile Include="TarTestsBase.Posix.cs" />
<Compile Include="TarTestsBase.Ustar.cs" />
<Compile Include="TarTestsBase.V7.cs" />
+ <Compile Include="TarWriter\TarWriter.WriteEntry.Entry.Roundtrip.Tests.cs" />
<Compile Include="TarWriter\TarWriter.WriteEntryAsync.File.Tests.cs" />
<Compile Include="TarWriter\TarWriter.WriteEntry.Base.cs" />
<Compile Include="TarWriter\TarWriter.WriteEntryAsync.Tests.cs" />
+ <Compile Include="TarWriter\TarWriter.WriteEntryAsync.Entry.Roundtrip.Tests.cs" />
<Compile Include="TarWriter\TarWriter.WriteEntryAsync.Entry.Ustar.Tests.cs" />
<Compile Include="TarWriter\TarWriter.WriteEntryAsync.Entry.V7.Tests.cs" />
<Compile Include="TarWriter\TarWriter.WriteEntryAsync.Entry.Pax.Tests.cs" />
diff --git a/src/libraries/System.Formats.Tar/tests/TarTestsBase.cs b/src/libraries/System.Formats.Tar/tests/TarTestsBase.cs
index ae01821d62b..977b9fbb606 100644
--- a/src/libraries/System.Formats.Tar/tests/TarTestsBase.cs
+++ b/src/libraries/System.Formats.Tar/tests/TarTestsBase.cs
@@ -1,4 +1,4 @@
-// Licensed to the .NET Foundation under one or more agreements.
+// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections.Generic;
@@ -89,6 +89,11 @@ namespace System.Formats.Tar.Tests
protected const string PaxEaSize = "size";
protected const string PaxEaDevMajor = "devmajor";
protected const string PaxEaDevMinor = "devminor";
+ internal const char OneByteCharacter = 'a';
+ internal const char TwoBytesCharacter = '\u00F6';
+ internal const string FourBytesCharacter = "\uD83D\uDE12";
+ internal const char Separator = '/';
+ internal const int MaxPathComponent = 255;
private static readonly string[] V7TestCaseNames = new[]
{
@@ -622,5 +627,174 @@ namespace System.Formats.Tar.Tests
yield return new object[] { name };
}
}
+
+ private static List<string> GetPrefixes()
+ {
+ List<string> prefixes = new() { "", "/a/", "./", "../" };
+
+ if (OperatingSystem.IsWindows())
+ prefixes.Add("C:/");
+
+ return prefixes;
+ }
+
+ internal static IEnumerable<string> GetNamesPrefixedTestData(NameCapabilities max)
+ {
+ Assert.True(Enum.IsDefined(max));
+ List<string> prefixes = GetPrefixes();
+
+ foreach (string prefix in prefixes)
+ {
+ // prefix + name of length 100
+ int nameLength = 100 - prefix.Length;
+ yield return prefix + Repeat(OneByteCharacter, nameLength);
+ yield return prefix + Repeat(OneByteCharacter, nameLength - 2) + TwoBytesCharacter;
+ yield return prefix + Repeat(OneByteCharacter, nameLength - 4) + FourBytesCharacter;
+
+ // prefix alone
+ if (prefix != string.Empty)
+ yield return prefix;
+ }
+
+ if (max == NameCapabilities.Name)
+ yield break;
+
+ // maxed out name.
+ foreach (string prefix in prefixes)
+ {
+ yield return prefix + Repeat(OneByteCharacter, 100);
+ yield return prefix + Repeat(OneByteCharacter, 100 - 2) + TwoBytesCharacter;
+ yield return prefix + Repeat(OneByteCharacter, 100 - 4) + FourBytesCharacter;
+ }
+
+ // maxed out prefix and name.
+ foreach (string prefix in prefixes)
+ {
+ int directoryLength = 155 - prefix.Length;
+ yield return prefix + Repeat(OneByteCharacter, directoryLength) + Separator + Repeat(OneByteCharacter, 100);
+ yield return prefix + Repeat(OneByteCharacter, directoryLength - 2) + TwoBytesCharacter + Separator + Repeat(OneByteCharacter, 100);
+ yield return prefix + Repeat(OneByteCharacter, directoryLength - 4) + FourBytesCharacter + Separator + Repeat(OneByteCharacter, 100);
+ }
+
+ if (max == NameCapabilities.NameAndPrefix)
+ yield break;
+
+ foreach (string prefix in prefixes)
+ {
+ int directoryLength = MaxPathComponent - prefix.Length;
+ yield return prefix + Repeat(OneByteCharacter, directoryLength) + Separator + Repeat(OneByteCharacter, MaxPathComponent);
+ yield return prefix + Repeat(OneByteCharacter, directoryLength - 2) + TwoBytesCharacter + Separator + Repeat(OneByteCharacter, MaxPathComponent);
+ yield return prefix + Repeat(OneByteCharacter, directoryLength - 4) + FourBytesCharacter + Separator + Repeat(OneByteCharacter, MaxPathComponent);
+ }
+ }
+
+ internal static IEnumerable<string> GetNamesNonAsciiTestData(NameCapabilities max)
+ {
+ Assert.True(Enum.IsDefined(max));
+
+ yield return Repeat(OneByteCharacter, 100);
+ yield return Repeat(TwoBytesCharacter, 100 / 2);
+ yield return Repeat(OneByteCharacter, 2) + Repeat(TwoBytesCharacter, 49);
+
+ yield return Repeat(FourBytesCharacter, 100 / 4);
+ yield return Repeat(OneByteCharacter, 4) + Repeat(FourBytesCharacter, 24);
+
+ if (max == NameCapabilities.Name)
+ yield break;
+
+ // prefix + name
+ // this is 256 but is supported because prefix is not required to end in separator.
+ yield return Repeat(OneByteCharacter, 155) + Separator + Repeat(OneByteCharacter, 100);
+
+ // non-ascii prefix + name
+ yield return Repeat(TwoBytesCharacter, 155 / 2) + Separator + Repeat(OneByteCharacter, 100);
+ yield return Repeat(FourBytesCharacter, 155 / 4) + Separator + Repeat(OneByteCharacter, 100);
+
+ // prefix + non-ascii name
+ yield return Repeat(OneByteCharacter, 155) + Separator + Repeat(TwoBytesCharacter, 100 / 2);
+ yield return Repeat(OneByteCharacter, 155) + Separator + Repeat(FourBytesCharacter, 100 / 4);
+
+ // non-ascii prefix + non-ascii name
+ yield return Repeat(TwoBytesCharacter, 155 / 2) + Separator + Repeat(TwoBytesCharacter, 100 / 2);
+ yield return Repeat(FourBytesCharacter, 155 / 4) + Separator + Repeat(FourBytesCharacter, 100 / 4);
+
+ if (max == NameCapabilities.NameAndPrefix)
+ yield break;
+
+ // Pax and Gnu support unlimited paths.
+ yield return Repeat(OneByteCharacter, MaxPathComponent);
+ yield return Repeat(TwoBytesCharacter, MaxPathComponent / 2);
+ yield return Repeat(FourBytesCharacter, MaxPathComponent / 4);
+
+ yield return Repeat(OneByteCharacter, MaxPathComponent) + Separator + Repeat(OneByteCharacter, MaxPathComponent);
+ yield return Repeat(TwoBytesCharacter, MaxPathComponent / 2) + Separator + Repeat(TwoBytesCharacter, MaxPathComponent / 2);
+ yield return Repeat(FourBytesCharacter, MaxPathComponent / 4) + Separator + Repeat(FourBytesCharacter, MaxPathComponent / 4);
+ }
+
+ internal static IEnumerable<string> GetTooLongNamesTestData(NameCapabilities max)
+ {
+ Assert.True(max is NameCapabilities.Name or NameCapabilities.NameAndPrefix);
+
+ // root directory can't be saved as prefix
+ yield return "/" + Repeat(OneByteCharacter, 100);
+
+ List<string> prefixes = GetPrefixes();
+
+ // 1. non-ascii last character doesn't fit in name.
+ foreach (string prefix in prefixes)
+ {
+ // 1.1. last character doesn't fit fully.
+ yield return prefix + Repeat(OneByteCharacter, 100 + 1);
+ yield return prefix + Repeat(OneByteCharacter, 100 - 2) + Repeat(TwoBytesCharacter, 2);
+ yield return prefix + Repeat(OneByteCharacter, 100 - 4) + Repeat(FourBytesCharacter, 2);
+
+ // 1.2. last character doesn't fit by one byte.
+ yield return prefix + Repeat(OneByteCharacter, 100 - 2 + 1) + Repeat(TwoBytesCharacter, 1);
+ yield return prefix + Repeat(OneByteCharacter, 100 - 4 + 1) + Repeat(FourBytesCharacter, 1);
+ }
+
+ // 2. non-ascii last character doesn't fit in prefix.
+ string maxedOutName = Repeat(OneByteCharacter, 100);
+
+ // 2.1. last char doesn't fit fully.
+ yield return Repeat(OneByteCharacter, 155 + 1) + Separator + maxedOutName;
+ yield return Repeat(OneByteCharacter, 155 - 2) + Repeat(TwoBytesCharacter, 2) + Separator + maxedOutName;
+ yield return Repeat(OneByteCharacter, 155 - 4) + Repeat(FourBytesCharacter, 2) + Separator + maxedOutName;
+
+ // 2.2 last char doesn't fit by one byte.
+ yield return Repeat(OneByteCharacter, 155 - 2 + 1) + TwoBytesCharacter + Separator + maxedOutName;
+ yield return Repeat(OneByteCharacter, 155 - 4 + 1) + FourBytesCharacter + Separator + maxedOutName;
+
+ if (max is NameCapabilities.NameAndPrefix)
+ yield break;
+
+ // Next cases only apply for V7 which only allows 100 length names.
+ foreach (string prefix in prefixes)
+ {
+ if (prefix.Length == 0)
+ continue;
+
+ yield return prefix + Repeat(OneByteCharacter, 100);
+ yield return prefix + Repeat(TwoBytesCharacter, 100 / 2);
+ yield return prefix + Repeat(FourBytesCharacter, 100 / 4);
+ }
+ }
+
+ internal static string Repeat(char c, int count)
+ {
+ return new string(c, count);
+ }
+
+ internal static string Repeat(string c, int count)
+ {
+ return string.Concat(Enumerable.Repeat(c, count));
+ }
+
+ internal enum NameCapabilities
+ {
+ Name,
+ NameAndPrefix,
+ Unlimited
+ }
}
}
diff --git a/src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.Tests.cs b/src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.Tests.cs
index 8d482af0b1d..b46816844b4 100644
--- a/src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.Tests.cs
+++ b/src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.Tests.cs
@@ -1,7 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-using System.Collections.Generic;
using System.IO;
using Xunit;
@@ -174,7 +173,7 @@ namespace System.Formats.Tar.Tests
if (entryType is TarEntryType.SymbolicLink)
{
- expectedChecksum += GetLinkChecksum(longLink, out string linkName);
+ expectedChecksum += GetLinkChecksum(format, longLink, out string linkName);
entry.LinkName = linkName;
}
@@ -195,23 +194,26 @@ namespace System.Formats.Tar.Tests
}
else
{
- entryName = new string('a', 150);
- // 100 * 97 = 9700 (first 100 bytes go into 'name' field)
- expectedChecksum += 9700;
+ entryName = new string('a', 100);
+ expectedChecksum += 9700; // 100 * 97 = 9700 (first 100 bytes go into 'name' field)
+
+ // V7 does not support name fields larger than 100
+ if (format is not TarEntryFormat.V7)
+ {
+ entryName += "/" + new string('a', 50);
+ }
- // - V7 does not support name fields larger than 100, writes what it can
- // - Gnu writes first 100 bytes in 'name' field, then the full name is written in a LonPath entry
- // that precedes this one.
- if (format is TarEntryFormat.Ustar or TarEntryFormat.Pax)
+ // Gnu and Pax writes first 100 bytes in 'name' field, then the full name is written in a metadata entry that precedes this one.
+ if (format is TarEntryFormat.Ustar)
{
- // 50 * 97 = 4850 (rest of bytes go into 'prefix' field)
- expectedChecksum += 4850;
+ // Ustar can write the directory into prefix.
+ expectedChecksum += 4850; // 50 * 97 = 4850
}
}
return expectedChecksum;
}
- private int GetLinkChecksum(bool longLink, out string linkName)
+ private int GetLinkChecksum(TarEntryFormat format, bool longLink, out string linkName)
{
int expectedChecksum = 0;
if (!longLink)
@@ -222,12 +224,16 @@ namespace System.Formats.Tar.Tests
}
else
{
- linkName = new string('a', 150);
- // 100 * 97 = 9700 (first 100 bytes go into 'linkName' field)
+ linkName = new string('a', 100); // 100 * 97 = 9700 (first 100 bytes go into 'linkName' field)
expectedChecksum += 9700;
- // - V7 and Ustar ignore the rest of the bytes
- // - Pax and Gnu write first 100 bytes in 'linkName' field, then the full link name is written in the
+
+ // V7 and Ustar does not support name fields larger than 100
+ // Pax and Gnu write first 100 bytes in 'linkName' field, then the full link name is written in the
// preceding metadata entry (extended attributes for PAX, LongLink for GNU).
+ if (format is not TarEntryFormat.V7 and not TarEntryFormat.Ustar)
+ {
+ linkName += "/" + new string('a', 50);
+ }
}
return expectedChecksum;
diff --git a/src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntry.Entry.Roundtrip.Tests.cs b/src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntry.Entry.Roundtrip.Tests.cs
new file mode 100644
index 00000000000..ae1a3b82163
--- /dev/null
+++ b/src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntry.Entry.Roundtrip.Tests.cs
@@ -0,0 +1,151 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using Xunit;
+
+namespace System.Formats.Tar.Tests
+{
+ public class TarWriter_WriteEntry_Roundtrip_Tests : TarTestsBase
+ {
+ public static IEnumerable<object[]> NameRoundtripsTheoryData()
+ {
+ foreach (bool unseekableStream in new[] { false, true })
+ {
+ foreach (TarEntryType entryType in new[] { TarEntryType.RegularFile, TarEntryType.Directory })
+ {
+ foreach (string name in GetNamesNonAsciiTestData(NameCapabilities.Name).Concat(GetNamesPrefixedTestData(NameCapabilities.Name)))
+ {
+ TarEntryType v7EntryType = entryType is TarEntryType.RegularFile ? TarEntryType.V7RegularFile : entryType;
+ yield return new object[] { TarEntryFormat.V7, v7EntryType, unseekableStream, name };
+ }
+
+ foreach (string name in GetNamesNonAsciiTestData(NameCapabilities.NameAndPrefix).Concat(GetNamesPrefixedTestData(NameCapabilities.NameAndPrefix)))
+ {
+ yield return new object[] { TarEntryFormat.Ustar, entryType, unseekableStream, name };
+ }
+
+ foreach (string name in GetNamesNonAsciiTestData(NameCapabilities.Unlimited).Concat(GetNamesPrefixedTestData(NameCapabilities.Unlimited)))
+ {
+ yield return new object[] { TarEntryFormat.Pax, entryType, unseekableStream, name };
+ yield return new object[] { TarEntryFormat.Gnu, entryType, unseekableStream, name };
+ }
+ }
+ }
+ }
+
+ [Theory]
+ [MemberData(nameof(NameRoundtripsTheoryData))]
+ public void NameRoundtrips(TarEntryFormat entryFormat, TarEntryType entryType, bool unseekableStream, string name)
+ {
+ TarEntry entry = InvokeTarEntryCreationConstructor(entryFormat, entryType, name);
+ entry.Name = name;
+
+ MemoryStream ms = new();
+ Stream s = unseekableStream ? new WrappedStream(ms, ms.CanRead, ms.CanWrite, canSeek: false) : ms;
+
+ using (TarWriter writer = new(s, leaveOpen: true))
+ {
+ writer.WriteEntry(entry);
+ }
+
+ ms.Position = 0;
+ using TarReader reader = new(s);
+
+ entry = reader.GetNextEntry();
+ Assert.Null(reader.GetNextEntry());
+ Assert.Equal(name, entry.Name);
+ }
+
+ public static IEnumerable<object[]> LinkNameRoundtripsTheoryData()
+ {
+ foreach (bool unseekableStream in new[] { false, true })
+ {
+ foreach (TarEntryType entryType in new[] { TarEntryType.SymbolicLink, TarEntryType.HardLink })
+ {
+ foreach (string name in GetNamesNonAsciiTestData(NameCapabilities.Name).Concat(GetNamesPrefixedTestData(NameCapabilities.Name)))
+ {
+ yield return new object[] { TarEntryFormat.V7, entryType, unseekableStream, name };
+ yield return new object[] { TarEntryFormat.Ustar, entryType, unseekableStream, name };
+ }
+
+ foreach (string name in GetNamesNonAsciiTestData(NameCapabilities.Unlimited).Concat(GetNamesPrefixedTestData(NameCapabilities.Unlimited)))
+ {
+ yield return new object[] { TarEntryFormat.Pax, entryType, unseekableStream, name };
+ yield return new object[] { TarEntryFormat.Gnu, entryType, unseekableStream, name };
+ }
+ }
+ }
+ }
+
+ [Theory]
+ [MemberData(nameof(LinkNameRoundtripsTheoryData))]
+ public void LinkNameRoundtrips(TarEntryFormat entryFormat, TarEntryType entryType, bool unseekableStream, string linkName)
+ {
+ string name = "foo";
+ TarEntry entry = InvokeTarEntryCreationConstructor(entryFormat, entryType, name);
+ entry.LinkName = linkName;
+
+ MemoryStream ms = new();
+ Stream s = unseekableStream ? new WrappedStream(ms, ms.CanRead, ms.CanWrite, canSeek: false) : ms;
+
+ using (TarWriter writer = new(s, leaveOpen: true))
+ {
+ writer.WriteEntry(entry);
+ }
+
+ ms.Position = 0;
+ using TarReader reader = new(s);
+
+ entry = reader.GetNextEntry();
+ Assert.Null(reader.GetNextEntry());
+ Assert.Equal(name, entry.Name);
+ Assert.Equal(linkName, entry.LinkName);
+ }
+
+ public static IEnumerable<object[]> UserNameGroupNameRoundtripsTheoryData()
+ {
+ foreach (bool unseekableStream in new[] { false, true })
+ {
+ foreach (TarEntryFormat entryFormat in new[] { TarEntryFormat.Ustar, TarEntryFormat.Pax, TarEntryFormat.Gnu })
+ {
+ yield return new object[] { entryFormat, unseekableStream, Repeat(OneByteCharacter, 32) };
+ yield return new object[] { entryFormat, unseekableStream, Repeat(TwoBytesCharacter, 32 / 2) };
+ yield return new object[] { entryFormat, unseekableStream, Repeat(FourBytesCharacter, 32 / 4) };
+ }
+ }
+ }
+
+ [Theory]
+ [MemberData(nameof(UserNameGroupNameRoundtripsTheoryData))]
+ public void UserNameGroupNameRoundtrips(TarEntryFormat entryFormat, bool unseekableStream, string userGroupName)
+ {
+ string name = "foo";
+ TarEntry entry = InvokeTarEntryCreationConstructor(entryFormat, TarEntryType.RegularFile, name);
+ PosixTarEntry posixEntry = Assert.IsAssignableFrom<PosixTarEntry>(entry);
+ posixEntry.UserName = userGroupName;
+ posixEntry.GroupName = userGroupName;
+
+ MemoryStream ms = new();
+ Stream s = unseekableStream ? new WrappedStream(ms, ms.CanRead, ms.CanWrite, canSeek: false) : ms;
+
+ using (TarWriter writer = new(s, leaveOpen: true))
+ {
+ writer.WriteEntry(posixEntry);
+ }
+
+ ms.Position = 0;
+ using TarReader reader = new(s);
+
+ entry = reader.GetNextEntry();
+ posixEntry = Assert.IsAssignableFrom<PosixTarEntry>(entry);
+ Assert.Null(reader.GetNextEntry());
+
+ Assert.Equal(name, posixEntry.Name);
+ Assert.Equal(userGroupName, posixEntry.UserName);
+ Assert.Equal(userGroupName, posixEntry.GroupName);
+ }
+ }
+}
diff --git a/src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntry.Tests.cs b/src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntry.Tests.cs
index 9c2aa572c34..e3bec8df31f 100644
--- a/src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntry.Tests.cs
+++ b/src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntry.Tests.cs
@@ -301,8 +301,6 @@ namespace System.Formats.Tar.Tests
}
[Theory]
- [InlineData(TarEntryFormat.V7)]
- // [InlineData(TarEntryFormat.Ustar)] https://github.com/dotnet/runtime/issues/75360
[InlineData(TarEntryFormat.Pax)]
[InlineData(TarEntryFormat.Gnu)]
public void WriteLongName(TarEntryFormat format)
@@ -355,5 +353,102 @@ namespace System.Formats.Tar.Tests
return expectedName;
}
}
+
+ public static IEnumerable<object[]> WriteEntry_TooLongName_Throws_TheoryData()
+ {
+ foreach (TarEntryType entryType in new[] { TarEntryType.RegularFile, TarEntryType.Directory })
+ {
+ foreach (string name in GetTooLongNamesTestData(NameCapabilities.Name))
+ {
+ TarEntryType v7EntryType = entryType is TarEntryType.RegularFile ? TarEntryType.V7RegularFile : entryType;
+ yield return new object[] { TarEntryFormat.V7, v7EntryType, name };
+ }
+
+ foreach (string name in GetTooLongNamesTestData(NameCapabilities.NameAndPrefix))
+ {
+ yield return new object[] { TarEntryFormat.Ustar, entryType, name };
+ }
+ }
+ }
+
+ [Theory]
+ [MemberData(nameof(WriteEntry_TooLongName_Throws_TheoryData))]
+ public void WriteEntry_TooLongName_Throws(TarEntryFormat entryFormat, TarEntryType entryType, string name)
+ {
+ using TarWriter writer = new(new MemoryStream());
+
+ TarEntry entry = InvokeTarEntryCreationConstructor(entryFormat, entryType, name);
+ Assert.Throws<ArgumentException>("entry", () => writer.WriteEntry(entry));
+ }
+
+ public static IEnumerable<object[]> WriteEntry_TooLongLinkName_Throws_TheoryData()
+ {
+ foreach (TarEntryType entryType in new[] { TarEntryType.SymbolicLink, TarEntryType.HardLink })
+ {
+ foreach (string name in GetTooLongNamesTestData(NameCapabilities.Name))
+ {
+ yield return new object[] { TarEntryFormat.V7, entryType, name };
+ }
+
+ foreach (string name in GetTooLongNamesTestData(NameCapabilities.NameAndPrefix))
+ {
+ yield return new object[] { TarEntryFormat.Ustar, entryType, name };
+ }
+ }
+ }
+
+ [Theory]
+ [MemberData(nameof(WriteEntry_TooLongLinkName_Throws_TheoryData))]
+ public void WriteEntry_TooLongLinkName_Throws(TarEntryFormat entryFormat, TarEntryType entryType, string linkName)
+ {
+ using TarWriter writer = new(new MemoryStream());
+
+ TarEntry entry = InvokeTarEntryCreationConstructor(entryFormat, entryType, "foo");
+ entry.LinkName = linkName;
+
+ Assert.Throws<ArgumentException>("entry", () => writer.WriteEntry(entry));
+ }
+
+ public static IEnumerable<object[]> WriteEntry_TooLongUserGroupName_Throws_TheoryData()
+ {
+ // Not testing Pax as it supports unlimited size uname/gname.
+ foreach (TarEntryFormat entryFormat in new[] { TarEntryFormat.Ustar, TarEntryFormat.Gnu })
+ {
+ // Last character doesn't fit fully.
+ yield return new object[] { entryFormat, Repeat(OneByteCharacter, 32 + 1) };
+ yield return new object[] { entryFormat, Repeat(TwoBytesCharacter, 32 / 2 + 1) };
+ yield return new object[] { entryFormat, Repeat(FourBytesCharacter, 32 / 4 + 1) };
+
+ // Last character doesn't fit by one byte.
+ yield return new object[] { entryFormat, Repeat(TwoBytesCharacter, 32 - 2 + 1) + TwoBytesCharacter };
+ yield return new object[] { entryFormat, Repeat(FourBytesCharacter, 32 - 4 + 1) + FourBytesCharacter };
+ }
+ }
+
+ [Theory]
+ [MemberData(nameof(WriteEntry_TooLongUserGroupName_Throws_TheoryData))]
+ public void WriteEntry_TooLongUserName_Throws(TarEntryFormat entryFormat, string userName)
+ {
+ using TarWriter writer = new(new MemoryStream());
+
+ TarEntry entry = InvokeTarEntryCreationConstructor(entryFormat, TarEntryType.RegularFile, "foo");
+ PosixTarEntry posixEntry = Assert.IsAssignableFrom<PosixTarEntry>(entry);
+ posixEntry.UserName = userName;
+
+ Assert.Throws<ArgumentException>("entry", () => writer.WriteEntry(entry));
+ }
+
+ [Theory]
+ [MemberData(nameof(WriteEntry_TooLongUserGroupName_Throws_TheoryData))]
+ public void WriteEntry_TooLongGroupName_Throws(TarEntryFormat entryFormat, string groupName)
+ {
+ using TarWriter writer = new(new MemoryStream());
+
+ TarEntry entry = InvokeTarEntryCreationConstructor(entryFormat, TarEntryType.RegularFile, "foo");
+ PosixTarEntry posixEntry = Assert.IsAssignableFrom<PosixTarEntry>(entry);
+ posixEntry.GroupName = groupName;
+
+ Assert.Throws<ArgumentException>("entry", () => writer.WriteEntry(entry));
+ }
}
}
diff --git a/src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntryAsync.Entry.Roundtrip.Tests.cs b/src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntryAsync.Entry.Roundtrip.Tests.cs
new file mode 100644
index 00000000000..030ffe5d57d
--- /dev/null
+++ b/src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntryAsync.Entry.Roundtrip.Tests.cs
@@ -0,0 +1,100 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Collections.Generic;
+using System.IO;
+using System.Threading.Tasks;
+using Xunit;
+
+namespace System.Formats.Tar.Tests
+{
+ public class TarWriter_WriteEntryAsync_Roundtrip_Tests : TarTestsBase
+ {
+ public static IEnumerable<object[]> NameRoundtripsAsyncTheoryData()
+ => TarWriter_WriteEntry_Roundtrip_Tests.NameRoundtripsTheoryData();
+
+ [Theory]
+ [MemberData(nameof(NameRoundtripsAsyncTheoryData))]
+ public async Task NameRoundtripsAsync(TarEntryFormat entryFormat, TarEntryType entryType, bool unseekableStream, string name)
+ {
+ TarEntry entry = InvokeTarEntryCreationConstructor(entryFormat, entryType, name);
+ entry.Name = name;
+
+ MemoryStream ms = new();
+ Stream s = unseekableStream ? new WrappedStream(ms, ms.CanRead, ms.CanWrite, canSeek: false) : ms;
+
+ await using (TarWriter writer = new(s, leaveOpen: true))
+ {
+ await writer.WriteEntryAsync(entry);
+ }
+
+ ms.Position = 0;
+ await using TarReader reader = new(s);
+
+ entry = await reader.GetNextEntryAsync();
+ Assert.Null(await reader.GetNextEntryAsync());
+ Assert.Equal(name, entry.Name);
+ }
+
+ public static IEnumerable<object[]> LinkNameRoundtripsAsyncTheoryData()
+ => TarWriter_WriteEntry_Roundtrip_Tests.LinkNameRoundtripsTheoryData();
+
+ [Theory]
+ [MemberData(nameof(LinkNameRoundtripsAsyncTheoryData))]
+ public async Task LinkNameRoundtripsAsync(TarEntryFormat entryFormat, TarEntryType entryType, bool unseekableStream, string linkName)
+ {
+ string name = "foo";
+ TarEntry entry = InvokeTarEntryCreationConstructor(entryFormat, entryType, name);
+ entry.LinkName = linkName;
+
+ MemoryStream ms = new();
+ Stream s = unseekableStream ? new WrappedStream(ms, ms.CanRead, ms.CanWrite, canSeek: false) : ms;
+
+ await using (TarWriter writer = new(s, leaveOpen: true))
+ {
+ await writer.WriteEntryAsync(entry);
+ }
+
+ ms.Position = 0;
+ await using TarReader reader = new(s);
+
+ entry = await reader.GetNextEntryAsync();
+ Assert.Null(await reader.GetNextEntryAsync());
+ Assert.Equal(name, entry.Name);
+ Assert.Equal(linkName, entry.LinkName);
+ }
+
+ public static IEnumerable<object[]> UserNameGroupNameRoundtripsAsyncTheoryData()
+ => TarWriter_WriteEntry_Roundtrip_Tests.UserNameGroupNameRoundtripsTheoryData();
+
+ [Theory]
+ [MemberData(nameof(UserNameGroupNameRoundtripsAsyncTheoryData))]
+ public async Task UserNameGroupNameRoundtripsAsync(TarEntryFormat entryFormat, bool unseekableStream, string userGroupName)
+ {
+ string name = "foo";
+ TarEntry entry = InvokeTarEntryCreationConstructor(entryFormat, TarEntryType.RegularFile, name);
+ PosixTarEntry posixEntry = Assert.IsAssignableFrom<PosixTarEntry>(entry);
+ posixEntry.UserName = userGroupName;
+ posixEntry.GroupName = userGroupName;
+
+ MemoryStream ms = new();
+ Stream s = unseekableStream ? new WrappedStream(ms, ms.CanRead, ms.CanWrite, canSeek: false) : ms;
+
+ await using (TarWriter writer = new(s, leaveOpen: true))
+ {
+ await writer.WriteEntryAsync(posixEntry);
+ }
+
+ ms.Position = 0;
+ await using TarReader reader = new(s);
+
+ entry = await reader.GetNextEntryAsync();
+ posixEntry = Assert.IsAssignableFrom<PosixTarEntry>(entry);
+ Assert.Null(await reader.GetNextEntryAsync());
+
+ Assert.Equal(name, posixEntry.Name);
+ Assert.Equal(userGroupName, posixEntry.UserName);
+ Assert.Equal(userGroupName, posixEntry.GroupName);
+ }
+ }
+}
diff --git a/src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntryAsync.Tests.cs b/src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntryAsync.Tests.cs
index c2eb58a7f1f..be70a43bb25 100644
--- a/src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntryAsync.Tests.cs
+++ b/src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntryAsync.Tests.cs
@@ -322,5 +322,62 @@ namespace System.Formats.Tar.Tests
}
}
}
+
+ public static IEnumerable<object[]> WriteEntry_TooLongName_Throws_Async_TheoryData()
+ => TarWriter_WriteEntry_Tests.WriteEntry_TooLongName_Throws_TheoryData();
+
+ [Theory]
+ [MemberData(nameof(WriteEntry_TooLongName_Throws_Async_TheoryData))]
+ public async Task WriteEntry_TooLongName_Throws_Async(TarEntryFormat entryFormat, TarEntryType entryType, string name)
+ {
+ await using TarWriter writer = new(new MemoryStream());
+
+ TarEntry entry = InvokeTarEntryCreationConstructor(entryFormat, entryType, name);
+ await Assert.ThrowsAsync<ArgumentException>("entry", () => writer.WriteEntryAsync(entry));
+ }
+
+ public static IEnumerable<object[]> WriteEntry_TooLongLinkName_Throws_Async_TheoryData()
+ => TarWriter_WriteEntry_Tests.WriteEntry_TooLongLinkName_Throws_TheoryData();
+
+ [Theory]
+ [MemberData(nameof(WriteEntry_TooLongLinkName_Throws_Async_TheoryData))]
+ public async Task WriteEntry_TooLongLinkName_Throws_Async(TarEntryFormat entryFormat, TarEntryType entryType, string linkName)
+ {
+ await using TarWriter writer = new(new MemoryStream());
+
+ TarEntry entry = InvokeTarEntryCreationConstructor(entryFormat, entryType, "foo");
+ entry.LinkName = linkName;
+
+ await Assert.ThrowsAsync<ArgumentException>("entry", () => writer.WriteEntryAsync(entry));
+ }
+
+ public static IEnumerable<object[]> WriteEntry_TooLongUserGroupName_Throws_Async_TheoryData()
+ => TarWriter_WriteEntry_Tests.WriteEntry_TooLongUserGroupName_Throws_TheoryData();
+
+ [Theory]
+ [MemberData(nameof(WriteEntry_TooLongUserGroupName_Throws_Async_TheoryData))]
+ public async Task WriteEntry_TooLongUserName_Throws_Async(TarEntryFormat entryFormat, string userName)
+ {
+ await using TarWriter writer = new(new MemoryStream());
+
+ TarEntry entry = InvokeTarEntryCreationConstructor(entryFormat, TarEntryType.RegularFile, "foo");
+ PosixTarEntry posixEntry = Assert.IsAssignableFrom<PosixTarEntry>(entry);
+ posixEntry.UserName = userName;
+
+ await Assert.ThrowsAsync<ArgumentException>("entry", () => writer.WriteEntryAsync(entry));
+ }
+
+ [Theory]
+ [MemberData(nameof(WriteEntry_TooLongUserGroupName_Throws_Async_TheoryData))]
+ public async Task WriteEntry_TooLongGroupName_Throws_Async(TarEntryFormat entryFormat, string groupName)
+ {
+ await using TarWriter writer = new(new MemoryStream());
+
+ TarEntry entry = InvokeTarEntryCreationConstructor(entryFormat, TarEntryType.RegularFile, "foo");
+ PosixTarEntry posixEntry = Assert.IsAssignableFrom<PosixTarEntry>(entry);
+ posixEntry.GroupName = groupName;
+
+ await Assert.ThrowsAsync<ArgumentException>("entry", () => writer.WriteEntryAsync(entry));
+ }
}
}
diff --git a/src/libraries/System.Globalization.Calendars/System.Globalization.Calendars.sln b/src/libraries/System.Globalization.Calendars/System.Globalization.Calendars.sln
index 0743d7ff60b..dcce7bd5b44 100644
--- a/src/libraries/System.Globalization.Calendars/System.Globalization.Calendars.sln
+++ b/src/libraries/System.Globalization.Calendars/System.Globalization.Calendars.sln
@@ -13,6 +13,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Globalization.Calend
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{617B4727-AA14-4840-8898-1947D7C6E437}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{D99C08B2-8AEF-4767-BAFC-10DC63478640}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{85FFAE67-940A-4C58-AF73-0E0CF9722B29}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{6AADBEF6-644B-4174-9AB4-EB6023E2404B}"
@@ -71,11 +73,8 @@ Global
{32F01C47-D495-45CE-9567-E4C434F7D627}.Release|x86.ActiveCfg = Release|Any CPU
{32F01C47-D495-45CE-9567-E4C434F7D627}.Release|x86.Build.0 = Release|Any CPU
{32F01C47-D495-45CE-9567-E4C434F7D627}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {32F01C47-D495-45CE-9567-E4C434F7D627}.Checked|Any CPU.Build.0 = Debug|Any CPU
{32F01C47-D495-45CE-9567-E4C434F7D627}.Checked|x64.ActiveCfg = Debug|Any CPU
- {32F01C47-D495-45CE-9567-E4C434F7D627}.Checked|x64.Build.0 = Debug|Any CPU
{32F01C47-D495-45CE-9567-E4C434F7D627}.Checked|x86.ActiveCfg = Debug|Any CPU
- {32F01C47-D495-45CE-9567-E4C434F7D627}.Checked|x86.Build.0 = Debug|Any CPU
{6553EF4A-C352-4034-835A-7679E589B5A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6553EF4A-C352-4034-835A-7679E589B5A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6553EF4A-C352-4034-835A-7679E589B5A6}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -89,11 +88,8 @@ Global
{6553EF4A-C352-4034-835A-7679E589B5A6}.Release|x86.ActiveCfg = Release|Any CPU
{6553EF4A-C352-4034-835A-7679E589B5A6}.Release|x86.Build.0 = Release|Any CPU
{6553EF4A-C352-4034-835A-7679E589B5A6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {6553EF4A-C352-4034-835A-7679E589B5A6}.Checked|Any CPU.Build.0 = Debug|Any CPU
{6553EF4A-C352-4034-835A-7679E589B5A6}.Checked|x64.ActiveCfg = Debug|Any CPU
- {6553EF4A-C352-4034-835A-7679E589B5A6}.Checked|x64.Build.0 = Debug|Any CPU
{6553EF4A-C352-4034-835A-7679E589B5A6}.Checked|x86.ActiveCfg = Debug|Any CPU
- {6553EF4A-C352-4034-835A-7679E589B5A6}.Checked|x86.Build.0 = Debug|Any CPU
{705D0D71-8890-4893-824F-E302CDE5349F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{705D0D71-8890-4893-824F-E302CDE5349F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{705D0D71-8890-4893-824F-E302CDE5349F}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -107,11 +103,8 @@ Global
{705D0D71-8890-4893-824F-E302CDE5349F}.Release|x86.ActiveCfg = Release|Any CPU
{705D0D71-8890-4893-824F-E302CDE5349F}.Release|x86.Build.0 = Release|Any CPU
{705D0D71-8890-4893-824F-E302CDE5349F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {705D0D71-8890-4893-824F-E302CDE5349F}.Checked|Any CPU.Build.0 = Debug|Any CPU
{705D0D71-8890-4893-824F-E302CDE5349F}.Checked|x64.ActiveCfg = Debug|Any CPU
- {705D0D71-8890-4893-824F-E302CDE5349F}.Checked|x64.Build.0 = Debug|Any CPU
{705D0D71-8890-4893-824F-E302CDE5349F}.Checked|x86.ActiveCfg = Debug|Any CPU
- {705D0D71-8890-4893-824F-E302CDE5349F}.Checked|x86.Build.0 = Debug|Any CPU
{CD1CDCDD-64FA-4E75-A74F-16A978C56449}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CD1CDCDD-64FA-4E75-A74F-16A978C56449}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CD1CDCDD-64FA-4E75-A74F-16A978C56449}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -125,11 +118,8 @@ Global
{CD1CDCDD-64FA-4E75-A74F-16A978C56449}.Release|x86.ActiveCfg = Release|Any CPU
{CD1CDCDD-64FA-4E75-A74F-16A978C56449}.Release|x86.Build.0 = Release|Any CPU
{CD1CDCDD-64FA-4E75-A74F-16A978C56449}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {CD1CDCDD-64FA-4E75-A74F-16A978C56449}.Checked|Any CPU.Build.0 = Debug|Any CPU
{CD1CDCDD-64FA-4E75-A74F-16A978C56449}.Checked|x64.ActiveCfg = Debug|Any CPU
- {CD1CDCDD-64FA-4E75-A74F-16A978C56449}.Checked|x64.Build.0 = Debug|Any CPU
{CD1CDCDD-64FA-4E75-A74F-16A978C56449}.Checked|x86.ActiveCfg = Debug|Any CPU
- {CD1CDCDD-64FA-4E75-A74F-16A978C56449}.Checked|x86.Build.0 = Debug|Any CPU
{BFEF5B19-7D03-42BA-9CD1-D1B53F35D706}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BFEF5B19-7D03-42BA-9CD1-D1B53F35D706}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BFEF5B19-7D03-42BA-9CD1-D1B53F35D706}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -143,11 +133,8 @@ Global
{BFEF5B19-7D03-42BA-9CD1-D1B53F35D706}.Release|x86.ActiveCfg = Release|Any CPU
{BFEF5B19-7D03-42BA-9CD1-D1B53F35D706}.Release|x86.Build.0 = Release|Any CPU
{BFEF5B19-7D03-42BA-9CD1-D1B53F35D706}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {BFEF5B19-7D03-42BA-9CD1-D1B53F35D706}.Checked|Any CPU.Build.0 = Debug|Any CPU
{BFEF5B19-7D03-42BA-9CD1-D1B53F35D706}.Checked|x64.ActiveCfg = Debug|Any CPU
- {BFEF5B19-7D03-42BA-9CD1-D1B53F35D706}.Checked|x64.Build.0 = Debug|Any CPU
{BFEF5B19-7D03-42BA-9CD1-D1B53F35D706}.Checked|x86.ActiveCfg = Debug|Any CPU
- {BFEF5B19-7D03-42BA-9CD1-D1B53F35D706}.Checked|x86.Build.0 = Debug|Any CPU
{617B4727-AA14-4840-8898-1947D7C6E437}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{617B4727-AA14-4840-8898-1947D7C6E437}.Debug|Any CPU.Build.0 = Debug|Any CPU
{617B4727-AA14-4840-8898-1947D7C6E437}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -161,11 +148,23 @@ Global
{617B4727-AA14-4840-8898-1947D7C6E437}.Release|x86.ActiveCfg = Release|Any CPU
{617B4727-AA14-4840-8898-1947D7C6E437}.Release|x86.Build.0 = Release|Any CPU
{617B4727-AA14-4840-8898-1947D7C6E437}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {617B4727-AA14-4840-8898-1947D7C6E437}.Checked|Any CPU.Build.0 = Debug|Any CPU
{617B4727-AA14-4840-8898-1947D7C6E437}.Checked|x64.ActiveCfg = Debug|Any CPU
- {617B4727-AA14-4840-8898-1947D7C6E437}.Checked|x64.Build.0 = Debug|Any CPU
{617B4727-AA14-4840-8898-1947D7C6E437}.Checked|x86.ActiveCfg = Debug|Any CPU
- {617B4727-AA14-4840-8898-1947D7C6E437}.Checked|x86.Build.0 = Debug|Any CPU
+ {D99C08B2-8AEF-4767-BAFC-10DC63478640}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D99C08B2-8AEF-4767-BAFC-10DC63478640}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D99C08B2-8AEF-4767-BAFC-10DC63478640}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {D99C08B2-8AEF-4767-BAFC-10DC63478640}.Debug|x64.Build.0 = Debug|Any CPU
+ {D99C08B2-8AEF-4767-BAFC-10DC63478640}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {D99C08B2-8AEF-4767-BAFC-10DC63478640}.Debug|x86.Build.0 = Debug|Any CPU
+ {D99C08B2-8AEF-4767-BAFC-10DC63478640}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D99C08B2-8AEF-4767-BAFC-10DC63478640}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D99C08B2-8AEF-4767-BAFC-10DC63478640}.Release|x64.ActiveCfg = Release|Any CPU
+ {D99C08B2-8AEF-4767-BAFC-10DC63478640}.Release|x64.Build.0 = Release|Any CPU
+ {D99C08B2-8AEF-4767-BAFC-10DC63478640}.Release|x86.ActiveCfg = Release|Any CPU
+ {D99C08B2-8AEF-4767-BAFC-10DC63478640}.Release|x86.Build.0 = Release|Any CPU
+ {D99C08B2-8AEF-4767-BAFC-10DC63478640}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {D99C08B2-8AEF-4767-BAFC-10DC63478640}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {D99C08B2-8AEF-4767-BAFC-10DC63478640}.Checked|x86.ActiveCfg = Debug|Any CPU
{85FFAE67-940A-4C58-AF73-0E0CF9722B29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{85FFAE67-940A-4C58-AF73-0E0CF9722B29}.Debug|Any CPU.Build.0 = Debug|Any CPU
{85FFAE67-940A-4C58-AF73-0E0CF9722B29}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -179,11 +178,8 @@ Global
{85FFAE67-940A-4C58-AF73-0E0CF9722B29}.Release|x86.ActiveCfg = Release|Any CPU
{85FFAE67-940A-4C58-AF73-0E0CF9722B29}.Release|x86.Build.0 = Release|Any CPU
{85FFAE67-940A-4C58-AF73-0E0CF9722B29}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {85FFAE67-940A-4C58-AF73-0E0CF9722B29}.Checked|Any CPU.Build.0 = Debug|Any CPU
{85FFAE67-940A-4C58-AF73-0E0CF9722B29}.Checked|x64.ActiveCfg = Debug|Any CPU
- {85FFAE67-940A-4C58-AF73-0E0CF9722B29}.Checked|x64.Build.0 = Debug|Any CPU
{85FFAE67-940A-4C58-AF73-0E0CF9722B29}.Checked|x86.ActiveCfg = Debug|Any CPU
- {85FFAE67-940A-4C58-AF73-0E0CF9722B29}.Checked|x86.Build.0 = Debug|Any CPU
{6AADBEF6-644B-4174-9AB4-EB6023E2404B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6AADBEF6-644B-4174-9AB4-EB6023E2404B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6AADBEF6-644B-4174-9AB4-EB6023E2404B}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -197,11 +193,8 @@ Global
{6AADBEF6-644B-4174-9AB4-EB6023E2404B}.Release|x86.ActiveCfg = Release|Any CPU
{6AADBEF6-644B-4174-9AB4-EB6023E2404B}.Release|x86.Build.0 = Release|Any CPU
{6AADBEF6-644B-4174-9AB4-EB6023E2404B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {6AADBEF6-644B-4174-9AB4-EB6023E2404B}.Checked|Any CPU.Build.0 = Debug|Any CPU
{6AADBEF6-644B-4174-9AB4-EB6023E2404B}.Checked|x64.ActiveCfg = Debug|Any CPU
- {6AADBEF6-644B-4174-9AB4-EB6023E2404B}.Checked|x64.Build.0 = Debug|Any CPU
{6AADBEF6-644B-4174-9AB4-EB6023E2404B}.Checked|x86.ActiveCfg = Debug|Any CPU
- {6AADBEF6-644B-4174-9AB4-EB6023E2404B}.Checked|x86.Build.0 = Debug|Any CPU
{80B76066-1C3A-449A-8E4B-76F7D2C74FEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{80B76066-1C3A-449A-8E4B-76F7D2C74FEF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{80B76066-1C3A-449A-8E4B-76F7D2C74FEF}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -215,11 +208,8 @@ Global
{80B76066-1C3A-449A-8E4B-76F7D2C74FEF}.Release|x86.ActiveCfg = Release|Any CPU
{80B76066-1C3A-449A-8E4B-76F7D2C74FEF}.Release|x86.Build.0 = Release|Any CPU
{80B76066-1C3A-449A-8E4B-76F7D2C74FEF}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {80B76066-1C3A-449A-8E4B-76F7D2C74FEF}.Checked|Any CPU.Build.0 = Debug|Any CPU
{80B76066-1C3A-449A-8E4B-76F7D2C74FEF}.Checked|x64.ActiveCfg = Debug|Any CPU
- {80B76066-1C3A-449A-8E4B-76F7D2C74FEF}.Checked|x64.Build.0 = Debug|Any CPU
{80B76066-1C3A-449A-8E4B-76F7D2C74FEF}.Checked|x86.ActiveCfg = Debug|Any CPU
- {80B76066-1C3A-449A-8E4B-76F7D2C74FEF}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -231,6 +221,7 @@ Global
{CD1CDCDD-64FA-4E75-A74F-16A978C56449} = {CDAC58B3-78D7-482F-B3EF-798DFAF7A1A4}
{BFEF5B19-7D03-42BA-9CD1-D1B53F35D706} = {CDAC58B3-78D7-482F-B3EF-798DFAF7A1A4}
{6553EF4A-C352-4034-835A-7679E589B5A6} = {4449A37B-FFED-470F-9F39-24611CB72D10}
+ {D99C08B2-8AEF-4767-BAFC-10DC63478640} = {4449A37B-FFED-470F-9F39-24611CB72D10}
{80B76066-1C3A-449A-8E4B-76F7D2C74FEF} = {4449A37B-FFED-470F-9F39-24611CB72D10}
{617B4727-AA14-4840-8898-1947D7C6E437} = {749527EE-F2D9-4169-A75A-B00BA30651A1}
{85FFAE67-940A-4C58-AF73-0E0CF9722B29} = {749527EE-F2D9-4169-A75A-B00BA30651A1}
diff --git a/src/libraries/System.Globalization/System.Globalization.sln b/src/libraries/System.Globalization/System.Globalization.sln
index 590f8dff1a9..3f8004a3276 100644
--- a/src/libraries/System.Globalization/System.Globalization.sln
+++ b/src/libraries/System.Globalization/System.Globalization.sln
@@ -17,6 +17,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Globalization.Tests"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{74CAB3C9-1AE1-467E-B139-35E7113F4660}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{4AEE93BE-2DDE-4429-BEE1-13E419B80BA1}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{12E788BB-7E58-4780-B52E-DB5A91A49DFF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{F4A35959-8F1B-4CA9-B672-3ACFBDD54174}"
@@ -75,11 +77,8 @@ Global
{79613DED-481D-44EF-BB89-7AC6BD53026B}.Release|x86.ActiveCfg = Release|Any CPU
{79613DED-481D-44EF-BB89-7AC6BD53026B}.Release|x86.Build.0 = Release|Any CPU
{79613DED-481D-44EF-BB89-7AC6BD53026B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {79613DED-481D-44EF-BB89-7AC6BD53026B}.Checked|Any CPU.Build.0 = Debug|Any CPU
{79613DED-481D-44EF-BB89-7AC6BD53026B}.Checked|x64.ActiveCfg = Debug|Any CPU
- {79613DED-481D-44EF-BB89-7AC6BD53026B}.Checked|x64.Build.0 = Debug|Any CPU
{79613DED-481D-44EF-BB89-7AC6BD53026B}.Checked|x86.ActiveCfg = Debug|Any CPU
- {79613DED-481D-44EF-BB89-7AC6BD53026B}.Checked|x86.Build.0 = Debug|Any CPU
{40231BCB-E151-45E0-A1C4-4D559A434362}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{40231BCB-E151-45E0-A1C4-4D559A434362}.Debug|Any CPU.Build.0 = Debug|Any CPU
{40231BCB-E151-45E0-A1C4-4D559A434362}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -93,11 +92,8 @@ Global
{40231BCB-E151-45E0-A1C4-4D559A434362}.Release|x86.ActiveCfg = Release|Any CPU
{40231BCB-E151-45E0-A1C4-4D559A434362}.Release|x86.Build.0 = Release|Any CPU
{40231BCB-E151-45E0-A1C4-4D559A434362}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {40231BCB-E151-45E0-A1C4-4D559A434362}.Checked|Any CPU.Build.0 = Debug|Any CPU
{40231BCB-E151-45E0-A1C4-4D559A434362}.Checked|x64.ActiveCfg = Debug|Any CPU
- {40231BCB-E151-45E0-A1C4-4D559A434362}.Checked|x64.Build.0 = Debug|Any CPU
{40231BCB-E151-45E0-A1C4-4D559A434362}.Checked|x86.ActiveCfg = Debug|Any CPU
- {40231BCB-E151-45E0-A1C4-4D559A434362}.Checked|x86.Build.0 = Debug|Any CPU
{55249BC9-201A-4418-AF14-7AC743D9A867}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{55249BC9-201A-4418-AF14-7AC743D9A867}.Debug|Any CPU.Build.0 = Debug|Any CPU
{55249BC9-201A-4418-AF14-7AC743D9A867}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -111,11 +107,8 @@ Global
{55249BC9-201A-4418-AF14-7AC743D9A867}.Release|x86.ActiveCfg = Release|Any CPU
{55249BC9-201A-4418-AF14-7AC743D9A867}.Release|x86.Build.0 = Release|Any CPU
{55249BC9-201A-4418-AF14-7AC743D9A867}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {55249BC9-201A-4418-AF14-7AC743D9A867}.Checked|Any CPU.Build.0 = Debug|Any CPU
{55249BC9-201A-4418-AF14-7AC743D9A867}.Checked|x64.ActiveCfg = Debug|Any CPU
- {55249BC9-201A-4418-AF14-7AC743D9A867}.Checked|x64.Build.0 = Debug|Any CPU
{55249BC9-201A-4418-AF14-7AC743D9A867}.Checked|x86.ActiveCfg = Debug|Any CPU
- {55249BC9-201A-4418-AF14-7AC743D9A867}.Checked|x86.Build.0 = Debug|Any CPU
{4ABAB509-1210-43B4-B274-76B4FE02BD9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4ABAB509-1210-43B4-B274-76B4FE02BD9B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4ABAB509-1210-43B4-B274-76B4FE02BD9B}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -129,11 +122,8 @@ Global
{4ABAB509-1210-43B4-B274-76B4FE02BD9B}.Release|x86.ActiveCfg = Release|Any CPU
{4ABAB509-1210-43B4-B274-76B4FE02BD9B}.Release|x86.Build.0 = Release|Any CPU
{4ABAB509-1210-43B4-B274-76B4FE02BD9B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {4ABAB509-1210-43B4-B274-76B4FE02BD9B}.Checked|Any CPU.Build.0 = Debug|Any CPU
{4ABAB509-1210-43B4-B274-76B4FE02BD9B}.Checked|x64.ActiveCfg = Debug|Any CPU
- {4ABAB509-1210-43B4-B274-76B4FE02BD9B}.Checked|x64.Build.0 = Debug|Any CPU
{4ABAB509-1210-43B4-B274-76B4FE02BD9B}.Checked|x86.ActiveCfg = Debug|Any CPU
- {4ABAB509-1210-43B4-B274-76B4FE02BD9B}.Checked|x86.Build.0 = Debug|Any CPU
{DD7E56B4-65B7-4822-A4E1-ECDD51524927}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DD7E56B4-65B7-4822-A4E1-ECDD51524927}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DD7E56B4-65B7-4822-A4E1-ECDD51524927}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -147,11 +137,8 @@ Global
{DD7E56B4-65B7-4822-A4E1-ECDD51524927}.Release|x86.ActiveCfg = Release|Any CPU
{DD7E56B4-65B7-4822-A4E1-ECDD51524927}.Release|x86.Build.0 = Release|Any CPU
{DD7E56B4-65B7-4822-A4E1-ECDD51524927}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {DD7E56B4-65B7-4822-A4E1-ECDD51524927}.Checked|Any CPU.Build.0 = Debug|Any CPU
{DD7E56B4-65B7-4822-A4E1-ECDD51524927}.Checked|x64.ActiveCfg = Debug|Any CPU
- {DD7E56B4-65B7-4822-A4E1-ECDD51524927}.Checked|x64.Build.0 = Debug|Any CPU
{DD7E56B4-65B7-4822-A4E1-ECDD51524927}.Checked|x86.ActiveCfg = Debug|Any CPU
- {DD7E56B4-65B7-4822-A4E1-ECDD51524927}.Checked|x86.Build.0 = Debug|Any CPU
{9B797657-6BBC-4240-9903-3FCE3E1FC713}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9B797657-6BBC-4240-9903-3FCE3E1FC713}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9B797657-6BBC-4240-9903-3FCE3E1FC713}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -165,11 +152,8 @@ Global
{9B797657-6BBC-4240-9903-3FCE3E1FC713}.Release|x86.ActiveCfg = Release|Any CPU
{9B797657-6BBC-4240-9903-3FCE3E1FC713}.Release|x86.Build.0 = Release|Any CPU
{9B797657-6BBC-4240-9903-3FCE3E1FC713}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {9B797657-6BBC-4240-9903-3FCE3E1FC713}.Checked|Any CPU.Build.0 = Debug|Any CPU
{9B797657-6BBC-4240-9903-3FCE3E1FC713}.Checked|x64.ActiveCfg = Debug|Any CPU
- {9B797657-6BBC-4240-9903-3FCE3E1FC713}.Checked|x64.Build.0 = Debug|Any CPU
{9B797657-6BBC-4240-9903-3FCE3E1FC713}.Checked|x86.ActiveCfg = Debug|Any CPU
- {9B797657-6BBC-4240-9903-3FCE3E1FC713}.Checked|x86.Build.0 = Debug|Any CPU
{A66D589C-6FEE-41EE-A7D9-C5306BF5AE47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A66D589C-6FEE-41EE-A7D9-C5306BF5AE47}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A66D589C-6FEE-41EE-A7D9-C5306BF5AE47}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -183,11 +167,8 @@ Global
{A66D589C-6FEE-41EE-A7D9-C5306BF5AE47}.Release|x86.ActiveCfg = Release|Any CPU
{A66D589C-6FEE-41EE-A7D9-C5306BF5AE47}.Release|x86.Build.0 = Release|Any CPU
{A66D589C-6FEE-41EE-A7D9-C5306BF5AE47}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {A66D589C-6FEE-41EE-A7D9-C5306BF5AE47}.Checked|Any CPU.Build.0 = Debug|Any CPU
{A66D589C-6FEE-41EE-A7D9-C5306BF5AE47}.Checked|x64.ActiveCfg = Debug|Any CPU
- {A66D589C-6FEE-41EE-A7D9-C5306BF5AE47}.Checked|x64.Build.0 = Debug|Any CPU
{A66D589C-6FEE-41EE-A7D9-C5306BF5AE47}.Checked|x86.ActiveCfg = Debug|Any CPU
- {A66D589C-6FEE-41EE-A7D9-C5306BF5AE47}.Checked|x86.Build.0 = Debug|Any CPU
{74CAB3C9-1AE1-467E-B139-35E7113F4660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{74CAB3C9-1AE1-467E-B139-35E7113F4660}.Debug|Any CPU.Build.0 = Debug|Any CPU
{74CAB3C9-1AE1-467E-B139-35E7113F4660}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -201,11 +182,23 @@ Global
{74CAB3C9-1AE1-467E-B139-35E7113F4660}.Release|x86.ActiveCfg = Release|Any CPU
{74CAB3C9-1AE1-467E-B139-35E7113F4660}.Release|x86.Build.0 = Release|Any CPU
{74CAB3C9-1AE1-467E-B139-35E7113F4660}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {74CAB3C9-1AE1-467E-B139-35E7113F4660}.Checked|Any CPU.Build.0 = Debug|Any CPU
{74CAB3C9-1AE1-467E-B139-35E7113F4660}.Checked|x64.ActiveCfg = Debug|Any CPU
- {74CAB3C9-1AE1-467E-B139-35E7113F4660}.Checked|x64.Build.0 = Debug|Any CPU
{74CAB3C9-1AE1-467E-B139-35E7113F4660}.Checked|x86.ActiveCfg = Debug|Any CPU
- {74CAB3C9-1AE1-467E-B139-35E7113F4660}.Checked|x86.Build.0 = Debug|Any CPU
+ {4AEE93BE-2DDE-4429-BEE1-13E419B80BA1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4AEE93BE-2DDE-4429-BEE1-13E419B80BA1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4AEE93BE-2DDE-4429-BEE1-13E419B80BA1}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {4AEE93BE-2DDE-4429-BEE1-13E419B80BA1}.Debug|x64.Build.0 = Debug|Any CPU
+ {4AEE93BE-2DDE-4429-BEE1-13E419B80BA1}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {4AEE93BE-2DDE-4429-BEE1-13E419B80BA1}.Debug|x86.Build.0 = Debug|Any CPU
+ {4AEE93BE-2DDE-4429-BEE1-13E419B80BA1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4AEE93BE-2DDE-4429-BEE1-13E419B80BA1}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4AEE93BE-2DDE-4429-BEE1-13E419B80BA1}.Release|x64.ActiveCfg = Release|Any CPU
+ {4AEE93BE-2DDE-4429-BEE1-13E419B80BA1}.Release|x64.Build.0 = Release|Any CPU
+ {4AEE93BE-2DDE-4429-BEE1-13E419B80BA1}.Release|x86.ActiveCfg = Release|Any CPU
+ {4AEE93BE-2DDE-4429-BEE1-13E419B80BA1}.Release|x86.Build.0 = Release|Any CPU
+ {4AEE93BE-2DDE-4429-BEE1-13E419B80BA1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {4AEE93BE-2DDE-4429-BEE1-13E419B80BA1}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {4AEE93BE-2DDE-4429-BEE1-13E419B80BA1}.Checked|x86.ActiveCfg = Debug|Any CPU
{12E788BB-7E58-4780-B52E-DB5A91A49DFF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{12E788BB-7E58-4780-B52E-DB5A91A49DFF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{12E788BB-7E58-4780-B52E-DB5A91A49DFF}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -219,11 +212,8 @@ Global
{12E788BB-7E58-4780-B52E-DB5A91A49DFF}.Release|x86.ActiveCfg = Release|Any CPU
{12E788BB-7E58-4780-B52E-DB5A91A49DFF}.Release|x86.Build.0 = Release|Any CPU
{12E788BB-7E58-4780-B52E-DB5A91A49DFF}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {12E788BB-7E58-4780-B52E-DB5A91A49DFF}.Checked|Any CPU.Build.0 = Debug|Any CPU
{12E788BB-7E58-4780-B52E-DB5A91A49DFF}.Checked|x64.ActiveCfg = Debug|Any CPU
- {12E788BB-7E58-4780-B52E-DB5A91A49DFF}.Checked|x64.Build.0 = Debug|Any CPU
{12E788BB-7E58-4780-B52E-DB5A91A49DFF}.Checked|x86.ActiveCfg = Debug|Any CPU
- {12E788BB-7E58-4780-B52E-DB5A91A49DFF}.Checked|x86.Build.0 = Debug|Any CPU
{F4A35959-8F1B-4CA9-B672-3ACFBDD54174}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F4A35959-8F1B-4CA9-B672-3ACFBDD54174}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F4A35959-8F1B-4CA9-B672-3ACFBDD54174}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -237,11 +227,8 @@ Global
{F4A35959-8F1B-4CA9-B672-3ACFBDD54174}.Release|x86.ActiveCfg = Release|Any CPU
{F4A35959-8F1B-4CA9-B672-3ACFBDD54174}.Release|x86.Build.0 = Release|Any CPU
{F4A35959-8F1B-4CA9-B672-3ACFBDD54174}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {F4A35959-8F1B-4CA9-B672-3ACFBDD54174}.Checked|Any CPU.Build.0 = Debug|Any CPU
{F4A35959-8F1B-4CA9-B672-3ACFBDD54174}.Checked|x64.ActiveCfg = Debug|Any CPU
- {F4A35959-8F1B-4CA9-B672-3ACFBDD54174}.Checked|x64.Build.0 = Debug|Any CPU
{F4A35959-8F1B-4CA9-B672-3ACFBDD54174}.Checked|x86.ActiveCfg = Debug|Any CPU
- {F4A35959-8F1B-4CA9-B672-3ACFBDD54174}.Checked|x86.Build.0 = Debug|Any CPU
{41F80FEC-8515-455F-AC3E-D88B6CAAF8DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{41F80FEC-8515-455F-AC3E-D88B6CAAF8DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{41F80FEC-8515-455F-AC3E-D88B6CAAF8DA}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -255,11 +242,8 @@ Global
{41F80FEC-8515-455F-AC3E-D88B6CAAF8DA}.Release|x86.ActiveCfg = Release|Any CPU
{41F80FEC-8515-455F-AC3E-D88B6CAAF8DA}.Release|x86.Build.0 = Release|Any CPU
{41F80FEC-8515-455F-AC3E-D88B6CAAF8DA}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {41F80FEC-8515-455F-AC3E-D88B6CAAF8DA}.Checked|Any CPU.Build.0 = Debug|Any CPU
{41F80FEC-8515-455F-AC3E-D88B6CAAF8DA}.Checked|x64.ActiveCfg = Debug|Any CPU
- {41F80FEC-8515-455F-AC3E-D88B6CAAF8DA}.Checked|x64.Build.0 = Debug|Any CPU
{41F80FEC-8515-455F-AC3E-D88B6CAAF8DA}.Checked|x86.ActiveCfg = Debug|Any CPU
- {41F80FEC-8515-455F-AC3E-D88B6CAAF8DA}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -273,6 +257,7 @@ Global
{9B797657-6BBC-4240-9903-3FCE3E1FC713} = {C223E72F-FD21-43C3-AC7A-62BCF4A5C379}
{A66D589C-6FEE-41EE-A7D9-C5306BF5AE47} = {C223E72F-FD21-43C3-AC7A-62BCF4A5C379}
{55249BC9-201A-4418-AF14-7AC743D9A867} = {A93AFF96-DB24-4FF5-ABAE-9EC08504D5FA}
+ {4AEE93BE-2DDE-4429-BEE1-13E419B80BA1} = {A93AFF96-DB24-4FF5-ABAE-9EC08504D5FA}
{41F80FEC-8515-455F-AC3E-D88B6CAAF8DA} = {A93AFF96-DB24-4FF5-ABAE-9EC08504D5FA}
{74CAB3C9-1AE1-467E-B139-35E7113F4660} = {0378EF1C-9838-4AD0-867D-506FB02F8BBB}
{12E788BB-7E58-4780-B52E-DB5A91A49DFF} = {0378EF1C-9838-4AD0-867D-506FB02F8BBB}
diff --git a/src/libraries/System.IO.FileSystem/tests/FileStream/FileStreamConformanceTests.Windows.cs b/src/libraries/System.IO.FileSystem/tests/FileStream/FileStreamConformanceTests.Windows.cs
index 8061eb6bd16..c3fea537d8c 100644
--- a/src/libraries/System.IO.FileSystem/tests/FileStream/FileStreamConformanceTests.Windows.cs
+++ b/src/libraries/System.IO.FileSystem/tests/FileStream/FileStreamConformanceTests.Windows.cs
@@ -85,15 +85,23 @@ namespace System.IO.Tests
private static Lazy<bool> _canShareFiles = new Lazy<bool>(() =>
{
- if (!PlatformDetection.IsWindowsAndElevated || PlatformDetection.IsWindowsNanoServer)
+ if (!PlatformDetection.IsWindowsAndElevated)
{
return false;
}
- // the "Server Service" allows for file sharing. It can be disabled on some of our CI machines.
- using (ServiceController sharingService = new ServiceController("Server"))
+ try
+ {
+ // the "Server Service" allows for file sharing. It can be disabled on some machines.
+ using (ServiceController sharingService = new ServiceController("Server"))
+ {
+ return sharingService.Status == ServiceControllerStatus.Running;
+ }
+ }
+ catch (InvalidOperationException)
{
- return sharingService.Status == ServiceControllerStatus.Running;
+ // The service is not installed.
+ return false;
}
});
diff --git a/src/libraries/System.IO.IsolatedStorage/src/System.IO.IsolatedStorage.csproj b/src/libraries/System.IO.IsolatedStorage/src/System.IO.IsolatedStorage.csproj
index 9b5284960f9..2309a8c007a 100644
--- a/src/libraries/System.IO.IsolatedStorage/src/System.IO.IsolatedStorage.csproj
+++ b/src/libraries/System.IO.IsolatedStorage/src/System.IO.IsolatedStorage.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-MacCatalyst;$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS;$(NetCoreAppCurrent)-Android;$(NetCoreAppCurrent)</TargetFrameworks>
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
@@ -19,10 +19,18 @@
<Compile Include="$(CommonPath)System\Security\IdentityHelper.cs"
Link="Common\System\Security\IdentityHelper.cs" />
</ItemGroup>
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Android' or '$(TargetPlatformIdentifier)' == 'iOS' or '$(TargetPlatformIdentifier)' == 'MacCatalyst' or '$(TargetPlatformIdentifier)' == 'tvOS'">
+ <Compile Include="System\IO\IsolatedStorage\Helper.AnyMobile.cs" />
+ <Compile Include="System\IO\IsolatedStorage\IsolatedStorageFile.AnyMobile.cs" />
+ </ItemGroup>
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != 'Android' and '$(TargetPlatformIdentifier)' != 'iOS' and '$(TargetPlatformIdentifier)' != 'MacCatalyst' and '$(TargetPlatformIdentifier)' != 'tvOS' and '$(TargetPlatformIdentifier)' != ''">
+ <Compile Include="System\IO\IsolatedStorage\Helper.NonMobile.cs" />
+ <Compile Include="System\IO\IsolatedStorage\IsolatedStorageFile.NonMobile.cs" />
+ </ItemGroup>
<ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="System\IO\IsolatedStorage\Helper.Win32.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != 'windows'">
<Compile Include="System\IO\IsolatedStorage\Helper.Unix.cs" />
</ItemGroup>
<ItemGroup>
diff --git a/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/Helper.AnyMobile.cs b/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/Helper.AnyMobile.cs
new file mode 100644
index 00000000000..4121814515f
--- /dev/null
+++ b/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/Helper.AnyMobile.cs
@@ -0,0 +1,10 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+namespace System.IO.IsolatedStorage
+{
+ internal static partial class Helper
+ {
+ public const string IsolatedStorageDirectoryName = ".isolated-storage";
+ }
+}
diff --git a/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/Helper.NonMobile.cs b/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/Helper.NonMobile.cs
new file mode 100644
index 00000000000..cde27b6c5e2
--- /dev/null
+++ b/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/Helper.NonMobile.cs
@@ -0,0 +1,10 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+namespace System.IO.IsolatedStorage
+{
+ internal static partial class Helper
+ {
+ public const string IsolatedStorageDirectoryName = "IsolatedStorage";
+ }
+}
diff --git a/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/Helper.Win32Unix.cs b/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/Helper.Win32Unix.cs
index 5a55e866789..7577ea7ee04 100644
--- a/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/Helper.Win32Unix.cs
+++ b/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/Helper.Win32Unix.cs
@@ -12,7 +12,7 @@ namespace System.IO.IsolatedStorage
{
internal static string GetDataDirectory(IsolatedStorageScope scope)
{
- // This is the relevant special folder for the given scope plus "IsolatedStorage".
+ // This is the relevant special folder for the given scope plus IsolatedStorageDirectoryName.
// It is meant to replicate the behavior of the VM ComIsolatedStorage::GetRootDir().
// (note that Silverlight used "CoreIsolatedStorage" for a directory name and did not support machine scope)
diff --git a/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/Helper.cs b/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/Helper.cs
index 3b5d6b6afbc..984eeed4046 100644
--- a/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/Helper.cs
+++ b/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/Helper.cs
@@ -5,14 +5,12 @@ namespace System.IO.IsolatedStorage
{
internal static partial class Helper
{
- private const string IsolatedStorageDirectoryName = "IsolatedStorage";
-
private static string? s_machineRootDirectory;
private static string? s_roamingUserRootDirectory;
private static string? s_userRootDirectory;
/// <summary>
- /// The full root directory is the relevant special folder from Environment.GetFolderPath() plus "IsolatedStorage"
+ /// The full root directory is the relevant special folder from Environment.GetFolderPath() plus IsolatedStorageDirectoryName
/// and a set of random directory names if not roaming. (The random directories aren't created for WinRT as
/// the FolderPath locations for WinRT are app isolated already.)
///
@@ -21,6 +19,8 @@ namespace System.IO.IsolatedStorage
/// User: @"C:\Users\jerem\AppData\Local\IsolatedStorage\10v31ho4.bo2\eeolfu22.f2w\"
/// User|Roaming: @"C:\Users\jerem\AppData\Roaming\IsolatedStorage\"
/// Machine: @"C:\ProgramData\IsolatedStorage\nin03cyc.wr0\o3j0urs3.0sn\"
+ /// Android path: "/data/user/0/net.dot.System.IO.IsolatedStorage.Tests/files/.config/.isolated-storage/"
+ /// iOS path: "/var/mobile/Containers/Data/Application/A323CBB9-A2B3-4432-9449-48CC20C07A7D/Documents/.config/.isolated-storage/"
///
/// Identity for the current store gets tacked on after this.
/// </summary>
diff --git a/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/IsolatedStorageFile.AnyMobile.cs b/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/IsolatedStorageFile.AnyMobile.cs
new file mode 100644
index 00000000000..69a2f706779
--- /dev/null
+++ b/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/IsolatedStorageFile.AnyMobile.cs
@@ -0,0 +1,13 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+namespace System.IO.IsolatedStorage
+{
+ public sealed partial class IsolatedStorageFile : IsolatedStorage, IDisposable
+ {
+ private string GetIsolatedStorageRoot()
+ {
+ return Helper.GetRootDirectory(Scope);
+ }
+ }
+}
diff --git a/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/IsolatedStorageFile.NonMobile.cs b/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/IsolatedStorageFile.NonMobile.cs
new file mode 100644
index 00000000000..4f547d55cff
--- /dev/null
+++ b/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/IsolatedStorageFile.NonMobile.cs
@@ -0,0 +1,19 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Text;
+
+namespace System.IO.IsolatedStorage
+{
+ public sealed partial class IsolatedStorageFile : IsolatedStorage, IDisposable
+ {
+ private string GetIsolatedStorageRoot()
+ {
+ StringBuilder root = new StringBuilder(Helper.GetRootDirectory(Scope));
+ root.Append(SeparatorExternal);
+ root.Append(IdentityHash);
+
+ return root.ToString();
+ }
+ }
+}
diff --git a/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/IsolatedStorageFile.cs b/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/IsolatedStorageFile.cs
index 0f024ca64fb..4afd6468cea 100644
--- a/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/IsolatedStorageFile.cs
+++ b/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/IsolatedStorageFile.cs
@@ -43,9 +43,7 @@ namespace System.IO.IsolatedStorage
// InitStore will set up the IdentityHash
InitStore(scope, null, null);
- StringBuilder sb = new StringBuilder(Helper.GetRootDirectory(scope));
- sb.Append(SeparatorExternal);
- sb.Append(IdentityHash);
+ StringBuilder sb = new StringBuilder(GetIsolatedStorageRoot());
sb.Append(SeparatorExternal);
if (Helper.IsApplication(scope))
diff --git a/src/libraries/System.IO.IsolatedStorage/tests/System.IO.IsolatedStorage.Tests.csproj b/src/libraries/System.IO.IsolatedStorage/tests/System.IO.IsolatedStorage.Tests.csproj
index b075376fa8b..0410513c46c 100644
--- a/src/libraries/System.IO.IsolatedStorage/tests/System.IO.IsolatedStorage.Tests.csproj
+++ b/src/libraries/System.IO.IsolatedStorage/tests/System.IO.IsolatedStorage.Tests.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-Browser</TargetFrameworks>
+ <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-Browser;$(NetCoreAppCurrent)-MacCatalyst;$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS;$(NetCoreAppCurrent)-Android</TargetFrameworks>
<IgnoreForCI Condition="'$(TargetOS)' == 'Browser'">true</IgnoreForCI>
</PropertyGroup>
<ItemGroup>
@@ -17,7 +17,7 @@
<Compile Include="..\src\System\IO\IsolatedStorage\Helper.Win32.cs"
Link="Internals\Helper.Win32.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix' or '$(TargetPlatformIdentifier)' == 'Browser'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != 'windows'">
<Compile Include="..\src\System\IO\IsolatedStorage\Helper.Unix.cs"
Link="Internals\Helper.Unix.cs" />
</ItemGroup>
@@ -53,6 +53,14 @@
<Compile Include="System\IO\IsolatedStorage\TestHelper.cs" />
<Compile Include="System\IO\IsolatedStorage\RemoveTests.cs" />
</ItemGroup>
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Android' or '$(TargetPlatformIdentifier)' == 'iOS' or '$(TargetPlatformIdentifier)' == 'MacCatalyst' or '$(TargetPlatformIdentifier)' == 'tvOS'">
+ <Compile Include="..\src\System\IO\IsolatedStorage\Helper.AnyMobile.cs" />
+ <Compile Include="System\IO\IsolatedStorage\TestHelper.AnyMobile.cs" />
+ </ItemGroup>
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != 'Android' and '$(TargetPlatformIdentifier)' != 'iOS' and '$(TargetPlatformIdentifier)' != 'MacCatalyst' and '$(TargetPlatformIdentifier)' != 'tvOS' and '$(TargetPlatformIdentifier)' != ''">
+ <Compile Include="..\src\System\IO\IsolatedStorage\Helper.NonMobile.cs" />
+ <Compile Include="System\IO\IsolatedStorage\TestHelper.NonMobile.cs" />
+ </ItemGroup>
<ItemGroup>
<ProjectReference Include="$(LibrariesProjectRoot)System.DirectoryServices\src\System.DirectoryServices.csproj" />
</ItemGroup>
diff --git a/src/libraries/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/HelperTests.cs b/src/libraries/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/HelperTests.cs
index 2fe50e59055..60d65949da7 100644
--- a/src/libraries/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/HelperTests.cs
+++ b/src/libraries/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/HelperTests.cs
@@ -45,7 +45,7 @@ namespace System.IO.IsolatedStorage.Tests
return;
string path = Helper.GetDataDirectory(scope);
- Assert.Equal("IsolatedStorage", Path.GetFileName(path));
+ Assert.Equal(Helper.IsolatedStorageDirectoryName, Path.GetFileName(path));
}
}
}
diff --git a/src/libraries/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/TestHelper.AnyMobile.cs b/src/libraries/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/TestHelper.AnyMobile.cs
new file mode 100644
index 00000000000..63709fd41ab
--- /dev/null
+++ b/src/libraries/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/TestHelper.AnyMobile.cs
@@ -0,0 +1,23 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Reflection;
+using System.Collections.Generic;
+
+namespace System.IO.IsolatedStorage
+{
+ public static partial class TestHelper
+ {
+ private static List<string> GetRoots()
+ {
+ List<string> roots = new List<string>();
+ string userRoot = Helper.GetDataDirectory(IsolatedStorageScope.User);
+ string randomUserRoot = Helper.GetRandomDirectory(userRoot, IsolatedStorageScope.User);
+ roots.Add(randomUserRoot);
+
+ // Application scope doesn't go under a random dir
+ roots.Add(userRoot);
+ return roots;
+ }
+ }
+}
diff --git a/src/libraries/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/TestHelper.NonMobile.cs b/src/libraries/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/TestHelper.NonMobile.cs
new file mode 100644
index 00000000000..e0217dc241a
--- /dev/null
+++ b/src/libraries/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/TestHelper.NonMobile.cs
@@ -0,0 +1,36 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Reflection;
+using System.Collections.Generic;
+
+namespace System.IO.IsolatedStorage
+{
+ public static partial class TestHelper
+ {
+ private static List<string> GetRoots()
+ {
+ string hash;
+ object identity;
+ Helper.GetDefaultIdentityAndHash(out identity, out hash, '.');
+ List<string> roots = new List<string>();
+ string userRoot = Helper.GetDataDirectory(IsolatedStorageScope.User);
+ string randomUserRoot = Helper.GetRandomDirectory(userRoot, IsolatedStorageScope.User);
+
+ roots.Add(Path.Combine(randomUserRoot, hash));
+ // Application scope doesn't go under a random dir
+ roots.Add(Path.Combine(userRoot, hash));
+
+ // https://github.com/dotnet/runtime/issues/2092
+ // https://github.com/dotnet/runtime/issues/21742
+ if (OperatingSystem.IsWindows()
+ && !PlatformDetection.IsInAppContainer)
+ {
+ roots.Add(Helper.GetDataDirectory(IsolatedStorageScope.Machine));
+ }
+
+ return roots;
+ }
+ }
+}
+ \ No newline at end of file
diff --git a/src/libraries/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/TestHelper.cs b/src/libraries/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/TestHelper.cs
index e3e7f423a7b..06339504237 100644
--- a/src/libraries/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/TestHelper.cs
+++ b/src/libraries/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/TestHelper.cs
@@ -8,7 +8,7 @@ using System.Text;
namespace System.IO.IsolatedStorage
{
- public static class TestHelper
+ public static partial class TestHelper
{
private static PropertyInfo s_rootDirectoryProperty;
private static List<string> s_roots;
@@ -17,27 +17,8 @@ namespace System.IO.IsolatedStorage
{
s_rootDirectoryProperty = typeof(IsolatedStorageFile).GetProperty("RootDirectory", BindingFlags.NonPublic | BindingFlags.Instance);
- s_roots = new List<string>();
-
- string hash;
- object identity;
- Helper.GetDefaultIdentityAndHash(out identity, out hash, '.');
-
- string userRoot = Helper.GetDataDirectory(IsolatedStorageScope.User);
- string randomUserRoot = Helper.GetRandomDirectory(userRoot, IsolatedStorageScope.User);
- s_roots.Add(Path.Combine(randomUserRoot, hash));
-
- // Application scope doesn't go under a random dir
- s_roots.Add(Path.Combine(userRoot, hash));
-
- // https://github.com/dotnet/runtime/issues/2092
- // https://github.com/dotnet/runtime/issues/21742
- if (OperatingSystem.IsWindows()
- && !PlatformDetection.IsInAppContainer)
- {
- s_roots.Add(Helper.GetDataDirectory(IsolatedStorageScope.Machine));
- }
-
+ s_roots = GetRoots();
+
// We don't expose Roaming yet
// Helper.GetDataDirectory(IsolatedStorageScope.Roaming);
}
diff --git a/src/libraries/System.IO.Pipes/System.IO.Pipes.sln b/src/libraries/System.IO.Pipes/System.IO.Pipes.sln
index 8875fca79dd..62c4660bdf0 100644
--- a/src/libraries/System.IO.Pipes/System.IO.Pipes.sln
+++ b/src/libraries/System.IO.Pipes/System.IO.Pipes.sln
@@ -11,6 +11,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Configuration.Config
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Configuration.ConfigurationManager", "..\System.Configuration.ConfigurationManager\src\System.Configuration.ConfigurationManager.csproj", "{FED8B31F-94BB-48AF-9A0A-03C777BD805B}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.EventLog", "..\System.Diagnostics.EventLog\ref\System.Diagnostics.EventLog.csproj", "{616A1164-8B49-42C1-BD86-F416B47F7543}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.EventLog.Messages", "..\System.Diagnostics.EventLog\src\Messages\System.Diagnostics.EventLog.Messages.csproj", "{F97B792B-B1B0-47B5-BC93-72FCD6E0BD93}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.EventLog", "..\System.Diagnostics.EventLog\src\System.Diagnostics.EventLog.csproj", "{1EE276D5-2F82-4D93-9E35-33A26022AB6D}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.DirectoryServices.AccountManagement", "..\System.DirectoryServices.AccountManagement\ref\System.DirectoryServices.AccountManagement.csproj", "{9A567CB8-B318-42C0-B05F-B0746E50DBFD}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.DirectoryServices.AccountManagement", "..\System.DirectoryServices.AccountManagement\src\System.DirectoryServices.AccountManagement.csproj", "{DD5D3579-50B5-4ECE-AE54-2C67E66B8E09}"
@@ -89,6 +95,18 @@ Global
{FED8B31F-94BB-48AF-9A0A-03C777BD805B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FED8B31F-94BB-48AF-9A0A-03C777BD805B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FED8B31F-94BB-48AF-9A0A-03C777BD805B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {616A1164-8B49-42C1-BD86-F416B47F7543}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {616A1164-8B49-42C1-BD86-F416B47F7543}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {616A1164-8B49-42C1-BD86-F416B47F7543}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {616A1164-8B49-42C1-BD86-F416B47F7543}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F97B792B-B1B0-47B5-BC93-72FCD6E0BD93}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F97B792B-B1B0-47B5-BC93-72FCD6E0BD93}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F97B792B-B1B0-47B5-BC93-72FCD6E0BD93}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F97B792B-B1B0-47B5-BC93-72FCD6E0BD93}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1EE276D5-2F82-4D93-9E35-33A26022AB6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1EE276D5-2F82-4D93-9E35-33A26022AB6D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1EE276D5-2F82-4D93-9E35-33A26022AB6D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1EE276D5-2F82-4D93-9E35-33A26022AB6D}.Release|Any CPU.Build.0 = Release|Any CPU
{9A567CB8-B318-42C0-B05F-B0746E50DBFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9A567CB8-B318-42C0-B05F-B0746E50DBFD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9A567CB8-B318-42C0-B05F-B0746E50DBFD}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -179,6 +197,7 @@ Global
{DF14A751-0E6D-4B99-A6FB-F295B8C5E0FC} = {78D8A09F-59F1-4F02-8FA9-14243A052080}
{F5E105DC-89A1-45D4-A663-4A1BDEB48E9D} = {B64B7581-6925-4823-B7AF-97FBC53A4146}
{64157E8E-5D3C-4DC5-A2B5-5272DAEA83D2} = {B64B7581-6925-4823-B7AF-97FBC53A4146}
+ {616A1164-8B49-42C1-BD86-F416B47F7543} = {B64B7581-6925-4823-B7AF-97FBC53A4146}
{9A567CB8-B318-42C0-B05F-B0746E50DBFD} = {B64B7581-6925-4823-B7AF-97FBC53A4146}
{572E9C48-D5F4-4D27-825F-6BBC504E9526} = {B64B7581-6925-4823-B7AF-97FBC53A4146}
{7FACB7D5-E0A4-43D4-8C61-CB0C39C8A7EF} = {B64B7581-6925-4823-B7AF-97FBC53A4146}
@@ -190,6 +209,8 @@ Global
{724E9C4C-A140-4815-88A4-2934BD67574F} = {B64B7581-6925-4823-B7AF-97FBC53A4146}
{BA89E145-C970-46E5-8732-3CCE1821ADA2} = {B90127A0-E005-44FE-9D2B-3DE06444CE37}
{FED8B31F-94BB-48AF-9A0A-03C777BD805B} = {B90127A0-E005-44FE-9D2B-3DE06444CE37}
+ {F97B792B-B1B0-47B5-BC93-72FCD6E0BD93} = {B90127A0-E005-44FE-9D2B-3DE06444CE37}
+ {1EE276D5-2F82-4D93-9E35-33A26022AB6D} = {B90127A0-E005-44FE-9D2B-3DE06444CE37}
{DD5D3579-50B5-4ECE-AE54-2C67E66B8E09} = {B90127A0-E005-44FE-9D2B-3DE06444CE37}
{826D5FBF-95C3-42EE-BACD-0CA38B6FEC73} = {B90127A0-E005-44FE-9D2B-3DE06444CE37}
{A15EED32-12DF-40D3-AA8E-197F76D8A0C5} = {B90127A0-E005-44FE-9D2B-3DE06444CE37}
diff --git a/src/libraries/System.IO.UnmanagedMemoryStream/System.IO.UnmanagedMemoryStream.sln b/src/libraries/System.IO.UnmanagedMemoryStream/System.IO.UnmanagedMemoryStream.sln
index 29896d82709..ff81f92e827 100644
--- a/src/libraries/System.IO.UnmanagedMemoryStream/System.IO.UnmanagedMemoryStream.sln
+++ b/src/libraries/System.IO.UnmanagedMemoryStream/System.IO.UnmanagedMemoryStream.sln
@@ -15,6 +15,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.IO.UnmanagedMemorySt
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{5CB1579E-E830-4812-A7F5-0E33E1847BF6}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{CD3B40BE-3F02-4A20-9713-D6BAB90FCCF4}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{00BCBF77-11E9-45BC-A663-D1904B92C0E9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{D6653CCB-7EF2-4B4F-86D5-0FC47FDFBC9E}"
@@ -75,11 +77,8 @@ Global
{9963A1DA-8EBD-47EF-8BF2-7B6444BE6FCE}.Release|x86.ActiveCfg = Release|Any CPU
{9963A1DA-8EBD-47EF-8BF2-7B6444BE6FCE}.Release|x86.Build.0 = Release|Any CPU
{9963A1DA-8EBD-47EF-8BF2-7B6444BE6FCE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {9963A1DA-8EBD-47EF-8BF2-7B6444BE6FCE}.Checked|Any CPU.Build.0 = Debug|Any CPU
{9963A1DA-8EBD-47EF-8BF2-7B6444BE6FCE}.Checked|x64.ActiveCfg = Debug|Any CPU
- {9963A1DA-8EBD-47EF-8BF2-7B6444BE6FCE}.Checked|x64.Build.0 = Debug|Any CPU
{9963A1DA-8EBD-47EF-8BF2-7B6444BE6FCE}.Checked|x86.ActiveCfg = Debug|Any CPU
- {9963A1DA-8EBD-47EF-8BF2-7B6444BE6FCE}.Checked|x86.Build.0 = Debug|Any CPU
{7DC8F0E9-5D6C-47F7-AE83-9AB1180AF51E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7DC8F0E9-5D6C-47F7-AE83-9AB1180AF51E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7DC8F0E9-5D6C-47F7-AE83-9AB1180AF51E}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -93,11 +92,8 @@ Global
{7DC8F0E9-5D6C-47F7-AE83-9AB1180AF51E}.Release|x86.ActiveCfg = Release|Any CPU
{7DC8F0E9-5D6C-47F7-AE83-9AB1180AF51E}.Release|x86.Build.0 = Release|Any CPU
{7DC8F0E9-5D6C-47F7-AE83-9AB1180AF51E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {7DC8F0E9-5D6C-47F7-AE83-9AB1180AF51E}.Checked|Any CPU.Build.0 = Debug|Any CPU
{7DC8F0E9-5D6C-47F7-AE83-9AB1180AF51E}.Checked|x64.ActiveCfg = Debug|Any CPU
- {7DC8F0E9-5D6C-47F7-AE83-9AB1180AF51E}.Checked|x64.Build.0 = Debug|Any CPU
{7DC8F0E9-5D6C-47F7-AE83-9AB1180AF51E}.Checked|x86.ActiveCfg = Debug|Any CPU
- {7DC8F0E9-5D6C-47F7-AE83-9AB1180AF51E}.Checked|x86.Build.0 = Debug|Any CPU
{547BD84E-4ACA-4881-AF46-0CD71042F28E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{547BD84E-4ACA-4881-AF46-0CD71042F28E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{547BD84E-4ACA-4881-AF46-0CD71042F28E}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -111,11 +107,8 @@ Global
{547BD84E-4ACA-4881-AF46-0CD71042F28E}.Release|x86.ActiveCfg = Release|Any CPU
{547BD84E-4ACA-4881-AF46-0CD71042F28E}.Release|x86.Build.0 = Release|Any CPU
{547BD84E-4ACA-4881-AF46-0CD71042F28E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {547BD84E-4ACA-4881-AF46-0CD71042F28E}.Checked|Any CPU.Build.0 = Debug|Any CPU
{547BD84E-4ACA-4881-AF46-0CD71042F28E}.Checked|x64.ActiveCfg = Debug|Any CPU
- {547BD84E-4ACA-4881-AF46-0CD71042F28E}.Checked|x64.Build.0 = Debug|Any CPU
{547BD84E-4ACA-4881-AF46-0CD71042F28E}.Checked|x86.ActiveCfg = Debug|Any CPU
- {547BD84E-4ACA-4881-AF46-0CD71042F28E}.Checked|x86.Build.0 = Debug|Any CPU
{9ED000E5-2F8D-4B49-85BD-70E34AB2A26F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9ED000E5-2F8D-4B49-85BD-70E34AB2A26F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9ED000E5-2F8D-4B49-85BD-70E34AB2A26F}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -129,11 +122,8 @@ Global
{9ED000E5-2F8D-4B49-85BD-70E34AB2A26F}.Release|x86.ActiveCfg = Release|Any CPU
{9ED000E5-2F8D-4B49-85BD-70E34AB2A26F}.Release|x86.Build.0 = Release|Any CPU
{9ED000E5-2F8D-4B49-85BD-70E34AB2A26F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {9ED000E5-2F8D-4B49-85BD-70E34AB2A26F}.Checked|Any CPU.Build.0 = Debug|Any CPU
{9ED000E5-2F8D-4B49-85BD-70E34AB2A26F}.Checked|x64.ActiveCfg = Debug|Any CPU
- {9ED000E5-2F8D-4B49-85BD-70E34AB2A26F}.Checked|x64.Build.0 = Debug|Any CPU
{9ED000E5-2F8D-4B49-85BD-70E34AB2A26F}.Checked|x86.ActiveCfg = Debug|Any CPU
- {9ED000E5-2F8D-4B49-85BD-70E34AB2A26F}.Checked|x86.Build.0 = Debug|Any CPU
{658B1534-3B9E-4108-9AFE-161562723E9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{658B1534-3B9E-4108-9AFE-161562723E9D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{658B1534-3B9E-4108-9AFE-161562723E9D}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -147,11 +137,8 @@ Global
{658B1534-3B9E-4108-9AFE-161562723E9D}.Release|x86.ActiveCfg = Release|Any CPU
{658B1534-3B9E-4108-9AFE-161562723E9D}.Release|x86.Build.0 = Release|Any CPU
{658B1534-3B9E-4108-9AFE-161562723E9D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {658B1534-3B9E-4108-9AFE-161562723E9D}.Checked|Any CPU.Build.0 = Debug|Any CPU
{658B1534-3B9E-4108-9AFE-161562723E9D}.Checked|x64.ActiveCfg = Debug|Any CPU
- {658B1534-3B9E-4108-9AFE-161562723E9D}.Checked|x64.Build.0 = Debug|Any CPU
{658B1534-3B9E-4108-9AFE-161562723E9D}.Checked|x86.ActiveCfg = Debug|Any CPU
- {658B1534-3B9E-4108-9AFE-161562723E9D}.Checked|x86.Build.0 = Debug|Any CPU
{D14DC8D4-F45E-412D-AE98-CA07F900347B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D14DC8D4-F45E-412D-AE98-CA07F900347B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D14DC8D4-F45E-412D-AE98-CA07F900347B}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -165,11 +152,8 @@ Global
{D14DC8D4-F45E-412D-AE98-CA07F900347B}.Release|x86.ActiveCfg = Release|Any CPU
{D14DC8D4-F45E-412D-AE98-CA07F900347B}.Release|x86.Build.0 = Release|Any CPU
{D14DC8D4-F45E-412D-AE98-CA07F900347B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {D14DC8D4-F45E-412D-AE98-CA07F900347B}.Checked|Any CPU.Build.0 = Debug|Any CPU
{D14DC8D4-F45E-412D-AE98-CA07F900347B}.Checked|x64.ActiveCfg = Debug|Any CPU
- {D14DC8D4-F45E-412D-AE98-CA07F900347B}.Checked|x64.Build.0 = Debug|Any CPU
{D14DC8D4-F45E-412D-AE98-CA07F900347B}.Checked|x86.ActiveCfg = Debug|Any CPU
- {D14DC8D4-F45E-412D-AE98-CA07F900347B}.Checked|x86.Build.0 = Debug|Any CPU
{5CB1579E-E830-4812-A7F5-0E33E1847BF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5CB1579E-E830-4812-A7F5-0E33E1847BF6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5CB1579E-E830-4812-A7F5-0E33E1847BF6}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -183,11 +167,23 @@ Global
{5CB1579E-E830-4812-A7F5-0E33E1847BF6}.Release|x86.ActiveCfg = Release|Any CPU
{5CB1579E-E830-4812-A7F5-0E33E1847BF6}.Release|x86.Build.0 = Release|Any CPU
{5CB1579E-E830-4812-A7F5-0E33E1847BF6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {5CB1579E-E830-4812-A7F5-0E33E1847BF6}.Checked|Any CPU.Build.0 = Debug|Any CPU
{5CB1579E-E830-4812-A7F5-0E33E1847BF6}.Checked|x64.ActiveCfg = Debug|Any CPU
- {5CB1579E-E830-4812-A7F5-0E33E1847BF6}.Checked|x64.Build.0 = Debug|Any CPU
{5CB1579E-E830-4812-A7F5-0E33E1847BF6}.Checked|x86.ActiveCfg = Debug|Any CPU
- {5CB1579E-E830-4812-A7F5-0E33E1847BF6}.Checked|x86.Build.0 = Debug|Any CPU
+ {CD3B40BE-3F02-4A20-9713-D6BAB90FCCF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {CD3B40BE-3F02-4A20-9713-D6BAB90FCCF4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {CD3B40BE-3F02-4A20-9713-D6BAB90FCCF4}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {CD3B40BE-3F02-4A20-9713-D6BAB90FCCF4}.Debug|x64.Build.0 = Debug|Any CPU
+ {CD3B40BE-3F02-4A20-9713-D6BAB90FCCF4}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {CD3B40BE-3F02-4A20-9713-D6BAB90FCCF4}.Debug|x86.Build.0 = Debug|Any CPU
+ {CD3B40BE-3F02-4A20-9713-D6BAB90FCCF4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {CD3B40BE-3F02-4A20-9713-D6BAB90FCCF4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {CD3B40BE-3F02-4A20-9713-D6BAB90FCCF4}.Release|x64.ActiveCfg = Release|Any CPU
+ {CD3B40BE-3F02-4A20-9713-D6BAB90FCCF4}.Release|x64.Build.0 = Release|Any CPU
+ {CD3B40BE-3F02-4A20-9713-D6BAB90FCCF4}.Release|x86.ActiveCfg = Release|Any CPU
+ {CD3B40BE-3F02-4A20-9713-D6BAB90FCCF4}.Release|x86.Build.0 = Release|Any CPU
+ {CD3B40BE-3F02-4A20-9713-D6BAB90FCCF4}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {CD3B40BE-3F02-4A20-9713-D6BAB90FCCF4}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {CD3B40BE-3F02-4A20-9713-D6BAB90FCCF4}.Checked|x86.ActiveCfg = Debug|Any CPU
{00BCBF77-11E9-45BC-A663-D1904B92C0E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{00BCBF77-11E9-45BC-A663-D1904B92C0E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{00BCBF77-11E9-45BC-A663-D1904B92C0E9}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -201,11 +197,8 @@ Global
{00BCBF77-11E9-45BC-A663-D1904B92C0E9}.Release|x86.ActiveCfg = Release|Any CPU
{00BCBF77-11E9-45BC-A663-D1904B92C0E9}.Release|x86.Build.0 = Release|Any CPU
{00BCBF77-11E9-45BC-A663-D1904B92C0E9}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {00BCBF77-11E9-45BC-A663-D1904B92C0E9}.Checked|Any CPU.Build.0 = Debug|Any CPU
{00BCBF77-11E9-45BC-A663-D1904B92C0E9}.Checked|x64.ActiveCfg = Debug|Any CPU
- {00BCBF77-11E9-45BC-A663-D1904B92C0E9}.Checked|x64.Build.0 = Debug|Any CPU
{00BCBF77-11E9-45BC-A663-D1904B92C0E9}.Checked|x86.ActiveCfg = Debug|Any CPU
- {00BCBF77-11E9-45BC-A663-D1904B92C0E9}.Checked|x86.Build.0 = Debug|Any CPU
{D6653CCB-7EF2-4B4F-86D5-0FC47FDFBC9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D6653CCB-7EF2-4B4F-86D5-0FC47FDFBC9E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D6653CCB-7EF2-4B4F-86D5-0FC47FDFBC9E}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -219,11 +212,8 @@ Global
{D6653CCB-7EF2-4B4F-86D5-0FC47FDFBC9E}.Release|x86.ActiveCfg = Release|Any CPU
{D6653CCB-7EF2-4B4F-86D5-0FC47FDFBC9E}.Release|x86.Build.0 = Release|Any CPU
{D6653CCB-7EF2-4B4F-86D5-0FC47FDFBC9E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {D6653CCB-7EF2-4B4F-86D5-0FC47FDFBC9E}.Checked|Any CPU.Build.0 = Debug|Any CPU
{D6653CCB-7EF2-4B4F-86D5-0FC47FDFBC9E}.Checked|x64.ActiveCfg = Debug|Any CPU
- {D6653CCB-7EF2-4B4F-86D5-0FC47FDFBC9E}.Checked|x64.Build.0 = Debug|Any CPU
{D6653CCB-7EF2-4B4F-86D5-0FC47FDFBC9E}.Checked|x86.ActiveCfg = Debug|Any CPU
- {D6653CCB-7EF2-4B4F-86D5-0FC47FDFBC9E}.Checked|x86.Build.0 = Debug|Any CPU
{D74D791F-5A0A-40FB-AF29-07EA0E890B16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D74D791F-5A0A-40FB-AF29-07EA0E890B16}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D74D791F-5A0A-40FB-AF29-07EA0E890B16}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -237,11 +227,8 @@ Global
{D74D791F-5A0A-40FB-AF29-07EA0E890B16}.Release|x86.ActiveCfg = Release|Any CPU
{D74D791F-5A0A-40FB-AF29-07EA0E890B16}.Release|x86.Build.0 = Release|Any CPU
{D74D791F-5A0A-40FB-AF29-07EA0E890B16}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {D74D791F-5A0A-40FB-AF29-07EA0E890B16}.Checked|Any CPU.Build.0 = Debug|Any CPU
{D74D791F-5A0A-40FB-AF29-07EA0E890B16}.Checked|x64.ActiveCfg = Debug|Any CPU
- {D74D791F-5A0A-40FB-AF29-07EA0E890B16}.Checked|x64.Build.0 = Debug|Any CPU
{D74D791F-5A0A-40FB-AF29-07EA0E890B16}.Checked|x86.ActiveCfg = Debug|Any CPU
- {D74D791F-5A0A-40FB-AF29-07EA0E890B16}.Checked|x86.Build.0 = Debug|Any CPU
{5D668190-807E-475F-9CDC-71CAA0ADA726}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5D668190-807E-475F-9CDC-71CAA0ADA726}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5D668190-807E-475F-9CDC-71CAA0ADA726}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -255,11 +242,8 @@ Global
{5D668190-807E-475F-9CDC-71CAA0ADA726}.Release|x86.ActiveCfg = Release|Any CPU
{5D668190-807E-475F-9CDC-71CAA0ADA726}.Release|x86.Build.0 = Release|Any CPU
{5D668190-807E-475F-9CDC-71CAA0ADA726}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {5D668190-807E-475F-9CDC-71CAA0ADA726}.Checked|Any CPU.Build.0 = Debug|Any CPU
{5D668190-807E-475F-9CDC-71CAA0ADA726}.Checked|x64.ActiveCfg = Debug|Any CPU
- {5D668190-807E-475F-9CDC-71CAA0ADA726}.Checked|x64.Build.0 = Debug|Any CPU
{5D668190-807E-475F-9CDC-71CAA0ADA726}.Checked|x86.ActiveCfg = Debug|Any CPU
- {5D668190-807E-475F-9CDC-71CAA0ADA726}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -272,6 +256,7 @@ Global
{D14DC8D4-F45E-412D-AE98-CA07F900347B} = {7BB3C727-EA87-416E-84DD-34ADD5540067}
{547BD84E-4ACA-4881-AF46-0CD71042F28E} = {F0F69F17-CFD8-4C03-B86D-C95F0F8D78EC}
{9ED000E5-2F8D-4B49-85BD-70E34AB2A26F} = {F0F69F17-CFD8-4C03-B86D-C95F0F8D78EC}
+ {CD3B40BE-3F02-4A20-9713-D6BAB90FCCF4} = {F0F69F17-CFD8-4C03-B86D-C95F0F8D78EC}
{D74D791F-5A0A-40FB-AF29-07EA0E890B16} = {F0F69F17-CFD8-4C03-B86D-C95F0F8D78EC}
{5D668190-807E-475F-9CDC-71CAA0ADA726} = {F0F69F17-CFD8-4C03-B86D-C95F0F8D78EC}
{5CB1579E-E830-4812-A7F5-0E33E1847BF6} = {8A43D0EF-B87B-4046-963C-3DFA9ADA62FB}
diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/ILGen.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/ILGen.cs
index 5cd7fd59185..bb7aaa108f6 100644
--- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/ILGen.cs
+++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/ILGen.cs
@@ -673,11 +673,6 @@ namespace System.Linq.Expressions.Compiler
}
else
{
- if (tf == TypeCode.Byte)
- {
- return;
- }
-
convCode = OpCodes.Conv_I1;
}
@@ -689,11 +684,6 @@ namespace System.Linq.Expressions.Compiler
}
else
{
- if (tf == TypeCode.SByte)
- {
- return;
- }
-
convCode = OpCodes.Conv_U1;
}
@@ -704,14 +694,6 @@ namespace System.Linq.Expressions.Compiler
case TypeCode.SByte:
case TypeCode.Byte:
return;
- case TypeCode.Char:
- case TypeCode.UInt16:
- if (!isChecked)
- {
- return;
- }
-
- break;
}
convCode = isChecked
@@ -726,14 +708,6 @@ namespace System.Linq.Expressions.Compiler
case TypeCode.Char:
case TypeCode.UInt16:
return;
- case TypeCode.SByte:
- case TypeCode.Int16:
- if (!isChecked)
- {
- return;
- }
-
- break;
}
convCode = isChecked
diff --git a/src/libraries/System.Linq.Expressions/tests/Convert/ConvertTests.cs b/src/libraries/System.Linq.Expressions/tests/Convert/ConvertTests.cs
index eb7d20b6ac7..dd9c274f0a3 100644
--- a/src/libraries/System.Linq.Expressions/tests/Convert/ConvertTests.cs
+++ b/src/libraries/System.Linq.Expressions/tests/Convert/ConvertTests.cs
@@ -183,6 +183,15 @@ namespace System.Linq.Expressions.Tests
}
[Theory, ClassData(typeof(CompilationTypes))]
+ public static void ConvertByteToSByteRetIntTest(bool useInterpreter)
+ {
+ foreach (byte value in new byte[] { 0, 1, byte.MaxValue })
+ {
+ VerifyByteToSByteRetInt(value, useInterpreter);
+ }
+ }
+
+ [Theory, ClassData(typeof(CompilationTypes))]
public static void ConvertByteToNullableSByteTest(bool useInterpreter)
{
foreach (byte value in new byte[] { 0, 1, byte.MaxValue })
@@ -4413,6 +4422,15 @@ namespace System.Linq.Expressions.Tests
}
[Theory, ClassData(typeof(CompilationTypes))]
+ public static void ConvertSByteToByteRetIntTest(bool useInterpreter)
+ {
+ foreach (sbyte value in new sbyte[] { 0, 1, -1, sbyte.MinValue, sbyte.MaxValue })
+ {
+ VerifySByteToByteRetInt(value, useInterpreter);
+ }
+ }
+
+ [Theory, ClassData(typeof(CompilationTypes))]
public static void ConvertSByteToNullableByteTest(bool useInterpreter)
{
foreach (sbyte value in new sbyte[] { 0, 1, -1, sbyte.MinValue, sbyte.MaxValue })
@@ -5151,6 +5169,15 @@ namespace System.Linq.Expressions.Tests
}
[Theory, ClassData(typeof(CompilationTypes))]
+ public static void ConvertShortToUShortRetIntTest(bool useInterpreter)
+ {
+ foreach (short value in new short[] { 0, 1, -1, short.MinValue, short.MaxValue })
+ {
+ VerifyShortToUShortRetInt(value, useInterpreter);
+ }
+ }
+
+ [Theory, ClassData(typeof(CompilationTypes))]
public static void ConvertShortToNullableUShortTest(bool useInterpreter)
{
foreach (short value in new short[] { 0, 1, -1, short.MinValue, short.MaxValue })
@@ -6609,6 +6636,15 @@ namespace System.Linq.Expressions.Tests
}
[Theory, ClassData(typeof(CompilationTypes))]
+ public static void ConvertUShortToShortRetIntTest(bool useInterpreter)
+ {
+ foreach (ushort value in new ushort[] { 0, 1, ushort.MaxValue })
+ {
+ VerifyUShortToShortRetInt(value, useInterpreter);
+ }
+ }
+
+ [Theory, ClassData(typeof(CompilationTypes))]
public static void ConvertUShortToNullableShortTest(bool useInterpreter)
{
foreach (ushort value in new ushort[] { 0, 1, ushort.MaxValue })
@@ -7136,6 +7172,17 @@ namespace System.Linq.Expressions.Tests
Assert.Equal(unchecked((sbyte)value), f());
}
+ private static void VerifyByteToSByteRetInt(byte value, bool useInterpreter)
+ {
+ Expression<Func<int>> e =
+ Expression.Lambda<Func<int>>(
+ Expression.Convert(Expression.Convert(Expression.Constant(value, typeof(byte)), typeof(sbyte)), typeof(int)),
+ Enumerable.Empty<ParameterExpression>());
+ Func<int> f = e.Compile(useInterpreter);
+
+ Assert.Equal((int)unchecked((sbyte)value), f());
+ }
+
private static void VerifyByteToNullableSByte(byte value, bool useInterpreter)
{
Expression<Func<sbyte?>> e =
@@ -13178,6 +13225,17 @@ namespace System.Linq.Expressions.Tests
Assert.Equal(unchecked((byte)value), f());
}
+ private static void VerifySByteToByteRetInt(sbyte value, bool useInterpreter)
+ {
+ Expression<Func<int>> e =
+ Expression.Lambda<Func<int>>(
+ Expression.Convert(Expression.Convert(Expression.Constant(value, typeof(sbyte)), typeof(byte)), typeof(int)),
+ Enumerable.Empty<ParameterExpression>());
+ Func<int> f = e.Compile(useInterpreter);
+
+ Assert.Equal((int)unchecked((byte)value), f());
+ }
+
private static void VerifySByteToNullableByte(sbyte value, bool useInterpreter)
{
Expression<Func<byte?>> e =
@@ -14122,6 +14180,17 @@ namespace System.Linq.Expressions.Tests
Assert.Equal(unchecked((ushort)value), f());
}
+ private static void VerifyShortToUShortRetInt(short value, bool useInterpreter)
+ {
+ Expression<Func<int>> e =
+ Expression.Lambda<Func<int>>(
+ Expression.Convert(Expression.Convert(Expression.Constant(value, typeof(short)), typeof(ushort)), typeof(int)),
+ Enumerable.Empty<ParameterExpression>());
+ Func<int> f = e.Compile(useInterpreter);
+
+ Assert.Equal((int)unchecked((ushort)value), f());
+ }
+
private static void VerifyShortToNullableUShort(short value, bool useInterpreter)
{
Expression<Func<ushort?>> e =
@@ -16030,6 +16099,17 @@ namespace System.Linq.Expressions.Tests
Assert.Equal(unchecked((short)value), f());
}
+ private static void VerifyUShortToShortRetInt(ushort value, bool useInterpreter)
+ {
+ Expression<Func<int>> e =
+ Expression.Lambda<Func<int>>(
+ Expression.Convert(Expression.Convert(Expression.Constant(value, typeof(ushort)), typeof(short)), typeof(int)),
+ Enumerable.Empty<ParameterExpression>());
+ Func<int> f = e.Compile(useInterpreter);
+
+ Assert.Equal((int)unchecked((short)value), f());
+ }
+
private static void VerifyUShortToNullableShort(ushort value, bool useInterpreter)
{
Expression<Func<short?>> e =
diff --git a/src/libraries/System.Linq.Expressions/tests/ILReader/ILReaderFactory.cs b/src/libraries/System.Linq.Expressions/tests/ILReader/ILReaderFactory.cs
index 991d25f078f..e532b3f4fc9 100644
--- a/src/libraries/System.Linq.Expressions/tests/ILReader/ILReaderFactory.cs
+++ b/src/libraries/System.Linq.Expressions/tests/ILReader/ILReaderFactory.cs
@@ -41,6 +41,6 @@ namespace System.Linq.Expressions.Tests
private static readonly Type s_runtimeConstructorInfoType = Type.GetType("System.Reflection.RuntimeConstructorInfo", throwOnError: true);
private static readonly Type s_rtDynamicMethodType = Type.GetType("System.Reflection.Emit.DynamicMethod+RTDynamicMethod", throwOnError: true);
- private static readonly FieldInfo s_fiOwner = s_rtDynamicMethodType.GetFieldAssert("m_owner");
+ private static readonly FieldInfo s_fiOwner = s_rtDynamicMethodType.GetFieldAssert("_owner");
}
}
diff --git a/src/libraries/System.Linq/src/System.Linq.csproj b/src/libraries/System.Linq/src/System.Linq.csproj
index 00a86f0e368..e0509ff215f 100644
--- a/src/libraries/System.Linq/src/System.Linq.csproj
+++ b/src/libraries/System.Linq/src/System.Linq.csproj
@@ -74,6 +74,7 @@
<Compile Include="System\Linq\Last.cs" />
<Compile Include="System\Linq\Lookup.cs" />
<Compile Include="System\Linq\Max.cs" />
+ <Compile Include="System\Linq\MaxMin.cs" />
<Compile Include="System\Linq\Min.cs" />
<Compile Include="System\Linq\OrderBy.cs" />
<Compile Include="System\Linq\OrderedEnumerable.cs" />
@@ -104,5 +105,6 @@
<Reference Include="System.Numerics.Vectors" />
<Reference Include="System.Runtime" />
<Reference Include="System.Runtime.InteropServices" />
+ <Reference Include="System.Runtime.Intrinsics" />
</ItemGroup>
</Project> \ No newline at end of file
diff --git a/src/libraries/System.Linq/src/System/Linq/Max.cs b/src/libraries/System.Linq/src/System/Linq/Max.cs
index 743c4cf5360..fb86ecb5479 100644
--- a/src/libraries/System.Linq/src/System/Linq/Max.cs
+++ b/src/libraries/System.Linq/src/System/Linq/Max.cs
@@ -3,94 +3,26 @@
using System.Collections.Generic;
using System.Numerics;
+using System.Runtime.Intrinsics;
namespace System.Linq
{
public static partial class Enumerable
{
- public static int Max(this IEnumerable<int> source) => MaxInteger(source);
+ public static int Max(this IEnumerable<int> source) => MinMaxInteger<int, MaxCalc<int>>(source);
- public static int? Max(this IEnumerable<int?> source) => MaxInteger(source);
-
- public static long Max(this IEnumerable<long> source) => MaxInteger(source);
-
- public static long? Max(this IEnumerable<long?> source) => MaxInteger(source);
+ public static long Max(this IEnumerable<long> source) => MinMaxInteger<long, MaxCalc<long>>(source);
- private static T MaxInteger<T>(this IEnumerable<T> source) where T : struct, IBinaryInteger<T>
+ private struct MaxCalc<T> : IMinMaxCalc<T> where T : struct, IBinaryInteger<T>
{
- T value;
-
- if (source.TryGetSpan(out ReadOnlySpan<T> span))
- {
- if (span.IsEmpty)
- {
- ThrowHelper.ThrowNoElementsException();
- }
-
- // Vectorize the search if possible.
- int index;
- if (Vector.IsHardwareAccelerated && span.Length >= Vector<T>.Count * 2)
- {
- // The span is at least two vectors long. Create a vector from the first N elements,
- // and then repeatedly compare that against the next vector from the span. At the end,
- // the resulting vector will contain the maximum values found, and we then need only
- // to find the max of those.
- var maxes = new Vector<T>(span);
- index = Vector<T>.Count;
- do
- {
- maxes = Vector.Max(maxes, new Vector<T>(span.Slice(index)));
- index += Vector<T>.Count;
- }
- while (index + Vector<T>.Count <= span.Length);
-
- value = maxes[0];
- for (int i = 1; i < Vector<T>.Count; i++)
- {
- if (maxes[i] > value)
- {
- value = maxes[i];
- }
- }
- }
- else
- {
- value = span[0];
- index = 1;
- }
-
- // Iterate through the remaining elements, comparing against the max.
- for (int i = index; (uint)i < (uint)span.Length; i++)
- {
- if (span[i] > value)
- {
- value = span[i];
- }
- }
-
- return value;
- }
-
- using (IEnumerator<T> e = source.GetEnumerator())
- {
- if (!e.MoveNext())
- {
- ThrowHelper.ThrowNoElementsException();
- }
+ public static bool Compare(T left, T right) => left > right;
+ public static Vector128<T> Compare(Vector128<T> left, Vector128<T> right) => Vector128.Max(left, right);
+ public static Vector256<T> Compare(Vector256<T> left, Vector256<T> right) => Vector256.Max(left, right);
+ }
- value = e.Current;
- while (e.MoveNext())
- {
- T x = e.Current;
- if (x > value)
- {
- value = x;
- }
- }
- }
+ public static int? Max(this IEnumerable<int?> source) => MaxInteger(source);
- return value;
- }
+ public static long? Max(this IEnumerable<long?> source) => MaxInteger(source);
private static T? MaxInteger<T>(this IEnumerable<T?> source) where T : struct, IBinaryInteger<T>
{
@@ -386,6 +318,17 @@ namespace System.Linq
comparer ??= Comparer<TSource>.Default;
+ if (typeof(TSource) == typeof(byte) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<byte, MaxCalc<byte>>((IEnumerable<byte>)source);
+ if (typeof(TSource) == typeof(sbyte) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<sbyte, MaxCalc<sbyte>>((IEnumerable<sbyte>)source);
+ if (typeof(TSource) == typeof(ushort) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<ushort, MaxCalc<ushort>>((IEnumerable<ushort>)source);
+ if (typeof(TSource) == typeof(short) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<short, MaxCalc<short>>((IEnumerable<short>)source);
+ if (typeof(TSource) == typeof(uint) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<uint, MaxCalc<uint>>((IEnumerable<uint>)source);
+ if (typeof(TSource) == typeof(int) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<int, MaxCalc<int>>((IEnumerable<int>)source);
+ if (typeof(TSource) == typeof(ulong) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<ulong, MaxCalc<ulong>>((IEnumerable<ulong>)source);
+ if (typeof(TSource) == typeof(long) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<long, MaxCalc<long>>((IEnumerable<long>)source);
+ if (typeof(TSource) == typeof(nuint) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<nuint, MaxCalc<nuint>>((IEnumerable<nuint>)source);
+ if (typeof(TSource) == typeof(nint) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<nint, MaxCalc<nint>>((IEnumerable<nint>)source);
+
TSource? value = default;
using (IEnumerator<TSource> e = source.GetEnumerator())
{
diff --git a/src/libraries/System.Linq/src/System/Linq/MaxMin.cs b/src/libraries/System.Linq/src/System/Linq/MaxMin.cs
new file mode 100644
index 00000000000..5def04f6ced
--- /dev/null
+++ b/src/libraries/System.Linq/src/System/Linq/MaxMin.cs
@@ -0,0 +1,118 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Collections.Generic;
+using System.Numerics;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Runtime.Intrinsics;
+
+namespace System.Linq
+{
+ public static partial class Enumerable
+ {
+ private interface IMinMaxCalc<T> where T : struct, IBinaryInteger<T>
+ {
+ public static abstract bool Compare(T left, T right);
+ public static abstract Vector128<T> Compare(Vector128<T> left, Vector128<T> right);
+ public static abstract Vector256<T> Compare(Vector256<T> left, Vector256<T> right);
+ }
+
+ private static T MinMaxInteger<T, TMinMax>(this IEnumerable<T> source)
+ where T : struct, IBinaryInteger<T>
+ where TMinMax : IMinMaxCalc<T>
+ {
+ T value;
+
+ if (source.TryGetSpan(out ReadOnlySpan<T> span))
+ {
+ if (span.IsEmpty)
+ {
+ ThrowHelper.ThrowNoElementsException();
+ }
+
+ if (!Vector128.IsHardwareAccelerated || span.Length < Vector128<T>.Count)
+ {
+ value = span[0];
+ for (int i = 1; i < span.Length; i++)
+ {
+ if (TMinMax.Compare(span[i], value))
+ {
+ value = span[i];
+ }
+ }
+ }
+ else if (!Vector256.IsHardwareAccelerated || span.Length < Vector256<T>.Count)
+ {
+ ref T current = ref MemoryMarshal.GetReference(span);
+ ref T lastVectorStart = ref Unsafe.Add(ref current, span.Length - Vector128<T>.Count);
+
+ Vector128<T> best = Vector128.LoadUnsafe(ref current);
+ current = ref Unsafe.Add(ref current, Vector128<T>.Count);
+
+ while (Unsafe.IsAddressLessThan(ref current, ref lastVectorStart))
+ {
+ best = TMinMax.Compare(best, Vector128.LoadUnsafe(ref current));
+ current = ref Unsafe.Add(ref current, Vector128<T>.Count);
+ }
+ best = TMinMax.Compare(best, Vector128.LoadUnsafe(ref lastVectorStart));
+
+ value = best[0];
+ for (int i = 1; i < Vector128<T>.Count; i++)
+ {
+ if (TMinMax.Compare(best[i], value))
+ {
+ value = best[i];
+ }
+ }
+ }
+ else
+ {
+ ref T current = ref MemoryMarshal.GetReference(span);
+ ref T lastVectorStart = ref Unsafe.Add(ref current, span.Length - Vector256<T>.Count);
+
+ Vector256<T> best = Vector256.LoadUnsafe(ref current);
+ current = ref Unsafe.Add(ref current, Vector256<T>.Count);
+
+ while (Unsafe.IsAddressLessThan(ref current, ref lastVectorStart))
+ {
+ best = TMinMax.Compare(best, Vector256.LoadUnsafe(ref current));
+ current = ref Unsafe.Add(ref current, Vector256<T>.Count);
+ }
+ best = TMinMax.Compare(best, Vector256.LoadUnsafe(ref lastVectorStart));
+
+ value = best[0];
+ for (int i = 1; i < Vector256<T>.Count; i++)
+ {
+ if (TMinMax.Compare(best[i], value))
+ {
+ value = best[i];
+ }
+ }
+ }
+ }
+ else
+ {
+ using (IEnumerator<T> e = source.GetEnumerator())
+ {
+ if (!e.MoveNext())
+ {
+ ThrowHelper.ThrowNoElementsException();
+ }
+
+ value = e.Current;
+ while (e.MoveNext())
+ {
+ T x = e.Current;
+ if (TMinMax.Compare(x, value))
+ {
+ value = x;
+ }
+ }
+ }
+ }
+
+ return value;
+ }
+ }
+}
diff --git a/src/libraries/System.Linq/src/System/Linq/Min.cs b/src/libraries/System.Linq/src/System/Linq/Min.cs
index 1ba23524978..c5e5ba5f34f 100644
--- a/src/libraries/System.Linq/src/System/Linq/Min.cs
+++ b/src/libraries/System.Linq/src/System/Linq/Min.cs
@@ -3,94 +3,26 @@
using System.Collections.Generic;
using System.Numerics;
+using System.Runtime.Intrinsics;
namespace System.Linq
{
public static partial class Enumerable
{
- public static int Min(this IEnumerable<int> source) => MinInteger(source);
+ public static int Min(this IEnumerable<int> source) => MinMaxInteger<int, MinCalc<int>>(source);
- public static long Min(this IEnumerable<long> source) => MinInteger(source);
+ public static long Min(this IEnumerable<long> source) => MinMaxInteger<long, MinCalc<long>>(source);
- public static int? Min(this IEnumerable<int?> source) => MinInteger(source);
-
- public static long? Min(this IEnumerable<long?> source) => MinInteger(source);
-
- private static T MinInteger<T>(this IEnumerable<T> source) where T : struct, IBinaryInteger<T>
+ private struct MinCalc<T> : IMinMaxCalc<T> where T : struct, IBinaryInteger<T>
{
- T value;
-
- if (source.TryGetSpan(out ReadOnlySpan<T> span))
- {
- if (span.IsEmpty)
- {
- ThrowHelper.ThrowNoElementsException();
- }
-
- // Vectorize the search if possible.
- int index;
- if (Vector.IsHardwareAccelerated && span.Length >= Vector<T>.Count * 2)
- {
- // The span is at least two vectors long. Create a vector from the first N elements,
- // and then repeatedly compare that against the next vector from the span. At the end,
- // the resulting vector will contain the minimum values found, and we then need only
- // to find the min of those.
- var mins = new Vector<T>(span);
- index = Vector<T>.Count;
- do
- {
- mins = Vector.Min(mins, new Vector<T>(span.Slice(index)));
- index += Vector<T>.Count;
- }
- while (index + Vector<T>.Count <= span.Length);
-
- value = mins[0];
- for (int i = 1; i < Vector<T>.Count; i++)
- {
- if (mins[i] < value)
- {
- value = mins[i];
- }
- }
- }
- else
- {
- value = span[0];
- index = 1;
- }
-
- // Iterate through the remaining elements, comparing against the min.
- for (int i = index; (uint)i < (uint)span.Length; i++)
- {
- if (span[i] < value)
- {
- value = span[i];
- }
- }
-
- return value;
- }
-
- using (IEnumerator<T> e = source.GetEnumerator())
- {
- if (!e.MoveNext())
- {
- ThrowHelper.ThrowNoElementsException();
- }
+ public static bool Compare(T left, T right) => left < right;
+ public static Vector128<T> Compare(Vector128<T> left, Vector128<T> right) => Vector128.Min(left, right);
+ public static Vector256<T> Compare(Vector256<T> left, Vector256<T> right) => Vector256.Min(left, right);
+ }
- value = e.Current;
- while (e.MoveNext())
- {
- T x = e.Current;
- if (x < value)
- {
- value = x;
- }
- }
- }
+ public static int? Min(this IEnumerable<int?> source) => MinInteger(source);
- return value;
- }
+ public static long? Min(this IEnumerable<long?> source) => MinInteger(source);
private static T? MinInteger<T>(this IEnumerable<T?> source) where T : struct, IBinaryInteger<T>
{
@@ -351,9 +283,9 @@ namespace System.Linq
/// <exception cref="ArgumentNullException"><paramref name="source" /> is <see langword="null" />.</exception>
/// <exception cref="ArgumentException">No object in <paramref name="source" /> implements the <see cref="System.IComparable" /> or <see cref="System.IComparable{T}" /> interface.</exception>
/// <remarks>
- /// <para>If type <typeparamref name="TSource" /> implements <see cref="System.IComparable{T}" />, the <see cref="Max{T}(IEnumerable{T})" /> method uses that implementation to compare values. Otherwise, if type <typeparamref name="TSource" /> implements <see cref="System.IComparable" />, that implementation is used to compare values.</para>
+ /// <para>If type <typeparamref name="TSource" /> implements <see cref="System.IComparable{T}" />, the <see cref="Min{T}(IEnumerable{T})" /> method uses that implementation to compare values. Otherwise, if type <typeparamref name="TSource" /> implements <see cref="System.IComparable" />, that implementation is used to compare values.</para>
/// <para>If <typeparamref name="TSource" /> is a reference type and the source sequence is empty or contains only values that are <see langword="null" />, this method returns <see langword="null" />.</para>
- /// <para>In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of <see cref="O:Enumerable.Max" />.</para>
+ /// <para>In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of <see cref="O:Enumerable.Min" />.</para>
/// </remarks>
public static TSource? Min<TSource>(this IEnumerable<TSource> source, IComparer<TSource>? comparer)
{
@@ -364,6 +296,17 @@ namespace System.Linq
comparer ??= Comparer<TSource>.Default;
+ if (typeof(TSource) == typeof(byte) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<byte, MinCalc<byte>>((IEnumerable<byte>)source);
+ if (typeof(TSource) == typeof(sbyte) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<sbyte, MinCalc<sbyte>>((IEnumerable<sbyte>)source);
+ if (typeof(TSource) == typeof(ushort) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<ushort, MinCalc<ushort>>((IEnumerable<ushort>)source);
+ if (typeof(TSource) == typeof(short) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<short, MinCalc<short>>((IEnumerable<short>)source);
+ if (typeof(TSource) == typeof(uint) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<uint, MinCalc<uint>>((IEnumerable<uint>)source);
+ if (typeof(TSource) == typeof(int) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<int, MinCalc<int>>((IEnumerable<int>)source);
+ if (typeof(TSource) == typeof(ulong) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<ulong, MinCalc<ulong>>((IEnumerable<ulong>)source);
+ if (typeof(TSource) == typeof(long) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<long, MinCalc<long>>((IEnumerable<long>)source);
+ if (typeof(TSource) == typeof(nuint) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<nuint, MinCalc<nuint>>((IEnumerable<nuint>)source);
+ if (typeof(TSource) == typeof(nint) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<nint, MinCalc<nint>>((IEnumerable<nint>)source);
+
TSource? value = default;
using (IEnumerator<TSource> e = source.GetEnumerator())
{
diff --git a/src/libraries/System.Linq/tests/MaxTests.cs b/src/libraries/System.Linq/tests/MaxTests.cs
index c3d058161fb..42727d83620 100644
--- a/src/libraries/System.Linq/tests/MaxTests.cs
+++ b/src/libraries/System.Linq/tests/MaxTests.cs
@@ -2,12 +2,74 @@
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections.Generic;
+using System.Numerics;
using Xunit;
namespace System.Linq.Tests
{
public class MaxTests : EnumerableTests
{
+ public static IEnumerable<object[]> Max_AllTypes_TestData()
+ {
+ for (int length = 2; length < 33; length++)
+ {
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (byte)i)), (byte)(length + length - 1) };
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (byte)i).ToArray()), (byte)(length + length - 1) };
+
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (sbyte)i)), (sbyte)(length + length - 1) };
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (sbyte)i).ToArray()), (sbyte)(length + length - 1) };
+
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (ushort)i)), (ushort)(length + length - 1) };
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (ushort)i).ToArray()), (ushort)(length + length - 1) };
+
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (short)i)), (short)(length + length - 1) };
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (short)i).ToArray()), (short)(length + length - 1) };
+
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (uint)i)), (uint)(length + length - 1) };
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (uint)i).ToArray()), (uint)(length + length - 1) };
+
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (int)i)), (int)(length + length - 1) };
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (int)i).ToArray()), (int)(length + length - 1) };
+
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (ulong)i)), (ulong)(length + length - 1) };
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (ulong)i).ToArray()), (ulong)(length + length - 1) };
+
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (long)i)), (long)(length + length - 1) };
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (long)i).ToArray()), (long)(length + length - 1) };
+
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (float)i)), (float)(length + length - 1) };
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (float)i).ToArray()), (float)(length + length - 1) };
+
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (double)i)), (double)(length + length - 1) };
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (double)i).ToArray()), (double)(length + length - 1) };
+
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (decimal)i)), (decimal)(length + length - 1) };
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (decimal)i).ToArray()), (decimal)(length + length - 1) };
+
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (nuint)i)), (nuint)(length + length - 1) };
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (nuint)i).ToArray()), (nuint)(length + length - 1) };
+
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (nint)i)), (nint)(length + length - 1) };
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (nint)i).ToArray()), (nint)(length + length - 1) };
+ }
+ }
+
+ [Theory]
+ [MemberData(nameof(Max_AllTypes_TestData))]
+ public void Max_AllTypes<T>(IEnumerable<T> source, T expected) where T : INumber<T>
+ {
+ Assert.Equal(expected, source.Max());
+
+ Assert.Equal(expected, source.Max(comparer: null));
+ Assert.Equal(expected, source.Max(Comparer<T>.Default));
+ Assert.Equal(expected, source.Max(Comparer<T>.Create(Comparer<T>.Default.Compare)));
+
+ T first = source.First();
+ Assert.Equal(first, source.Max(Comparer<T>.Create((x, y) => x == first ? 1 : -1)));
+
+ Assert.Equal(expected + T.One, source.Max(x => x + T.One));
+ }
+
[Fact]
public void SameResultsRepeatCallsIntQuery()
{
@@ -64,12 +126,6 @@ namespace System.Linq.Tests
yield return new object[] { new TestEnumerable<int>(array), expected };
yield return new object[] { array, expected };
}
-
- for (int length = 2; length < 33; length++)
- {
- yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length)), length + length - 1 };
- yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).ToArray()), length + length - 1 };
- }
}
[Theory]
@@ -100,12 +156,6 @@ namespace System.Linq.Tests
yield return new object[] { new TestEnumerable<long>(array), expected };
yield return new object[] { array, expected };
}
-
- for (int length = 2; length < 33; length++)
- {
- yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (long)i)), (long)(length + length - 1) };
- yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (long)i).ToArray()), (long)(length + length - 1) };
- }
}
[Theory]
@@ -167,12 +217,6 @@ namespace System.Linq.Tests
yield return new object[] { new TestEnumerable<float>(array), expected };
yield return new object[] { array, expected };
}
-
- for (int length = 2; length < 33; length++)
- {
- yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (float)i)), (float)(length + length - 1) };
- yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (float)i).ToArray()), (float)(length + length - 1) };
- }
}
[Theory]
@@ -195,6 +239,8 @@ namespace System.Linq.Tests
{
Assert.Throws<InvalidOperationException>(() => Enumerable.Empty<float>().Max());
Assert.Throws<InvalidOperationException>(() => Enumerable.Empty<float>().Max(x => x));
+ Assert.Throws<InvalidOperationException>(() => Array.Empty<float>().Max());
+ Assert.Throws<InvalidOperationException>(() => new List<float>().Max());
}
[Fact]
@@ -251,12 +297,6 @@ namespace System.Linq.Tests
yield return new object[] { new TestEnumerable<double>(array), expected };
yield return new object[] { array, expected };
}
-
- for (int length = 2; length < 33; length++)
- {
- yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (double)i)), (double)(length + length - 1) };
- yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (double)i).ToArray()), (double)(length + length - 1) };
- }
}
[Theory]
@@ -279,6 +319,8 @@ namespace System.Linq.Tests
{
Assert.Throws<InvalidOperationException>(() => Enumerable.Empty<double>().Max());
Assert.Throws<InvalidOperationException>(() => Enumerable.Empty<double>().Max(x => x));
+ Assert.Throws<InvalidOperationException>(() => Array.Empty<double>().Max());
+ Assert.Throws<InvalidOperationException>(() => new List<double>().Max());
}
[Fact]
@@ -321,12 +363,6 @@ namespace System.Linq.Tests
yield return new object[] { new TestEnumerable<decimal>(array), expected };
yield return new object[] { array, expected };
}
-
- for (int length = 2; length < 33; length++)
- {
- yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (decimal)i)), (decimal)(length + length - 1) };
- yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (decimal)i).ToArray()), (decimal)(length + length - 1) };
- }
}
[Theory]
diff --git a/src/libraries/System.Linq/tests/MinTests.cs b/src/libraries/System.Linq/tests/MinTests.cs
index c8165596735..e877dd5911a 100644
--- a/src/libraries/System.Linq/tests/MinTests.cs
+++ b/src/libraries/System.Linq/tests/MinTests.cs
@@ -2,12 +2,74 @@
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections.Generic;
+using System.Numerics;
using Xunit;
namespace System.Linq.Tests
{
public class MinTests : EnumerableTests
{
+ public static IEnumerable<object[]> Min_AllTypes_TestData()
+ {
+ for (int length = 2; length < 33; length++)
+ {
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (byte)i)), (byte)length };
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (byte)i).ToArray()), (byte)length };
+
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (sbyte)i)), (sbyte)length };
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (sbyte)i).ToArray()), (sbyte)length };
+
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (ushort)i)), (ushort)length };
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (ushort)i).ToArray()), (ushort)length };
+
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (short)i)), (short)length };
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (short)i).ToArray()), (short)length };
+
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (uint)i)), (uint)length };
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (uint)i).ToArray()), (uint)length };
+
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (int)i)), (int)length };
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (int)i).ToArray()), (int)length };
+
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (ulong)i)), (ulong)length };
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (ulong)i).ToArray()), (ulong)length };
+
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (long)i)), (long)length };
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (long)i).ToArray()), (long)length };
+
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (float)i)), (float)length };
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (float)i).ToArray()), (float)length };
+
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (double)i)), (double)length };
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (double)i).ToArray()), (double)length };
+
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (decimal)i)), (decimal)length };
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (decimal)i).ToArray()), (decimal)length };
+
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (nuint)i)), (nuint)length };
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (nuint)i).ToArray()), (nuint)length };
+
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (nint)i)), (nint)length };
+ yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (nint)i).ToArray()), (nint)length };
+ }
+ }
+
+ [Theory]
+ [MemberData(nameof(Min_AllTypes_TestData))]
+ public void Min_AllTypes<T>(IEnumerable<T> source, T expected) where T : INumber<T>
+ {
+ Assert.Equal(expected, source.Min());
+
+ Assert.Equal(expected, source.Min(comparer: null));
+ Assert.Equal(expected, source.Min(Comparer<T>.Default));
+ Assert.Equal(expected, source.Min(Comparer<T>.Create(Comparer<T>.Default.Compare)));
+
+ T first = source.First();
+ Assert.Equal(first, source.Min(Comparer<T>.Create((x, y) => x == first ? -1 : 1)));
+
+ Assert.Equal(expected + T.One, source.Min(x => x + T.One));
+ }
+
[Fact]
public void SameResultsRepeatCallsIntQuery()
{
@@ -49,12 +111,6 @@ namespace System.Linq.Tests
yield return new object[] { new TestEnumerable<int>(array), expected };
yield return new object[] { array, expected };
}
-
- for (int length = 2; length < 33; length++)
- {
- yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length)), length };
- yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).ToArray()), length };
- }
}
[Theory]
@@ -101,12 +157,6 @@ namespace System.Linq.Tests
yield return new object[] { new TestEnumerable<long>(array), expected };
yield return new object[] { array, expected };
}
-
- for (int length = 2; length < 33; length++)
- {
- yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (long)i)), (long)length };
- yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (long)i).ToArray()), (long)length };
- }
}
[Theory]
@@ -175,12 +225,6 @@ namespace System.Linq.Tests
// a long time.
yield return new object[] { Enumerable.Repeat(float.NaN, int.MaxValue), float.NaN };
yield return new object[] { Enumerable.Repeat(float.NaN, 3).ToArray(), float.NaN };
-
- for (int length = 2; length < 33; length++)
- {
- yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (float)i)), (float)length };
- yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (float)i).ToArray()), (float)length };
- }
}
[Theory]
@@ -247,12 +291,6 @@ namespace System.Linq.Tests
// Without this optimization, we would iterate through int.MaxValue elements, which takes
// a long time.
yield return new object[] { Enumerable.Repeat(double.NaN, int.MaxValue), double.NaN };
-
- for (int length = 2; length < 33; length++)
- {
- yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (double)i)), (double)length };
- yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (double)i).ToArray()), (double)length };
- }
}
[Theory]
@@ -299,12 +337,6 @@ namespace System.Linq.Tests
yield return new object[] { new TestEnumerable<decimal>(array), expected };
yield return new object[] { array, expected };
}
-
- for (int length = 2; length < 33; length++)
- {
- yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (decimal)i)), (decimal)length };
- yield return new object[] { Shuffler.Shuffle(Enumerable.Range(length, length).Select(i => (decimal)i).ToArray()), (decimal)length };
- }
}
[Theory]
diff --git a/src/libraries/System.Memory.Data/System.Memory.Data.sln b/src/libraries/System.Memory.Data/System.Memory.Data.sln
index 09b8f13bd6b..cb364747ac5 100644
--- a/src/libraries/System.Memory.Data/System.Memory.Data.sln
+++ b/src/libraries/System.Memory.Data/System.Memory.Data.sln
@@ -31,6 +31,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGene
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.0", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.Roslyn4.0.csproj", "{C7F95DF5-1832-4AEA-943B-86ED0226D98B}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.4", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.Roslyn4.4.csproj", "{87AD8C70-4F96-4BD5-A265-2C74AD699B8D}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\ref\System.Text.Json.csproj", "{1D93DCD8-BF67-4FB5-A25A-7837F230B173}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{6A2B5C68-14C3-4989-8530-D51A138C72AE}"
@@ -113,6 +115,10 @@ Global
{C7F95DF5-1832-4AEA-943B-86ED0226D98B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C7F95DF5-1832-4AEA-943B-86ED0226D98B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C7F95DF5-1832-4AEA-943B-86ED0226D98B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {87AD8C70-4F96-4BD5-A265-2C74AD699B8D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {87AD8C70-4F96-4BD5-A265-2C74AD699B8D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {87AD8C70-4F96-4BD5-A265-2C74AD699B8D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {87AD8C70-4F96-4BD5-A265-2C74AD699B8D}.Release|Any CPU.Build.0 = Release|Any CPU
{1D93DCD8-BF67-4FB5-A25A-7837F230B173}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1D93DCD8-BF67-4FB5-A25A-7837F230B173}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1D93DCD8-BF67-4FB5-A25A-7837F230B173}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -144,6 +150,7 @@ Global
{3B738A97-60C4-40EC-B38B-E41C38C18616} = {839FCC67-5EA8-4A07-B5D4-9E1DF0B3BE76}
{898AC186-6BE8-4266-954D-DFFF3EE6C428} = {839FCC67-5EA8-4A07-B5D4-9E1DF0B3BE76}
{C7F95DF5-1832-4AEA-943B-86ED0226D98B} = {839FCC67-5EA8-4A07-B5D4-9E1DF0B3BE76}
+ {87AD8C70-4F96-4BD5-A265-2C74AD699B8D} = {839FCC67-5EA8-4A07-B5D4-9E1DF0B3BE76}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {01DAF96B-AF8E-4576-A1BC-57D19BDB317E}
diff --git a/src/libraries/System.Memory/System.Memory.sln b/src/libraries/System.Memory/System.Memory.sln
index 42471da3e93..d66566f9301 100644
--- a/src/libraries/System.Memory/System.Memory.sln
+++ b/src/libraries/System.Memory/System.Memory.sln
@@ -11,6 +11,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Memory.Tests", "test
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{EFF00253-633C-4D2F-86EE-F40C721F6A68}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{D0EEF7E0-BD51-4C39-AF4F-DD583D01AEBE}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{84AD7BF6-D76C-4BEE-9879-5A23150DD3F7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{DA7CEED7-1A86-4221-B4AD-4307AB83A31F}"
@@ -69,11 +71,8 @@ Global
{6A54FACA-933E-4C1D-92AB-1A5506CFC212}.Release|x86.ActiveCfg = Release|Any CPU
{6A54FACA-933E-4C1D-92AB-1A5506CFC212}.Release|x86.Build.0 = Release|Any CPU
{6A54FACA-933E-4C1D-92AB-1A5506CFC212}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {6A54FACA-933E-4C1D-92AB-1A5506CFC212}.Checked|Any CPU.Build.0 = Debug|Any CPU
{6A54FACA-933E-4C1D-92AB-1A5506CFC212}.Checked|x64.ActiveCfg = Debug|Any CPU
- {6A54FACA-933E-4C1D-92AB-1A5506CFC212}.Checked|x64.Build.0 = Debug|Any CPU
{6A54FACA-933E-4C1D-92AB-1A5506CFC212}.Checked|x86.ActiveCfg = Debug|Any CPU
- {6A54FACA-933E-4C1D-92AB-1A5506CFC212}.Checked|x86.Build.0 = Debug|Any CPU
{9112BAE3-344D-4DD0-ADC9-478D82B84584}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9112BAE3-344D-4DD0-ADC9-478D82B84584}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9112BAE3-344D-4DD0-ADC9-478D82B84584}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -87,11 +86,8 @@ Global
{9112BAE3-344D-4DD0-ADC9-478D82B84584}.Release|x86.ActiveCfg = Release|Any CPU
{9112BAE3-344D-4DD0-ADC9-478D82B84584}.Release|x86.Build.0 = Release|Any CPU
{9112BAE3-344D-4DD0-ADC9-478D82B84584}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {9112BAE3-344D-4DD0-ADC9-478D82B84584}.Checked|Any CPU.Build.0 = Debug|Any CPU
{9112BAE3-344D-4DD0-ADC9-478D82B84584}.Checked|x64.ActiveCfg = Debug|Any CPU
- {9112BAE3-344D-4DD0-ADC9-478D82B84584}.Checked|x64.Build.0 = Debug|Any CPU
{9112BAE3-344D-4DD0-ADC9-478D82B84584}.Checked|x86.ActiveCfg = Debug|Any CPU
- {9112BAE3-344D-4DD0-ADC9-478D82B84584}.Checked|x86.Build.0 = Debug|Any CPU
{C9417154-D8DB-4FF9-9DD8-6B2ED351FC92}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C9417154-D8DB-4FF9-9DD8-6B2ED351FC92}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C9417154-D8DB-4FF9-9DD8-6B2ED351FC92}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -105,11 +101,8 @@ Global
{C9417154-D8DB-4FF9-9DD8-6B2ED351FC92}.Release|x86.ActiveCfg = Release|Any CPU
{C9417154-D8DB-4FF9-9DD8-6B2ED351FC92}.Release|x86.Build.0 = Release|Any CPU
{C9417154-D8DB-4FF9-9DD8-6B2ED351FC92}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {C9417154-D8DB-4FF9-9DD8-6B2ED351FC92}.Checked|Any CPU.Build.0 = Debug|Any CPU
{C9417154-D8DB-4FF9-9DD8-6B2ED351FC92}.Checked|x64.ActiveCfg = Debug|Any CPU
- {C9417154-D8DB-4FF9-9DD8-6B2ED351FC92}.Checked|x64.Build.0 = Debug|Any CPU
{C9417154-D8DB-4FF9-9DD8-6B2ED351FC92}.Checked|x86.ActiveCfg = Debug|Any CPU
- {C9417154-D8DB-4FF9-9DD8-6B2ED351FC92}.Checked|x86.Build.0 = Debug|Any CPU
{C2BC6AE7-7E8B-4AA2-8E9F-5D4B9127B297}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C2BC6AE7-7E8B-4AA2-8E9F-5D4B9127B297}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C2BC6AE7-7E8B-4AA2-8E9F-5D4B9127B297}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -123,11 +116,8 @@ Global
{C2BC6AE7-7E8B-4AA2-8E9F-5D4B9127B297}.Release|x86.ActiveCfg = Release|Any CPU
{C2BC6AE7-7E8B-4AA2-8E9F-5D4B9127B297}.Release|x86.Build.0 = Release|Any CPU
{C2BC6AE7-7E8B-4AA2-8E9F-5D4B9127B297}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {C2BC6AE7-7E8B-4AA2-8E9F-5D4B9127B297}.Checked|Any CPU.Build.0 = Debug|Any CPU
{C2BC6AE7-7E8B-4AA2-8E9F-5D4B9127B297}.Checked|x64.ActiveCfg = Debug|Any CPU
- {C2BC6AE7-7E8B-4AA2-8E9F-5D4B9127B297}.Checked|x64.Build.0 = Debug|Any CPU
{C2BC6AE7-7E8B-4AA2-8E9F-5D4B9127B297}.Checked|x86.ActiveCfg = Debug|Any CPU
- {C2BC6AE7-7E8B-4AA2-8E9F-5D4B9127B297}.Checked|x86.Build.0 = Debug|Any CPU
{EFF00253-633C-4D2F-86EE-F40C721F6A68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EFF00253-633C-4D2F-86EE-F40C721F6A68}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EFF00253-633C-4D2F-86EE-F40C721F6A68}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -141,11 +131,23 @@ Global
{EFF00253-633C-4D2F-86EE-F40C721F6A68}.Release|x86.ActiveCfg = Release|Any CPU
{EFF00253-633C-4D2F-86EE-F40C721F6A68}.Release|x86.Build.0 = Release|Any CPU
{EFF00253-633C-4D2F-86EE-F40C721F6A68}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {EFF00253-633C-4D2F-86EE-F40C721F6A68}.Checked|Any CPU.Build.0 = Debug|Any CPU
{EFF00253-633C-4D2F-86EE-F40C721F6A68}.Checked|x64.ActiveCfg = Debug|Any CPU
- {EFF00253-633C-4D2F-86EE-F40C721F6A68}.Checked|x64.Build.0 = Debug|Any CPU
{EFF00253-633C-4D2F-86EE-F40C721F6A68}.Checked|x86.ActiveCfg = Debug|Any CPU
- {EFF00253-633C-4D2F-86EE-F40C721F6A68}.Checked|x86.Build.0 = Debug|Any CPU
+ {D0EEF7E0-BD51-4C39-AF4F-DD583D01AEBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D0EEF7E0-BD51-4C39-AF4F-DD583D01AEBE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D0EEF7E0-BD51-4C39-AF4F-DD583D01AEBE}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {D0EEF7E0-BD51-4C39-AF4F-DD583D01AEBE}.Debug|x64.Build.0 = Debug|Any CPU
+ {D0EEF7E0-BD51-4C39-AF4F-DD583D01AEBE}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {D0EEF7E0-BD51-4C39-AF4F-DD583D01AEBE}.Debug|x86.Build.0 = Debug|Any CPU
+ {D0EEF7E0-BD51-4C39-AF4F-DD583D01AEBE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D0EEF7E0-BD51-4C39-AF4F-DD583D01AEBE}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D0EEF7E0-BD51-4C39-AF4F-DD583D01AEBE}.Release|x64.ActiveCfg = Release|Any CPU
+ {D0EEF7E0-BD51-4C39-AF4F-DD583D01AEBE}.Release|x64.Build.0 = Release|Any CPU
+ {D0EEF7E0-BD51-4C39-AF4F-DD583D01AEBE}.Release|x86.ActiveCfg = Release|Any CPU
+ {D0EEF7E0-BD51-4C39-AF4F-DD583D01AEBE}.Release|x86.Build.0 = Release|Any CPU
+ {D0EEF7E0-BD51-4C39-AF4F-DD583D01AEBE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {D0EEF7E0-BD51-4C39-AF4F-DD583D01AEBE}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {D0EEF7E0-BD51-4C39-AF4F-DD583D01AEBE}.Checked|x86.ActiveCfg = Debug|Any CPU
{84AD7BF6-D76C-4BEE-9879-5A23150DD3F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{84AD7BF6-D76C-4BEE-9879-5A23150DD3F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{84AD7BF6-D76C-4BEE-9879-5A23150DD3F7}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -159,11 +161,8 @@ Global
{84AD7BF6-D76C-4BEE-9879-5A23150DD3F7}.Release|x86.ActiveCfg = Release|Any CPU
{84AD7BF6-D76C-4BEE-9879-5A23150DD3F7}.Release|x86.Build.0 = Release|Any CPU
{84AD7BF6-D76C-4BEE-9879-5A23150DD3F7}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {84AD7BF6-D76C-4BEE-9879-5A23150DD3F7}.Checked|Any CPU.Build.0 = Debug|Any CPU
{84AD7BF6-D76C-4BEE-9879-5A23150DD3F7}.Checked|x64.ActiveCfg = Debug|Any CPU
- {84AD7BF6-D76C-4BEE-9879-5A23150DD3F7}.Checked|x64.Build.0 = Debug|Any CPU
{84AD7BF6-D76C-4BEE-9879-5A23150DD3F7}.Checked|x86.ActiveCfg = Debug|Any CPU
- {84AD7BF6-D76C-4BEE-9879-5A23150DD3F7}.Checked|x86.Build.0 = Debug|Any CPU
{DA7CEED7-1A86-4221-B4AD-4307AB83A31F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DA7CEED7-1A86-4221-B4AD-4307AB83A31F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DA7CEED7-1A86-4221-B4AD-4307AB83A31F}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -177,11 +176,8 @@ Global
{DA7CEED7-1A86-4221-B4AD-4307AB83A31F}.Release|x86.ActiveCfg = Release|Any CPU
{DA7CEED7-1A86-4221-B4AD-4307AB83A31F}.Release|x86.Build.0 = Release|Any CPU
{DA7CEED7-1A86-4221-B4AD-4307AB83A31F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {DA7CEED7-1A86-4221-B4AD-4307AB83A31F}.Checked|Any CPU.Build.0 = Debug|Any CPU
{DA7CEED7-1A86-4221-B4AD-4307AB83A31F}.Checked|x64.ActiveCfg = Debug|Any CPU
- {DA7CEED7-1A86-4221-B4AD-4307AB83A31F}.Checked|x64.Build.0 = Debug|Any CPU
{DA7CEED7-1A86-4221-B4AD-4307AB83A31F}.Checked|x86.ActiveCfg = Debug|Any CPU
- {DA7CEED7-1A86-4221-B4AD-4307AB83A31F}.Checked|x86.Build.0 = Debug|Any CPU
{B773D664-C00B-4DB3-823B-947576EE7A46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B773D664-C00B-4DB3-823B-947576EE7A46}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B773D664-C00B-4DB3-823B-947576EE7A46}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -195,11 +191,8 @@ Global
{B773D664-C00B-4DB3-823B-947576EE7A46}.Release|x86.ActiveCfg = Release|Any CPU
{B773D664-C00B-4DB3-823B-947576EE7A46}.Release|x86.Build.0 = Release|Any CPU
{B773D664-C00B-4DB3-823B-947576EE7A46}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {B773D664-C00B-4DB3-823B-947576EE7A46}.Checked|Any CPU.Build.0 = Debug|Any CPU
{B773D664-C00B-4DB3-823B-947576EE7A46}.Checked|x64.ActiveCfg = Debug|Any CPU
- {B773D664-C00B-4DB3-823B-947576EE7A46}.Checked|x64.Build.0 = Debug|Any CPU
{B773D664-C00B-4DB3-823B-947576EE7A46}.Checked|x86.ActiveCfg = Debug|Any CPU
- {B773D664-C00B-4DB3-823B-947576EE7A46}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -210,6 +203,7 @@ Global
{6A54FACA-933E-4C1D-92AB-1A5506CFC212} = {FA259C32-B79B-4DE2-9677-055D5D25FA33}
{C2BC6AE7-7E8B-4AA2-8E9F-5D4B9127B297} = {FA259C32-B79B-4DE2-9677-055D5D25FA33}
{9112BAE3-344D-4DD0-ADC9-478D82B84584} = {7212FBCF-E89D-4065-9DCE-D5F7E5D3EF1D}
+ {D0EEF7E0-BD51-4C39-AF4F-DD583D01AEBE} = {7212FBCF-E89D-4065-9DCE-D5F7E5D3EF1D}
{B773D664-C00B-4DB3-823B-947576EE7A46} = {7212FBCF-E89D-4065-9DCE-D5F7E5D3EF1D}
{EFF00253-633C-4D2F-86EE-F40C721F6A68} = {2BEB1A89-DD2D-42BD-95DD-89860A0C9663}
{84AD7BF6-D76C-4BEE-9879-5A23150DD3F7} = {2BEB1A89-DD2D-42BD-95DD-89860A0C9663}
diff --git a/src/libraries/System.Memory/tests/Span/SequenceEqual.T.cs b/src/libraries/System.Memory/tests/Span/SequenceEqual.T.cs
index 75c633a6b1a..293a754674e 100644
--- a/src/libraries/System.Memory/tests/Span/SequenceEqual.T.cs
+++ b/src/libraries/System.Memory/tests/Span/SequenceEqual.T.cs
@@ -2,6 +2,9 @@
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
+using System.Linq;
+using System.Runtime.InteropServices;
using Xunit;
namespace System.SpanTests
@@ -170,5 +173,181 @@ namespace System.SpanTests
Assert.Equal(expected, theStrings.SequenceEqual(secondInput, EqualityComparer<string>.Default));
Assert.Equal(expected, theStrings.SequenceEqual((ReadOnlySpan<string>)secondInput, EqualityComparer<string>.Default));
}
+
+ [Theory]
+ [InlineData(100)]
+ public static void SequenceEquals_OverriddenEqualsReturnsFalse_EqualsFalse(int length)
+ {
+ Span<StructOverridingEqualsToAlwaysReturnFalse> span1 = Enumerable.Range(0, length).Select(i => new StructOverridingEqualsToAlwaysReturnFalse()).ToArray();
+ Assert.False(span1.SequenceEqual(span1.ToArray()));
+
+ Span<StructImplementingIEquatableToAlwaysReturnFalse> span2 = Enumerable.Range(0, length).Select(i => new StructImplementingIEquatableToAlwaysReturnFalse()).ToArray();
+ Assert.False(span2.SequenceEqual(span2.ToArray()));
+ }
+
+ private struct StructOverridingEqualsToAlwaysReturnFalse
+ {
+ public override bool Equals([NotNullWhen(true)] object? obj) => false;
+ public override int GetHashCode() => 0;
+ }
+
+ private struct StructImplementingIEquatableToAlwaysReturnFalse : IEquatable<StructImplementingIEquatableToAlwaysReturnFalse>
+ {
+ public bool Equals(StructImplementingIEquatableToAlwaysReturnFalse other) => false;
+ }
+
+ [Theory]
+ [InlineData(100)]
+ public static void SequenceEquals_StructWithOddFieldSize_EqualsAsExpected(int length)
+ {
+ Span<StructWithOddFieldSize> span1 = new StructWithOddFieldSize[length];
+ Span<StructWithOddFieldSize> span2 = new StructWithOddFieldSize[length];
+
+ MemoryMarshal.AsBytes(span1).Fill(0);
+ MemoryMarshal.AsBytes(span2).Fill(0xFF);
+
+ for (int i = 0; i < length; i++)
+ {
+ span1[i].Value1 = span2[i].Value1 = (byte)i;
+ span1[i].Value2 = span2[i].Value2 = (byte)(i * 2);
+ span1[i].Value3 = span2[i].Value3 = (byte)(i * 3);
+ }
+
+ Assert.True(span1.SequenceEqual(span2));
+ Assert.True(span2.SequenceEqual(span1));
+
+ span1[length / 2].Value2++;
+
+ Assert.False(span1.SequenceEqual(span2));
+ Assert.False(span2.SequenceEqual(span1));
+ }
+
+ private struct StructWithOddFieldSize
+ {
+ public byte Value1, Value2, Value3;
+ }
+
+ [Theory]
+ [InlineData(100)]
+ public static void SequenceEquals_StructWithOddFieldSizeAndIEquatable_EqualsAsExpected(int length)
+ {
+ Span<StructWithOddFieldSizeAndIEquatable> span1 = new StructWithOddFieldSizeAndIEquatable[length];
+ Span<StructWithOddFieldSizeAndIEquatable> span2 = new StructWithOddFieldSizeAndIEquatable[length];
+
+ MemoryMarshal.AsBytes(span1).Fill(0);
+ MemoryMarshal.AsBytes(span2).Fill(0xFF);
+
+ for (int i = 0; i < length; i++)
+ {
+ span1[i].Value1 = span2[i].Value1 = (byte)i;
+ span1[i].Value2 = span2[i].Value2 = (byte)(i * 2);
+ span1[i].Value3 = span2[i].Value3 = (byte)(i * 3);
+ }
+
+ Assert.True(span1.SequenceEqual(span2));
+ Assert.True(span2.SequenceEqual(span1));
+
+ span1[length / 2].Value2++;
+
+ Assert.False(span1.SequenceEqual(span2));
+ Assert.False(span2.SequenceEqual(span1));
+ }
+
+ private struct StructWithOddFieldSizeAndIEquatable : IEquatable<StructWithOddFieldSizeAndIEquatable>
+ {
+ public int Value1;
+ public short Value2;
+ public byte Value3;
+
+ public bool Equals(StructWithOddFieldSizeAndIEquatable other) =>
+ Value1 == other.Value1 &&
+ Value2 == other.Value2 &&
+ Value3 == other.Value3;
+
+ public override bool Equals([NotNullWhen(true)] object? obj) =>
+ obj is StructWithOddFieldSizeAndIEquatable other &&
+ Equals(other);
+
+ public override int GetHashCode() =>
+ HashCode.Combine(Value1, Value2, Value3);
+ }
+
+ [Theory]
+ [InlineData(100)]
+ public static void SequenceEquals_StructWithExplicitFieldSizeAndNoFields_EqualsAsExpected(int length)
+ {
+ Span<StructWithExplicitFieldSizeAndNoFields> span1 = new StructWithExplicitFieldSizeAndNoFields[length];
+ Span<StructWithExplicitFieldSizeAndNoFields> span2 = new StructWithExplicitFieldSizeAndNoFields[length];
+
+ MemoryMarshal.AsBytes(span1).Fill(0);
+ MemoryMarshal.AsBytes(span2).Fill(0xFF);
+
+ Assert.True(span1.SequenceEqual(span2));
+ Assert.True(span2.SequenceEqual(span1));
+ }
+
+ [StructLayout(LayoutKind.Sequential, Size = 64)]
+ private struct StructWithExplicitFieldSizeAndNoFields
+ {
+ }
+
+ [Theory]
+ [InlineData(100)]
+ public static void SequenceEquals_StructWithExplicitFieldSizeAndFields_EqualsAsExpected(int length)
+ {
+ Span<StructWithExplicitFieldSizeAndFields> span1 = new StructWithExplicitFieldSizeAndFields[length];
+ Span<StructWithExplicitFieldSizeAndFields> span2 = new StructWithExplicitFieldSizeAndFields[length];
+
+ MemoryMarshal.AsBytes(span1).Fill(0);
+ MemoryMarshal.AsBytes(span2).Fill(0xFF);
+
+ for (int i = 0; i < length; i++)
+ {
+ span1[i].Value = span2[i].Value = i;
+ }
+
+ Assert.True(span1.SequenceEqual(span2));
+ Assert.True(span2.SequenceEqual(span1));
+
+ span1[length / 2].Value++;
+
+ Assert.False(span1.SequenceEqual(span2));
+ Assert.False(span2.SequenceEqual(span1));
+ }
+
+ [StructLayout(LayoutKind.Sequential, Size = 64)]
+ private struct StructWithExplicitFieldSizeAndFields
+ {
+ public int Value;
+ }
+
+ [Theory]
+ [InlineData(100)]
+ public static void SequenceEquals_StructWithDoubleField_EqualsAsExpected(int length)
+ {
+ Span<StructWithDoubleField> span1 = new StructWithDoubleField[length];
+ Span<StructWithDoubleField> span2 = new StructWithDoubleField[length];
+
+ MemoryMarshal.AsBytes(span1).Fill(0);
+ MemoryMarshal.AsBytes(span2).Fill(0xFF);
+
+ for (int i = 0; i < length; i++)
+ {
+ span1[i].Value = span2[i].Value = i;
+ }
+
+ Assert.True(span1.SequenceEqual(span2));
+ Assert.True(span2.SequenceEqual(span1));
+
+ span1[length / 2].Value++;
+
+ Assert.False(span1.SequenceEqual(span2));
+ Assert.False(span2.SequenceEqual(span1));
+ }
+
+ private struct StructWithDoubleField
+ {
+ public double Value;
+ }
}
}
diff --git a/src/libraries/System.Net.Http.Json/System.Net.Http.Json.sln b/src/libraries/System.Net.Http.Json/System.Net.Http.Json.sln
index 8773c237a84..e2170bf8ebb 100644
--- a/src/libraries/System.Net.Http.Json/System.Net.Http.Json.sln
+++ b/src/libraries/System.Net.Http.Json/System.Net.Http.Json.sln
@@ -55,6 +55,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGene
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.0", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.Roslyn4.0.csproj", "{65F336C0-BFB7-4248-A56C-8F1AE8770590}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.4", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.Roslyn4.4.csproj", "{01A80754-3531-4394-98C6-0739793B66FA}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\ref\System.Text.Json.csproj", "{EA992513-9CA4-4DEB-B0EE-A8FD0252B451}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{BC7D3412-DBCB-4863-8BF8-41899E32608C}"
@@ -185,6 +187,10 @@ Global
{65F336C0-BFB7-4248-A56C-8F1AE8770590}.Debug|Any CPU.Build.0 = Debug|Any CPU
{65F336C0-BFB7-4248-A56C-8F1AE8770590}.Release|Any CPU.ActiveCfg = Release|Any CPU
{65F336C0-BFB7-4248-A56C-8F1AE8770590}.Release|Any CPU.Build.0 = Release|Any CPU
+ {01A80754-3531-4394-98C6-0739793B66FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {01A80754-3531-4394-98C6-0739793B66FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {01A80754-3531-4394-98C6-0739793B66FA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {01A80754-3531-4394-98C6-0739793B66FA}.Release|Any CPU.Build.0 = Release|Any CPU
{EA992513-9CA4-4DEB-B0EE-A8FD0252B451}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EA992513-9CA4-4DEB-B0EE-A8FD0252B451}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EA992513-9CA4-4DEB-B0EE-A8FD0252B451}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -228,6 +234,7 @@ Global
{E1A1EC7C-3257-46EB-8DBC-DE8DAB3F4F4F} = {5A418E02-B18A-41F1-9D4F-1BD6CB51F63C}
{E277B012-C6EE-4032-9E80-C1EE3BAD7F51} = {5A418E02-B18A-41F1-9D4F-1BD6CB51F63C}
{65F336C0-BFB7-4248-A56C-8F1AE8770590} = {5A418E02-B18A-41F1-9D4F-1BD6CB51F63C}
+ {01A80754-3531-4394-98C6-0739793B66FA} = {5A418E02-B18A-41F1-9D4F-1BD6CB51F63C}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A121E5BA-D935-4572-8D67-2F15DF29922B}
diff --git a/src/libraries/System.Net.Http.WinHttpHandler/System.Net.Http.WinHttpHandler.sln b/src/libraries/System.Net.Http.WinHttpHandler/System.Net.Http.WinHttpHandler.sln
index 843ee29b3fa..8e461004061 100644
--- a/src/libraries/System.Net.Http.WinHttpHandler/System.Net.Http.WinHttpHandler.sln
+++ b/src/libraries/System.Net.Http.WinHttpHandler/System.Net.Http.WinHttpHandler.sln
@@ -63,6 +63,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGene
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.0", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.Roslyn4.0.csproj", "{310F6EE8-5F12-4663-A5B8-01344C5CC821}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.4", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.Roslyn4.4.csproj", "{F39DE885-64D8-4551-91C6-3E9DBD4D8C88}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\ref\System.Text.Json.csproj", "{8ABBBDC5-48A1-43BA-A629-AE58C35318AA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{E470810A-BAF2-4B3C-92CB-72007B7F1B6A}"
@@ -209,6 +211,10 @@ Global
{310F6EE8-5F12-4663-A5B8-01344C5CC821}.Debug|Any CPU.Build.0 = Debug|Any CPU
{310F6EE8-5F12-4663-A5B8-01344C5CC821}.Release|Any CPU.ActiveCfg = Release|Any CPU
{310F6EE8-5F12-4663-A5B8-01344C5CC821}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F39DE885-64D8-4551-91C6-3E9DBD4D8C88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F39DE885-64D8-4551-91C6-3E9DBD4D8C88}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F39DE885-64D8-4551-91C6-3E9DBD4D8C88}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F39DE885-64D8-4551-91C6-3E9DBD4D8C88}.Release|Any CPU.Build.0 = Release|Any CPU
{8ABBBDC5-48A1-43BA-A629-AE58C35318AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8ABBBDC5-48A1-43BA-A629-AE58C35318AA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8ABBBDC5-48A1-43BA-A629-AE58C35318AA}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -256,6 +262,7 @@ Global
{834ECDE7-4B5D-4DBD-8BCA-98343A99179F} = {B8C52E24-376F-4E8D-AA8A-62E25C161863}
{F37B0EB9-2882-42F9-88DE-BB55AD9DCA5D} = {B8C52E24-376F-4E8D-AA8A-62E25C161863}
{310F6EE8-5F12-4663-A5B8-01344C5CC821} = {B8C52E24-376F-4E8D-AA8A-62E25C161863}
+ {F39DE885-64D8-4551-91C6-3E9DBD4D8C88} = {B8C52E24-376F-4E8D-AA8A-62E25C161863}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F5BAF3DD-D05C-4DCC-BB36-16645CA1F151}
diff --git a/src/libraries/System.Net.Http/System.Net.Http.sln b/src/libraries/System.Net.Http/System.Net.Http.sln
index 9d4ef2e584c..575a5a61d41 100644
--- a/src/libraries/System.Net.Http/System.Net.Http.sln
+++ b/src/libraries/System.Net.Http/System.Net.Http.sln
@@ -17,8 +17,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.DirectoryServices.Pr
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Formats.Asn1", "..\System.Formats.Asn1\ref\System.Formats.Asn1.csproj", "{50DB5029-84A6-4395-A941-1776D7E4D309}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Formats.Asn1", "..\System.Formats.Asn1\src\System.Formats.Asn1.csproj", "{74A6A2A8-9D0F-44C2-8C97-CF3F3A28DA14}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Memory", "..\System.Memory\ref\System.Memory.csproj", "{C5CA4275-5F20-4A91-A985-3B1183A2BDAF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Net.Http", "ref\System.Net.Http.csproj", "{CB685EA0-3A2C-4966-82EF-F04D0C02A419}"
@@ -33,14 +31,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Net.Http.Unit.Tests"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Net.Primitives", "..\System.Net.Primitives\ref\System.Net.Primitives.csproj", "{57E7FC2D-6403-4690-8FE3-7EE1EB642630}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Net.Quic", "..\System.Net.Quic\ref\System.Net.Quic.csproj", "{84E90EDE-19CD-460D-A2E8-71D9D726C56C}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Net.Quic", "..\System.Net.Quic\src\System.Net.Quic.csproj", "{F1FFB6F5-628E-4DF5-8FD0-9ADFB9EF5E91}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Net.Security", "..\System.Net.Security\ref\System.Net.Security.csproj", "{0FCFAD52-30B7-4767-95A2-34FD295D31F4}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Net.Security", "..\System.Net.Security\src\System.Net.Security.csproj", "{520ADB73-9746-48AE-8298-78B8FAC2ED4B}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Net.Sockets", "..\System.Net.Sockets\ref\System.Net.Sockets.csproj", "{2A888AE7-A822-4FF5-B6F0-9C7FEB46D117}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JSImportGenerator", "..\System.Runtime.InteropServices.JavaScript\gen\JSImportGenerator\JSImportGenerator.csproj", "{17069DE3-C00A-4A4C-9FAF-557F2E8A6197}"
@@ -107,10 +99,6 @@ Global
{50DB5029-84A6-4395-A941-1776D7E4D309}.Debug|Any CPU.Build.0 = Debug|Any CPU
{50DB5029-84A6-4395-A941-1776D7E4D309}.Release|Any CPU.ActiveCfg = Release|Any CPU
{50DB5029-84A6-4395-A941-1776D7E4D309}.Release|Any CPU.Build.0 = Release|Any CPU
- {74A6A2A8-9D0F-44C2-8C97-CF3F3A28DA14}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {74A6A2A8-9D0F-44C2-8C97-CF3F3A28DA14}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {74A6A2A8-9D0F-44C2-8C97-CF3F3A28DA14}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {74A6A2A8-9D0F-44C2-8C97-CF3F3A28DA14}.Release|Any CPU.Build.0 = Release|Any CPU
{C5CA4275-5F20-4A91-A985-3B1183A2BDAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C5CA4275-5F20-4A91-A985-3B1183A2BDAF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C5CA4275-5F20-4A91-A985-3B1183A2BDAF}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -139,22 +127,10 @@ Global
{57E7FC2D-6403-4690-8FE3-7EE1EB642630}.Debug|Any CPU.Build.0 = Debug|Any CPU
{57E7FC2D-6403-4690-8FE3-7EE1EB642630}.Release|Any CPU.ActiveCfg = Release|Any CPU
{57E7FC2D-6403-4690-8FE3-7EE1EB642630}.Release|Any CPU.Build.0 = Release|Any CPU
- {84E90EDE-19CD-460D-A2E8-71D9D726C56C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {84E90EDE-19CD-460D-A2E8-71D9D726C56C}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {84E90EDE-19CD-460D-A2E8-71D9D726C56C}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {84E90EDE-19CD-460D-A2E8-71D9D726C56C}.Release|Any CPU.Build.0 = Release|Any CPU
- {F1FFB6F5-628E-4DF5-8FD0-9ADFB9EF5E91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F1FFB6F5-628E-4DF5-8FD0-9ADFB9EF5E91}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F1FFB6F5-628E-4DF5-8FD0-9ADFB9EF5E91}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F1FFB6F5-628E-4DF5-8FD0-9ADFB9EF5E91}.Release|Any CPU.Build.0 = Release|Any CPU
{0FCFAD52-30B7-4767-95A2-34FD295D31F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0FCFAD52-30B7-4767-95A2-34FD295D31F4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0FCFAD52-30B7-4767-95A2-34FD295D31F4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0FCFAD52-30B7-4767-95A2-34FD295D31F4}.Release|Any CPU.Build.0 = Release|Any CPU
- {520ADB73-9746-48AE-8298-78B8FAC2ED4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {520ADB73-9746-48AE-8298-78B8FAC2ED4B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {520ADB73-9746-48AE-8298-78B8FAC2ED4B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {520ADB73-9746-48AE-8298-78B8FAC2ED4B}.Release|Any CPU.Build.0 = Release|Any CPU
{2A888AE7-A822-4FF5-B6F0-9C7FEB46D117}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2A888AE7-A822-4FF5-B6F0-9C7FEB46D117}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2A888AE7-A822-4FF5-B6F0-9C7FEB46D117}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -206,7 +182,6 @@ Global
{C5CA4275-5F20-4A91-A985-3B1183A2BDAF} = {3F6352E6-73F1-4E69-A3AD-7E9E7F9051AD}
{CB685EA0-3A2C-4966-82EF-F04D0C02A419} = {3F6352E6-73F1-4E69-A3AD-7E9E7F9051AD}
{57E7FC2D-6403-4690-8FE3-7EE1EB642630} = {3F6352E6-73F1-4E69-A3AD-7E9E7F9051AD}
- {84E90EDE-19CD-460D-A2E8-71D9D726C56C} = {3F6352E6-73F1-4E69-A3AD-7E9E7F9051AD}
{0FCFAD52-30B7-4767-95A2-34FD295D31F4} = {3F6352E6-73F1-4E69-A3AD-7E9E7F9051AD}
{2A888AE7-A822-4FF5-B6F0-9C7FEB46D117} = {3F6352E6-73F1-4E69-A3AD-7E9E7F9051AD}
{DB976968-CBB9-4134-88C6-5E682D050809} = {3F6352E6-73F1-4E69-A3AD-7E9E7F9051AD}
@@ -214,10 +189,7 @@ Global
{38FD827A-C96C-41CF-A514-CDAD16AE4802} = {3F6352E6-73F1-4E69-A3AD-7E9E7F9051AD}
{E33BB464-D65A-46DB-9BC1-836A5D126196} = {3F6352E6-73F1-4E69-A3AD-7E9E7F9051AD}
{8D82C57C-D809-4E65-BDFF-E73C13DA37BC} = {145B4B2E-5EF8-46F2-A596-E1043BB22873}
- {74A6A2A8-9D0F-44C2-8C97-CF3F3A28DA14} = {145B4B2E-5EF8-46F2-A596-E1043BB22873}
{11F31E64-4000-47F3-AE19-C83EB4EC0ED8} = {145B4B2E-5EF8-46F2-A596-E1043BB22873}
- {F1FFB6F5-628E-4DF5-8FD0-9ADFB9EF5E91} = {145B4B2E-5EF8-46F2-A596-E1043BB22873}
- {520ADB73-9746-48AE-8298-78B8FAC2ED4B} = {145B4B2E-5EF8-46F2-A596-E1043BB22873}
{17069DE3-C00A-4A4C-9FAF-557F2E8A6197} = {7841027C-6B57-4756-A757-8B19ECA0D9C7}
{98AA859A-14F1-465D-80D6-343A4075CC7B} = {7841027C-6B57-4756-A757-8B19ECA0D9C7}
{786ED1A9-1EFF-4BC4-A833-E680D9960F72} = {7841027C-6B57-4756-A757-8B19ECA0D9C7}
diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj b/src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj
index 2a66de73114..83b3bb8da28 100644
--- a/src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj
+++ b/src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj
@@ -9,6 +9,7 @@
<EnablePreviewFeatures>true</EnablePreviewFeatures>
<!-- the res/xml/network_security_config.xml file comes from the System.Net.TestData package -->
<IncludeNetworkSecurityConfig Condition="'$(TargetOS)' == 'Android'">true</IncludeNetworkSecurityConfig>
+ <EventSourceSupport Condition="'$(TestNativeAot)' == 'true'">true</EventSourceSupport>
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
diff --git a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/HttpStress.csproj b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/HttpStress.csproj
index 7a6f987b219..bb71d66d214 100644
--- a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/HttpStress.csproj
+++ b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/HttpStress.csproj
@@ -2,7 +2,6 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
- <LangVersion>preview</LangVersion>
<Nullable>enable</Nullable>
<EnablePreviewFeatures>True</EnablePreviewFeatures>
</PropertyGroup>
diff --git a/src/libraries/System.Net.Mail/src/System/Net/Mime/MimeBasePart.cs b/src/libraries/System.Net.Mail/src/System/Net/Mime/MimeBasePart.cs
index 50f1d368f59..68c3cd2f523 100644
--- a/src/libraries/System.Net.Mail/src/System/Net/Mime/MimeBasePart.cs
+++ b/src/libraries/System.Net.Mail/src/System/Net/Mime/MimeBasePart.cs
@@ -43,7 +43,6 @@ namespace System.Net.Mime
}
private static readonly char[] s_headerValueSplitChars = new char[] { '\r', '\n', ' ' };
- private static readonly char[] s_questionMarkSplitChars = new char[] { '?' };
internal static string DecodeHeaderValue(string? value)
{
@@ -65,7 +64,7 @@ namespace System.Net.Mime
//the third is the unicode encoding type, and the fourth is encoded message itself. '?' is not valid inside of
//an encoded string other than as a separator for these five parts.
//If this check fails, the string is either not encoded or cannot be decoded by this method
- string[] subStrings = foldedSubString.Split(s_questionMarkSplitChars);
+ string[] subStrings = foldedSubString.Split('?');
if ((subStrings.Length != 5 || subStrings[0] != "=" || subStrings[4] != "="))
{
return value;
diff --git a/src/libraries/System.Net.Mail/tests/Functional/System.Net.Mail.Functional.Tests.csproj b/src/libraries/System.Net.Mail/tests/Functional/System.Net.Mail.Functional.Tests.csproj
index 61a055f504b..351ce983448 100644
--- a/src/libraries/System.Net.Mail/tests/Functional/System.Net.Mail.Functional.Tests.csproj
+++ b/src/libraries/System.Net.Mail/tests/Functional/System.Net.Mail.Functional.Tests.csproj
@@ -5,6 +5,7 @@
<EnableLibraryImportGenerator>true</EnableLibraryImportGenerator>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<EnablePreviewFeatures>true</EnablePreviewFeatures>
+ <EventSourceSupport Condition="'$(TestNativeAot)' == 'true'">true</EventSourceSupport>
</PropertyGroup>
<ItemGroup>
<Compile Include="AlternateViewCollectionTest.cs" />
diff --git a/src/libraries/System.Net.NameResolution/tests/FunctionalTests/System.Net.NameResolution.Functional.Tests.csproj b/src/libraries/System.Net.NameResolution/tests/FunctionalTests/System.Net.NameResolution.Functional.Tests.csproj
index 982ca8491f7..f4588a2b4a1 100644
--- a/src/libraries/System.Net.NameResolution/tests/FunctionalTests/System.Net.NameResolution.Functional.Tests.csproj
+++ b/src/libraries/System.Net.NameResolution/tests/FunctionalTests/System.Net.NameResolution.Functional.Tests.csproj
@@ -3,6 +3,7 @@
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-Browser</TargetFrameworks>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
<IgnoreForCI Condition="'$(TargetOS)' == 'Browser'">true</IgnoreForCI>
+ <EventSourceSupport Condition="'$(TestNativeAot)' == 'true'">true</EventSourceSupport>
</PropertyGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
diff --git a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/LinuxIPv4InterfaceProperties.cs b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/LinuxIPv4InterfaceProperties.cs
index 1a02bbe05fb..de7b309e480 100644
--- a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/LinuxIPv4InterfaceProperties.cs
+++ b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/LinuxIPv4InterfaceProperties.cs
@@ -52,8 +52,7 @@ namespace System.Net.NetworkInformation
{
return StringParsingHelpers.ParseRawIntFile(paths[i]) == 1;
}
- catch (IOException) { }
- catch (UnauthorizedAccessException) { }
+ catch (NetworkInformationException ex) when (ex.InnerException is IOException or UnauthorizedAccessException) { }
}
return false;
diff --git a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/StringParsingHelpers.Connections.cs b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/StringParsingHelpers.Connections.cs
index 3d25db45642..248ce38b5d2 100644
--- a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/StringParsingHelpers.Connections.cs
+++ b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/StringParsingHelpers.Connections.cs
@@ -9,8 +9,6 @@ namespace System.Net.NetworkInformation
{
internal static partial class StringParsingHelpers
{
- private static readonly string[] s_newLineSeparator = new string[] { Environment.NewLine }; // Used for string splitting
-
internal static int ParseNumSocketConnections(string filePath, string protocolName)
{
// Parse the number of active connections out of /proc/net/sockstat
@@ -32,7 +30,7 @@ namespace System.Net.NetworkInformation
if (tcp4ConnectionsFile != null)
{
string tcp4FileContents = ReadAllText(tcp4ConnectionsFile);
- v4connections = tcp4FileContents.Split(s_newLineSeparator, StringSplitOptions.RemoveEmptyEntries);
+ v4connections = tcp4FileContents.Split(Environment.NewLine, StringSplitOptions.RemoveEmptyEntries);
}
else
{
@@ -42,7 +40,7 @@ namespace System.Net.NetworkInformation
if (tcp6ConnectionsFile != null)
{
string tcp6FileContents = ReadAllText(tcp6ConnectionsFile);
- v6connections = tcp6FileContents.Split(s_newLineSeparator, StringSplitOptions.RemoveEmptyEntries);
+ v6connections = tcp6FileContents.Split(Environment.NewLine, StringSplitOptions.RemoveEmptyEntries);
}
else
{
@@ -112,7 +110,7 @@ namespace System.Net.NetworkInformation
if (tcp4ConnectionsFile != null)
{
string tcp4FileContents = ReadAllText(tcp4ConnectionsFile);
- v4connections = tcp4FileContents.Split(s_newLineSeparator, StringSplitOptions.RemoveEmptyEntries);
+ v4connections = tcp4FileContents.Split(Environment.NewLine, StringSplitOptions.RemoveEmptyEntries);
}
else
{
@@ -122,7 +120,7 @@ namespace System.Net.NetworkInformation
if (tcp6ConnectionsFile != null)
{
string tcp6FileContents = ReadAllText(tcp6ConnectionsFile);
- v6connections = tcp6FileContents.Split(s_newLineSeparator, StringSplitOptions.RemoveEmptyEntries);
+ v6connections = tcp6FileContents.Split(Environment.NewLine, StringSplitOptions.RemoveEmptyEntries);
}
else
{
@@ -192,7 +190,7 @@ namespace System.Net.NetworkInformation
if (udp4File != null)
{
string udp4FileContents = ReadAllText(udp4File);
- v4connections = udp4FileContents.Split(s_newLineSeparator, StringSplitOptions.RemoveEmptyEntries);
+ v4connections = udp4FileContents.Split(Environment.NewLine, StringSplitOptions.RemoveEmptyEntries);
}
else
{
@@ -202,7 +200,7 @@ namespace System.Net.NetworkInformation
if (udp6File != null)
{
string udp6FileContents = ReadAllText(udp6File);
- v6connections = udp6FileContents.Split(s_newLineSeparator, StringSplitOptions.RemoveEmptyEntries);
+ v6connections = udp6FileContents.Split(Environment.NewLine, StringSplitOptions.RemoveEmptyEntries);
}
else
{
diff --git a/src/libraries/System.Net.NetworkInformation/tests/FunctionalTests/System.Net.NetworkInformation.Functional.Tests.csproj b/src/libraries/System.Net.NetworkInformation/tests/FunctionalTests/System.Net.NetworkInformation.Functional.Tests.csproj
index 345e1f518da..d0d92ab8682 100644
--- a/src/libraries/System.Net.NetworkInformation/tests/FunctionalTests/System.Net.NetworkInformation.Functional.Tests.csproj
+++ b/src/libraries/System.Net.NetworkInformation/tests/FunctionalTests/System.Net.NetworkInformation.Functional.Tests.csproj
@@ -5,6 +5,7 @@
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<IgnoreForCI Condition="'$(TargetOS)' == 'Browser'">true</IgnoreForCI>
<DefineConstants>$(DefineConstants);NETWORKINFORMATION_TEST</DefineConstants>
+ <EventSourceSupport Condition="'$(TestNativeAot)' == 'true'">true</EventSourceSupport>
</PropertyGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
diff --git a/src/libraries/System.Net.Primitives/src/System.Net.Primitives.csproj b/src/libraries/System.Net.Primitives/src/System.Net.Primitives.csproj
index 84a5864cac9..b77d6366c7a 100644
--- a/src/libraries/System.Net.Primitives/src/System.Net.Primitives.csproj
+++ b/src/libraries/System.Net.Primitives/src/System.Net.Primitives.csproj
@@ -1,4 +1,4 @@
-<Project Sdk="Microsoft.NET.Sdk">
+<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<ILLinkKeepDepAttributes>false</ILLinkKeepDepAttributes> <!-- See comments in Cookie.cs -->
@@ -158,6 +158,7 @@
<Reference Include="System.Memory" />
<Reference Include="System.Runtime" />
<Reference Include="System.Runtime.InteropServices" />
+ <Reference Include="System.Runtime.Intrinsics" />
<Reference Include="System.Threading" />
</ItemGroup>
</Project>
diff --git a/src/libraries/System.Net.Primitives/src/System/Net/IPAddress.cs b/src/libraries/System.Net.Primitives/src/System/Net/IPAddress.cs
index d1fefb09ab0..5579e8a50d7 100644
--- a/src/libraries/System.Net.Primitives/src/System/Net/IPAddress.cs
+++ b/src/libraries/System.Net.Primitives/src/System/Net/IPAddress.cs
@@ -7,6 +7,7 @@ using System.Diagnostics.CodeAnalysis;
using System.Net.Sockets;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
+using System.Runtime.Intrinsics;
namespace System.Net
{
@@ -54,11 +55,13 @@ namespace System.Net
internal const int NumberOfLabels = IPAddressParserStatics.IPv6AddressBytes / 2;
+ [MemberNotNullWhen(false, nameof(_numbers))]
private bool IsIPv4
{
get { return _numbers == null; }
}
+ [MemberNotNullWhen(true, nameof(_numbers))]
private bool IsIPv6
{
get { return _numbers != null; }
@@ -104,7 +107,7 @@ namespace System.Net
/// </devdoc>
public IPAddress(long newAddress)
{
- if (newAddress < 0 || newAddress > 0x00000000FFFFFFFF)
+ if ((ulong)newAddress > 0x00000000FFFFFFFF)
{
throw new ArgumentOutOfRangeException(nameof(newAddress));
}
@@ -131,18 +134,12 @@ namespace System.Net
// Consider: Since scope is only valid for link-local and site-local
// addresses we could implement some more robust checking here
- if (scopeid < 0 || scopeid > 0x00000000FFFFFFFF)
+ if ((ulong)scopeid > 0x00000000FFFFFFFF)
{
throw new ArgumentOutOfRangeException(nameof(scopeid));
}
- _numbers = new ushort[NumberOfLabels];
-
- for (int i = 0; i < NumberOfLabels; i++)
- {
- _numbers[i] = (ushort)(address[i * 2] * 256 + address[i * 2 + 1]);
- }
-
+ _numbers = ReadUInt16NumbersFromBytes(address);
PrivateScopeId = (uint)scopeid;
}
@@ -151,13 +148,7 @@ namespace System.Net
Debug.Assert(numbers != null);
Debug.Assert(numbers.Length == NumberOfLabels);
- var arr = new ushort[NumberOfLabels];
- for (int i = 0; i < arr.Length; i++)
- {
- arr[i] = numbers[i];
- }
-
- _numbers = arr;
+ _numbers = numbers.ToArray();
PrivateScopeId = scopeid;
}
@@ -188,17 +179,37 @@ namespace System.Net
}
else if (address.Length == IPAddressParserStatics.IPv6AddressBytes)
{
- _numbers = new ushort[NumberOfLabels];
+ _numbers = ReadUInt16NumbersFromBytes(address);
+ }
+ else
+ {
+ throw new ArgumentException(SR.dns_bad_ip_address, nameof(address));
+ }
+ }
- for (int i = 0; i < NumberOfLabels; i++)
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ private static ushort[] ReadUInt16NumbersFromBytes(ReadOnlySpan<byte> address)
+ {
+ ushort[] numbers = new ushort[NumberOfLabels];
+ if (Vector128.IsHardwareAccelerated)
+ {
+ Vector128<ushort> ushorts = Vector128.LoadUnsafe(ref MemoryMarshal.GetReference(address)).AsUInt16();
+ if (BitConverter.IsLittleEndian)
{
- _numbers[i] = (ushort)(address[i * 2] * 256 + address[i * 2 + 1]);
+ // Reverse endianness of each ushort
+ ushorts = Vector128.ShiftLeft(ushorts, 8) | Vector128.ShiftRightLogical(ushorts, 8);
}
+ ushorts.StoreUnsafe(ref MemoryMarshal.GetArrayDataReference(numbers));
}
else
{
- throw new ArgumentException(SR.dns_bad_ip_address, nameof(address));
+ for (int i = 0; i < numbers.Length; i++)
+ {
+ numbers[i] = BinaryPrimitives.ReadUInt16BigEndian(address.Slice(i * 2));
+ }
}
+
+ return numbers;
}
// We need this internally since we need to interface with winsock,
@@ -274,12 +285,28 @@ namespace System.Net
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private void WriteIPv6Bytes(Span<byte> destination)
{
- Debug.Assert(_numbers != null && _numbers.Length == NumberOfLabels);
- int j = 0;
- for (int i = 0; i < NumberOfLabels; i++)
+ ushort[]? numbers = _numbers;
+ Debug.Assert(numbers != null && numbers.Length == NumberOfLabels);
+
+ if (BitConverter.IsLittleEndian)
+ {
+ if (Vector128.IsHardwareAccelerated)
+ {
+ Vector128<ushort> ushorts = Vector128.LoadUnsafe(ref MemoryMarshal.GetArrayDataReference(numbers));
+ ushorts = Vector128.ShiftLeft(ushorts, 8) | Vector128.ShiftRightLogical(ushorts, 8);
+ ushorts.AsByte().StoreUnsafe(ref MemoryMarshal.GetReference(destination));
+ }
+ else
+ {
+ for (int i = 0; i < numbers.Length; i++)
+ {
+ BinaryPrimitives.WriteUInt16BigEndian(destination.Slice(i * 2), numbers[i]);
+ }
+ }
+ }
+ else
{
- destination[j++] = (byte)((_numbers[i] >> 8) & 0xFF);
- destination[j++] = (byte)((_numbers[i]) & 0xFF);
+ MemoryMarshal.AsBytes<ushort>(numbers).CopyTo(destination);
}
}
@@ -365,13 +392,13 @@ namespace System.Net
public override string ToString() =>
_toString ??= IsIPv4 ?
IPAddressParser.IPv4AddressToString(PrivateAddress) :
- IPAddressParser.IPv6AddressToString(_numbers!, PrivateScopeId);
+ IPAddressParser.IPv6AddressToString(_numbers, PrivateScopeId);
public bool TryFormat(Span<char> destination, out int charsWritten)
{
return IsIPv4 ?
IPAddressParser.IPv4AddressToString(PrivateAddress, destination, out charsWritten) :
- IPAddressParser.IPv6AddressToString(_numbers!, PrivateScopeId, destination, out charsWritten);
+ IPAddressParser.IPv6AddressToString(_numbers, PrivateScopeId, destination, out charsWritten);
}
public static long HostToNetworkOrder(long host)
@@ -429,7 +456,7 @@ namespace System.Net
{
get
{
- return IsIPv6 && ((_numbers![0] & 0xFF00) == 0xFF00);
+ return IsIPv6 && ((_numbers[0] & 0xFF00) == 0xFF00);
}
}
@@ -442,7 +469,7 @@ namespace System.Net
{
get
{
- return IsIPv6 && ((_numbers![0] & 0xFFC0) == 0xFE80);
+ return IsIPv6 && ((_numbers[0] & 0xFFC0) == 0xFE80);
}
}
@@ -455,7 +482,7 @@ namespace System.Net
{
get
{
- return IsIPv6 && ((_numbers![0] & 0xFFC0) == 0xFEC0);
+ return IsIPv6 && ((_numbers[0] & 0xFFC0) == 0xFEC0);
}
}
@@ -464,8 +491,8 @@ namespace System.Net
get
{
return IsIPv6 &&
- (_numbers![0] == 0x2001) &&
- (_numbers![1] == 0);
+ (_numbers[0] == 0x2001) &&
+ (_numbers[1] == 0);
}
}
@@ -474,7 +501,7 @@ namespace System.Net
{
get
{
- return IsIPv6 && ((_numbers![0] & 0xFE00) == 0xFC00);
+ return IsIPv6 && ((_numbers[0] & 0xFE00) == 0xFC00);
}
}
@@ -487,14 +514,11 @@ namespace System.Net
{
return false;
}
- for (int i = 0; i < 5; i++)
- {
- if (_numbers![i] != 0)
- {
- return false;
- }
- }
- return (_numbers![5] == 0xFFFF);
+
+ ReadOnlySpan<byte> numbers = MemoryMarshal.AsBytes(new ReadOnlySpan<ushort>(_numbers));
+ return
+ MemoryMarshal.Read<ulong>(numbers) == 0 &&
+ BinaryPrimitives.ReadUInt32LittleEndian(numbers.Slice(8)) == 0xFFFF0000;
}
}
@@ -622,7 +646,7 @@ namespace System.Net
return this;
}
- uint address = (uint)_numbers![6] << 16 | (uint)_numbers[7];
+ uint address = (uint)_numbers[6] << 16 | (uint)_numbers[7];
return new IPAddress((uint)HostToNetworkOrder(unchecked((int)address)));
}
diff --git a/src/libraries/System.Net.Quic/ref/System.Net.Quic.cs b/src/libraries/System.Net.Quic/ref/System.Net.Quic.cs
index fed27168ef8..dccd0daf4c8 100644
--- a/src/libraries/System.Net.Quic/ref/System.Net.Quic.cs
+++ b/src/libraries/System.Net.Quic/ref/System.Net.Quic.cs
@@ -59,6 +59,7 @@ namespace System.Net.Quic
ConnectionIdle = 10,
ProtocolError = 11,
OperationAborted = 12,
+ AlpnInUse = 13,
}
public sealed partial class QuicException : System.IO.IOException
{
diff --git a/src/libraries/System.Net.Quic/src/Resources/Strings.resx b/src/libraries/System.Net.Quic/src/Resources/Strings.resx
index b55b399c2cd..09e0e5dc47f 100644
--- a/src/libraries/System.Net.Quic/src/Resources/Strings.resx
+++ b/src/libraries/System.Net.Quic/src/Resources/Strings.resx
@@ -204,6 +204,9 @@
<data name="net_quic_protocol_error" xml:space="preserve">
<value>A QUIC protocol error was encountered</value>
</data>
+ <data name="net_quic_alpn_in_use" xml:space="preserve">
+ <value>Another QUIC listener is already listening on one of the requested application protocols on the same port.</value>
+ </data>
<data name="net_quic_ver_neg_error" xml:space="preserve">
<value>A version negotiation error was encountered.</value>
</data>
diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/ThrowHelper.cs b/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/ThrowHelper.cs
index 428dcf00814..65db16ea406 100644
--- a/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/ThrowHelper.cs
+++ b/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/ThrowHelper.cs
@@ -73,6 +73,7 @@ internal static class ThrowHelper
if (status == QUIC_STATUS_INVALID_ADDRESS) return new QuicException(QuicError.InvalidAddress, null, SR.net_quic_invalid_address);
if (status == QUIC_STATUS_CONNECTION_IDLE) return new QuicException(QuicError.ConnectionIdle, null, SR.net_quic_connection_idle);
if (status == QUIC_STATUS_PROTOCOL_ERROR) return new QuicException(QuicError.ProtocolError, null, SR.net_quic_protocol_error);
+ if (status == QUIC_STATUS_ALPN_IN_USE) return new QuicException(QuicError.AlpnInUse, null, SR.net_quic_protocol_error);
if (status == QUIC_STATUS_TLS_ERROR ||
status == QUIC_STATUS_CERT_EXPIRED ||
@@ -155,6 +156,7 @@ internal static class ThrowHelper
else if (status == QUIC_STATUS_USER_CANCELED) return "QUIC_STATUS_USER_CANCELED";
else if (status == QUIC_STATUS_ALPN_NEG_FAILURE) return "QUIC_STATUS_ALPN_NEG_FAILURE";
else if (status == QUIC_STATUS_STREAM_LIMIT_REACHED) return "QUIC_STATUS_STREAM_LIMIT_REACHED";
+ else if (status == QUIC_STATUS_ALPN_IN_USE) return "QUIC_STATUS_ALPN_IN_USE";
else if (status == QUIC_STATUS_CLOSE_NOTIFY) return "QUIC_STATUS_CLOSE_NOTIFY";
else if (status == QUIC_STATUS_BAD_CERTIFICATE) return "QUIC_STATUS_BAD_CERTIFICATE";
else if (status == QUIC_STATUS_UNSUPPORTED_CERTIFICATE) return "QUIC_STATUS_UNSUPPORTED_CERTIFICATE";
diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Interop/msquic.cs b/src/libraries/System.Net.Quic/src/System/Net/Quic/Interop/msquic.cs
index 81f62f081a6..db4d69c539f 100644
--- a/src/libraries/System.Net.Quic/src/System/Net/Quic/Interop/msquic.cs
+++ b/src/libraries/System.Net.Quic/src/System/Net/Quic/Interop/msquic.cs
@@ -73,6 +73,7 @@ namespace Microsoft.Quic
public static int QUIC_STATUS_USER_CANCELED => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_USER_CANCELED : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_USER_CANCELED : MsQuic_Linux.QUIC_STATUS_USER_CANCELED;
public static int QUIC_STATUS_ALPN_NEG_FAILURE => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_ALPN_NEG_FAILURE : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_ALPN_NEG_FAILURE : MsQuic_Linux.QUIC_STATUS_ALPN_NEG_FAILURE;
public static int QUIC_STATUS_STREAM_LIMIT_REACHED => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_STREAM_LIMIT_REACHED : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_STREAM_LIMIT_REACHED : MsQuic_Linux.QUIC_STATUS_STREAM_LIMIT_REACHED;
+ public static int QUIC_STATUS_ALPN_IN_USE => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_ALPN_IN_USE : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_ALPN_IN_USE : MsQuic_Linux.QUIC_STATUS_ALPN_IN_USE;
public static int QUIC_STATUS_CLOSE_NOTIFY => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_CLOSE_NOTIFY : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_CLOSE_NOTIFY : MsQuic_Linux.QUIC_STATUS_CLOSE_NOTIFY;
public static int QUIC_STATUS_BAD_CERTIFICATE => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_BAD_CERTIFICATE : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_BAD_CERTIFICATE : MsQuic_Linux.QUIC_STATUS_BAD_CERTIFICATE;
public static int QUIC_STATUS_UNSUPPORTED_CERTIFICATE => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_UNSUPPORTED_CERTIFICATE : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_UNSUPPORTED_CERTIFICATE : MsQuic_Linux.QUIC_STATUS_UNSUPPORTED_CERTIFICATE;
diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Interop/msquic_generated.cs b/src/libraries/System.Net.Quic/src/System/Net/Quic/Interop/msquic_generated.cs
index 738c2365f60..54b392cc54a 100644
--- a/src/libraries/System.Net.Quic/src/System/Net/Quic/Interop/msquic_generated.cs
+++ b/src/libraries/System.Net.Quic/src/System/Net/Quic/Interop/msquic_generated.cs
@@ -689,6 +689,34 @@ namespace Microsoft.Quic
}
}
+ [NativeTypeName("uint32_t : 1")]
+ internal uint GreaseBitNegotiated
+ {
+ get
+ {
+ return (_bitfield >> 4) & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0x1u << 4)) | ((value & 0x1u) << 4);
+ }
+ }
+
+ [NativeTypeName("uint32_t : 27")]
+ internal uint RESERVED
+ {
+ get
+ {
+ return (_bitfield >> 5) & 0x7FFFFFFu;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0x7FFFFFFu << 5)) | ((value & 0x7FFFFFFu) << 5);
+ }
+ }
+
[NativeTypeName("uint32_t")]
internal uint Rtt;
@@ -772,6 +800,9 @@ namespace Microsoft.Quic
[NativeTypeName("uint32_t")]
internal uint SendCongestionWindow;
+
+ [NativeTypeName("uint32_t")]
+ internal uint DestCidUpdateCount;
}
internal partial struct QUIC_LISTENER_STATISTICS
@@ -1079,17 +1110,31 @@ namespace Microsoft.Quic
}
}
- [NativeTypeName("uint8_t : 2")]
+ [NativeTypeName("uint8_t : 1")]
+ internal byte GreaseQuicBitEnabled
+ {
+ get
+ {
+ return (byte)((_bitfield >> 6) & 0x1u);
+ }
+
+ set
+ {
+ _bitfield = (byte)((_bitfield & ~(0x1u << 6)) | ((value & 0x1u) << 6));
+ }
+ }
+
+ [NativeTypeName("uint8_t : 1")]
internal byte RESERVED
{
get
{
- return (byte)((_bitfield >> 6) & 0x3u);
+ return (byte)((_bitfield >> 7) & 0x1u);
}
set
{
- _bitfield = (byte)((_bitfield & ~(0x3u << 6)) | ((value & 0x3u) << 6));
+ _bitfield = (byte)((_bitfield & ~(0x1u << 7)) | ((value & 0x1u) << 7));
}
}
@@ -1099,6 +1144,9 @@ namespace Microsoft.Quic
[NativeTypeName("uint8_t")]
internal byte MtuDiscoveryMissingProbeCount;
+ [NativeTypeName("uint32_t")]
+ internal uint DestCidUpdateIdleTimeoutMs;
+
internal ref ulong IsSetFlags
{
get
@@ -1564,8 +1612,8 @@ namespace Microsoft.Quic
}
}
- [NativeTypeName("uint64_t : 33")]
- internal ulong RESERVED
+ [NativeTypeName("uint64_t : 1")]
+ internal ulong DestCidUpdateIdleTimeoutMs
{
get
{
@@ -1577,6 +1625,34 @@ namespace Microsoft.Quic
_bitfield = (_bitfield & ~(0x1UL << 31)) | ((value & 0x1UL) << 31);
}
}
+
+ [NativeTypeName("uint64_t : 1")]
+ internal ulong GreaseQuicBitEnabled
+ {
+ get
+ {
+ return (_bitfield >> 32) & 0x1UL;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0x1UL << 32)) | ((value & 0x1UL) << 32);
+ }
+ }
+
+ [NativeTypeName("uint64_t : 31")]
+ internal ulong RESERVED
+ {
+ get
+ {
+ return (_bitfield >> 33) & 0x7FFFFFFFUL;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0x7FFFFFFFUL << 33)) | ((value & 0x7FFFFFFFUL) << 33);
+ }
+ }
}
}
}
diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Interop/msquic_generated_linux.cs b/src/libraries/System.Net.Quic/src/System/Net/Quic/Interop/msquic_generated_linux.cs
index 880ed49b887..f8c8e91ab34 100644
--- a/src/libraries/System.Net.Quic/src/System/Net/Quic/Interop/msquic_generated_linux.cs
+++ b/src/libraries/System.Net.Quic/src/System/Net/Quic/Interop/msquic_generated_linux.cs
@@ -81,6 +81,9 @@ namespace Microsoft.Quic
[NativeTypeName("#define QUIC_STATUS_STREAM_LIMIT_REACHED ((QUIC_STATUS)ESTRPIPE)")]
public const int QUIC_STATUS_STREAM_LIMIT_REACHED = ((int)(86));
+ [NativeTypeName("#define QUIC_STATUS_ALPN_IN_USE ((QUIC_STATUS)EPROTOTYPE)")]
+ public const int QUIC_STATUS_ALPN_IN_USE = unchecked((int)(91));
+
[NativeTypeName("#define QUIC_STATUS_CLOSE_NOTIFY QUIC_STATUS_TLS_ALERT(0)")]
public const int QUIC_STATUS_CLOSE_NOTIFY = ((int)(0xff & 0) + 256 + 200000000);
diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Interop/msquic_generated_macos.cs b/src/libraries/System.Net.Quic/src/System/Net/Quic/Interop/msquic_generated_macos.cs
index f3fa6b0de89..26b32f65542 100644
--- a/src/libraries/System.Net.Quic/src/System/Net/Quic/Interop/msquic_generated_macos.cs
+++ b/src/libraries/System.Net.Quic/src/System/Net/Quic/Interop/msquic_generated_macos.cs
@@ -81,6 +81,9 @@ namespace Microsoft.Quic
[NativeTypeName("#define QUIC_STATUS_STREAM_LIMIT_REACHED ((QUIC_STATUS)ESTRPIPE)")]
public const int QUIC_STATUS_STREAM_LIMIT_REACHED = ((int)(86));
+ [NativeTypeName("#define QUIC_STATUS_ALPN_IN_USE ((QUIC_STATUS)EPROTOTYPE)")]
+ public const int QUIC_STATUS_ALPN_IN_USE = unchecked((int)(41));
+
[NativeTypeName("#define QUIC_STATUS_CLOSE_NOTIFY QUIC_STATUS_TLS_ALERT(0)")]
public const int QUIC_STATUS_CLOSE_NOTIFY = ((int)(0xff & 0) + 256 + 200000000);
diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Interop/msquic_generated_windows.cs b/src/libraries/System.Net.Quic/src/System/Net/Quic/Interop/msquic_generated_windows.cs
index ea4f755da5d..c9ceebc638a 100644
--- a/src/libraries/System.Net.Quic/src/System/Net/Quic/Interop/msquic_generated_windows.cs
+++ b/src/libraries/System.Net.Quic/src/System/Net/Quic/Interop/msquic_generated_windows.cs
@@ -81,6 +81,9 @@ namespace Microsoft.Quic
[NativeTypeName("#define QUIC_STATUS_STREAM_LIMIT_REACHED ERROR_QUIC_STREAM_LIMIT_REACHED")]
public const int QUIC_STATUS_STREAM_LIMIT_REACHED = unchecked((int)(0x80410008));
+ [NativeTypeName("#define QUIC_STATUS_ALPN_IN_USE ERROR_QUIC_ALPN_IN_USE")]
+ public const int QUIC_STATUS_ALPN_IN_USE = unchecked((int)(0x80410009L));
+
[NativeTypeName("#define QUIC_STATUS_CLOSE_NOTIFY QUIC_STATUS_TLS_ALERT(0)")]
public const int QUIC_STATUS_CLOSE_NOTIFY = unchecked(((int)(0x80410100)) | (0xff & 0));
diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicError.cs b/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicError.cs
index 7207ebbaa33..e70e86f7d45 100644
--- a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicError.cs
+++ b/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicError.cs
@@ -72,5 +72,10 @@ namespace System.Net.Quic
/// The operation has been aborted.
/// </summary>
OperationAborted,
+
+ /// <summary>
+ /// Another QUIC listener is already listening on one of the requested application protocols on the same port.
+ /// </summary>
+ AlpnInUse,
}
}
diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicStream.Stream.cs b/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicStream.Stream.cs
index 25b299cf3e2..8bf979926a2 100644
--- a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicStream.Stream.cs
+++ b/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicStream.Stream.cs
@@ -169,7 +169,7 @@ public partial class QuicStream : Stream
/// <inheritdoc />
public override void WriteByte(byte value)
{
- Write(MemoryMarshal.CreateReadOnlySpan(ref value, 1));
+ Write(new ReadOnlySpan<byte>(in value));
}
/// <inheritdoc />
diff --git a/src/libraries/System.Net.Quic/tests/FunctionalTests/QuicListenerTests.cs b/src/libraries/System.Net.Quic/tests/FunctionalTests/QuicListenerTests.cs
index af05db6f809..d577a33f80f 100644
--- a/src/libraries/System.Net.Quic/tests/FunctionalTests/QuicListenerTests.cs
+++ b/src/libraries/System.Net.Quic/tests/FunctionalTests/QuicListenerTests.cs
@@ -133,16 +133,7 @@ namespace System.Net.Quic.Tests
public async Task TwoListenersOnSamePort_SameAlpn_Throws()
{
await using QuicListener listener = await CreateQuicListener();
-
- //
- // TODO: MsQuic returns QUIC_STATUS_INVALID_STATE in this case, returning
- // ADDRESS_IN_USE could be confusing because you can actually bind two listeners
- // to the same port (see TwoListenersOnSamePort_DisjointAlpn_Success). It may be better
- // to add a new error code to identify this case
- //
- // [ActiveIssue("https://github.com/dotnet/runtime/issues/73045")]
- //
- await AssertThrowsQuicExceptionAsync(QuicError.InternalError, async () => await CreateQuicListener(listener.LocalEndPoint));
+ await AssertThrowsQuicExceptionAsync(QuicError.AlpnInUse, async () => await CreateQuicListener(listener.LocalEndPoint));
}
[Fact]
diff --git a/src/libraries/System.Net.Quic/tests/FunctionalTests/QuicTestBase.cs b/src/libraries/System.Net.Quic/tests/FunctionalTests/QuicTestBase.cs
index 35fa6ab5474..8d013427b62 100644
--- a/src/libraries/System.Net.Quic/tests/FunctionalTests/QuicTestBase.cs
+++ b/src/libraries/System.Net.Quic/tests/FunctionalTests/QuicTestBase.cs
@@ -60,6 +60,7 @@ namespace System.Net.Quic.Tests
public async Task<QuicException> AssertThrowsQuicExceptionAsync(QuicError expectedError, Func<Task> testCode)
{
QuicException ex = await Assert.ThrowsAsync<QuicException>(testCode);
+ _output.WriteLine(ex.ToString());
Assert.Equal(expectedError, ex.QuicError);
return ex;
}
diff --git a/src/libraries/System.Net.Requests/tests/System.Net.Requests.Tests.csproj b/src/libraries/System.Net.Requests/tests/System.Net.Requests.Tests.csproj
index 413a4da999f..8e509bd356a 100644
--- a/src/libraries/System.Net.Requests/tests/System.Net.Requests.Tests.csproj
+++ b/src/libraries/System.Net.Requests/tests/System.Net.Requests.Tests.csproj
@@ -10,6 +10,7 @@
<!-- the res/xml/network_security_config.xml file comes from the System.Net.TestData package -->
<IncludeNetworkSecurityConfig Condition="'$(TargetOS)' == 'Android'">true</IncludeNetworkSecurityConfig>
<EnablePreviewFeatures>true</EnablePreviewFeatures>
+ <EventSourceSupport Condition="'$(TestNativeAot)' == 'true'">true</EventSourceSupport>
</PropertyGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
diff --git a/src/libraries/System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj b/src/libraries/System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj
index 72b596e6c80..7c3d432f34c 100644
--- a/src/libraries/System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj
+++ b/src/libraries/System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj
@@ -8,6 +8,7 @@
<!-- the res/xml/network_security_config.xml file comes from the System.Net.TestData package -->
<IncludeNetworkSecurityConfig Condition="'$(TargetOS)' == 'Android'">true</IncludeNetworkSecurityConfig>
<EnablePreviewFeatures>true</EnablePreviewFeatures>
+ <EventSourceSupport Condition="'$(TestNativeAot)' == 'true'">true</EventSourceSupport>
</PropertyGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
diff --git a/src/libraries/System.Net.Security/tests/UnitTests/System.Net.Security.Unit.Tests.csproj b/src/libraries/System.Net.Security/tests/UnitTests/System.Net.Security.Unit.Tests.csproj
index 1dd366e72a0..1d7184003da 100644
--- a/src/libraries/System.Net.Security/tests/UnitTests/System.Net.Security.Unit.Tests.csproj
+++ b/src/libraries/System.Net.Security/tests/UnitTests/System.Net.Security.Unit.Tests.csproj
@@ -13,8 +13,6 @@
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-Browser;$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-Android</TargetFrameworks>
<IgnoreForCI Condition="'$(TargetOS)' == 'Browser'">true</IgnoreForCI>
<EnableLibraryImportGenerator>true</EnableLibraryImportGenerator>
- <!--Remove once this is fixed, https://github.com/dotnet/runtime/issues/71506 -->
- <IlcTrimMetadata>false</IlcTrimMetadata>
</PropertyGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
diff --git a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Unix.cs b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Unix.cs
index 000e4f9aee6..ec5d17cd504 100644
--- a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Unix.cs
+++ b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Unix.cs
@@ -170,14 +170,17 @@ namespace System.Net.Sockets
#pragma warning disable CA1822
private Socket? GetOrCreateAcceptSocket(Socket? acceptSocket, bool checkDisconnected, string propertyName, out SafeSocketHandle? handle)
{
- if (acceptSocket != null && acceptSocket._handle.HasShutdownSend)
+ if (acceptSocket != null)
{
- throw new SocketException((int)SocketError.InvalidArgument);
- }
+ if (acceptSocket._handle.HasShutdownSend)
+ {
+ throw new SocketException((int)SocketError.InvalidArgument);
+ }
- if (acceptSocket != null && acceptSocket._rightEndPoint != null && (!checkDisconnected || !acceptSocket._isDisconnected))
- {
- throw new InvalidOperationException(SR.Format(SR.net_sockets_namedmustnotbebound, propertyName));
+ if (acceptSocket._rightEndPoint != null && (!checkDisconnected || !acceptSocket._isDisconnected))
+ {
+ throw new InvalidOperationException(SR.Format(SR.net_sockets_namedmustnotbebound, propertyName));
+ }
}
handle = null;
@@ -273,39 +276,7 @@ namespace System.Net.Sockets
{
object? origValue = pi.GetValue(source);
object? cloneValue = pi.GetValue(this);
-
- if (origValue is IEnumerable origEnumerable)
- {
- IEnumerable? cloneEnumerable = cloneValue as IEnumerable;
- Debug.Assert(cloneEnumerable != null, $"{pi.Name}. Expected enumerable cloned value.");
-
- IEnumerator e1 = origEnumerable.GetEnumerator();
- try
- {
- IEnumerator e2 = cloneEnumerable.GetEnumerator();
- try
- {
- while (e1.MoveNext())
- {
- Debug.Assert(e2.MoveNext(), $"{pi.Name}. Cloned enumerator too short.");
- Debug.Assert(Equals(e1.Current, e2.Current), $"{pi.Name}. Cloned enumerator's values don't match.");
- }
- Debug.Assert(!e2.MoveNext(), $"{pi.Name}. Cloned enumerator too long.");
- }
- finally
- {
- (e2 as IDisposable)?.Dispose();
- }
- }
- finally
- {
- (e1 as IDisposable)?.Dispose();
- }
- }
- else
- {
- Debug.Assert(Equals(origValue, cloneValue), $"{pi.Name}. Expected: {origValue}, Actual: {cloneValue}");
- }
+ Debug.Assert(Equals(origValue, cloneValue), $"{pi.Name}. Expected: {origValue}, Actual: {cloneValue}");
}
#endif
return this;
diff --git a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEventArgs.Unix.cs b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEventArgs.Unix.cs
index 7f946d57d12..79d8e77ec28 100644
--- a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEventArgs.Unix.cs
+++ b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEventArgs.Unix.cs
@@ -335,20 +335,21 @@ namespace System.Net.Sockets
private SocketError FinishOperationAccept(Internals.SocketAddress remoteSocketAddress)
{
System.Buffer.BlockCopy(_acceptBuffer!, 0, remoteSocketAddress.Buffer, 0, _acceptAddressBufferCount);
- Socket? sukru = _acceptSocket;
- _acceptSocket = _currentSocket!.CreateAcceptSocket(
+ Socket acceptedSocket = _currentSocket!.CreateAcceptSocket(
SocketPal.CreateSocket(_acceptedFileDescriptor),
_currentSocket._rightEndPoint!.Create(remoteSocketAddress));
- if (sukru != null)
+ if (_acceptSocket is null)
{
- sukru.DisposeHandle();
- sukru.CopyStateFromSource(_acceptSocket);
- // We keep this socket to make clean-up.
- Socket temp = _acceptSocket;
- _acceptSocket = sukru;
- temp.ClearHandle();
- temp.Dispose();
- GC.SuppressFinalize(temp);
+ // Store the accepted socket
+ _acceptSocket = acceptedSocket;
+ }
+ else
+ {
+ // Copy state from the accepted socket into the caller-supplied socket and then dispose of the original.
+ _acceptSocket.DisposeHandle();
+ _acceptSocket.CopyStateFromSource(acceptedSocket);
+ acceptedSocket.ClearHandle();
+ acceptedSocket.Dispose();
}
return SocketError.Success;
}
diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/System.Net.Sockets.Tests.csproj b/src/libraries/System.Net.Sockets/tests/FunctionalTests/System.Net.Sockets.Tests.csproj
index 0d7df7229db..884db1eea54 100644
--- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/System.Net.Sockets.Tests.csproj
+++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/System.Net.Sockets.Tests.csproj
@@ -4,6 +4,7 @@
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-Browser</TargetFrameworks>
<IgnoreForCI Condition="'$(TargetOS)' == 'Browser'">true</IgnoreForCI>
+ <EventSourceSupport Condition="'$(TestNativeAot)' == 'true'">true</EventSourceSupport>
</PropertyGroup>
<ItemGroup>
<Compile Include="Accept.cs" />
diff --git a/src/libraries/System.Net.WebClient/src/System.Net.WebClient.csproj b/src/libraries/System.Net.WebClient/src/System.Net.WebClient.csproj
index 949fea2f4d4..fdbfd8f017d 100644
--- a/src/libraries/System.Net.WebClient/src/System.Net.WebClient.csproj
+++ b/src/libraries/System.Net.WebClient/src/System.Net.WebClient.csproj
@@ -28,6 +28,7 @@
<Reference Include="System.Collections.Specialized" />
<Reference Include="System.ComponentModel.EventBasedAsync" />
<Reference Include="System.ComponentModel.Primitives" />
+ <Reference Include="System.Memory" />
<Reference Include="System.Net.Primitives" />
<Reference Include="System.Net.Requests" />
<Reference Include="System.Net.WebHeaderCollection" />
diff --git a/src/libraries/System.Net.WebClient/src/System/Net/WebClient.cs b/src/libraries/System.Net.WebClient/src/System/Net/WebClient.cs
index 89a8f5375e2..0a893f002c7 100644
--- a/src/libraries/System.Net.WebClient/src/System/Net/WebClient.cs
+++ b/src/libraries/System.Net.WebClient/src/System/Net/WebClient.cs
@@ -1076,24 +1076,6 @@ namespace System.Net
}
}
- private static bool ByteArrayHasPrefix(byte[] prefix, byte[] byteArray)
- {
- if (prefix == null || byteArray == null || prefix.Length > byteArray.Length)
- {
- return false;
- }
-
- for (int i = 0; i < prefix.Length; i++)
- {
- if (prefix[i] != byteArray[i])
- {
- return false;
- }
- }
-
- return true;
- }
-
private static readonly char[] s_parseContentTypeSeparators = new char[] { ';', '=', ' ' };
private static readonly Encoding[] s_knownEncodings = { Encoding.UTF8, Encoding.UTF32, Encoding.Unicode, Encoding.BigEndianUnicode };
@@ -1147,13 +1129,12 @@ namespace System.Net
if (enc == null)
{
// UTF32 must be tested before Unicode because it's BOM is the same but longer.
- Encoding[] encodings = s_knownEncodings;
- for (int i = 0; i < encodings.Length; i++)
+ foreach (Encoding encoding in s_knownEncodings)
{
- byte[] preamble = encodings[i].GetPreamble();
- if (ByteArrayHasPrefix(preamble, data))
+ ReadOnlySpan<byte> preamble = encoding.Preamble;
+ if (data.AsSpan().StartsWith(preamble))
{
- enc = encodings[i];
+ enc = encoding;
bomLengthInData = preamble.Length;
break;
}
@@ -1166,8 +1147,8 @@ namespace System.Net
// Calculate BOM length based on encoding guess. Then check for it in the data.
if (bomLengthInData == -1)
{
- byte[] preamble = enc.GetPreamble();
- bomLengthInData = ByteArrayHasPrefix(preamble, data) ? preamble.Length : 0;
+ ReadOnlySpan<byte> preamble = enc.Preamble;
+ bomLengthInData = data.AsSpan().StartsWith(preamble) ? preamble.Length : 0;
}
// Convert byte array to string stripping off any BOM before calling Format().
@@ -1187,88 +1168,9 @@ namespace System.Net
}
[return: NotNullIfNotNull(nameof(str))]
- private static string? UrlEncode(string? str)
- {
- if (str == null)
- return null;
- byte[] bytes = Encoding.UTF8.GetBytes(str);
- return Encoding.ASCII.GetString(UrlEncodeBytesToBytesInternal(bytes, 0, bytes.Length, false));
- }
-
- private static byte[] UrlEncodeBytesToBytesInternal(byte[] bytes, int offset, int count, bool alwaysCreateReturnValue)
- {
- int cSpaces = 0;
- int cUnsafe = 0;
-
- // Count them first.
- for (int i = 0; i < count; i++)
- {
- char ch = (char)bytes[offset + i];
-
- if (ch == ' ')
- {
- cSpaces++;
- }
- else if (!IsSafe(ch))
- {
- cUnsafe++;
- }
- }
-
- // If nothing to expand.
- if (!alwaysCreateReturnValue && cSpaces == 0 && cUnsafe == 0)
- return bytes;
-
- // Expand not 'safe' characters into %XX, spaces to +.
- byte[] expandedBytes = new byte[count + cUnsafe * 2];
- int pos = 0;
-
- for (int i = 0; i < count; i++)
- {
- byte b = bytes[offset + i];
- char ch = (char)b;
-
- if (IsSafe(ch))
- {
- expandedBytes[pos++] = b;
- }
- else if (ch == ' ')
- {
- expandedBytes[pos++] = (byte)'+';
- }
- else
- {
- expandedBytes[pos++] = (byte)'%';
- expandedBytes[pos++] = (byte)HexConverter.ToCharLower(b >> 4);
- expandedBytes[pos++] = (byte)HexConverter.ToCharLower(b);
- }
- }
-
- return expandedBytes;
- }
-
- private static bool IsSafe(char ch)
- {
- if (char.IsAsciiLetterOrDigit(ch))
- {
- return true;
- }
-
- switch (ch)
- {
- case '-':
- case '_':
- case '.':
- case '!':
- case '*':
- case '\'':
- case '(':
- case ')':
- return true;
- }
-
- return false;
- }
+ private static string? UrlEncode(string? str) =>
+ str is null ? null :
+ WebUtility.UrlEncode(str);
private void InvokeOperationCompleted(AsyncOperation asyncOp, SendOrPostCallback callback, AsyncCompletedEventArgs eventArgs)
{
diff --git a/src/libraries/System.Numerics.Vectors/System.Numerics.Vectors.sln b/src/libraries/System.Numerics.Vectors/System.Numerics.Vectors.sln
index 6298764ad65..84750edc458 100644
--- a/src/libraries/System.Numerics.Vectors/System.Numerics.Vectors.sln
+++ b/src/libraries/System.Numerics.Vectors/System.Numerics.Vectors.sln
@@ -11,6 +11,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Numerics.Vectors.Tes
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{88F4A78E-4EF9-4EB6-995E-CD24152C4704}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{1542B12A-6A37-49F9-B87B-4B1BB1F689E4}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{547EC332-29FE-47A8-B477-4E19BE521235}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{F99EAF58-533E-4941-A0C5-5101309D8AB9}"
@@ -69,11 +71,8 @@ Global
{9EDBE037-EFE0-4B72-B602-E4C3F0C05F2F}.Release|x86.ActiveCfg = Release|Any CPU
{9EDBE037-EFE0-4B72-B602-E4C3F0C05F2F}.Release|x86.Build.0 = Release|Any CPU
{9EDBE037-EFE0-4B72-B602-E4C3F0C05F2F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {9EDBE037-EFE0-4B72-B602-E4C3F0C05F2F}.Checked|Any CPU.Build.0 = Debug|Any CPU
{9EDBE037-EFE0-4B72-B602-E4C3F0C05F2F}.Checked|x64.ActiveCfg = Debug|Any CPU
- {9EDBE037-EFE0-4B72-B602-E4C3F0C05F2F}.Checked|x64.Build.0 = Debug|Any CPU
{9EDBE037-EFE0-4B72-B602-E4C3F0C05F2F}.Checked|x86.ActiveCfg = Debug|Any CPU
- {9EDBE037-EFE0-4B72-B602-E4C3F0C05F2F}.Checked|x86.Build.0 = Debug|Any CPU
{5B2027FA-F43A-4E80-880F-B3A7A2720AA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5B2027FA-F43A-4E80-880F-B3A7A2720AA7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5B2027FA-F43A-4E80-880F-B3A7A2720AA7}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -87,11 +86,8 @@ Global
{5B2027FA-F43A-4E80-880F-B3A7A2720AA7}.Release|x86.ActiveCfg = Release|Any CPU
{5B2027FA-F43A-4E80-880F-B3A7A2720AA7}.Release|x86.Build.0 = Release|Any CPU
{5B2027FA-F43A-4E80-880F-B3A7A2720AA7}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {5B2027FA-F43A-4E80-880F-B3A7A2720AA7}.Checked|Any CPU.Build.0 = Debug|Any CPU
{5B2027FA-F43A-4E80-880F-B3A7A2720AA7}.Checked|x64.ActiveCfg = Debug|Any CPU
- {5B2027FA-F43A-4E80-880F-B3A7A2720AA7}.Checked|x64.Build.0 = Debug|Any CPU
{5B2027FA-F43A-4E80-880F-B3A7A2720AA7}.Checked|x86.ActiveCfg = Debug|Any CPU
- {5B2027FA-F43A-4E80-880F-B3A7A2720AA7}.Checked|x86.Build.0 = Debug|Any CPU
{ED450846-85A0-4CED-B4D9-9EB769CF794B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ED450846-85A0-4CED-B4D9-9EB769CF794B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ED450846-85A0-4CED-B4D9-9EB769CF794B}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -105,11 +101,8 @@ Global
{ED450846-85A0-4CED-B4D9-9EB769CF794B}.Release|x86.ActiveCfg = Release|Any CPU
{ED450846-85A0-4CED-B4D9-9EB769CF794B}.Release|x86.Build.0 = Release|Any CPU
{ED450846-85A0-4CED-B4D9-9EB769CF794B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {ED450846-85A0-4CED-B4D9-9EB769CF794B}.Checked|Any CPU.Build.0 = Debug|Any CPU
{ED450846-85A0-4CED-B4D9-9EB769CF794B}.Checked|x64.ActiveCfg = Debug|Any CPU
- {ED450846-85A0-4CED-B4D9-9EB769CF794B}.Checked|x64.Build.0 = Debug|Any CPU
{ED450846-85A0-4CED-B4D9-9EB769CF794B}.Checked|x86.ActiveCfg = Debug|Any CPU
- {ED450846-85A0-4CED-B4D9-9EB769CF794B}.Checked|x86.Build.0 = Debug|Any CPU
{B38797B1-BB45-4B30-9D4F-79D9F4B3735B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B38797B1-BB45-4B30-9D4F-79D9F4B3735B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B38797B1-BB45-4B30-9D4F-79D9F4B3735B}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -123,11 +116,8 @@ Global
{B38797B1-BB45-4B30-9D4F-79D9F4B3735B}.Release|x86.ActiveCfg = Release|Any CPU
{B38797B1-BB45-4B30-9D4F-79D9F4B3735B}.Release|x86.Build.0 = Release|Any CPU
{B38797B1-BB45-4B30-9D4F-79D9F4B3735B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {B38797B1-BB45-4B30-9D4F-79D9F4B3735B}.Checked|Any CPU.Build.0 = Debug|Any CPU
{B38797B1-BB45-4B30-9D4F-79D9F4B3735B}.Checked|x64.ActiveCfg = Debug|Any CPU
- {B38797B1-BB45-4B30-9D4F-79D9F4B3735B}.Checked|x64.Build.0 = Debug|Any CPU
{B38797B1-BB45-4B30-9D4F-79D9F4B3735B}.Checked|x86.ActiveCfg = Debug|Any CPU
- {B38797B1-BB45-4B30-9D4F-79D9F4B3735B}.Checked|x86.Build.0 = Debug|Any CPU
{88F4A78E-4EF9-4EB6-995E-CD24152C4704}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{88F4A78E-4EF9-4EB6-995E-CD24152C4704}.Debug|Any CPU.Build.0 = Debug|Any CPU
{88F4A78E-4EF9-4EB6-995E-CD24152C4704}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -141,11 +131,23 @@ Global
{88F4A78E-4EF9-4EB6-995E-CD24152C4704}.Release|x86.ActiveCfg = Release|Any CPU
{88F4A78E-4EF9-4EB6-995E-CD24152C4704}.Release|x86.Build.0 = Release|Any CPU
{88F4A78E-4EF9-4EB6-995E-CD24152C4704}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {88F4A78E-4EF9-4EB6-995E-CD24152C4704}.Checked|Any CPU.Build.0 = Debug|Any CPU
{88F4A78E-4EF9-4EB6-995E-CD24152C4704}.Checked|x64.ActiveCfg = Debug|Any CPU
- {88F4A78E-4EF9-4EB6-995E-CD24152C4704}.Checked|x64.Build.0 = Debug|Any CPU
{88F4A78E-4EF9-4EB6-995E-CD24152C4704}.Checked|x86.ActiveCfg = Debug|Any CPU
- {88F4A78E-4EF9-4EB6-995E-CD24152C4704}.Checked|x86.Build.0 = Debug|Any CPU
+ {1542B12A-6A37-49F9-B87B-4B1BB1F689E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1542B12A-6A37-49F9-B87B-4B1BB1F689E4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1542B12A-6A37-49F9-B87B-4B1BB1F689E4}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {1542B12A-6A37-49F9-B87B-4B1BB1F689E4}.Debug|x64.Build.0 = Debug|Any CPU
+ {1542B12A-6A37-49F9-B87B-4B1BB1F689E4}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {1542B12A-6A37-49F9-B87B-4B1BB1F689E4}.Debug|x86.Build.0 = Debug|Any CPU
+ {1542B12A-6A37-49F9-B87B-4B1BB1F689E4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1542B12A-6A37-49F9-B87B-4B1BB1F689E4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1542B12A-6A37-49F9-B87B-4B1BB1F689E4}.Release|x64.ActiveCfg = Release|Any CPU
+ {1542B12A-6A37-49F9-B87B-4B1BB1F689E4}.Release|x64.Build.0 = Release|Any CPU
+ {1542B12A-6A37-49F9-B87B-4B1BB1F689E4}.Release|x86.ActiveCfg = Release|Any CPU
+ {1542B12A-6A37-49F9-B87B-4B1BB1F689E4}.Release|x86.Build.0 = Release|Any CPU
+ {1542B12A-6A37-49F9-B87B-4B1BB1F689E4}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {1542B12A-6A37-49F9-B87B-4B1BB1F689E4}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {1542B12A-6A37-49F9-B87B-4B1BB1F689E4}.Checked|x86.ActiveCfg = Debug|Any CPU
{547EC332-29FE-47A8-B477-4E19BE521235}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{547EC332-29FE-47A8-B477-4E19BE521235}.Debug|Any CPU.Build.0 = Debug|Any CPU
{547EC332-29FE-47A8-B477-4E19BE521235}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -159,11 +161,8 @@ Global
{547EC332-29FE-47A8-B477-4E19BE521235}.Release|x86.ActiveCfg = Release|Any CPU
{547EC332-29FE-47A8-B477-4E19BE521235}.Release|x86.Build.0 = Release|Any CPU
{547EC332-29FE-47A8-B477-4E19BE521235}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {547EC332-29FE-47A8-B477-4E19BE521235}.Checked|Any CPU.Build.0 = Debug|Any CPU
{547EC332-29FE-47A8-B477-4E19BE521235}.Checked|x64.ActiveCfg = Debug|Any CPU
- {547EC332-29FE-47A8-B477-4E19BE521235}.Checked|x64.Build.0 = Debug|Any CPU
{547EC332-29FE-47A8-B477-4E19BE521235}.Checked|x86.ActiveCfg = Debug|Any CPU
- {547EC332-29FE-47A8-B477-4E19BE521235}.Checked|x86.Build.0 = Debug|Any CPU
{F99EAF58-533E-4941-A0C5-5101309D8AB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F99EAF58-533E-4941-A0C5-5101309D8AB9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F99EAF58-533E-4941-A0C5-5101309D8AB9}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -177,11 +176,8 @@ Global
{F99EAF58-533E-4941-A0C5-5101309D8AB9}.Release|x86.ActiveCfg = Release|Any CPU
{F99EAF58-533E-4941-A0C5-5101309D8AB9}.Release|x86.Build.0 = Release|Any CPU
{F99EAF58-533E-4941-A0C5-5101309D8AB9}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {F99EAF58-533E-4941-A0C5-5101309D8AB9}.Checked|Any CPU.Build.0 = Debug|Any CPU
{F99EAF58-533E-4941-A0C5-5101309D8AB9}.Checked|x64.ActiveCfg = Debug|Any CPU
- {F99EAF58-533E-4941-A0C5-5101309D8AB9}.Checked|x64.Build.0 = Debug|Any CPU
{F99EAF58-533E-4941-A0C5-5101309D8AB9}.Checked|x86.ActiveCfg = Debug|Any CPU
- {F99EAF58-533E-4941-A0C5-5101309D8AB9}.Checked|x86.Build.0 = Debug|Any CPU
{728E34E5-10B0-4181-940B-EB3FB7784DFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{728E34E5-10B0-4181-940B-EB3FB7784DFA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{728E34E5-10B0-4181-940B-EB3FB7784DFA}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -195,11 +191,8 @@ Global
{728E34E5-10B0-4181-940B-EB3FB7784DFA}.Release|x86.ActiveCfg = Release|Any CPU
{728E34E5-10B0-4181-940B-EB3FB7784DFA}.Release|x86.Build.0 = Release|Any CPU
{728E34E5-10B0-4181-940B-EB3FB7784DFA}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {728E34E5-10B0-4181-940B-EB3FB7784DFA}.Checked|Any CPU.Build.0 = Debug|Any CPU
{728E34E5-10B0-4181-940B-EB3FB7784DFA}.Checked|x64.ActiveCfg = Debug|Any CPU
- {728E34E5-10B0-4181-940B-EB3FB7784DFA}.Checked|x64.Build.0 = Debug|Any CPU
{728E34E5-10B0-4181-940B-EB3FB7784DFA}.Checked|x86.ActiveCfg = Debug|Any CPU
- {728E34E5-10B0-4181-940B-EB3FB7784DFA}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -210,6 +203,7 @@ Global
{9EDBE037-EFE0-4B72-B602-E4C3F0C05F2F} = {2C4425BA-8478-4BCB-B616-E6FC28ADEAB9}
{B38797B1-BB45-4B30-9D4F-79D9F4B3735B} = {2C4425BA-8478-4BCB-B616-E6FC28ADEAB9}
{5B2027FA-F43A-4E80-880F-B3A7A2720AA7} = {ED90FF1C-59D4-4AB0-860E-2872ECA1BFEC}
+ {1542B12A-6A37-49F9-B87B-4B1BB1F689E4} = {ED90FF1C-59D4-4AB0-860E-2872ECA1BFEC}
{728E34E5-10B0-4181-940B-EB3FB7784DFA} = {ED90FF1C-59D4-4AB0-860E-2872ECA1BFEC}
{88F4A78E-4EF9-4EB6-995E-CD24152C4704} = {38837FDE-8CFE-4676-B3CE-48165E0FD6CF}
{547EC332-29FE-47A8-B477-4E19BE521235} = {38837FDE-8CFE-4676-B3CE-48165E0FD6CF}
diff --git a/src/libraries/System.Numerics.Vectors/tests/GenericVectorTests.cs b/src/libraries/System.Numerics.Vectors/tests/GenericVectorTests.cs
index 3d095d04b64..a655f54590d 100644
--- a/src/libraries/System.Numerics.Vectors/tests/GenericVectorTests.cs
+++ b/src/libraries/System.Numerics.Vectors/tests/GenericVectorTests.cs
@@ -25,6 +25,13 @@ namespace System.Numerics.Tests
dummy = System.Numerics.Vector<float>.One;
}
+ [Fact]
+ public unsafe void IsHardwareAcceleratedTest()
+ {
+ MethodInfo methodInfo = typeof(Vector).GetMethod("get_IsHardwareAccelerated");
+ Assert.Equal(Vector.IsHardwareAccelerated, methodInfo.Invoke(null, null));
+ }
+
#region Constructor Tests
[Fact]
diff --git a/src/libraries/System.Private.CoreLib/gen/EventSourceGenerator.Parser.cs b/src/libraries/System.Private.CoreLib/gen/EventSourceGenerator.Parser.cs
index b438859ebbf..fa2e1a2fc85 100644
--- a/src/libraries/System.Private.CoreLib/gen/EventSourceGenerator.Parser.cs
+++ b/src/libraries/System.Private.CoreLib/gen/EventSourceGenerator.Parser.cs
@@ -9,7 +9,6 @@ using System.Text;
using System.Threading;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp.Syntax;
-using GeneratorAttributeSyntaxContext = Microsoft.CodeAnalysis.DotnetRuntime.Extensions.GeneratorAttributeSyntaxContext;
namespace Generators
{
diff --git a/src/libraries/System.Private.CoreLib/gen/EventSourceGenerator.cs b/src/libraries/System.Private.CoreLib/gen/EventSourceGenerator.cs
index e57f11d6f4e..90ea79020dd 100644
--- a/src/libraries/System.Private.CoreLib/gen/EventSourceGenerator.cs
+++ b/src/libraries/System.Private.CoreLib/gen/EventSourceGenerator.cs
@@ -7,7 +7,6 @@ using System.Collections.Immutable;
using System.Threading;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp.Syntax;
-using Microsoft.CodeAnalysis.DotnetRuntime.Extensions;
namespace Generators
{
@@ -40,7 +39,6 @@ namespace Generators
IncrementalValuesProvider<EventSourceClass> eventSourceClasses =
context.SyntaxProvider.ForAttributeWithMetadataName(
- context,
EventSourceAutoGenerateAttribute,
(node, _) => node is ClassDeclarationSyntax,
GetSemanticTargetForGeneration)
diff --git a/src/libraries/System.Private.CoreLib/gen/System.Private.CoreLib.Generators.csproj b/src/libraries/System.Private.CoreLib/gen/System.Private.CoreLib.Generators.csproj
index 90d6ae99bb2..d7db8cf0a39 100644
--- a/src/libraries/System.Private.CoreLib/gen/System.Private.CoreLib.Generators.csproj
+++ b/src/libraries/System.Private.CoreLib/gen/System.Private.CoreLib.Generators.csproj
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
- <LangVersion>10.0</LangVersion>
<NoWarn>$(NoWarn);CS3001</NoWarn>
</PropertyGroup>
@@ -13,16 +12,6 @@
</ItemGroup>
<ItemGroup>
- <Compile Include="$(CommonPath)Roslyn\GetBestTypeByMetadataName.cs" Link="Common\Roslyn\GetBestTypeByMetadataName.cs" />
- <Compile Include="$(CommonPath)Roslyn\Hash.cs" Link="Common\Roslyn\Hash.cs" />
- <Compile Include="$(CommonPath)Roslyn\ISyntaxHelper.cs" Link="Common\Roslyn\ISyntaxHelper.cs" />
- <Compile Include="$(CommonPath)Roslyn\CSharpSyntaxHelper.cs" Link="Common\Roslyn\CSharpSyntaxHelper.cs" />
- <Compile Include="$(CommonPath)Roslyn\GlobalAliases.cs" Link="Common\Roslyn\GlobalAliases.cs" />
- <Compile Include="$(CommonPath)Roslyn\SyntaxNodeGrouping.cs" Link="Common\Roslyn\SyntaxNodeGrouping.cs" />
- <Compile Include="$(CommonPath)Roslyn\SyntaxValueProvider.ImmutableArrayValueComparer.cs" Link="Common\Roslyn\SyntaxValueProvider.ImmutableArrayValueComparer.cs" />
- <Compile Include="$(CommonPath)Roslyn\SyntaxValueProvider_ForAttributeWithMetadataName.cs" Link="Common\Roslyn\SyntaxValueProvider_ForAttributeWithMetadataName.cs" />
- <Compile Include="$(CommonPath)Roslyn\SyntaxValueProvider_ForAttributeWithSimpleName.cs" Link="Common\Roslyn\SyntaxValueProvider_ForAttributeWithSimpleName.cs" />
-
<Compile Include="$(CoreLibSharedDir)System\Collections\Generic\ValueListBuilder.cs" Link="Production\ValueListBuilder.cs" />
<Compile Include="$(CoreLibSharedDir)System\Collections\Generic\ValueListBuilder.Pop.cs" Link="Production\ValueListBuilder.Pop.cs" />
</ItemGroup>
diff --git a/src/libraries/System.Private.CoreLib/src/ILLink/ILLink.Descriptors.LibraryBuild.xml b/src/libraries/System.Private.CoreLib/src/ILLink/ILLink.Descriptors.LibraryBuild.xml
index ee28b6e38cf..d7380437c86 100644
--- a/src/libraries/System.Private.CoreLib/src/ILLink/ILLink.Descriptors.LibraryBuild.xml
+++ b/src/libraries/System.Private.CoreLib/src/ILLink/ILLink.Descriptors.LibraryBuild.xml
@@ -8,5 +8,27 @@
<!-- Used by VS4Mac via reflection to symbolize stack traces -->
<method name="GetMethodFromNativeIP" />
</type>
+ <type fullname="System.Runtime.Serialization.SerializationInfo">
+ <!-- Used by System.Runtime.Serialization.Formatters via reflection -->
+ <method name="UpdateValue" />
+ <method name="ThrowIfDeserializationInProgress" />
+ </type>
+ <type fullname="Internal.Runtime.InteropServices.ComActivator">
+ <!-- Used by hostpolicy.cpp -->
+ <method name="GetClassFactoryForTypeInternal" />
+ <method name="RegisterClassForTypeInternal" />
+ <method name="UnregisterClassForTypeInternal" />
+ </type>
+ <type fullname="Internal.Runtime.InteropServices.InMemoryAssemblyLoader">
+ <!-- Used by hostpolicy.cpp -->
+ <method name="LoadInMemoryAssembly" />
+ <!-- Used by ijwhost.cpp -->
+ <method name="LoadInMemoryAssemblyInContext" />
+ </type>
+ <type fullname="Internal.Runtime.InteropServices.ComponentActivator">
+ <!-- Used by hostpolicy.cpp -->
+ <method name="LoadAssemblyAndGetFunctionPointer" />
+ <method name="GetFunctionPointer" />
+ </type>
</assembly>
</linker>
diff --git a/src/libraries/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComponentActivator.cs b/src/libraries/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComponentActivator.cs
index 50f7a5eff13..12961f17bdb 100644
--- a/src/libraries/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComponentActivator.cs
+++ b/src/libraries/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComponentActivator.cs
@@ -11,7 +11,7 @@ using System.Runtime.Versioning;
namespace Internal.Runtime.InteropServices
{
- public static partial class ComponentActivator
+ internal static partial class ComponentActivator
{
private const string TrimIncompatibleWarningMessage = "Native hosting is not trim compatible and this warning will be seen if trimming is enabled.";
private const string NativeAOTIncompatibleWarningMessage = "The native code for the method requested might not be available at runtime.";
diff --git a/src/libraries/System.Private.CoreLib/src/Resources/Strings.resx b/src/libraries/System.Private.CoreLib/src/Resources/Strings.resx
index b961ea2eea7..762886be5e9 100644
--- a/src/libraries/System.Private.CoreLib/src/Resources/Strings.resx
+++ b/src/libraries/System.Private.CoreLib/src/Resources/Strings.resx
@@ -229,6 +229,9 @@
<data name="Arg_CannotHaveNegativeValue" xml:space="preserve">
<value>String cannot contain a minus sign if the base is not 10.</value>
</data>
+ <data name="Arg_CannotMarshal" xml:space="preserve">
+ <value>Type '{0}' cannot be marshaled as an unmanaged structure; no meaningful size or offset can be computed.</value>
+ </data>
<data name="Arg_CannotMixComparisonInfrastructure" xml:space="preserve">
<value>The usage of IKeyComparer and IHashCodeProvider/IComparer interfaces cannot be mixed; use one or the other.</value>
</data>
diff --git a/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems b/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems
index b12227e70d5..e4f97a37356 100644
--- a/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems
+++ b/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems
@@ -187,6 +187,7 @@
<Compile Include="$(MSBuildThisFileDirectory)System\Collections\Concurrent\IProducerConsumerCollectionDebugView.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Collections\DictionaryEntry.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Collections\Generic\ArraySortHelper.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Collections\Generic\CollectionExtensions.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Collections\Generic\Comparer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Collections\Generic\Dictionary.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Collections\Generic\EqualityComparer.cs" />
@@ -530,6 +531,7 @@
<Compile Include="$(MSBuildThisFileDirectory)System\Numerics\Matrix4x4.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Numerics\Plane.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Numerics\Quaternion.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Numerics\TotalOrderIeee754Comparer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Numerics\Vector.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Numerics\Vector_1.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Numerics\Vector2.cs" />
@@ -603,6 +605,7 @@
<Compile Include="$(MSBuildThisFileDirectory)System\Reflection\DefaultMemberAttribute.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Reflection\Emit\AssemblyBuilder.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Reflection\Emit\AssemblyBuilderAccess.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Reflection\Emit\DynamicMethod.cs" Condition="'$(FeatureNativeAot)' != 'true'" />
<Compile Include="$(MSBuildThisFileDirectory)System\Reflection\Emit\EmptyCAHolder.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Reflection\Emit\FlowControl.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Reflection\Emit\Label.cs" />
@@ -2292,7 +2295,7 @@
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)System\IO\FileStatus.SetTimes.OSX.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(IsiOSLike)' == 'true'">
+ <ItemGroup Condition="'$(IsiOSLike)' == 'true' or '$(IsOSXLike)' == 'true'">
<Compile Include="$(CommonPath)Interop\OSX\System.Native\Interop.SearchPath.cs">
<Link>Common\Interop\OSX\Interop.SearchPath.cs</Link>
</Compile>
@@ -2462,4 +2465,7 @@
<Compile Include="$(MSBuildThisFileDirectory)System\Numerics\IUnaryPlusOperators.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Numerics\IUnsignedNumber.cs" />
</ItemGroup>
+ <ItemGroup Condition="'$(FeatureMono)' == 'true'">
+ <Compile Include="$(MSBuildThisFileDirectory)System\SpanHelpers.Mono.cs" />
+ </ItemGroup>
</Project>
diff --git a/src/libraries/System.Private.CoreLib/src/System/AppContext.cs b/src/libraries/System.Private.CoreLib/src/System/AppContext.cs
index d851869aae2..534922c8c24 100644
--- a/src/libraries/System.Private.CoreLib/src/System/AppContext.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/AppContext.cs
@@ -68,13 +68,13 @@ namespace System
#pragma warning disable CS0067 // events raised by the VM
[field: DynamicDependency(DynamicallyAccessedMemberTypes.PublicConstructors, typeof(UnhandledExceptionEventArgs))]
- public static event UnhandledExceptionEventHandler? UnhandledException;
+ internal static event UnhandledExceptionEventHandler? UnhandledException;
[field: DynamicDependency(DynamicallyAccessedMemberTypes.PublicConstructors, typeof(FirstChanceExceptionEventArgs))]
- public static event EventHandler<FirstChanceExceptionEventArgs>? FirstChanceException;
+ internal static event EventHandler<FirstChanceExceptionEventArgs>? FirstChanceException;
#pragma warning restore CS0067
- public static event EventHandler? ProcessExit;
+ internal static event EventHandler? ProcessExit;
internal static void OnProcessExit()
{
diff --git a/src/libraries/System.Private.CoreLib/src/System/Array.cs b/src/libraries/System.Private.CoreLib/src/System/Array.cs
index b665d3094e1..2e9f5f2e6c8 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Array.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Array.cs
@@ -32,8 +32,9 @@ namespace System
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
}
- // T[] implements IList<T>.
- return new ReadOnlyCollection<T>(array);
+ return array.Length == 0 ?
+ ReadOnlyCollection<T>.Empty :
+ new ReadOnlyCollection<T>(array);
}
public static void Resize<T>([NotNull] ref T[]? array, int newSize)
@@ -1344,28 +1345,18 @@ namespace System
}
else if (Unsafe.SizeOf<T>() == sizeof(int))
{
- int result = typeof(T).IsValueType
- ? SpanHelpers.IndexOfValueType(
- ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(Unsafe.As<int[]>(array)), startIndex),
- Unsafe.As<T, int>(ref value),
- count)
- : SpanHelpers.IndexOf(
- ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(Unsafe.As<int[]>(array)), startIndex),
- Unsafe.As<T, int>(ref value),
- count);
+ int result = SpanHelpers.IndexOfValueType(
+ ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(Unsafe.As<int[]>(array)), startIndex),
+ Unsafe.As<T, int>(ref value),
+ count);
return (result >= 0 ? startIndex : 0) + result;
}
else if (Unsafe.SizeOf<T>() == sizeof(long))
{
- int result = typeof(T).IsValueType
- ? SpanHelpers.IndexOfValueType(
- ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(Unsafe.As<long[]>(array)), startIndex),
- Unsafe.As<T, long>(ref value),
- count)
- : SpanHelpers.IndexOf(
- ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(Unsafe.As<long[]>(array)), startIndex),
- Unsafe.As<T, long>(ref value),
- count);
+ int result = SpanHelpers.IndexOfValueType(
+ ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(Unsafe.As<long[]>(array)), startIndex),
+ Unsafe.As<T, long>(ref value),
+ count);
return (result >= 0 ? startIndex : 0) + result;
}
}
diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/CollectionExtensions.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/CollectionExtensions.cs
new file mode 100644
index 00000000000..068536049a6
--- /dev/null
+++ b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/CollectionExtensions.cs
@@ -0,0 +1,164 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Collections.ObjectModel;
+using System.Diagnostics.CodeAnalysis;
+
+namespace System.Collections.Generic
+{
+ public static class CollectionExtensions
+ {
+ public static TValue? GetValueOrDefault<TKey, TValue>(this IReadOnlyDictionary<TKey, TValue> dictionary, TKey key) =>
+ dictionary.GetValueOrDefault(key, default!);
+
+ public static TValue GetValueOrDefault<TKey, TValue>(this IReadOnlyDictionary<TKey, TValue> dictionary, TKey key, TValue defaultValue)
+ {
+ if (dictionary is null)
+ {
+ ThrowHelper.ThrowArgumentNullException(ExceptionArgument.dictionary);
+ }
+
+ return dictionary.TryGetValue(key, out TValue? value) ? value : defaultValue;
+ }
+
+ public static bool TryAdd<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key, TValue value)
+ {
+ if (dictionary is null)
+ {
+ ThrowHelper.ThrowArgumentNullException(ExceptionArgument.dictionary);
+ }
+
+ if (!dictionary.ContainsKey(key))
+ {
+ dictionary.Add(key, value);
+ return true;
+ }
+
+ return false;
+ }
+
+ public static bool Remove<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key, [MaybeNullWhen(false)] out TValue value)
+ {
+ if (dictionary is null)
+ {
+ ThrowHelper.ThrowArgumentNullException(ExceptionArgument.dictionary);
+ }
+
+ if (dictionary.TryGetValue(key, out value))
+ {
+ dictionary.Remove(key);
+ return true;
+ }
+
+ value = default;
+ return false;
+ }
+
+ /// <summary>
+ /// Returns a read-only <see cref="ReadOnlyCollection{T}"/> wrapper
+ /// for the specified list.
+ /// </summary>
+ /// <typeparam name="T">The type of elements in the collection.</typeparam>
+ /// <param name="list">The list to wrap.</param>
+ /// <returns>An object that acts as a read-only wrapper around the current <see cref="IList{T}"/>.</returns>
+ /// <exception cref="ArgumentNullException"><paramref name="list"/> is null.</exception>
+ public static ReadOnlyCollection<T> AsReadOnly<T>(this IList<T> list) =>
+ new ReadOnlyCollection<T>(list);
+
+ /// <summary>
+ /// Returns a read-only <see cref="ReadOnlyDictionary{TKey, TValue}"/> wrapper
+ /// for the current dictionary.
+ /// </summary>
+ /// <typeparam name="TKey">The type of keys in the dictionary.</typeparam>
+ /// <typeparam name="TValue">The type of values in the dictionary.</typeparam>
+ /// <param name="dictionary">The dictionary to wrap.</param>
+ /// <returns>An object that acts as a read-only wrapper around the current <see cref="IDictionary{TKey, TValue}"/>.</returns>
+ /// <exception cref="ArgumentNullException"><paramref name="dictionary"/> is null.</exception>
+ public static ReadOnlyDictionary<TKey, TValue> AsReadOnly<TKey, TValue>(this IDictionary<TKey, TValue> dictionary) where TKey : notnull =>
+ new ReadOnlyDictionary<TKey, TValue>(dictionary);
+
+ /// <summary>Adds the elements of the specified span to the end of the <see cref="List{T}"/>.</summary>
+ /// <typeparam name="T">The type of elements in the list.</typeparam>
+ /// <param name="list">The list to which the elements should be added.</param>
+ /// <param name="source">The span whose elements should be added to the end of the <see cref="List{T}"/>.</param>
+ /// <exception cref="ArgumentNullException">The <paramref name="list"/> is null.</exception>
+ public static void AddRange<T>(this List<T> list, ReadOnlySpan<T> source)
+ {
+ if (list is null)
+ {
+ ThrowHelper.ThrowArgumentNullException(ExceptionArgument.list);
+ }
+
+ if (!source.IsEmpty)
+ {
+ if (list._items.Length - list._size < source.Length)
+ {
+ list.Grow(checked(list._size + source.Length));
+ }
+
+ source.CopyTo(list._items.AsSpan(list._size));
+ list._size += source.Length;
+ list._version++;
+ }
+ }
+
+ /// <summary>Inserts the elements of a span into the <see cref="List{T}"/> at the specified index.</summary>
+ /// <typeparam name="T">The type of elements in the list.</typeparam>
+ /// <param name="list">The list into which the elements should be inserted.</param>
+ /// <param name="index">The zero-based index at which the new elements should be inserted.</param>
+ /// <param name="source">The span whose elements should be added to the <see cref="List{T}"/>.</param>
+ /// <exception cref="ArgumentNullException">The <paramref name="list"/> is null.</exception>
+ /// <exception cref="ArgumentOutOfRangeException"><paramref name="index"/> is less than 0 or greater than <paramref name="list"/>'s <see cref="List{T}.Count"/>.</exception>
+ public static void InsertRange<T>(this List<T> list, int index, ReadOnlySpan<T> source)
+ {
+ if (list is null)
+ {
+ ThrowHelper.ThrowArgumentNullException(ExceptionArgument.list);
+ }
+
+ if ((uint)index > (uint)list._size)
+ {
+ ThrowHelper.ThrowArgumentOutOfRange_IndexMustBeLessOrEqualException();
+ }
+
+ if (!source.IsEmpty)
+ {
+ if (list._items.Length - list._size < source.Length)
+ {
+ list.Grow(checked(list._size + source.Length));
+ }
+
+ // If the index at which to insert is less than the number of items in the list,
+ // shift all items past that location in the list down to the end, making room
+ // to copy in the new data.
+ if (index < list._size)
+ {
+ Array.Copy(list._items, index, list._items, index + source.Length, list._size - index);
+ }
+
+ // Copy the source span into the list.
+ // Note that this does not handle the unsafe case of trying to insert a CollectionsMarshal.AsSpan(list)
+ // or some slice thereof back into the list itself; such an operation has undefined behavior.
+ source.CopyTo(list._items.AsSpan(index));
+ list._size += source.Length;
+ list._version++;
+ }
+ }
+
+ /// <summary>Copies the entire <see cref="List{T}"/> to a span.</summary>
+ /// <typeparam name="T">The type of elements in the list.</typeparam>
+ /// <param name="list">The list from which the elements are copied.</param>
+ /// <param name="destination">The span that is the destination of the elements copied from <paramref name="list"/>.</param>
+ /// <exception cref="ArgumentNullException">The <paramref name="list"/> is null.</exception>
+ /// <exception cref="ArgumentException">The number of elements in the source <see cref="List{T}"/> is greater than the number of elements that the destination span can contain.</exception>
+ public static void CopyTo<T>(this List<T> list, Span<T> destination)
+ {
+ if (list is null)
+ {
+ ThrowHelper.ThrowArgumentNullException(ExceptionArgument.list);
+ }
+
+ new ReadOnlySpan<T>(list._items, 0, list._size).CopyTo(destination);
+ }
+ }
+}
diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/Dictionary.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/Dictionary.cs
index b77d3a2e43b..870acdfbee6 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/Dictionary.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/Dictionary.cs
@@ -52,22 +52,31 @@ namespace System.Collections.Generic
Initialize(capacity);
}
- if (comparer is not null && comparer != EqualityComparer<TKey>.Default) // first check for null to avoid forcing default comparer instantiation unnecessarily
+ // For reference types, we always want to store a comparer instance, either
+ // the one provided, or if one wasn't provided, the default (accessing
+ // EqualityComparer<TKey>.Default with shared generics on every dictionary
+ // access can add measurable overhead). For value types, if no comparer is
+ // provided, or if the default is provided, we'd prefer to use
+ // EqualityComparer<TKey>.Default.Equals on every use, enabling the JIT to
+ // devirtualize and possibly inline the operation.
+ if (!typeof(TKey).IsValueType)
{
- _comparer = comparer;
- }
+ _comparer = comparer ?? EqualityComparer<TKey>.Default;
- // Special-case EqualityComparer<string>.Default, StringComparer.Ordinal, and StringComparer.OrdinalIgnoreCase.
- // We use a non-randomized comparer for improved perf, falling back to a randomized comparer if the
- // hash buckets become unbalanced.
- if (typeof(TKey) == typeof(string))
- {
- IEqualityComparer<string>? stringComparer = NonRandomizedStringEqualityComparer.GetStringComparer(_comparer);
- if (stringComparer is not null)
+ // Special-case EqualityComparer<string>.Default, StringComparer.Ordinal, and StringComparer.OrdinalIgnoreCase.
+ // We use a non-randomized comparer for improved perf, falling back to a randomized comparer if the
+ // hash buckets become unbalanced.
+ if (typeof(TKey) == typeof(string) &&
+ NonRandomizedStringEqualityComparer.GetStringComparer(_comparer!) is IEqualityComparer<string> stringComparer)
{
- _comparer = (IEqualityComparer<TKey>?)stringComparer;
+ _comparer = (IEqualityComparer<TKey>)stringComparer;
}
}
+ else if (comparer is not null && // first check for null to avoid forcing default comparer instantiation unnecessarily
+ comparer != EqualityComparer<TKey>.Default)
+ {
+ _comparer = comparer;
+ }
}
public Dictionary(IDictionary<TKey, TValue> dictionary) : this(dictionary, null) { }
@@ -161,7 +170,8 @@ namespace System.Collections.Generic
{
if (typeof(TKey) == typeof(string))
{
- return (IEqualityComparer<TKey>)IInternalStringEqualityComparer.GetUnderlyingEqualityComparer((IEqualityComparer<string?>?)_comparer);
+ Debug.Assert(_comparer is not null, "The comparer should never be null for a reference type.");
+ return (IEqualityComparer<TKey>)IInternalStringEqualityComparer.GetUnderlyingEqualityComparer((IEqualityComparer<string?>)_comparer);
}
else
{
@@ -362,76 +372,43 @@ namespace System.Collections.Generic
{
Debug.Assert(_entries != null, "expected entries to be != null");
IEqualityComparer<TKey>? comparer = _comparer;
- if (comparer == null)
+ if (typeof(TKey).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types
+ comparer == null)
{
uint hashCode = (uint)key.GetHashCode();
int i = GetBucket(hashCode);
Entry[]? entries = _entries;
uint collisionCount = 0;
- if (typeof(TKey).IsValueType)
- {
- // ValueType: Devirtualize with EqualityComparer<TValue>.Default intrinsic
-
- i--; // Value in _buckets is 1-based; subtract 1 from i. We do it here so it fuses with the following conditional.
- do
- {
- // Should be a while loop https://github.com/dotnet/runtime/issues/9422
- // Test in if to drop range check for following array access
- if ((uint)i >= (uint)entries.Length)
- {
- goto ReturnNotFound;
- }
- entry = ref entries[i];
- if (entry.hashCode == hashCode && EqualityComparer<TKey>.Default.Equals(entry.key, key))
- {
- goto ReturnFound;
- }
-
- i = entry.next;
-
- collisionCount++;
- } while (collisionCount <= (uint)entries.Length);
-
- // The chain of entries forms a loop; which means a concurrent update has happened.
- // Break out of the loop and throw, rather than looping forever.
- goto ConcurrentOperation;
- }
- else
+ // ValueType: Devirtualize with EqualityComparer<TValue>.Default intrinsic
+ i--; // Value in _buckets is 1-based; subtract 1 from i. We do it here so it fuses with the following conditional.
+ do
{
- // Object type: Shared Generic, EqualityComparer<TValue>.Default won't devirtualize
- // https://github.com/dotnet/runtime/issues/10050
- // So cache in a local rather than get EqualityComparer per loop iteration
- EqualityComparer<TKey> defaultComparer = EqualityComparer<TKey>.Default;
-
- i--; // Value in _buckets is 1-based; subtract 1 from i. We do it here so it fuses with the following conditional.
- do
+ // Should be a while loop https://github.com/dotnet/runtime/issues/9422
+ // Test in if to drop range check for following array access
+ if ((uint)i >= (uint)entries.Length)
{
- // Should be a while loop https://github.com/dotnet/runtime/issues/9422
- // Test in if to drop range check for following array access
- if ((uint)i >= (uint)entries.Length)
- {
- goto ReturnNotFound;
- }
+ goto ReturnNotFound;
+ }
- entry = ref entries[i];
- if (entry.hashCode == hashCode && defaultComparer.Equals(entry.key, key))
- {
- goto ReturnFound;
- }
+ entry = ref entries[i];
+ if (entry.hashCode == hashCode && EqualityComparer<TKey>.Default.Equals(entry.key, key))
+ {
+ goto ReturnFound;
+ }
- i = entry.next;
+ i = entry.next;
- collisionCount++;
- } while (collisionCount <= (uint)entries.Length);
+ collisionCount++;
+ } while (collisionCount <= (uint)entries.Length);
- // The chain of entries forms a loop; which means a concurrent update has happened.
- // Break out of the loop and throw, rather than looping forever.
- goto ConcurrentOperation;
- }
+ // The chain of entries forms a loop; which means a concurrent update has happened.
+ // Break out of the loop and throw, rather than looping forever.
+ goto ConcurrentOperation;
}
else
{
+ Debug.Assert(comparer is not null);
uint hashCode = (uint)comparer.GetHashCode(key);
int i = GetBucket(hashCode);
Entry[]? entries = _entries;
@@ -513,98 +490,56 @@ namespace System.Collections.Generic
Debug.Assert(entries != null, "expected entries to be non-null");
IEqualityComparer<TKey>? comparer = _comparer;
- uint hashCode = (uint)((comparer == null) ? key.GetHashCode() : comparer.GetHashCode(key));
+ Debug.Assert(comparer is not null || typeof(TKey).IsValueType);
+ uint hashCode = (uint)((typeof(TKey).IsValueType && comparer == null) ? key.GetHashCode() : comparer!.GetHashCode(key));
uint collisionCount = 0;
ref int bucket = ref GetBucket(hashCode);
int i = bucket - 1; // Value in _buckets is 1-based
- if (comparer == null)
+ if (typeof(TKey).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types
+ comparer == null)
{
- if (typeof(TKey).IsValueType)
+ // ValueType: Devirtualize with EqualityComparer<TValue>.Default intrinsic
+ while (true)
{
- // ValueType: Devirtualize with EqualityComparer<TValue>.Default intrinsic
- while (true)
+ // Should be a while loop https://github.com/dotnet/runtime/issues/9422
+ // Test uint in if rather than loop condition to drop range check for following array access
+ if ((uint)i >= (uint)entries.Length)
{
- // Should be a while loop https://github.com/dotnet/runtime/issues/9422
- // Test uint in if rather than loop condition to drop range check for following array access
- if ((uint)i >= (uint)entries.Length)
- {
- break;
- }
-
- if (entries[i].hashCode == hashCode && EqualityComparer<TKey>.Default.Equals(entries[i].key, key))
- {
- if (behavior == InsertionBehavior.OverwriteExisting)
- {
- entries[i].value = value;
- return true;
- }
-
- if (behavior == InsertionBehavior.ThrowOnExisting)
- {
- ThrowHelper.ThrowAddingDuplicateWithKeyArgumentException(key);
- }
-
- return false;
- }
-
- i = entries[i].next;
-
- collisionCount++;
- if (collisionCount > (uint)entries.Length)
- {
- // The chain of entries forms a loop; which means a concurrent update has happened.
- // Break out of the loop and throw, rather than looping forever.
- ThrowHelper.ThrowInvalidOperationException_ConcurrentOperationsNotSupported();
- }
+ break;
}
- }
- else
- {
- // Object type: Shared Generic, EqualityComparer<TValue>.Default won't devirtualize
- // https://github.com/dotnet/runtime/issues/10050
- // So cache in a local rather than get EqualityComparer per loop iteration
- EqualityComparer<TKey> defaultComparer = EqualityComparer<TKey>.Default;
- while (true)
+
+ if (entries[i].hashCode == hashCode && EqualityComparer<TKey>.Default.Equals(entries[i].key, key))
{
- // Should be a while loop https://github.com/dotnet/runtime/issues/9422
- // Test uint in if rather than loop condition to drop range check for following array access
- if ((uint)i >= (uint)entries.Length)
+ if (behavior == InsertionBehavior.OverwriteExisting)
{
- break;
+ entries[i].value = value;
+ return true;
}
- if (entries[i].hashCode == hashCode && defaultComparer.Equals(entries[i].key, key))
+ if (behavior == InsertionBehavior.ThrowOnExisting)
{
- if (behavior == InsertionBehavior.OverwriteExisting)
- {
- entries[i].value = value;
- return true;
- }
-
- if (behavior == InsertionBehavior.ThrowOnExisting)
- {
- ThrowHelper.ThrowAddingDuplicateWithKeyArgumentException(key);
- }
-
- return false;
+ ThrowHelper.ThrowAddingDuplicateWithKeyArgumentException(key);
}
- i = entries[i].next;
+ return false;
+ }
- collisionCount++;
- if (collisionCount > (uint)entries.Length)
- {
- // The chain of entries forms a loop; which means a concurrent update has happened.
- // Break out of the loop and throw, rather than looping forever.
- ThrowHelper.ThrowInvalidOperationException_ConcurrentOperationsNotSupported();
- }
+ i = entries[i].next;
+
+ collisionCount++;
+ if (collisionCount > (uint)entries.Length)
+ {
+ // The chain of entries forms a loop; which means a concurrent update has happened.
+ // Break out of the loop and throw, rather than looping forever.
+ ThrowHelper.ThrowInvalidOperationException_ConcurrentOperationsNotSupported();
}
}
}
else
{
+ Debug.Assert(comparer is not null);
while (true)
{
// Should be a while loop https://github.com/dotnet/runtime/issues/9422
@@ -710,80 +645,47 @@ namespace System.Collections.Generic
Debug.Assert(entries != null, "expected entries to be non-null");
IEqualityComparer<TKey>? comparer = dictionary._comparer;
- uint hashCode = (uint)((comparer == null) ? key.GetHashCode() : comparer.GetHashCode(key));
+ Debug.Assert(comparer is not null || typeof(TKey).IsValueType);
+ uint hashCode = (uint)((typeof(TKey).IsValueType && comparer == null) ? key.GetHashCode() : comparer!.GetHashCode(key));
uint collisionCount = 0;
ref int bucket = ref dictionary.GetBucket(hashCode);
int i = bucket - 1; // Value in _buckets is 1-based
- if (comparer == null)
+ if (typeof(TKey).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types
+ comparer == null)
{
- if (typeof(TKey).IsValueType)
+ // ValueType: Devirtualize with EqualityComparer<TValue>.Default intrinsic
+ while (true)
{
- // ValueType: Devirtualize with EqualityComparer<TValue>.Default intrinsic
- while (true)
+ // Should be a while loop https://github.com/dotnet/runtime/issues/9422
+ // Test uint in if rather than loop condition to drop range check for following array access
+ if ((uint)i >= (uint)entries.Length)
{
- // Should be a while loop https://github.com/dotnet/runtime/issues/9422
- // Test uint in if rather than loop condition to drop range check for following array access
- if ((uint)i >= (uint)entries.Length)
- {
- break;
- }
-
- if (entries[i].hashCode == hashCode && EqualityComparer<TKey>.Default.Equals(entries[i].key, key))
- {
- exists = true;
-
- return ref entries[i].value!;
- }
-
- i = entries[i].next;
-
- collisionCount++;
- if (collisionCount > (uint)entries.Length)
- {
- // The chain of entries forms a loop; which means a concurrent update has happened.
- // Break out of the loop and throw, rather than looping forever.
- ThrowHelper.ThrowInvalidOperationException_ConcurrentOperationsNotSupported();
- }
+ break;
}
- }
- else
- {
- // Object type: Shared Generic, EqualityComparer<TValue>.Default won't devirtualize
- // https://github.com/dotnet/runtime/issues/10050
- // So cache in a local rather than get EqualityComparer per loop iteration
- EqualityComparer<TKey> defaultComparer = EqualityComparer<TKey>.Default;
- while (true)
+
+ if (entries[i].hashCode == hashCode && EqualityComparer<TKey>.Default.Equals(entries[i].key, key))
+ {
+ exists = true;
+
+ return ref entries[i].value!;
+ }
+
+ i = entries[i].next;
+
+ collisionCount++;
+ if (collisionCount > (uint)entries.Length)
{
- // Should be a while loop https://github.com/dotnet/runtime/issues/9422
- // Test uint in if rather than loop condition to drop range check for following array access
- if ((uint)i >= (uint)entries.Length)
- {
- break;
- }
-
- if (entries[i].hashCode == hashCode && defaultComparer.Equals(entries[i].key, key))
- {
- exists = true;
-
- return ref entries[i].value!;
- }
-
- i = entries[i].next;
-
- collisionCount++;
- if (collisionCount > (uint)entries.Length)
- {
- // The chain of entries forms a loop; which means a concurrent update has happened.
- // Break out of the loop and throw, rather than looping forever.
- ThrowHelper.ThrowInvalidOperationException_ConcurrentOperationsNotSupported();
- }
+ // The chain of entries forms a loop; which means a concurrent update has happened.
+ // Break out of the loop and throw, rather than looping forever.
+ ThrowHelper.ThrowInvalidOperationException_ConcurrentOperationsNotSupported();
}
}
}
else
{
+ Debug.Assert(comparer is not null);
while (true)
{
// Should be a while loop https://github.com/dotnet/runtime/issues/9422
@@ -929,20 +831,15 @@ namespace System.Collections.Generic
if (!typeof(TKey).IsValueType && forceNewHashCodes)
{
Debug.Assert(_comparer is NonRandomizedStringEqualityComparer);
- _comparer = (IEqualityComparer<TKey>)((NonRandomizedStringEqualityComparer)_comparer).GetRandomizedEqualityComparer();
+ IEqualityComparer<TKey> comparer = _comparer = (IEqualityComparer<TKey>)((NonRandomizedStringEqualityComparer)_comparer).GetRandomizedEqualityComparer();
for (int i = 0; i < count; i++)
{
if (entries[i].next >= -1)
{
- entries[i].hashCode = (uint)_comparer.GetHashCode(entries[i].key);
+ entries[i].hashCode = (uint)comparer.GetHashCode(entries[i].key);
}
}
-
- if (ReferenceEquals(_comparer, EqualityComparer<TKey>.Default))
- {
- _comparer = null;
- }
}
// Assign member variables after both arrays allocated to guard against corruption from OOM if second fails
@@ -978,7 +875,11 @@ namespace System.Collections.Generic
{
Debug.Assert(_entries != null, "entries should be non-null");
uint collisionCount = 0;
- uint hashCode = (uint)(_comparer?.GetHashCode(key) ?? key.GetHashCode());
+
+ IEqualityComparer<TKey>? comparer = _comparer;
+ Debug.Assert(typeof(TKey).IsValueType || comparer is not null);
+ uint hashCode = (uint)(typeof(TKey).IsValueType && comparer == null ? key.GetHashCode() : comparer!.GetHashCode(key));
+
ref int bucket = ref GetBucket(hashCode);
Entry[]? entries = _entries;
int last = -1;
@@ -987,7 +888,8 @@ namespace System.Collections.Generic
{
ref Entry entry = ref entries[i];
- if (entry.hashCode == hashCode && (_comparer?.Equals(entry.key, key) ?? EqualityComparer<TKey>.Default.Equals(entry.key, key)))
+ if (entry.hashCode == hashCode &&
+ (typeof(TKey).IsValueType && comparer == null ? EqualityComparer<TKey>.Default.Equals(entry.key, key) : comparer!.Equals(entry.key, key)))
{
if (last < 0)
{
@@ -1046,7 +948,11 @@ namespace System.Collections.Generic
{
Debug.Assert(_entries != null, "entries should be non-null");
uint collisionCount = 0;
- uint hashCode = (uint)(_comparer?.GetHashCode(key) ?? key.GetHashCode());
+
+ IEqualityComparer<TKey>? comparer = _comparer;
+ Debug.Assert(typeof(TKey).IsValueType || comparer is not null);
+ uint hashCode = (uint)(typeof(TKey).IsValueType && comparer == null ? key.GetHashCode() : comparer!.GetHashCode(key));
+
ref int bucket = ref GetBucket(hashCode);
Entry[]? entries = _entries;
int last = -1;
@@ -1055,7 +961,8 @@ namespace System.Collections.Generic
{
ref Entry entry = ref entries[i];
- if (entry.hashCode == hashCode && (_comparer?.Equals(entry.key, key) ?? EqualityComparer<TKey>.Default.Equals(entry.key, key)))
+ if (entry.hashCode == hashCode &&
+ (typeof(TKey).IsValueType && comparer == null ? EqualityComparer<TKey>.Default.Equals(entry.key, key) : comparer!.Equals(entry.key, key)))
{
if (last < 0)
{
@@ -1597,7 +1504,7 @@ namespace System.Collections.Generic
void ICollection<TKey>.Clear() =>
ThrowHelper.ThrowNotSupportedException(ExceptionResource.NotSupported_KeyCollectionSet);
- bool ICollection<TKey>.Contains(TKey item) =>
+ public bool Contains(TKey item) =>
_dictionary.ContainsKey(item);
bool ICollection<TKey>.Remove(TKey item)
diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.cs
index a4f392142bc..fbee608bbf4 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.cs
@@ -94,9 +94,11 @@ namespace System.Collections.Generic
_getHashCode = getHashCode;
}
- public override bool Equals(T? x, T? y) => _equals(x, y);
+ public override bool Equals(T? x, T? y) =>
+ _equals(x, y);
- public override int GetHashCode([DisallowNull] T obj) => _getHashCode(obj);
+ public override int GetHashCode([DisallowNull] T obj) =>
+ _getHashCode(obj);
public override bool Equals(object? obj) =>
obj is DelegateEqualityComparer<T> other &&
@@ -127,16 +129,15 @@ namespace System.Collections.Generic
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public override int GetHashCode([DisallowNull] T obj) => obj?.GetHashCode() ?? 0;
+ public override int GetHashCode([DisallowNull] T obj) =>
+ obj?.GetHashCode() ?? 0;
// Equals method for the comparer itself.
- // If in the future this type is made sealed, change the is check to obj != null && GetType() == obj.GetType().
public override bool Equals([NotNullWhen(true)] object? obj) =>
- obj is GenericEqualityComparer<T>;
+ obj != null && GetType() == obj.GetType();
- // If in the future this type is made sealed, change typeof(...) to GetType().
public override int GetHashCode() =>
- typeof(GenericEqualityComparer<T>).GetHashCode();
+ GetType().GetHashCode();
}
[Serializable]
@@ -168,7 +169,8 @@ namespace System.Collections.Generic
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public override int GetHashCode(T? obj) => obj.GetHashCode();
+ public override int GetHashCode(T? obj) =>
+ obj.GetHashCode();
// Equals method for the comparer itself.
public override bool Equals([NotNullWhen(true)] object? obj) =>
@@ -196,7 +198,8 @@ namespace System.Collections.Generic
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public override int GetHashCode([DisallowNull] T obj) => obj?.GetHashCode() ?? 0;
+ public override int GetHashCode([DisallowNull] T obj) =>
+ obj?.GetHashCode() ?? 0;
// Equals method for the comparer itself.
public override bool Equals([NotNullWhen(true)] object? obj) =>
@@ -212,16 +215,12 @@ namespace System.Collections.Generic
public sealed partial class ByteEqualityComparer : EqualityComparer<byte>
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public override bool Equals(byte x, byte y)
- {
- return x == y;
- }
+ public override bool Equals(byte x, byte y) =>
+ x == y;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public override int GetHashCode(byte b)
- {
- return b.GetHashCode();
- }
+ public override int GetHashCode(byte b) =>
+ b.GetHashCode();
// Equals method for the comparer itself.
public override bool Equals([NotNullWhen(true)] object? obj) =>
@@ -253,10 +252,8 @@ namespace System.Collections.Generic
// public override bool Equals(T x, T y) is runtime-specific
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public override int GetHashCode(T obj)
- {
- return obj.GetHashCode();
- }
+ public override int GetHashCode(T obj) =>
+ obj.GetHashCode();
// Equals method for the comparer itself.
public override bool Equals([NotNullWhen(true)] object? obj) =>
diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/HashSet.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/HashSet.cs
index 47b72f57dea..f842455c827 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/HashSet.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/HashSet.cs
@@ -52,22 +52,31 @@ namespace System.Collections.Generic
public HashSet(IEqualityComparer<T>? comparer)
{
- if (comparer is not null && comparer != EqualityComparer<T>.Default) // first check for null to avoid forcing default comparer instantiation unnecessarily
- {
- _comparer = comparer;
- }
-
- // Special-case EqualityComparer<string>.Default, StringComparer.Ordinal, and StringComparer.OrdinalIgnoreCase.
- // We use a non-randomized comparer for improved perf, falling back to a randomized comparer if the
- // hash buckets become unbalanced.
- if (typeof(T) == typeof(string))
- {
- IEqualityComparer<string>? stringComparer = NonRandomizedStringEqualityComparer.GetStringComparer(_comparer);
- if (stringComparer is not null)
+ // For reference types, we always want to store a comparer instance, either
+ // the one provided, or if one wasn't provided, the default (accessing
+ // EqualityComparer<TKey>.Default with shared generics on every dictionary
+ // access can add measurable overhead). For value types, if no comparer is
+ // provided, or if the default is provided, we'd prefer to use
+ // EqualityComparer<TKey>.Default.Equals on every use, enabling the JIT to
+ // devirtualize and possibly inline the operation.
+ if (!typeof(T).IsValueType)
+ {
+ _comparer = comparer ?? EqualityComparer<T>.Default;
+
+ // Special-case EqualityComparer<string>.Default, StringComparer.Ordinal, and StringComparer.OrdinalIgnoreCase.
+ // We use a non-randomized comparer for improved perf, falling back to a randomized comparer if the
+ // hash buckets become unbalanced.
+ if (typeof(T) == typeof(string) &&
+ NonRandomizedStringEqualityComparer.GetStringComparer(_comparer!) is IEqualityComparer<string> stringComparer)
{
- _comparer = (IEqualityComparer<T>?)stringComparer;
+ _comparer = (IEqualityComparer<T>)stringComparer;
}
}
+ else if (comparer is not null && // first check for null to avoid forcing default comparer instantiation unnecessarily
+ comparer != EqualityComparer<T>.Default)
+ {
+ _comparer = comparer;
+ }
}
public HashSet(int capacity) : this(capacity, null) { }
@@ -212,56 +221,32 @@ namespace System.Collections.Generic
uint collisionCount = 0;
IEqualityComparer<T>? comparer = _comparer;
- if (comparer == null)
+ if (typeof(T).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types
+ comparer == null)
{
- int hashCode = item != null ? item.GetHashCode() : 0;
- if (typeof(T).IsValueType)
+ // ValueType: Devirtualize with EqualityComparer<TValue>.Default intrinsic
+ int hashCode = item!.GetHashCode();
+ int i = GetBucketRef(hashCode) - 1; // Value in _buckets is 1-based
+ while (i >= 0)
{
- // ValueType: Devirtualize with EqualityComparer<TValue>.Default intrinsic
- int i = GetBucketRef(hashCode) - 1; // Value in _buckets is 1-based
- while (i >= 0)
+ ref Entry entry = ref entries[i];
+ if (entry.HashCode == hashCode && EqualityComparer<T>.Default.Equals(entry.Value, item))
{
- ref Entry entry = ref entries[i];
- if (entry.HashCode == hashCode && EqualityComparer<T>.Default.Equals(entry.Value, item))
- {
- return i;
- }
- i = entry.Next;
-
- collisionCount++;
- if (collisionCount > (uint)entries.Length)
- {
- // The chain of entries forms a loop, which means a concurrent update has happened.
- ThrowHelper.ThrowInvalidOperationException_ConcurrentOperationsNotSupported();
- }
+ return i;
}
- }
- else
- {
- // Object type: Shared Generic, EqualityComparer<TValue>.Default won't devirtualize (https://github.com/dotnet/runtime/issues/10050),
- // so cache in a local rather than get EqualityComparer per loop iteration.
- EqualityComparer<T> defaultComparer = EqualityComparer<T>.Default;
- int i = GetBucketRef(hashCode) - 1; // Value in _buckets is 1-based
- while (i >= 0)
+ i = entry.Next;
+
+ collisionCount++;
+ if (collisionCount > (uint)entries.Length)
{
- ref Entry entry = ref entries[i];
- if (entry.HashCode == hashCode && defaultComparer.Equals(entry.Value, item))
- {
- return i;
- }
- i = entry.Next;
-
- collisionCount++;
- if (collisionCount > (uint)entries.Length)
- {
- // The chain of entries forms a loop, which means a concurrent update has happened.
- ThrowHelper.ThrowInvalidOperationException_ConcurrentOperationsNotSupported();
- }
+ // The chain of entries forms a loop, which means a concurrent update has happened.
+ ThrowHelper.ThrowInvalidOperationException_ConcurrentOperationsNotSupported();
}
}
}
else
{
+ Debug.Assert(comparer is not null);
int hashCode = item != null ? comparer.GetHashCode(item) : 0;
int i = GetBucketRef(hashCode) - 1; // Value in _buckets is 1-based
while (i >= 0)
@@ -307,7 +292,13 @@ namespace System.Collections.Generic
uint collisionCount = 0;
int last = -1;
- int hashCode = item != null ? (_comparer?.GetHashCode(item) ?? item.GetHashCode()) : 0;
+
+ IEqualityComparer<T>? comparer = _comparer;
+ Debug.Assert(typeof(T).IsValueType || comparer is not null);
+ int hashCode =
+ typeof(T).IsValueType && comparer == null ? item!.GetHashCode() :
+ item is not null ? comparer!.GetHashCode(item) :
+ 0;
ref int bucket = ref GetBucketRef(hashCode);
int i = bucket - 1; // Value in buckets is 1-based
@@ -316,7 +307,7 @@ namespace System.Collections.Generic
{
ref Entry entry = ref entries[i];
- if (entry.HashCode == hashCode && (_comparer?.Equals(entry.Value, item) ?? EqualityComparer<T>.Default.Equals(entry.Value, item)))
+ if (entry.HashCode == hashCode && (comparer?.Equals(entry.Value, item) ?? EqualityComparer<T>.Default.Equals(entry.Value, item)))
{
if (last < 0)
{
@@ -922,7 +913,8 @@ namespace System.Collections.Generic
{
if (typeof(T) == typeof(string))
{
- return (IEqualityComparer<T>)IInternalStringEqualityComparer.GetUnderlyingEqualityComparer((IEqualityComparer<string?>?)_comparer);
+ Debug.Assert(_comparer is not null, "The comparer should never be null for a reference type.");
+ return (IEqualityComparer<T>)IInternalStringEqualityComparer.GetUnderlyingEqualityComparer((IEqualityComparer<string?>)_comparer);
}
else
{
@@ -972,21 +964,16 @@ namespace System.Collections.Generic
if (!typeof(T).IsValueType && forceNewHashCodes)
{
Debug.Assert(_comparer is NonRandomizedStringEqualityComparer);
- _comparer = (IEqualityComparer<T>)((NonRandomizedStringEqualityComparer)_comparer).GetRandomizedEqualityComparer();
+ IEqualityComparer<T> comparer = _comparer = (IEqualityComparer<T>)((NonRandomizedStringEqualityComparer)_comparer).GetRandomizedEqualityComparer();
for (int i = 0; i < count; i++)
{
ref Entry entry = ref entries[i];
if (entry.Next >= -1)
{
- entry.HashCode = entry.Value != null ? _comparer!.GetHashCode(entry.Value) : 0;
+ entry.HashCode = entry.Value != null ? comparer.GetHashCode(entry.Value) : 0;
}
}
-
- if (ReferenceEquals(_comparer, EqualityComparer<T>.Default))
- {
- _comparer = null;
- }
}
// Assign member variables after both arrays allocated to guard against corruption from OOM if second fails
@@ -1096,58 +1083,35 @@ namespace System.Collections.Generic
uint collisionCount = 0;
ref int bucket = ref Unsafe.NullRef<int>();
- if (comparer == null)
+ if (typeof(T).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types
+ comparer == null)
{
- hashCode = value != null ? value.GetHashCode() : 0;
+ hashCode = value!.GetHashCode();
bucket = ref GetBucketRef(hashCode);
int i = bucket - 1; // Value in _buckets is 1-based
- if (typeof(T).IsValueType)
- {
- // ValueType: Devirtualize with EqualityComparer<TValue>.Default intrinsic
- while (i >= 0)
- {
- ref Entry entry = ref entries[i];
- if (entry.HashCode == hashCode && EqualityComparer<T>.Default.Equals(entry.Value, value))
- {
- location = i;
- return false;
- }
- i = entry.Next;
- collisionCount++;
- if (collisionCount > (uint)entries.Length)
- {
- // The chain of entries forms a loop, which means a concurrent update has happened.
- ThrowHelper.ThrowInvalidOperationException_ConcurrentOperationsNotSupported();
- }
- }
- }
- else
+ // ValueType: Devirtualize with EqualityComparer<TValue>.Default intrinsic
+ while (i >= 0)
{
- // Object type: Shared Generic, EqualityComparer<TValue>.Default won't devirtualize (https://github.com/dotnet/runtime/issues/10050),
- // so cache in a local rather than get EqualityComparer per loop iteration.
- EqualityComparer<T> defaultComparer = EqualityComparer<T>.Default;
- while (i >= 0)
+ ref Entry entry = ref entries[i];
+ if (entry.HashCode == hashCode && EqualityComparer<T>.Default.Equals(entry.Value, value))
{
- ref Entry entry = ref entries[i];
- if (entry.HashCode == hashCode && defaultComparer.Equals(entry.Value, value))
- {
- location = i;
- return false;
- }
- i = entry.Next;
+ location = i;
+ return false;
+ }
+ i = entry.Next;
- collisionCount++;
- if (collisionCount > (uint)entries.Length)
- {
- // The chain of entries forms a loop, which means a concurrent update has happened.
- ThrowHelper.ThrowInvalidOperationException_ConcurrentOperationsNotSupported();
- }
+ collisionCount++;
+ if (collisionCount > (uint)entries.Length)
+ {
+ // The chain of entries forms a loop, which means a concurrent update has happened.
+ ThrowHelper.ThrowInvalidOperationException_ConcurrentOperationsNotSupported();
}
}
}
else
{
+ Debug.Assert(comparer is not null);
hashCode = value != null ? comparer.GetHashCode(value) : 0;
bucket = ref GetBucketRef(hashCode);
int i = bucket - 1; // Value in _buckets is 1-based
diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/IInternalStringEqualityComparer.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/IInternalStringEqualityComparer.cs
index 28c2ab9a07c..a084a81becf 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/IInternalStringEqualityComparer.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/IInternalStringEqualityComparer.cs
@@ -17,13 +17,9 @@ namespace System.Collections.Generic
/// Unwraps the internal equality comparer, if proxied.
/// Otherwise returns the equality comparer itself or its default equivalent.
/// </summary>
- internal static IEqualityComparer<string?> GetUnderlyingEqualityComparer(IEqualityComparer<string?>? outerComparer)
+ internal static IEqualityComparer<string?> GetUnderlyingEqualityComparer(IEqualityComparer<string?> outerComparer)
{
- if (outerComparer is null)
- {
- return EqualityComparer<string?>.Default;
- }
- else if (outerComparer is IInternalStringEqualityComparer internalComparer)
+ if (outerComparer is IInternalStringEqualityComparer internalComparer)
{
return internalComparer.GetUnderlyingEqualityComparer();
}
diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/List.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/List.cs
index 92414b3f242..6f1340e318f 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/List.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/List.cs
@@ -24,7 +24,7 @@ namespace System.Collections.Generic
internal T[] _items; // Do not rename (binary serialization)
internal int _size; // Do not rename (binary serialization)
- private int _version; // Do not rename (binary serialization)
+ internal int _version; // Do not rename (binary serialization)
#pragma warning disable CA1825 // avoid the extra generic instantiation for Array.Empty<T>()
private static readonly T[] s_emptyArray = new T[0];
@@ -241,7 +241,38 @@ namespace System.Collections.Generic
// capacity or the new size, whichever is larger.
//
public void AddRange(IEnumerable<T> collection)
- => InsertRange(_size, collection);
+ {
+ if (collection == null)
+ {
+ ThrowHelper.ThrowArgumentNullException(ExceptionArgument.collection);
+ }
+
+ if (collection is ICollection<T> c)
+ {
+ int count = c.Count;
+ if (count > 0)
+ {
+ if (_items.Length - _size < count)
+ {
+ Grow(_size + count);
+ }
+
+ c.CopyTo(_items, _size);
+ _size += count;
+ _version++;
+ }
+ }
+ else
+ {
+ using (IEnumerator<T> en = collection.GetEnumerator())
+ {
+ while (en.MoveNext())
+ {
+ Add(en.Current);
+ }
+ }
+ }
+ }
public ReadOnlyCollection<T> AsReadOnly()
=> new ReadOnlyCollection<T>(this);
@@ -418,7 +449,7 @@ namespace System.Collections.Generic
/// Increase the capacity of this list to at least the specified <paramref name="capacity"/>.
/// </summary>
/// <param name="capacity">The minimum capacity to ensure.</param>
- private void Grow(int capacity)
+ internal void Grow(int capacity)
{
Debug.Assert(_items.Length < capacity);
@@ -776,6 +807,7 @@ namespace System.Collections.Generic
c.CopyTo(_items, index);
}
_size += count;
+ _version++;
}
}
else
@@ -788,7 +820,6 @@ namespace System.Collections.Generic
}
}
}
- _version++;
}
// Returns the index of the last occurrence of a given value in a range of
@@ -866,8 +897,8 @@ namespace System.Collections.Generic
return Array.LastIndexOf(_items, item, index, count);
}
- // Removes the element at the given index. The size of the list is
- // decreased by one.
+ // Removes the first occurrence of the given element, if found.
+ // The size of the list is decreased by one if successful.
public bool Remove(T item)
{
int index = IndexOf(item);
diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/NonRandomizedStringEqualityComparer.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/NonRandomizedStringEqualityComparer.cs
index 1724cdcd1da..25846a6b2ab 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/NonRandomizedStringEqualityComparer.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/NonRandomizedStringEqualityComparer.cs
@@ -108,20 +108,23 @@ namespace System.Collections.Generic
}
}
- public static IEqualityComparer<string>? GetStringComparer(object? comparer)
+ public static IEqualityComparer<string>? GetStringComparer(object comparer)
{
// Special-case EqualityComparer<string>.Default, StringComparer.Ordinal, and StringComparer.OrdinalIgnoreCase.
// We use a non-randomized comparer for improved perf, falling back to a randomized comparer if the
// hash buckets become unbalanced.
- if (comparer is null)
+
+ if (ReferenceEquals(comparer, EqualityComparer<string>.Default))
{
return WrappedAroundDefaultComparer;
}
- else if (ReferenceEquals(comparer, StringComparer.Ordinal))
+
+ if (ReferenceEquals(comparer, StringComparer.Ordinal))
{
return WrappedAroundStringComparerOrdinal;
}
- else if (ReferenceEquals(comparer, StringComparer.OrdinalIgnoreCase))
+
+ if (ReferenceEquals(comparer, StringComparer.OrdinalIgnoreCase))
{
return WrappedAroundStringComparerOrdinalIgnoreCase;
}
diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/ObjectModel/ReadOnlyCollection.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/ObjectModel/ReadOnlyCollection.cs
index 09f2bc62299..1107dfae26f 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Collections/ObjectModel/ReadOnlyCollection.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Collections/ObjectModel/ReadOnlyCollection.cs
@@ -23,6 +23,11 @@ namespace System.Collections.ObjectModel
this.list = list;
}
+ // TODO https://github.com/dotnet/runtime/issues/76028: Make this public.
+ /// <summary>Gets an empty <see cref="ReadOnlyCollection{T}"/>.</summary>
+ /// <remarks>The returned instance is immutable and will always be empty.</remarks>
+ internal static ReadOnlyCollection<T> Empty { get; } = new ReadOnlyCollection<T>(Array.Empty<T>());
+
public int Count => list.Count;
public T this[int index] => list[index];
@@ -37,10 +42,10 @@ namespace System.Collections.ObjectModel
list.CopyTo(array, index);
}
- public IEnumerator<T> GetEnumerator()
- {
- return list.GetEnumerator();
- }
+ public IEnumerator<T> GetEnumerator() =>
+ list.Count == 0 ?
+ SZGenericArrayEnumerator<T>.Empty :
+ list.GetEnumerator();
public int IndexOf(T value)
{
diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/ObjectModel/ReadOnlyDictionary.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/ObjectModel/ReadOnlyDictionary.cs
index b3eff597377..a13af07cd86 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Collections/ObjectModel/ReadOnlyDictionary.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Collections/ObjectModel/ReadOnlyDictionary.cs
@@ -264,7 +264,7 @@ namespace System.Collections.ObjectModel
throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection);
}
- bool ICollection<TKey>.Contains(TKey item)
+ public bool Contains(TKey item)
{
return _collection.Contains(item);
}
diff --git a/src/libraries/System.Private.CoreLib/src/System/DateTimeOffset.Android.cs b/src/libraries/System.Private.CoreLib/src/System/DateTimeOffset.Android.cs
index c78dadcdfc3..c40e4708e47 100644
--- a/src/libraries/System.Private.CoreLib/src/System/DateTimeOffset.Android.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/DateTimeOffset.Android.cs
@@ -7,10 +7,8 @@ namespace System
{
public readonly partial struct DateTimeOffset
{
- private static bool s_androidTZDataLoaded;
- private static readonly object s_localUtcOffsetLock = new();
- private static Thread? s_loadAndroidTZData;
- private static bool s_startNewBackgroundThread = true;
+ // 0 == in process of being loaded, 1 == loaded
+ private static volatile int s_androidTZDataLoaded = -1;
// Now on Android does the following
// 1) quickly returning a fast path result when first called if the right AppContext data element is set
@@ -29,52 +27,38 @@ namespace System
{
DateTime utcDateTime = DateTime.UtcNow;
- if (s_androidTZDataLoaded) // The background thread finished, the cache is loaded.
+ if (s_androidTZDataLoaded == 1) // The background thread finished, the cache is loaded.
+ {
return ToLocalTime(utcDateTime, true);
+ }
- if (s_startNewBackgroundThread) // The cache isn't loaded and no background thread has been created
+ object? localDateTimeOffset = AppContext.GetData("System.TimeZoneInfo.LocalDateTimeOffset");
+ if (localDateTimeOffset == null) // If no offset property provided through monovm app context, default
{
- lock (s_localUtcOffsetLock)
- {
- // Now may be called multiple times before a cache is loaded and a background thread is running,
- // once the lock is available, check for a cache and background thread.
- if (s_androidTZDataLoaded)
- return ToLocalTime(utcDateTime, true);
+ // no need to create the thread, load tzdata now
+ s_androidTZDataLoaded = 1;
+ return ToLocalTime(utcDateTime, true);
+ }
- if (s_loadAndroidTZData == null)
+ // The cache isn't loaded yet.
+ if (Interlocked.CompareExchange(ref s_androidTZDataLoaded, 0, -1) == -1)
+ {
+ new Thread(() =>
+ {
+ try
{
- s_loadAndroidTZData = new Thread(() => {
- // Delay the background thread to avoid impacting startup, if it still coincides after 1s, startup is already perceived as slow
- Thread.Sleep(1000);
-
- _ = TimeZoneInfo.Local; // Load AndroidTZData
- s_androidTZDataLoaded = true;
+ // Delay the background thread to avoid impacting startup, if it still coincides after 1s, startup is already perceived as slow
+ Thread.Sleep(1000);
- lock (s_localUtcOffsetLock)
- {
- s_loadAndroidTZData = null; // Ensure thread is cleared when cache is loaded
- }
- });
- s_loadAndroidTZData.IsBackground = true;
+ _ = TimeZoneInfo.Local; // Load AndroidTZData
}
- }
-
- if (s_startNewBackgroundThread)
- {
- // Because Start does not block the calling thread,
- // setting the boolean flag to false immediately after should
- // prevent two calls to DateTimeOffset.Now in quick succession
- // from both reaching here.
- s_loadAndroidTZData.Start();
- s_startNewBackgroundThread = false;
- }
+ finally
+ {
+ s_androidTZDataLoaded = 1;
+ }
+ }) { IsBackground = true }.Start();
}
-
- object? localDateTimeOffset = AppContext.GetData("System.TimeZoneInfo.LocalDateTimeOffset");
- if (localDateTimeOffset == null) // If no offset property provided through monovm app context, default
- return ToLocalTime(utcDateTime, true);
-
// Fast path obtained offset incorporated into ToLocalTime(DateTime.UtcNow, true) logic
int localDateTimeOffsetSeconds = Convert.ToInt32(localDateTimeOffset);
TimeSpan offset = TimeSpan.FromSeconds(localDateTimeOffsetSeconds);
diff --git a/src/libraries/System.Private.CoreLib/src/System/Decimal.cs b/src/libraries/System.Private.CoreLib/src/System/Decimal.cs
index 8b469e385b1..cc7354014f4 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Decimal.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Decimal.cs
@@ -1813,6 +1813,7 @@ namespace System
// IParsable
//
+ /// <inheritdoc cref="IParsable{TSelf}.TryParse(string?, IFormatProvider?, out TSelf)" />
public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out decimal result) => TryParse(s, NumberStyles.Number, provider, out result);
//
diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventCounter.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventCounter.cs
index 2838cfc9468..a2fa85a262b 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventCounter.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventCounter.cs
@@ -171,7 +171,7 @@ namespace System.Diagnostics.Tracing
}
}
- protected void Flush()
+ private void Flush()
{
Debug.Assert(Monitor.IsEntered(this));
for (int i = 0; i < _bufferedValues.Length; i++)
diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs
index fbb6e56b361..e7169503414 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs
@@ -3923,7 +3923,7 @@ namespace System.Diagnostics.Tracing
/// created.
/// </para>
/// </summary>
- public class EventListener : IDisposable
+ public abstract class EventListener : IDisposable
{
private event EventHandler<EventSourceCreatedEventArgs>? _EventSourceCreated;
@@ -3963,7 +3963,7 @@ namespace System.Diagnostics.Tracing
/// Create a new EventListener in which all events start off turned off (use EnableEvents to turn
/// them on).
/// </summary>
- public EventListener()
+ protected EventListener()
{
// This will cause the OnEventSourceCreated callback to fire.
CallBackForExistingEventSources(true, (obj, args) =>
@@ -4100,7 +4100,7 @@ namespace System.Diagnostics.Tracing
/// and EventSourceIndex allows this extra information to be efficiently stored in a
/// (growable) array (eg List(T)).
/// </summary>
- public static int EventSourceIndex(EventSource eventSource) { return eventSource.m_id; }
+ protected internal static int EventSourceIndex(EventSource eventSource) { return eventSource.m_id; }
/// <summary>
/// This method is called whenever a new eventSource is 'attached' to the dispatcher.
diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventTypes.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventTypes.cs
index 9c1857fdef9..7494a74b767 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventTypes.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventTypes.cs
@@ -9,7 +9,7 @@ namespace System.Diagnostics.Tracing
/// TraceLogging: Used when calling EventSource.WriteMultiMerge.
/// Stores the type information to use when writing the event fields.
/// </summary>
- public class TraceLoggingEventTypes
+ internal sealed class TraceLoggingEventTypes
{
internal readonly TraceLoggingTypeInfo[] typeInfos;
#if FEATURE_PERFTRACING
diff --git a/src/libraries/System.Private.CoreLib/src/System/Double.cs b/src/libraries/System.Private.CoreLib/src/System/Double.cs
index 75580d6a88c..5f41487e25b 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Double.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Double.cs
@@ -1411,6 +1411,7 @@ namespace System
// IParsable
//
+ /// <inheritdoc cref="IParsable{TSelf}.TryParse(string?, IFormatProvider?, out TSelf)" />
public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out double result) => TryParse(s, NumberStyles.Float | NumberStyles.AllowThousands, provider, out result);
//
@@ -1562,7 +1563,7 @@ namespace System
else
{
// x or y is insignificant compared to the other
- result = x + y;
+ result = ax + ay;
}
}
}
diff --git a/src/libraries/System.Private.CoreLib/src/System/Enum.EnumInfo.cs b/src/libraries/System.Private.CoreLib/src/System/Enum.EnumInfo.cs
index 7ab48cfb11f..67f4d5860f6 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Enum.EnumInfo.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Enum.EnumInfo.cs
@@ -8,6 +8,7 @@ namespace System
internal sealed class EnumInfo
{
public readonly bool HasFlagsAttribute;
+ public readonly bool ValuesAreSequentialFromZero;
public readonly ulong[] Values;
public readonly string[] Names;
@@ -17,6 +18,17 @@ namespace System
HasFlagsAttribute = hasFlagsAttribute;
Values = values;
Names = names;
+
+ // Store whether all of the values are sequential starting from zero.
+ ValuesAreSequentialFromZero = true;
+ for (int i = 0; i < values.Length; i++)
+ {
+ if (values[i] != (ulong)i)
+ {
+ ValuesAreSequentialFromZero = false;
+ break;
+ }
+ }
}
}
}
diff --git a/src/libraries/System.Private.CoreLib/src/System/Enum.cs b/src/libraries/System.Private.CoreLib/src/System/Enum.cs
index cd4535867b0..d35f3a46c46 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Enum.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Enum.cs
@@ -116,12 +116,24 @@ namespace System
return GetEnumName(GetEnumInfo(enumType), ulValue);
}
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
private static string? GetEnumName(EnumInfo enumInfo, ulong ulValue)
{
- int index = FindDefinedIndex(enumInfo.Values, ulValue);
- if (index >= 0)
+ if (enumInfo.ValuesAreSequentialFromZero)
+ {
+ string[] names = enumInfo.Names;
+ if (ulValue < (ulong)names.Length)
+ {
+ return names[(uint)ulValue];
+ }
+ }
+ else
{
- return enumInfo.Names[index];
+ int index = FindDefinedIndex(enumInfo.Values, ulValue);
+ if (index >= 0)
+ {
+ return enumInfo.Names[index];
+ }
}
return null; // return null so the caller knows to .ToString() the input
@@ -302,7 +314,7 @@ namespace System
internal static string[] InternalGetNames(RuntimeType enumType) =>
// Get all of the names
- GetEnumInfo(enumType, true).Names;
+ GetEnumInfo(enumType).Names;
public static Type GetUnderlyingType(Type enumType)
{
@@ -327,10 +339,10 @@ namespace System
/// </summary>
/// <typeparam name="TEnum">An enumeration type.</typeparam>
/// /// <remarks>
- /// This method can be used to get enumeration values when creating an array of the enumeration type is challenging.
- /// For example, <see cref="T:System.Reflection.MetadataLoadContext" /> or on a platform where runtime codegen is not available.
+ /// You can use this method to get enumeration values when it's hard to create an array of the enumeration type.
+ /// For example, you might use this method for the <see cref="T:System.Reflection.MetadataLoadContext" /> enumeration or on a platform where run-time code generation is not available.
/// </remarks>
- /// <returns>An array that contains the values of the underlying type constants in enumType.</returns>
+ /// <returns>An array that contains the values of the underlying type constants in <typeparamref name="TEnum" />.</returns>
public static Array GetValuesAsUnderlyingType<TEnum>() where TEnum : struct, Enum =>
typeof(TEnum).GetEnumValuesAsUnderlyingType();
@@ -339,16 +351,14 @@ namespace System
/// </summary>
/// <param name="enumType">An enumeration type.</param>
/// <remarks>
- /// This method can be used to get enumeration values when creating an array of the enumeration type is challenging.
- /// For example, <see cref="T:System.Reflection.MetadataLoadContext" /> or on a platform where runtime codegen is not available.
+ /// You can use this method to get enumeration values when it's hard to create an array of the enumeration type.
+ /// For example, you might use this method for the <see cref="T:System.Reflection.MetadataLoadContext" /> enumeration or on a platform where run-time code generation is not available.
/// </remarks>
/// <returns>An array that contains the values of the underlying type constants in <paramref name="enumType" />.</returns>
- /// <exception cref="ArgumentNullException">
- /// Thrown when the enumeration type is null.
- /// </exception>
- /// <exception cref="ArgumentException">
- /// Thrown when the type is not an enumeration type.
- /// </exception>
+ /// <exception cref="T:System.ArgumentNullException">
+ /// <paramref name="enumType" /> is null.</exception>
+ /// <exception cref="T:System.ArgumentException">
+ /// <paramref name="enumType" /> is not an enumeration type.</exception>
public static Array GetValuesAsUnderlyingType(Type enumType)
{
ArgumentNullException.ThrowIfNull(enumType);
@@ -413,16 +423,21 @@ namespace System
internal static ulong[] InternalGetValues(RuntimeType enumType)
{
// Get all of the values
- return GetEnumInfo(enumType, false).Values;
+ return GetEnumInfo(enumType, getNames: false).Values;
}
public static bool IsDefined<TEnum>(TEnum value) where TEnum : struct, Enum
{
RuntimeType enumType = (RuntimeType)typeof(TEnum);
- ulong[] ulValues = Enum.InternalGetValues(enumType);
- ulong ulValue = Enum.ToUInt64(value);
-
- return FindDefinedIndex(ulValues, ulValue) >= 0;
+ EnumInfo info = GetEnumInfo(enumType, getNames: false);
+ ulong ulValue = ToUInt64(value);
+ ulong[] ulValues = info.Values;
+
+ // If the enum's values are all sequentially numbered starting from 0, then we can
+ // just return if the requested index is in range. Otherwise, search for the value.
+ return
+ info.ValuesAreSequentialFromZero ? ulValue < (ulong)ulValues.Length :
+ FindDefinedIndex(ulValues, ulValue) >= 0;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
diff --git a/src/libraries/System.Private.CoreLib/src/System/Environment.Android.cs b/src/libraries/System.Private.CoreLib/src/System/Environment.Android.cs
index 44c8988532f..8b9b01276c3 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Environment.Android.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Environment.Android.cs
@@ -54,7 +54,6 @@ namespace System
switch (folder)
{
- case SpecialFolder.Personal:
case SpecialFolder.LocalApplicationData:
return home;
@@ -65,6 +64,9 @@ namespace System
case SpecialFolder.DesktopDirectory:
return Path.Combine(home, "Desktop");
+ case SpecialFolder.MyDocuments: // Same value as Personal
+ return Path.Combine(home, "Documents");
+
case SpecialFolder.MyMusic:
return Path.Combine(home, "Music");
@@ -84,7 +86,7 @@ namespace System
return Path.Combine(home, ".fonts");
case SpecialFolder.UserProfile:
- return GetEnvironmentVariable("HOME");
+ return home;
case SpecialFolder.CommonApplicationData:
return "/usr/share";
diff --git a/src/libraries/System.Private.CoreLib/src/System/Environment.GetFolderPathCore.Unix.cs b/src/libraries/System.Private.CoreLib/src/System/Environment.GetFolderPathCore.Unix.cs
index 7990febb5a1..1ec8fd1af28 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Environment.GetFolderPathCore.Unix.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Environment.GetFolderPathCore.Unix.cs
@@ -9,6 +9,9 @@ using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
+#if TARGET_OSX
+using NSSearchPathDirectory = Interop.Sys.NSSearchPathDirectory;
+#endif
namespace System
{
@@ -17,7 +20,7 @@ namespace System
private static string GetFolderPathCore(SpecialFolder folder, SpecialFolderOption option)
{
// Get the path for the SpecialFolder
- string path = GetFolderPathCoreWithoutValidation(folder);
+ string path = GetFolderPathCoreWithoutValidation(folder) ?? string.Empty;
Debug.Assert(path != null);
// If we didn't get one, or if we got one but we're not supposed to verify it,
@@ -43,7 +46,7 @@ namespace System
return path;
}
- private static string GetFolderPathCoreWithoutValidation(SpecialFolder folder)
+ private static string? GetFolderPathCoreWithoutValidation(SpecialFolder folder)
{
// First handle any paths that involve only static paths, avoiding the overheads of getting user-local paths.
// https://www.freedesktop.org/software/systemd/man/file-hierarchy.html
@@ -85,42 +88,54 @@ namespace System
switch (folder)
{
case SpecialFolder.UserProfile:
- case SpecialFolder.MyDocuments: // same value as Personal
return home;
- case SpecialFolder.ApplicationData:
- return GetXdgConfig(home);
- case SpecialFolder.LocalApplicationData:
- // "$XDG_DATA_HOME defines the base directory relative to which user specific data files should be stored."
- // "If $XDG_DATA_HOME is either not set or empty, a default equal to $HOME/.local/share should be used."
- string? data = GetEnvironmentVariable("XDG_DATA_HOME");
- if (data is null || !data.StartsWith('/'))
- {
- data = Path.Combine(home, ".local", "share");
- }
- return data;
- case SpecialFolder.Desktop:
- case SpecialFolder.DesktopDirectory:
- return ReadXdgDirectory(home, "XDG_DESKTOP_DIR", "Desktop");
case SpecialFolder.Templates:
return ReadXdgDirectory(home, "XDG_TEMPLATES_DIR", "Templates");
- case SpecialFolder.MyVideos:
- return ReadXdgDirectory(home, "XDG_VIDEOS_DIR", "Videos");
-
+ // TODO: Consider merging the OSX path with the rest of the Apple systems here:
+ // https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/Environment.iOS.cs
#if TARGET_OSX
+ case SpecialFolder.Desktop:
+ case SpecialFolder.DesktopDirectory:
+ return Interop.Sys.SearchPath(NSSearchPathDirectory.NSDesktopDirectory);
+ case SpecialFolder.ApplicationData:
+ case SpecialFolder.LocalApplicationData:
+ return Interop.Sys.SearchPath(NSSearchPathDirectory.NSApplicationSupportDirectory);
+ case SpecialFolder.MyDocuments: // same value as Personal
+ return Interop.Sys.SearchPath(NSSearchPathDirectory.NSDocumentDirectory);
case SpecialFolder.MyMusic:
- return Path.Combine(home, "Music");
+ return Interop.Sys.SearchPath(NSSearchPathDirectory.NSMusicDirectory);
+ case SpecialFolder.MyVideos:
+ return Interop.Sys.SearchPath(NSSearchPathDirectory.NSMoviesDirectory);
case SpecialFolder.MyPictures:
- return Path.Combine(home, "Pictures");
+ return Interop.Sys.SearchPath(NSSearchPathDirectory.NSPicturesDirectory);
case SpecialFolder.Fonts:
return Path.Combine(home, "Library", "Fonts");
case SpecialFolder.Favorites:
return Path.Combine(home, "Library", "Favorites");
case SpecialFolder.InternetCache:
- return Path.Combine(home, "Library", "Caches");
+ return Interop.Sys.SearchPath(NSSearchPathDirectory.NSCachesDirectory);
#else
+ case SpecialFolder.Desktop:
+ case SpecialFolder.DesktopDirectory:
+ return ReadXdgDirectory(home, "XDG_DESKTOP_DIR", "Desktop");
+ case SpecialFolder.ApplicationData:
+ return GetXdgConfig(home);
+ case SpecialFolder.LocalApplicationData:
+ // "$XDG_DATA_HOME defines the base directory relative to which user specific data files should be stored."
+ // "If $XDG_DATA_HOME is either not set or empty, a default equal to $HOME/.local/share should be used."
+ string? data = GetEnvironmentVariable("XDG_DATA_HOME");
+ if (data is null || !data.StartsWith('/'))
+ {
+ data = Path.Combine(home, ".local", "share");
+ }
+ return data;
+ case SpecialFolder.MyDocuments: // same value as Personal
+ return ReadXdgDirectory(home, "XDG_DOCUMENTS_DIR", "Documents");
case SpecialFolder.MyMusic:
return ReadXdgDirectory(home, "XDG_MUSIC_DIR", "Music");
+ case SpecialFolder.MyVideos:
+ return ReadXdgDirectory(home, "XDG_VIDEOS_DIR", "Videos");
case SpecialFolder.MyPictures:
return ReadXdgDirectory(home, "XDG_PICTURES_DIR", "Pictures");
case SpecialFolder.Fonts:
diff --git a/src/libraries/System.Private.CoreLib/src/System/Half.cs b/src/libraries/System.Private.CoreLib/src/System/Half.cs
index ecab10dbc00..2e71e336928 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Half.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Half.cs
@@ -1888,6 +1888,7 @@ namespace System
// IParsable
//
+ /// <inheritdoc cref="IParsable{TSelf}.TryParse(string?, IFormatProvider?, out TSelf)" />
public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out Half result) => TryParse(s, DefaultParseStyle, provider, out result);
//
diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/DirectoryInfo.cs b/src/libraries/System.Private.CoreLib/src/System/IO/DirectoryInfo.cs
index 51395058018..c3ac9efeb92 100644
--- a/src/libraries/System.Private.CoreLib/src/System/IO/DirectoryInfo.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/IO/DirectoryInfo.cs
@@ -227,5 +227,20 @@ namespace System.IO
FileSystem.RemoveDirectory(FullPath, recursive);
Invalidate();
}
+
+ public override bool Exists
+ {
+ get
+ {
+ try
+ {
+ return ExistsCore;
+ }
+ catch
+ {
+ return false;
+ }
+ }
+ }
}
}
diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/FileInfo.cs b/src/libraries/System.Private.CoreLib/src/System/IO/FileInfo.cs
index a1f7df8bbc6..fb455e0e646 100644
--- a/src/libraries/System.Private.CoreLib/src/System/IO/FileInfo.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/IO/FileInfo.cs
@@ -113,6 +113,21 @@ namespace System.IO
Invalidate();
}
+ public override bool Exists
+ {
+ get
+ {
+ try
+ {
+ return ExistsCore;
+ }
+ catch
+ {
+ return false;
+ }
+ }
+ }
+
public FileStream Open(FileMode mode)
=> Open(mode, (mode == FileMode.Append ? FileAccess.Write : FileAccess.ReadWrite), FileShare.None);
diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/FileSystemInfo.cs b/src/libraries/System.Private.CoreLib/src/System/IO/FileSystemInfo.cs
index 5c64fc4fcdc..da70b06ed50 100644
--- a/src/libraries/System.Private.CoreLib/src/System/IO/FileSystemInfo.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/IO/FileSystemInfo.cs
@@ -56,30 +56,10 @@ namespace System.IO
}
}
- public virtual string Name
- {
- get
- {
- Debug.Fail("Property is abstract in the ref assembly and both Directory/FileInfo override it.");
- return _name!;
- }
- }
+ public abstract string Name { get; }
// Whether a file/directory exists
- public virtual bool Exists
- {
- get
- {
- try
- {
- return ExistsCore;
- }
- catch
- {
- return false;
- }
- }
- }
+ public abstract bool Exists { get; }
// Delete a file/directory
public abstract void Delete();
diff --git a/src/libraries/System.Private.CoreLib/src/System/Int128.cs b/src/libraries/System.Private.CoreLib/src/System/Int128.cs
index 12083208808..cbfeeb9b8ba 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Int128.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Int128.cs
@@ -2013,6 +2013,7 @@ namespace System
// IParsable
//
+ /// <inheritdoc cref="IParsable{TSelf}.TryParse(string?, IFormatProvider?, out TSelf)" />
public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out Int128 result) => TryParse(s, NumberStyles.Integer, provider, out result);
//
diff --git a/src/libraries/System.Private.CoreLib/src/System/Int16.cs b/src/libraries/System.Private.CoreLib/src/System/Int16.cs
index 94fe0e4844f..67183c0b1b5 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Int16.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Int16.cs
@@ -1355,6 +1355,7 @@ namespace System
// IParsable
//
+ /// <inheritdoc cref="IParsable{TSelf}.TryParse(string?, IFormatProvider?, out TSelf)" />
public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out short result) => TryParse(s, NumberStyles.Integer, provider, out result);
//
diff --git a/src/libraries/System.Private.CoreLib/src/System/Int32.cs b/src/libraries/System.Private.CoreLib/src/System/Int32.cs
index 7b7c3f2765f..5c701e0fca2 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Int32.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Int32.cs
@@ -1367,6 +1367,7 @@ namespace System
// IParsable
//
+ /// <inheritdoc cref="IParsable{TSelf}.TryParse(string?, IFormatProvider?, out TSelf)" />
public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out int result) => TryParse(s, NumberStyles.Integer, provider, out result);
//
diff --git a/src/libraries/System.Private.CoreLib/src/System/Int64.cs b/src/libraries/System.Private.CoreLib/src/System/Int64.cs
index 8752d93c2f8..464ebb4d118 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Int64.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Int64.cs
@@ -1360,6 +1360,7 @@ namespace System
// IParsable
//
+ /// <inheritdoc cref="IParsable{TSelf}.TryParse(string?, IFormatProvider?, out TSelf)" />
public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out long result) => TryParse(s, NumberStyles.Integer, provider, out result);
//
diff --git a/src/libraries/System.Private.CoreLib/src/System/IntPtr.cs b/src/libraries/System.Private.CoreLib/src/System/IntPtr.cs
index 3fbed0cea35..bf571241544 100644
--- a/src/libraries/System.Private.CoreLib/src/System/IntPtr.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/IntPtr.cs
@@ -223,6 +223,7 @@ namespace System
return nint_t.TryParse(s, out Unsafe.As<nint, nint_t>(ref result));
}
+ /// <inheritdoc cref="IParsable{TSelf}.TryParse(string?, IFormatProvider?, out TSelf)" />
public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out nint result)
{
Unsafe.SkipInit(out result);
diff --git a/src/libraries/System.Private.CoreLib/src/System/Math.cs b/src/libraries/System.Private.CoreLib/src/System/Math.cs
index 42cdef4060d..dab8d821ed7 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Math.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Math.cs
@@ -1320,9 +1320,14 @@ namespace System
return Round(value);
// For ARM/ARM64 we can lower it down to a single instruction FRINTA
- // For XARCH we have to use the common path
- if (AdvSimd.IsSupported && mode == MidpointRounding.AwayFromZero)
- return AdvSimd.RoundAwayFromZeroScalar(Vector64.CreateScalar(value)).ToScalar();
+ // For other platforms we use a fast managed implementation
+ if (mode == MidpointRounding.AwayFromZero)
+ {
+ if (AdvSimd.IsSupported)
+ return AdvSimd.RoundAwayFromZeroScalar(Vector64.CreateScalar(value)).ToScalar();
+ // manually fold BitDecrement(0.5)
+ return Truncate(value + CopySign(0.49999999999999994, value));
+ }
}
return Round(value, 0, mode);
@@ -1359,13 +1364,8 @@ namespace System
// it is rounded to the nearest value above (for positive numbers) or below (for negative numbers)
case MidpointRounding.AwayFromZero:
{
- double fraction = ModF(value, &value);
-
- if (Abs(fraction) >= 0.5)
- {
- value += Sign(fraction);
- }
-
+ // manually fold BitDecrement(0.5)
+ value = Truncate(value + CopySign(0.49999999999999994, value));
break;
}
// Directed rounding: Round to the nearest value, toward to zero
diff --git a/src/libraries/System.Private.CoreLib/src/System/MathF.cs b/src/libraries/System.Private.CoreLib/src/System/MathF.cs
index 6b86c780a5c..90a5f84af66 100644
--- a/src/libraries/System.Private.CoreLib/src/System/MathF.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/MathF.cs
@@ -436,9 +436,14 @@ namespace System
return Round(x);
// For ARM/ARM64 we can lower it down to a single instruction FRINTA
- // For XARCH we have to use the common path
- if (AdvSimd.IsSupported && mode == MidpointRounding.AwayFromZero)
- return AdvSimd.RoundAwayFromZeroScalar(Vector64.CreateScalarUnsafe(x)).ToScalar();
+ // For other platforms we use a fast managed implementation
+ if (mode == MidpointRounding.AwayFromZero)
+ {
+ if (AdvSimd.IsSupported)
+ return AdvSimd.RoundAwayFromZeroScalar(Vector64.CreateScalarUnsafe(x)).ToScalar();
+ // manually fold BitDecrement(0.5f)
+ return Truncate(x + CopySign(0.49999997f, x));
+ }
}
return Round(x, 0, mode);
@@ -475,13 +480,8 @@ namespace System
// it is rounded to the nearest value above (for positive numbers) or below (for negative numbers)
case MidpointRounding.AwayFromZero:
{
- float fraction = ModF(x, &x);
-
- if (Abs(fraction) >= 0.5f)
- {
- x += Sign(fraction);
- }
-
+ // manually fold BitDecrement(0.5f)
+ x = Truncate(x + CopySign(0.49999997f, x));
break;
}
// Directed rounding: Round to the nearest value, toward to zero
diff --git a/src/libraries/System.Private.CoreLib/src/System/MemoryExtensions.cs b/src/libraries/System.Private.CoreLib/src/System/MemoryExtensions.cs
index 5ae66529eb2..fd6229f70c1 100644
--- a/src/libraries/System.Private.CoreLib/src/System/MemoryExtensions.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/MemoryExtensions.cs
@@ -1617,6 +1617,7 @@ namespace System
Unsafe.Add(ref valueRef, 2),
span.Length);
+#if !MONO // We don't have a mono overload for 4 values
case 4:
return SpanHelpers.LastIndexOfAnyValueType(
ref spanRef,
@@ -1625,6 +1626,7 @@ namespace System
Unsafe.Add(ref valueRef, 2),
Unsafe.Add(ref valueRef, 3),
span.Length);
+#endif
default:
return LastIndexOfAnyProbabilistic(ref Unsafe.As<short, char>(ref spanRef), span.Length, ref Unsafe.As<short, char>(ref valueRef), values.Length);
diff --git a/src/libraries/System.Private.CoreLib/src/System/Numerics/INumberBase.cs b/src/libraries/System.Private.CoreLib/src/System/Numerics/INumberBase.cs
index 7bc025bf806..1bfcc4bb6a5 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Numerics/INumberBase.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Numerics/INumberBase.cs
@@ -337,7 +337,7 @@ namespace System.Numerics
/// <param name="result">On return, contains the result of successfully parsing <paramref name="s" /> or an undefined value on failure.</param>
/// <returns><c>true</c> if <paramref name="s" /> was successfully parsed; otherwise, <c>false</c>.</returns>
/// <exception cref="ArgumentException"><paramref name="style" /> is not a supported <see cref="NumberStyles" /> value.</exception>
- static abstract bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out TSelf result);
+ static abstract bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, [MaybeNullWhen(false)] out TSelf result);
/// <summary>Tries to parses a span of characters into a value.</summary>
/// <param name="s">The span of characters to parse.</param>
@@ -346,6 +346,6 @@ namespace System.Numerics
/// <param name="result">On return, contains the result of successfully parsing <paramref name="s" /> or an undefined value on failure.</param>
/// <returns><c>true</c> if <paramref name="s" /> was successfully parsed; otherwise, <c>false</c>.</returns>
/// <exception cref="ArgumentException"><paramref name="style" /> is not a supported <see cref="NumberStyles" /> value.</exception>
- static abstract bool TryParse(ReadOnlySpan<char> s, NumberStyles style, IFormatProvider? provider, out TSelf result);
+ static abstract bool TryParse(ReadOnlySpan<char> s, NumberStyles style, IFormatProvider? provider, [MaybeNullWhen(false)] out TSelf result);
}
}
diff --git a/src/libraries/System.Private.CoreLib/src/System/Numerics/TotalOrderIeee754Comparer.cs b/src/libraries/System.Private.CoreLib/src/System/Numerics/TotalOrderIeee754Comparer.cs
new file mode 100644
index 00000000000..d4611684336
--- /dev/null
+++ b/src/libraries/System.Private.CoreLib/src/System/Numerics/TotalOrderIeee754Comparer.cs
@@ -0,0 +1,233 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+
+namespace System.Numerics
+{
+ /// <summary>
+ /// Represents a comparison operation that compares floating-point numbers
+ /// with IEEE 754 totalOrder semantic.
+ /// </summary>
+ /// <typeparam name="T">The type of the numbers to be compared, must be an IEEE 754 floating-point type.</typeparam>
+ public readonly struct TotalOrderIeee754Comparer<T> : IComparer<T>, IEqualityComparer<T>, IEquatable<TotalOrderIeee754Comparer<T>>
+ where T : IFloatingPointIeee754<T>?
+ {
+ /// <summary>
+ /// Compares two numbers with IEEE 754 totalOrder semantic and returns
+ /// a value indicating whether one is less than, equal to, or greater than the other.
+ /// </summary>
+ /// <param name="x">The first number to compare.</param>
+ /// <param name="y">The second number to compare.</param>
+ /// <returns>
+ /// A signed integer that indicates the relative
+ /// values of <paramref name="x"/> and <paramref name="y"/>, as shown in the following table.
+ /// <list type="table">
+ /// <listheader>
+ /// <term> Value</term>
+ /// <description> Meaning</description>
+ /// </listheader>
+ /// <item>
+ /// <term> Less than zero</term>
+ /// <description><paramref name = "x" /> is less than <paramref name="y" /></description>
+ /// </item>
+ /// <item>
+ /// <term> Zero</term>
+ /// <description><paramref name = "x" /> equals <paramref name="y" /></description>
+ /// </item>
+ /// <item>
+ /// <term> Greater than zero</term>
+ /// <description><paramref name = "x" /> is greater than <paramref name="y" /></description>
+ /// </item>
+ /// </list>
+ /// </returns>
+ /// <remarks>
+ /// IEEE 754 specification defines totalOrder as &lt;= semantic.
+ /// totalOrder(x,y) is <see langword="true"/> when the result of this method is less than or equal to 0.
+ /// </remarks>
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public int Compare(T? x, T? y)
+ {
+ if (typeof(T) == typeof(float))
+ {
+ return CompareIntegerSemantic(BitConverter.SingleToInt32Bits((float)(object)x!), BitConverter.SingleToInt32Bits((float)(object)y!));
+ }
+ else if (typeof(T) == typeof(double))
+ {
+ return CompareIntegerSemantic(BitConverter.DoubleToInt64Bits((double)(object)x!), BitConverter.DoubleToInt64Bits((double)(object)y!));
+ }
+ else if (typeof(T) == typeof(Half))
+ {
+ return CompareIntegerSemantic(BitConverter.HalfToInt16Bits((Half)(object)x!), BitConverter.HalfToInt16Bits((Half)(object)y!));
+ }
+ else
+ {
+ return CompareGeneric(x, y);
+ }
+
+ static int CompareIntegerSemantic<TInteger>(TInteger x, TInteger y)
+ where TInteger : struct, IBinaryInteger<TInteger>, ISignedNumber<TInteger>
+ {
+ // In IEEE 754 binary floating-point representation, a number is represented as Sign|Exponent|Significand
+ // Normal numbers has an implicit 1. in front of the significand, so value with larger exponent will have larger absolute value
+ // Inf and NaN are defined as Exponent=All 1s, while Inf has Significand=0, sNaN has Significand=0xxx and qNaN has Significand=1xxx
+ // This also satisfies totalOrder definition which is +x < +Inf < +sNaN < +qNaN
+
+ // The order of NaNs of same category and same sign is implementation defined,
+ // here we define it as the order of exponent bits to simplify comparison
+
+ // Negative values are represented in sign-magnitude, instead of two's complement like integers
+ // Just negating the comparison result when both numbers are negative is enough
+
+ return (TInteger.IsNegative(x) && TInteger.IsNegative(y)) ? y.CompareTo(x) : x.CompareTo(y);
+ }
+
+ static int CompareGeneric(T? x, T? y)
+ {
+ // IComparer contract is null < value
+
+ if (x is null)
+ {
+ return (y is null) ? 0 : -1;
+ }
+ else if (y is null)
+ {
+ return 1;
+ }
+
+ // If < or > returns true, the result satisfies definition of totalOrder too
+
+ if (x < y)
+ {
+ return -1;
+ }
+ else if (x > y)
+ {
+ return 1;
+ }
+ else if (x == y)
+ {
+ if (T.IsZero(x)) // only zeros are equal to zeros
+ {
+ // IEEE 754 numbers are either positive or negative. Skip check for the opposite.
+
+ if (T.IsNegative(x))
+ {
+ return T.IsNegative(y) ? 0 : -1;
+ }
+ else
+ {
+ return T.IsPositive(y) ? 0 : 1;
+ }
+ }
+ else
+ {
+ // Equivalant values are compared by their exponent parts,
+ // and the value with smaller exponent is considered closer to zero.
+
+ // This only applies to IEEE 754 decimals. Consider to add support if decimals are added into .NET.
+ return 0;
+ }
+ }
+ else
+ {
+ // One or two of the values are NaN
+ // totalOrder defines that -qNaN < -sNaN < x < +sNaN < + qNaN
+
+ static int CompareSignificand(T x, T y)
+ {
+ // IEEE 754 totalOrder only defines the order of NaN type bit (the first bit of significand)
+ // To match the integer semantic comparison above, here we compare all the significand bits
+ // Revisit this if decimals are added
+
+ // Leave the space for custom floating-point type that has variable significand length
+
+ int xSignificandBits = x!.GetSignificandBitLength();
+ int ySignificandBits = y!.GetSignificandBitLength();
+
+ if (xSignificandBits == ySignificandBits)
+ {
+ // Prevent stack overflow for huge numbers
+ const int StackAllocThreshold = 256;
+
+ int xSignificandLength = x.GetSignificandByteCount();
+ int ySignificandLength = y.GetSignificandByteCount();
+
+ Span<byte> significandX = xSignificandLength <= StackAllocThreshold ? stackalloc byte[xSignificandLength] : new byte[xSignificandLength];
+ Span<byte> significandY = ySignificandLength <= StackAllocThreshold ? stackalloc byte[ySignificandLength] : new byte[ySignificandLength];
+
+ x.WriteSignificandBigEndian(significandX);
+ y.WriteSignificandBigEndian(significandY);
+
+ return significandX.SequenceCompareTo(significandY);
+ }
+ else
+ {
+ return xSignificandBits.CompareTo(ySignificandBits);
+ }
+ }
+
+ if (T.IsNaN(x))
+ {
+ if (T.IsNaN(y))
+ {
+ if (T.IsNegative(x))
+ {
+ return T.IsPositive(y) ? -1 : CompareSignificand(y, x);
+ }
+ else
+ {
+ return T.IsNegative(y) ? 1 : CompareSignificand(x, y);
+ }
+ }
+ else
+ {
+ return T.IsPositive(x) ? 1 : -1;
+ }
+ }
+ else if (T.IsNaN(y))
+ {
+ return T.IsPositive(y) ? -1 : 1;
+ }
+ else
+ {
+ // T does not correctly implement IEEE754 semantics
+ ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidArgumentForComparison);
+ return 0; // unreachable
+ }
+ }
+ }
+ }
+
+ /// <summary>
+ /// Determines whether the specified numbers are equal.
+ /// </summary>
+ /// <param name="x">The first number of type <typeparamref name="T"/> to compare.</param>
+ /// <param name="y">The second number of type <typeparamref name="T"/> to compare.</param>
+ /// <returns><see langword="true"/> if the specified numbers are equal; otherwise, <see langword="false"/>.</returns>
+ /// <remarks>
+ /// There is no corresponding equals semantic with totalOrder defined by IEEE 754 specification.
+ /// This method returns <see langword="true"/> when <see cref="Compare(T?, T?)"/> returns 0.
+ /// </remarks>
+ public bool Equals(T? x, T? y) => Compare(x, y) == 0;
+
+ /// <summary>
+ /// Returns a hash code for the specified number.
+ /// </summary>
+ /// <param name="obj">The number for which a hash code is to be returned.</param>
+ /// <returns>A hash code for the specified number.</returns>
+ public int GetHashCode([DisallowNull] T obj)
+ {
+ ArgumentNullException.ThrowIfNull(obj, nameof(obj));
+ return obj.GetHashCode();
+ }
+
+ public bool Equals(TotalOrderIeee754Comparer<T> other) => true;
+
+ public override bool Equals([NotNullWhen(true)] object? obj) => obj is TotalOrderIeee754Comparer<T>;
+
+ public override int GetHashCode() => EqualityComparer<T>.Default.GetHashCode();
+ }
+}
diff --git a/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector.cs b/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector.cs
index 5dee06aa6ad..207ce468711 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector.cs
@@ -18,7 +18,7 @@ namespace System.Numerics
public static bool IsHardwareAccelerated
{
[Intrinsic]
- get => false;
+ get => IsHardwareAccelerated;
}
/// <summary>Computes the absolute value of each element in a vector.</summary>
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.cs
index a2d74336bee..c5b926c4b21 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.cs
@@ -4,49 +4,20 @@
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
-using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
-using System.Runtime.Loader;
using System.Text;
-using System.Threading;
-using static System.Runtime.CompilerServices.RuntimeHelpers;
namespace System.Reflection.Emit
{
- public sealed class DynamicMethod : MethodInfo
+ public sealed partial class DynamicMethod : MethodInfo
{
- private RuntimeType[] m_parameterTypes;
- internal IRuntimeMethodInfo? m_methodHandle;
- private RuntimeType m_returnType;
- private DynamicILGenerator? m_ilGenerator;
- private DynamicILInfo? m_DynamicILInfo;
- private bool m_fInitLocals;
- private RuntimeModule m_module = null!;
- internal bool m_skipVisibility;
- internal RuntimeType? m_typeOwner; // can be null
- private MethodInvoker? _invoker;
- private Signature? _signature;
-
- // We want the creator of the DynamicMethod to control who has access to the
- // DynamicMethod (just like we do for delegates). However, a user can get to
- // the corresponding RTDynamicMethod using Exception.TargetSite, StackFrame.GetMethod, etc.
- // If we allowed use of RTDynamicMethod, the creator of the DynamicMethod would
- // not be able to bound access to the DynamicMethod. Hence, we need to ensure that
- // we do not allow direct use of RTDynamicMethod.
- private RTDynamicMethod m_dynMethod;
-
- // needed to keep the object alive during jitting
- // assigned by the DynamicResolver ctor
- internal DynamicResolver? m_resolver;
-
- internal bool m_restrictedSkipVisibility;
// The context when the method was created. We use this to do the RestrictedMemberAccess checks.
// These checks are done when the method is compiled. This can happen at an arbitrary time,
// when CreateDelegate or Invoke is called, or when another DynamicMethod executes OpCodes.Call.
// We capture the creation context so that we can do the checks against the same context,
// irrespective of when the method gets compiled. Note that the DynamicMethod does not know when
// it is ready for use since there is not API which indictates that IL generation has completed.
- private static volatile RuntimeModule? s_anonymouslyHostedDynamicMethodsModule;
+ private static volatile Module? s_anonymouslyHostedDynamicMethodsModule;
private static readonly object s_anonymouslyHostedDynamicMethodsModuleLock = new object();
//
@@ -229,7 +200,7 @@ namespace System.Reflection.Emit
// We create a transparent assembly to host DynamicMethods. Since the assembly does not have any
// non-public fields (or any fields at all), it is a safe anonymous assembly to host DynamicMethods
- private static RuntimeModule GetDynamicMethodsModule()
+ private static Module GetDynamicMethodsModule()
{
if (s_anonymouslyHostedDynamicMethodsModule != null)
return s_anonymouslyHostedDynamicMethodsModule;
@@ -249,15 +220,16 @@ namespace System.Reflection.Emit
null);
// this always gets the internal module.
- s_anonymouslyHostedDynamicMethodsModule = (RuntimeModule)assembly.ManifestModule!;
+ s_anonymouslyHostedDynamicMethodsModule = assembly.ManifestModule!;
}
return s_anonymouslyHostedDynamicMethodsModule;
}
- [MemberNotNull(nameof(m_parameterTypes))]
- [MemberNotNull(nameof(m_returnType))]
- [MemberNotNull(nameof(m_dynMethod))]
+ [MemberNotNull(nameof(_parameterTypes))]
+ [MemberNotNull(nameof(_returnType))]
+ [MemberNotNull(nameof(_dynMethod))]
+ [MemberNotNull(nameof(_module))]
private void Init(string name,
MethodAttributes attributes,
CallingConventions callingConvention,
@@ -275,34 +247,31 @@ namespace System.Reflection.Emit
// check and store the signature
if (signature != null)
{
- m_parameterTypes = new RuntimeType[signature.Length];
+ _parameterTypes = new RuntimeType[signature.Length];
for (int i = 0; i < signature.Length; i++)
{
if (signature[i] == null)
throw new ArgumentException(SR.Arg_InvalidTypeInSignature);
- m_parameterTypes[i] = (signature[i].UnderlyingSystemType as RuntimeType)!;
- if (m_parameterTypes[i] == null || m_parameterTypes[i] == typeof(void))
+ _parameterTypes[i] = (signature[i].UnderlyingSystemType as RuntimeType)!;
+ if (_parameterTypes[i] == null || _parameterTypes[i] == typeof(void))
throw new ArgumentException(SR.Arg_InvalidTypeInSignature);
}
}
else
{
- m_parameterTypes = Array.Empty<RuntimeType>();
+ _parameterTypes = Array.Empty<RuntimeType>();
}
// check and store the return value
- m_returnType = (returnType == null) ? (RuntimeType)typeof(void) : (returnType.UnderlyingSystemType as RuntimeType)!;
- if (m_returnType == null)
- throw new NotSupportedException(SR.Arg_InvalidTypeInRetType);
+ _returnType = returnType is null ?
+ (RuntimeType)typeof(void) :
+ (returnType.UnderlyingSystemType as RuntimeType) ?? throw new NotSupportedException(SR.Arg_InvalidTypeInRetType);
if (transparentMethod)
{
Debug.Assert(owner == null && m == null, "owner and m cannot be set for transparent methods");
- m_module = GetDynamicMethodsModule();
- if (skipVisibility)
- {
- m_restrictedSkipVisibility = true;
- }
+ _module = GetDynamicMethodsModule();
+ _restrictedSkipVisibility = skipVisibility;
}
else
{
@@ -311,122 +280,60 @@ namespace System.Reflection.Emit
Debug.Assert(m == null || owner == null, "m and owner cannot both be set");
if (m != null)
- m_module = m.ModuleHandle.GetRuntimeModule(); // this returns the underlying module for all RuntimeModule and ModuleBuilder objects.
+ _module = ModuleBuilder.GetRuntimeModuleFromModule(m); // this returns the underlying module for all RuntimeModule and ModuleBuilder objects.
else
{
- RuntimeType? rtOwner = null;
- if (owner != null)
- rtOwner = owner.UnderlyingSystemType as RuntimeType;
-
- if (rtOwner != null)
+ if (owner?.UnderlyingSystemType is RuntimeType rtOwner)
{
if (rtOwner.HasElementType || rtOwner.ContainsGenericParameters
|| rtOwner.IsGenericParameter || rtOwner.IsInterface)
throw new ArgumentException(SR.Argument_InvalidTypeForDynamicMethod);
- m_typeOwner = rtOwner;
- m_module = rtOwner.GetRuntimeModule();
+ _typeOwner = rtOwner;
+ _module = rtOwner.GetRuntimeModule();
+ }
+ else
+ {
+ _module = null!;
}
}
- m_skipVisibility = skipVisibility;
+ _skipVisibility = skipVisibility;
}
// initialize remaining fields
- m_ilGenerator = null;
- m_fInitLocals = true;
- m_methodHandle = null;
- m_dynMethod = new RTDynamicMethod(this, name, attributes, callingConvention);
- }
-
- //
- // Delegate and method creation
- //
-
- public sealed override Delegate CreateDelegate(Type delegateType)
- {
- if (m_restrictedSkipVisibility)
- {
- // Compile the method since accessibility checks are done as part of compilation.
- GetMethodDescriptor();
- IRuntimeMethodInfo? methodHandle = m_methodHandle;
- System.Runtime.CompilerServices.RuntimeHelpers.CompileMethod(methodHandle != null ? methodHandle.Value : RuntimeMethodHandleInternal.EmptyHandle);
- GC.KeepAlive(methodHandle);
- }
-
- MulticastDelegate d = (MulticastDelegate)Delegate.CreateDelegateNoSecurityCheck(delegateType, null, GetMethodDescriptor());
- // stash this MethodInfo by brute force.
- d.StoreDynamicMethod(GetMethodInfo());
- return d;
- }
-
- public sealed override Delegate CreateDelegate(Type delegateType, object? target)
- {
- if (m_restrictedSkipVisibility)
- {
- // Compile the method since accessibility checks are done as part of compilation
- GetMethodDescriptor();
- IRuntimeMethodInfo? methodHandle = m_methodHandle;
- System.Runtime.CompilerServices.RuntimeHelpers.CompileMethod(methodHandle != null ? methodHandle.Value : RuntimeMethodHandleInternal.EmptyHandle);
- GC.KeepAlive(methodHandle);
- }
-
- MulticastDelegate d = (MulticastDelegate)Delegate.CreateDelegateNoSecurityCheck(delegateType, target, GetMethodDescriptor());
- // stash this MethodInfo by brute force.
- d.StoreDynamicMethod(GetMethodInfo());
- return d;
- }
-
- // This is guaranteed to return a valid handle
- internal RuntimeMethodHandle GetMethodDescriptor()
- {
- if (m_methodHandle == null)
- {
- lock (this)
- {
- if (m_methodHandle == null)
- {
- if (m_DynamicILInfo != null)
- m_DynamicILInfo.GetCallableMethod(m_module, this);
- else
- {
- if (m_ilGenerator == null || m_ilGenerator.ILOffset == 0)
- throw new InvalidOperationException(SR.Format(SR.InvalidOperation_BadEmptyMethodBody, Name));
-
- m_ilGenerator.GetCallableMethod(m_module, this);
- }
- }
- }
- }
- return new RuntimeMethodHandle(m_methodHandle!);
+ _ilGenerator = null;
+ _initLocals = true;
+ _methodHandle = null;
+ _dynMethod = new RTDynamicMethod(this, name, attributes, callingConvention);
}
//
// MethodInfo api. They mostly forward to RTDynamicMethod
//
- public override string ToString() { return m_dynMethod.ToString(); }
+ public override string ToString() => _dynMethod.ToString();
- public override string Name => m_dynMethod.Name;
+ public override string Name => _dynMethod.Name;
- public override Type? DeclaringType => m_dynMethod.DeclaringType;
+ public override Type? DeclaringType => _dynMethod.DeclaringType;
- public override Type? ReflectedType => m_dynMethod.ReflectedType;
+ public override Type? ReflectedType => _dynMethod.ReflectedType;
- public override Module Module => m_dynMethod.Module;
+ public override Module Module => _dynMethod.Module;
// we cannot return a MethodHandle because we cannot track it via GC so this method is off limits
public override RuntimeMethodHandle MethodHandle => throw new InvalidOperationException(SR.InvalidOperation_NotAllowedInDynamicMethod);
- public override MethodAttributes Attributes => m_dynMethod.Attributes;
+ public override MethodAttributes Attributes => _dynMethod.Attributes;
- public override CallingConventions CallingConvention => m_dynMethod.CallingConvention;
+ public override CallingConventions CallingConvention => _dynMethod.CallingConvention;
public override MethodInfo GetBaseDefinition() { return this; }
- public override ParameterInfo[] GetParameters() { return m_dynMethod.GetParameters(); }
+ public override ParameterInfo[] GetParameters() => _dynMethod.GetParameters();
- public override MethodImplAttributes GetMethodImplementationFlags() { return m_dynMethod.GetMethodImplementationFlags(); }
+ public override MethodImplAttributes GetMethodImplementationFlags() => _dynMethod.GetMethodImplementationFlags();
public override bool IsSecurityCritical => true;
@@ -434,198 +341,17 @@ namespace System.Reflection.Emit
public override bool IsSecurityTransparent => false;
- private MethodInvoker Invoker
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get
- {
- _invoker ??= new MethodInvoker(this, Signature);
- return _invoker;
- }
- }
-
- internal Signature Signature
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get
- {
- [MethodImpl(MethodImplOptions.NoInlining)] // move lazy sig generation out of the hot path
- Signature LazyCreateSignature()
- {
- Debug.Assert(m_methodHandle != null);
- Debug.Assert(m_parameterTypes != null);
-
- Signature newSig = new Signature(m_methodHandle, m_parameterTypes, m_returnType, CallingConvention);
- Volatile.Write(ref _signature, newSig);
- return newSig;
- }
+ public override object[] GetCustomAttributes(Type attributeType, bool inherit) => _dynMethod.GetCustomAttributes(attributeType, inherit);
- return _signature ?? LazyCreateSignature();
- }
- }
+ public override object[] GetCustomAttributes(bool inherit) => _dynMethod.GetCustomAttributes(inherit);
- public override object? Invoke(object? obj, BindingFlags invokeAttr, Binder? binder, object?[]? parameters, CultureInfo? culture)
- {
- if ((CallingConvention & CallingConventions.VarArgs) == CallingConventions.VarArgs)
- throw new NotSupportedException(SR.NotSupported_CallToVarArg);
-
- //
- // We do not demand any permission here because the caller already has access
- // to the current DynamicMethod object, and it could just as easily emit another
- // Transparent DynamicMethod to call the current DynamicMethod.
- //
+ public override bool IsDefined(Type attributeType, bool inherit) => _dynMethod.IsDefined(attributeType, inherit);
- _ = GetMethodDescriptor();
- // ignore obj since it's a static method
+ public override Type ReturnType => _dynMethod.ReturnType;
- // verify arguments
- int argCount = (parameters != null) ? parameters.Length : 0;
- if (Signature.Arguments.Length != argCount)
- throw new TargetParameterCountException(SR.Arg_ParmCnt);
+ public override ParameterInfo ReturnParameter => _dynMethod.ReturnParameter;
- object? retValue;
-
- unsafe
- {
- if (argCount == 0)
- {
- retValue = Invoker.InlinedInvoke(obj, args: default, invokeAttr);
- }
- else if (argCount > MaxStackAllocArgCount)
- {
- Debug.Assert(parameters != null);
- retValue = InvokeWithManyArguments(this, argCount, obj, invokeAttr, binder, parameters, culture);
- }
- else
- {
- Debug.Assert(parameters != null);
- StackAllocedArguments argStorage = default;
- Span<object?> copyOfParameters = new(ref argStorage._arg0, argCount);
- Span<ParameterCopyBackAction> shouldCopyBackParameters = new(ref argStorage._copyBack0, argCount);
-
- StackAllocatedByRefs byrefStorage = default;
- IntPtr* pByRefStorage = (IntPtr*)&byrefStorage;
-
- CheckArguments(
- copyOfParameters,
- pByRefStorage,
- shouldCopyBackParameters,
- parameters,
- Signature.Arguments,
- binder,
- culture,
- invokeAttr);
-
- retValue = Invoker.InlinedInvoke(obj, pByRefStorage, invokeAttr);
-
- // Copy modified values out. This should be done only with ByRef or Type.Missing parameters.
- for (int i = 0; i < argCount; i++)
- {
- ParameterCopyBackAction action = shouldCopyBackParameters[i];
- if (action != ParameterCopyBackAction.None)
- {
- if (action == ParameterCopyBackAction.Copy)
- {
- parameters[i] = copyOfParameters[i];
- }
- else
- {
- Debug.Assert(action == ParameterCopyBackAction.CopyNullable);
- Debug.Assert(copyOfParameters[i] != null);
- Debug.Assert(((RuntimeType)copyOfParameters[i]!.GetType()).IsNullableOfT);
- parameters[i] = RuntimeMethodHandle.ReboxFromNullable(copyOfParameters[i]);
- }
- }
- }
- }
- }
-
- GC.KeepAlive(this);
- return retValue;
- }
-
- // Slower path that does a heap alloc for copyOfParameters and registers byrefs to those objects.
- // This is a separate method to support better performance for the faster paths.
- private static unsafe object? InvokeWithManyArguments(
- DynamicMethod mi,
- int argCount,
- object? obj,
- BindingFlags invokeAttr,
- Binder? binder,
- object?[] parameters,
- CultureInfo? culture)
- {
- object[] objHolder = new object[argCount];
- Span<object?> copyOfParameters = new(objHolder, 0, argCount);
-
- // We don't check a max stack size since we are invoking a method which
- // naturally requires a stack size that is dependent on the arg count\size.
- IntPtr* pByRefStorage = stackalloc IntPtr[argCount];
- NativeMemory.Clear(pByRefStorage, (uint)(argCount * sizeof(IntPtr)));
-
- ParameterCopyBackAction* copyBackActions = stackalloc ParameterCopyBackAction[argCount];
- Span<ParameterCopyBackAction> shouldCopyBackParameters = new(copyBackActions, argCount);
-
- GCFrameRegistration reg = new(pByRefStorage, (uint)argCount, areByRefs: true);
-
- object? retValue;
- try
- {
- RegisterForGCReporting(&reg);
- mi.CheckArguments(
- copyOfParameters,
- pByRefStorage,
- shouldCopyBackParameters,
- parameters,
- mi.Signature.Arguments,
- binder,
- culture,
- invokeAttr);
-
- retValue = mi.Invoker.InlinedInvoke(obj, pByRefStorage, invokeAttr);
- }
- finally
- {
- UnregisterForGCReporting(&reg);
- }
-
- // Copy modified values out. This should be done only with ByRef or Type.Missing parameters.
- for (int i = 0; i < argCount; i++)
- {
- ParameterCopyBackAction action = shouldCopyBackParameters[i];
- if (action != ParameterCopyBackAction.None)
- {
- if (action == ParameterCopyBackAction.Copy)
- {
- parameters[i] = copyOfParameters[i];
- }
- else
- {
- Debug.Assert(action == ParameterCopyBackAction.CopyNullable);
- Debug.Assert(copyOfParameters[i] != null);
- Debug.Assert(((RuntimeType)copyOfParameters[i]!.GetType()).IsNullableOfT);
- parameters[i] = RuntimeMethodHandle.ReboxFromNullable(copyOfParameters[i]);
- }
- }
- }
-
- return retValue;
- }
-
- public override object[] GetCustomAttributes(Type attributeType, bool inherit)
- {
- return m_dynMethod.GetCustomAttributes(attributeType, inherit);
- }
-
- public override object[] GetCustomAttributes(bool inherit) { return m_dynMethod.GetCustomAttributes(inherit); }
-
- public override bool IsDefined(Type attributeType, bool inherit) { return m_dynMethod.IsDefined(attributeType, inherit); }
-
- public override Type ReturnType => m_dynMethod.ReturnType;
-
- public override ParameterInfo ReturnParameter => m_dynMethod.ReturnParameter;
-
- public override ICustomAttributeProvider ReturnTypeCustomAttributes => m_dynMethod.ReturnTypeCustomAttributes;
+ public override ICustomAttributeProvider ReturnTypeCustomAttributes => _dynMethod.ReturnTypeCustomAttributes;
//
// DynamicMethod specific methods
@@ -633,50 +359,28 @@ namespace System.Reflection.Emit
public ParameterBuilder? DefineParameter(int position, ParameterAttributes attributes, string? parameterName)
{
- if (position < 0 || position > m_parameterTypes.Length)
+ if (position < 0 || position > _parameterTypes.Length)
throw new ArgumentOutOfRangeException(SR.ArgumentOutOfRange_ParamSequence);
position--; // it's 1 based. 0 is the return value
if (position >= 0)
{
- RuntimeParameterInfo[] parameters = m_dynMethod.LoadParameters();
+ RuntimeParameterInfo[] parameters = _dynMethod.LoadParameters();
parameters[position].SetName(parameterName);
parameters[position].SetAttributes(attributes);
}
return null;
}
- public DynamicILInfo GetDynamicILInfo()
- {
- if (m_DynamicILInfo == null)
- {
- byte[] methodSignature = SignatureHelper.GetMethodSigHelper(
- null, CallingConvention, ReturnType, null, null, m_parameterTypes, null, null).GetSignature(true);
- m_DynamicILInfo = new DynamicILInfo(this, methodSignature);
- }
- return m_DynamicILInfo;
- }
-
public ILGenerator GetILGenerator()
{
return GetILGenerator(64);
}
- public ILGenerator GetILGenerator(int streamSize)
- {
- if (m_ilGenerator == null)
- {
- byte[] methodSignature = SignatureHelper.GetMethodSigHelper(
- null, CallingConvention, ReturnType, null, null, m_parameterTypes, null, null).GetSignature(true);
- m_ilGenerator = new DynamicILGenerator(this, methodSignature, streamSize);
- }
- return m_ilGenerator;
- }
-
public bool InitLocals
{
- get => m_fInitLocals;
- set => m_fInitLocals = value;
+ get => _initLocals;
+ set => _initLocals = value;
}
//
@@ -685,7 +389,7 @@ namespace System.Reflection.Emit
internal MethodInfo GetMethodInfo()
{
- return m_dynMethod;
+ return _dynMethod;
}
//////////////////////////////////////////////////////////////////////////////////////////////
@@ -698,18 +402,18 @@ namespace System.Reflection.Emit
//
internal sealed class RTDynamicMethod : MethodInfo
{
- internal DynamicMethod m_owner;
- private RuntimeParameterInfo[]? m_parameters;
- private string m_name;
- private MethodAttributes m_attributes;
- private CallingConventions m_callingConvention;
+ internal DynamicMethod _owner;
+ private RuntimeParameterInfo[]? _parameters;
+ private string _name;
+ private MethodAttributes _attributes;
+ private CallingConventions _callingConvention;
internal RTDynamicMethod(DynamicMethod owner, string name, MethodAttributes attributes, CallingConventions callingConvention)
{
- m_owner = owner;
- m_name = name;
- m_attributes = attributes;
- m_callingConvention = callingConvention;
+ _owner = owner;
+ _name = name;
+ _attributes = attributes;
+ _callingConvention = callingConvention;
}
//
@@ -730,19 +434,19 @@ namespace System.Reflection.Emit
return sbName.ToString();
}
- public override string Name => m_name;
+ public override string Name => _name;
public override Type? DeclaringType => null;
public override Type? ReflectedType => null;
- public override Module Module => m_owner.m_module;
+ public override Module Module => _owner._module;
public override RuntimeMethodHandle MethodHandle => throw new InvalidOperationException(SR.InvalidOperation_NotAllowedInDynamicMethod);
- public override MethodAttributes Attributes => m_attributes;
+ public override MethodAttributes Attributes => _attributes;
- public override CallingConventions CallingConvention => m_callingConvention;
+ public override CallingConventions CallingConvention => _callingConvention;
public override MethodInfo GetBaseDefinition()
{
@@ -757,6 +461,11 @@ namespace System.Reflection.Emit
return parameters;
}
+ internal override ParameterInfo[] GetParametersNoCopy()
+ {
+ return LoadParameters();
+ }
+
public override MethodImplAttributes GetMethodImplementationFlags()
{
return MethodImplAttributes.IL | MethodImplAttributes.NoInlining;
@@ -802,33 +511,33 @@ namespace System.Reflection.Emit
return attributeType.IsAssignableFrom(typeof(MethodImplAttribute));
}
- public override bool IsSecurityCritical => m_owner.IsSecurityCritical;
+ public override bool IsSecurityCritical => _owner.IsSecurityCritical;
- public override bool IsSecuritySafeCritical => m_owner.IsSecuritySafeCritical;
+ public override bool IsSecuritySafeCritical => _owner.IsSecuritySafeCritical;
- public override bool IsSecurityTransparent => m_owner.IsSecurityTransparent;
+ public override bool IsSecurityTransparent => _owner.IsSecurityTransparent;
- public override Type ReturnType => m_owner.m_returnType;
+ public override Type ReturnType => _owner._returnType;
- public override ParameterInfo ReturnParameter => new RuntimeParameterInfo(this, null, m_owner.m_returnType, -1);
+ public override ParameterInfo ReturnParameter => new RuntimeParameterInfo(this, null, _owner._returnType, -1);
public override ICustomAttributeProvider ReturnTypeCustomAttributes => new EmptyCAHolder();
internal RuntimeParameterInfo[] LoadParameters()
{
- if (m_parameters == null)
+ if (_parameters == null)
{
- Type[] parameterTypes = m_owner.m_parameterTypes;
+ Type[] parameterTypes = _owner._parameterTypes;
RuntimeParameterInfo[] parameters = new RuntimeParameterInfo[parameterTypes.Length];
for (int i = 0; i < parameterTypes.Length; i++)
{
parameters[i] = new RuntimeParameterInfo(this, null, parameterTypes[i], i);
}
- m_parameters ??= parameters; // should we Interlocked.CompareExchange?
+ _parameters ??= parameters; // should we Interlocked.CompareExchange?
}
- return m_parameters;
+ return _parameters;
}
}
}
diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/Module.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/Module.cs
index 9efb2ac1803..30f47a9e21a 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Reflection/Module.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/Module.cs
@@ -24,7 +24,7 @@ namespace System.Reflection
public virtual Guid ModuleVersionId => throw NotImplemented.ByDesign;
public virtual string ScopeName => throw NotImplemented.ByDesign;
public ModuleHandle ModuleHandle => GetModuleHandleImpl();
- protected virtual ModuleHandle GetModuleHandleImpl() => ModuleHandle.EmptyHandle; // Not an api but declared protected because of Reflection.Core/Corelib divide (when built by NativeAOT)
+ private protected virtual ModuleHandle GetModuleHandleImpl() => ModuleHandle.EmptyHandle;
public virtual void GetPEKind(out PortableExecutableKinds peKind, out ImageFileMachine machine) { throw NotImplemented.ByDesign; }
public virtual bool IsResource() { throw NotImplemented.ByDesign; }
diff --git a/src/libraries/System.Private.CoreLib/src/System/Resources/ResourceManager.cs b/src/libraries/System.Private.CoreLib/src/System/Resources/ResourceManager.cs
index 06937798394..20f07154bde 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Resources/ResourceManager.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Resources/ResourceManager.cs
@@ -98,7 +98,7 @@ namespace System.Resources
public ResourceSet? lastResourceSet;
}
- protected string BaseNameField;
+ protected string BaseNameField; // The field is protected for .NET Framework compatibility
protected Assembly? MainAssembly; // Need the assembly manifest sometimes.
private Dictionary<string, ResourceSet>? _resourceSets;
diff --git a/src/libraries/System.Private.CoreLib/src/System/Resources/ResourceSet.cs b/src/libraries/System.Private.CoreLib/src/System/Resources/ResourceSet.cs
index 981a390ef94..65689f7ab1e 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Resources/ResourceSet.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Resources/ResourceSet.cs
@@ -18,7 +18,7 @@ namespace System.Resources
//
public class ResourceSet : IDisposable, IEnumerable
{
- protected IResourceReader Reader = null!;
+ protected IResourceReader? Reader; // The field is protected for .NET Framework compatibility
private Dictionary<object, object?>? _table;
private Dictionary<string, object?>? _caseInsensitiveTable; // For case-insensitive lookups.
diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/RuntimeInformation.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/RuntimeInformation.cs
index 8f97a5a660c..281b00f0c8b 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/RuntimeInformation.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/RuntimeInformation.cs
@@ -53,27 +53,28 @@ namespace System.Runtime.InteropServices
public static Architecture ProcessArchitecture
#if TARGET_X86
- => Architecture.X86;
+ => Architecture.X86
#elif TARGET_AMD64
- => Architecture.X64;
+ => Architecture.X64
#elif TARGET_ARMV6
- => Architecture.Armv6;
+ => Architecture.Armv6
#elif TARGET_ARM
- => Architecture.Arm;
+ => Architecture.Arm
#elif TARGET_ARM64
- => Architecture.Arm64;
+ => Architecture.Arm64
#elif TARGET_WASM
- => Architecture.Wasm;
+ => Architecture.Wasm
#elif TARGET_S390X
- => Architecture.S390x;
+ => Architecture.S390x
#elif TARGET_LOONGARCH64
- => Architecture.LoongArch64;
+ => Architecture.LoongArch64
#elif TARGET_POWERPC64
- => Architecture.Ppc64le;
+ => Architecture.Ppc64le
#elif TARGET_RISCV64
- => (Architecture)9; // TODO-RISCV64: go though API review for RiscV64
+ => (Architecture)9 // TODO-RISCV64: go though API review for RiscV64
#else
#error Unknown Architecture
#endif
+ ;
}
}
diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/UnmanagedFunctionPointerAttribute.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/UnmanagedFunctionPointerAttribute.cs
index 998ce790402..f99e73460af 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/UnmanagedFunctionPointerAttribute.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/UnmanagedFunctionPointerAttribute.cs
@@ -6,11 +6,6 @@ namespace System.Runtime.InteropServices
[AttributeUsage(AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
public sealed class UnmanagedFunctionPointerAttribute : Attribute
{
- public UnmanagedFunctionPointerAttribute()
- {
- CallingConvention = CallingConvention.Winapi;
- }
-
public UnmanagedFunctionPointerAttribute(CallingConvention callingConvention)
{
CallingConvention = callingConvention;
diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Crc32.PlatformNotSupported.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Crc32.PlatformNotSupported.cs
index 7923051be08..3cc715faa36 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Crc32.PlatformNotSupported.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Crc32.PlatformNotSupported.cs
@@ -8,7 +8,6 @@ namespace System.Runtime.Intrinsics.Arm
/// <summary>
/// This class provides access to the ARM Crc32 hardware instructions via intrinsics
/// </summary>
- [Intrinsic]
[CLSCompliant(false)]
public abstract class Crc32 : ArmBase
{
@@ -16,7 +15,6 @@ namespace System.Runtime.Intrinsics.Arm
public static new bool IsSupported { [Intrinsic] get { return false; } }
- [Intrinsic]
public new abstract class Arm64 : ArmBase.Arm64
{
internal Arm64() { }
diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector128.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector128.cs
index 01fb0a062c2..658c48aa045 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector128.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector128.cs
@@ -44,7 +44,7 @@ namespace System.Runtime.Intrinsics
public static bool IsHardwareAccelerated
{
[Intrinsic]
- get => false;
+ get => IsHardwareAccelerated;
}
/// <summary>Computes the absolute value of each element in a vector.</summary>
diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector256.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector256.cs
index 2fcf10a69f2..9f3cc77a850 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector256.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector256.cs
@@ -45,7 +45,7 @@ namespace System.Runtime.Intrinsics
public static bool IsHardwareAccelerated
{
[Intrinsic]
- get => false;
+ get => IsHardwareAccelerated;
}
/// <summary>Computes the absolute value of each element in a vector.</summary>
diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector64.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector64.cs
index efa7c3dd06c..69e7bc88d78 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector64.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector64.cs
@@ -21,7 +21,7 @@ namespace System.Runtime.Intrinsics
public static bool IsHardwareAccelerated
{
[Intrinsic]
- get => false;
+ get => IsHardwareAccelerated;
}
/// <summary>Computes the absolute value of each element in a vector.</summary>
diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/MemoryFailPoint.Windows.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/MemoryFailPoint.Windows.cs
index 593df35d978..8f0ac5eea51 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Runtime/MemoryFailPoint.Windows.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/MemoryFailPoint.Windows.cs
@@ -28,9 +28,9 @@ namespace System.Runtime
totalAddressSpaceFree = default;
return false;
}
+
availPageFile = memoryStatus.ullAvailPageFile;
totalAddressSpaceFree = memoryStatus.ullAvailVirtual;
- // Console.WriteLine($"Memory gate: Mem load: {memory.memoryLoad}% Available memory (physical + page file): {(memory.availPageFile >> 20)} MB Total free address space: {memory.availVirtual >> 20} MB GC Heap: {(GC.GetTotalMemory(true) >> 20)} MB");
return true;
}
@@ -45,8 +45,6 @@ namespace System.Runtime
// know whether VirtualAlloc could succeed.
ulong freeSpaceAfterGCHeap = MemFreeAfterAddress(null, size);
- // Console.WriteLine($"MemoryFailPoint: Checked for free VA space. Found enough? {(freeSpaceAfterGCHeap >= size)} Asked for: {size} Found: {freeSpaceAfterGCHeap}");
-
// We may set these without taking a lock - I don't believe
// this will hurt, as long as we never increment this number in
// the Dispose method. If we do an extra bit of checking every
diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SerializationInfo.SerializationGuard.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SerializationInfo.SerializationGuard.cs
index 6cc4c808a5e..bef1d6b0240 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SerializationInfo.SerializationGuard.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SerializationInfo.SerializationGuard.cs
@@ -19,7 +19,7 @@ namespace System.Runtime.Serialization
t_deserializationTracker ??= new DeserializationTracker();
// Returns true if deserialization is currently in progress
- public static bool DeserializationInProgress
+ internal static bool DeserializationInProgress
{
get
{
@@ -34,23 +34,13 @@ namespace System.Runtime.Serialization
}
}
- // Throws a SerializationException if dangerous deserialization is currently
- // in progress
- public static void ThrowIfDeserializationInProgress()
- {
- if (DeserializationInProgress)
- {
- throw new SerializationException(SR.Serialization_DangerousDeserialization);
- }
- }
-
// Throws a DeserializationBlockedException if dangerous deserialization is currently
// in progress and the AppContext switch Switch.System.Runtime.Serialization.SerializationGuard.{switchSuffix}
// is not true. The value of the switch is cached in cachedValue to avoid repeated lookups:
// 0: No value cached
// 1: The switch is true
// -1: The switch is false
- public static void ThrowIfDeserializationInProgress(string switchSuffix, ref int cachedValue)
+ internal static void ThrowIfDeserializationInProgress(string switchSuffix, ref int cachedValue)
{
const string SwitchPrefix = "Switch.System.Runtime.Serialization.SerializationGuard.";
Debug.Assert(!string.IsNullOrWhiteSpace(switchSuffix));
diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SerializationInfo.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SerializationInfo.cs
index 7d9a728f351..a0699e47cbb 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SerializationInfo.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SerializationInfo.cs
@@ -258,7 +258,7 @@ namespace System.Runtime.Serialization
/// <param name="name"> The name of the data to be updated.</param>
/// <param name="value"> The new value.</param>
/// <param name="type"> The type of the data being added.</param>
- public void UpdateValue(string name, object value, Type type)
+ internal void UpdateValue(string name, object value, Type type)
{
Debug.Assert(null != name, "[SerializationInfo.UpdateValue]name!=null");
Debug.Assert(null != value, "[SerializationInfo.UpdateValue]value!=null");
diff --git a/src/libraries/System.Private.CoreLib/src/System/SByte.cs b/src/libraries/System.Private.CoreLib/src/System/SByte.cs
index afd9b04f08e..ee9df96053b 100644
--- a/src/libraries/System.Private.CoreLib/src/System/SByte.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/SByte.cs
@@ -1320,6 +1320,7 @@ namespace System
// IParsable
//
+ /// <inheritdoc cref="IParsable{TSelf}.TryParse(string?, IFormatProvider?, out TSelf)" />
public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out sbyte result) => TryParse(s, NumberStyles.Integer, provider, out result);
//
diff --git a/src/libraries/System.Private.CoreLib/src/System/Single.cs b/src/libraries/System.Private.CoreLib/src/System/Single.cs
index 54e1ef148e9..2b4d5970000 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Single.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Single.cs
@@ -1391,6 +1391,7 @@ namespace System
// IParsable
//
+ /// <inheritdoc cref="IParsable{TSelf}.TryParse(string?, IFormatProvider?, out TSelf)" />
public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out float result) => TryParse(s, NumberStyles.Float | NumberStyles.AllowThousands, provider, out result);
//
diff --git a/src/libraries/System.Private.CoreLib/src/System/SpanHelpers.Mono.cs b/src/libraries/System.Private.CoreLib/src/System/SpanHelpers.Mono.cs
new file mode 100644
index 00000000000..d6a7f09e746
--- /dev/null
+++ b/src/libraries/System.Private.CoreLib/src/System/SpanHelpers.Mono.cs
@@ -0,0 +1,2697 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Diagnostics;
+using System.Numerics;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Runtime.Intrinsics;
+using System.Runtime.Intrinsics.Arm;
+using System.Runtime.Intrinsics.X86;
+
+namespace System
+{
+ internal static partial class SpanHelpers // helpers used by Mono
+ {
+ [MethodImpl(MethodImplOptions.AggressiveOptimization)]
+ internal static unsafe int IndexOfValueType(ref byte searchSpace, byte value, int length)
+ {
+ Debug.Assert(length >= 0);
+
+ uint uValue = value; // Use uint for comparisons to avoid unnecessary 8->32 extensions
+ nuint offset = 0; // Use nuint for arithmetic to avoid unnecessary 64->32->64 truncations
+ nuint lengthToExamine = (nuint)(uint)length;
+
+ if (Vector128.IsHardwareAccelerated)
+ {
+ // Avx2 branch also operates on Sse2 sizes, so check is combined.
+ if (length >= Vector128<byte>.Count * 2)
+ {
+ lengthToExamine = UnalignedCountVector128(ref searchSpace);
+ }
+ }
+ else if (Vector.IsHardwareAccelerated)
+ {
+ if (length >= Vector<byte>.Count * 2)
+ {
+ lengthToExamine = UnalignedCountVector(ref searchSpace);
+ }
+ }
+ SequentialScan:
+ while (lengthToExamine >= 8)
+ {
+ lengthToExamine -= 8;
+
+ if (uValue == Unsafe.AddByteOffset(ref searchSpace, offset))
+ goto Found;
+ if (uValue == Unsafe.AddByteOffset(ref searchSpace, offset + 1))
+ goto Found1;
+ if (uValue == Unsafe.AddByteOffset(ref searchSpace, offset + 2))
+ goto Found2;
+ if (uValue == Unsafe.AddByteOffset(ref searchSpace, offset + 3))
+ goto Found3;
+ if (uValue == Unsafe.AddByteOffset(ref searchSpace, offset + 4))
+ goto Found4;
+ if (uValue == Unsafe.AddByteOffset(ref searchSpace, offset + 5))
+ goto Found5;
+ if (uValue == Unsafe.AddByteOffset(ref searchSpace, offset + 6))
+ goto Found6;
+ if (uValue == Unsafe.AddByteOffset(ref searchSpace, offset + 7))
+ goto Found7;
+
+ offset += 8;
+ }
+
+ if (lengthToExamine >= 4)
+ {
+ lengthToExamine -= 4;
+
+ if (uValue == Unsafe.AddByteOffset(ref searchSpace, offset))
+ goto Found;
+ if (uValue == Unsafe.AddByteOffset(ref searchSpace, offset + 1))
+ goto Found1;
+ if (uValue == Unsafe.AddByteOffset(ref searchSpace, offset + 2))
+ goto Found2;
+ if (uValue == Unsafe.AddByteOffset(ref searchSpace, offset + 3))
+ goto Found3;
+
+ offset += 4;
+ }
+
+ while (lengthToExamine > 0)
+ {
+ lengthToExamine -= 1;
+
+ if (uValue == Unsafe.AddByteOffset(ref searchSpace, offset))
+ goto Found;
+
+ offset += 1;
+ }
+
+ // We get past SequentialScan only if IsHardwareAccelerated is true; and remain length is greater than Vector length.
+ // However, we still have the redundant check to allow the JIT to see that the code is unreachable and eliminate it when the platform does not
+ // have hardware accelerated. After processing Vector lengths we return to SequentialScan to finish any remaining.
+ if (Vector256.IsHardwareAccelerated)
+ {
+ if (offset < (nuint)(uint)length)
+ {
+ if ((((nuint)(uint)Unsafe.AsPointer(ref searchSpace) + offset) & (nuint)(Vector256<byte>.Count - 1)) != 0)
+ {
+ // Not currently aligned to Vector256 (is aligned to Vector128); this can cause a problem for searches
+ // with no upper bound e.g. String.strlen.
+ // Start with a check on Vector128 to align to Vector256, before moving to processing Vector256.
+ // This ensures we do not fault across memory pages while searching for an end of string.
+ Vector128<byte> values = Vector128.Create(value);
+ Vector128<byte> search = Vector128.LoadUnsafe(ref searchSpace, offset);
+
+ // Same method as below
+ uint matches = Vector128.Equals(values, search).ExtractMostSignificantBits();
+ if (matches == 0)
+ {
+ // Zero flags set so no matches
+ offset += (nuint)Vector128<byte>.Count;
+ }
+ else
+ {
+ // Find bitflag offset of first match and add to current offset
+ return (int)(offset + (uint)BitOperations.TrailingZeroCount(matches));
+ }
+ }
+
+ lengthToExamine = GetByteVector256SpanLength(offset, length);
+ if (lengthToExamine > offset)
+ {
+ Vector256<byte> values = Vector256.Create(value);
+ do
+ {
+ Vector256<byte> search = Vector256.LoadUnsafe(ref searchSpace, offset);
+ uint matches = Vector256.Equals(values, search).ExtractMostSignificantBits();
+ // Note that MoveMask has converted the equal vector elements into a set of bit flags,
+ // So the bit position in 'matches' corresponds to the element offset.
+ if (matches == 0)
+ {
+ // Zero flags set so no matches
+ offset += (nuint)Vector256<byte>.Count;
+ continue;
+ }
+
+ // Find bitflag offset of first match and add to current offset
+ return (int)(offset + (uint)BitOperations.TrailingZeroCount(matches));
+ } while (lengthToExamine > offset);
+ }
+
+ lengthToExamine = GetByteVector128SpanLength(offset, length);
+ if (lengthToExamine > offset)
+ {
+ Vector128<byte> values = Vector128.Create(value);
+ Vector128<byte> search = Vector128.LoadUnsafe(ref searchSpace, offset);
+
+ // Same method as above
+ uint matches = Vector128.Equals(values, search).ExtractMostSignificantBits();
+ if (matches == 0)
+ {
+ // Zero flags set so no matches
+ offset += (nuint)Vector128<byte>.Count;
+ }
+ else
+ {
+ // Find bitflag offset of first match and add to current offset
+ return (int)(offset + (uint)BitOperations.TrailingZeroCount(matches));
+ }
+ }
+
+ if (offset < (nuint)(uint)length)
+ {
+ lengthToExamine = ((nuint)(uint)length - offset);
+ goto SequentialScan;
+ }
+ }
+ }
+ else if (Vector128.IsHardwareAccelerated)
+ {
+ if (offset < (nuint)(uint)length)
+ {
+ lengthToExamine = GetByteVector128SpanLength(offset, length);
+
+ Vector128<byte> values = Vector128.Create(value);
+ while (lengthToExamine > offset)
+ {
+ Vector128<byte> search = Vector128.LoadUnsafe(ref searchSpace, offset);
+
+ // Same method as above
+ Vector128<byte> compareResult = Vector128.Equals(values, search);
+ if (compareResult == Vector128<byte>.Zero)
+ {
+ // Zero flags set so no matches
+ offset += (nuint)Vector128<byte>.Count;
+ continue;
+ }
+
+ // Find bitflag offset of first match and add to current offset
+ uint matches = compareResult.ExtractMostSignificantBits();
+ return (int)(offset + (uint)BitOperations.TrailingZeroCount(matches));
+ }
+
+ if (offset < (nuint)(uint)length)
+ {
+ lengthToExamine = ((nuint)(uint)length - offset);
+ goto SequentialScan;
+ }
+ }
+ }
+ else if (Vector.IsHardwareAccelerated)
+ {
+ if (offset < (nuint)(uint)length)
+ {
+ lengthToExamine = GetByteVectorSpanLength(offset, length);
+
+ Vector<byte> values = new Vector<byte>(value);
+
+ while (lengthToExamine > offset)
+ {
+ var matches = Vector.Equals(values, LoadVector(ref searchSpace, offset));
+ if (Vector<byte>.Zero.Equals(matches))
+ {
+ offset += (nuint)Vector<byte>.Count;
+ continue;
+ }
+
+ // Find offset of first match and add to current offset
+ return (int)offset + LocateFirstFoundByte(matches);
+ }
+
+ if (offset < (nuint)(uint)length)
+ {
+ lengthToExamine = ((nuint)(uint)length - offset);
+ goto SequentialScan;
+ }
+ }
+ }
+ return -1;
+ Found: // Workaround for https://github.com/dotnet/runtime/issues/8795
+ return (int)offset;
+ Found1:
+ return (int)(offset + 1);
+ Found2:
+ return (int)(offset + 2);
+ Found3:
+ return (int)(offset + 3);
+ Found4:
+ return (int)(offset + 4);
+ Found5:
+ return (int)(offset + 5);
+ Found6:
+ return (int)(offset + 6);
+ Found7:
+ return (int)(offset + 7);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ internal static unsafe int IndexOfValueType(ref short searchSpace, short value, int length)
+ => IndexOfChar(ref Unsafe.As<short, char>(ref searchSpace), Unsafe.As<short, char>(ref value), length);
+
+ [MethodImpl(MethodImplOptions.AggressiveOptimization)]
+ internal static unsafe int IndexOfChar(ref char searchSpace, char value, int length)
+ {
+ Debug.Assert(length >= 0);
+
+ nint offset = 0;
+ nint lengthToExamine = length;
+
+ if (((int)Unsafe.AsPointer(ref searchSpace) & 1) != 0)
+ {
+ // Input isn't char aligned, we won't be able to align it to a Vector
+ }
+ else if (Sse2.IsSupported || AdvSimd.Arm64.IsSupported)
+ {
+ // Avx2 branch also operates on Sse2 sizes, so check is combined.
+ // Needs to be double length to allow us to align the data first.
+ if (length >= Vector128<ushort>.Count * 2)
+ {
+ lengthToExamine = UnalignedCountVector128(ref searchSpace);
+ }
+ }
+ else if (Vector.IsHardwareAccelerated)
+ {
+ // Needs to be double length to allow us to align the data first.
+ if (length >= Vector<ushort>.Count * 2)
+ {
+ lengthToExamine = UnalignedCountVector(ref searchSpace);
+ }
+ }
+
+ SequentialScan:
+ // In the non-vector case lengthToExamine is the total length.
+ // In the vector case lengthToExamine first aligns to Vector,
+ // then in a second pass after the Vector lengths is the
+ // remaining data that is shorter than a Vector length.
+ while (lengthToExamine >= 4)
+ {
+ ref char current = ref Unsafe.Add(ref searchSpace, offset);
+
+ if (value == current)
+ goto Found;
+ if (value == Unsafe.Add(ref current, 1))
+ goto Found1;
+ if (value == Unsafe.Add(ref current, 2))
+ goto Found2;
+ if (value == Unsafe.Add(ref current, 3))
+ goto Found3;
+
+ offset += 4;
+ lengthToExamine -= 4;
+ }
+
+ while (lengthToExamine > 0)
+ {
+ if (value == Unsafe.Add(ref searchSpace, offset))
+ goto Found;
+
+ offset++;
+ lengthToExamine--;
+ }
+
+ // We get past SequentialScan only if IsHardwareAccelerated or intrinsic .IsSupported is true. However, we still have the redundant check to allow
+ // the JIT to see that the code is unreachable and eliminate it when the platform does not have hardware accelerated.
+ if (Avx2.IsSupported)
+ {
+ if (offset < length)
+ {
+ Debug.Assert(length - offset >= Vector128<ushort>.Count);
+ if (((nint)Unsafe.AsPointer(ref Unsafe.Add(ref searchSpace, (nint)offset)) & (nint)(Vector256<byte>.Count - 1)) != 0)
+ {
+ // Not currently aligned to Vector256 (is aligned to Vector128); this can cause a problem for searches
+ // with no upper bound e.g. String.wcslen. Start with a check on Vector128 to align to Vector256,
+ // before moving to processing Vector256.
+
+ // If the input searchSpan has been fixed or pinned, this ensures we do not fault across memory pages
+ // while searching for an end of string. Specifically that this assumes that the length is either correct
+ // or that the data is pinned otherwise it may cause an AccessViolation from crossing a page boundary into an
+ // unowned page. If the search is unbounded (e.g. null terminator in wcslen) and the search value is not found,
+ // again this will likely cause an AccessViolation. However, correctly bounded searches will return -1 rather
+ // than ever causing an AV.
+
+ // If the searchSpan has not been fixed or pinned the GC can relocate it during the execution of this
+ // method, so the alignment only acts as best endeavour. The GC cost is likely to dominate over
+ // the misalignment that may occur after; to we default to giving the GC a free hand to relocate and
+ // its up to the caller whether they are operating over fixed data.
+ Vector128<ushort> values = Vector128.Create((ushort)value);
+ Vector128<ushort> search = LoadVector128(ref searchSpace, offset);
+
+ // Same method as below
+ int matches = Sse2.MoveMask(Sse2.CompareEqual(values, search).AsByte());
+ if (matches == 0)
+ {
+ // Zero flags set so no matches
+ offset += Vector128<ushort>.Count;
+ }
+ else
+ {
+ // Find bitflag offset of first match and add to current offset
+ return (int)(offset + ((uint)BitOperations.TrailingZeroCount(matches) / sizeof(char)));
+ }
+ }
+
+ lengthToExamine = GetCharVector256SpanLength(offset, length);
+ if (lengthToExamine > 0)
+ {
+ Vector256<ushort> values = Vector256.Create((ushort)value);
+ do
+ {
+ Debug.Assert(lengthToExamine >= Vector256<ushort>.Count);
+
+ Vector256<ushort> search = LoadVector256(ref searchSpace, offset);
+ int matches = Avx2.MoveMask(Avx2.CompareEqual(values, search).AsByte());
+ // Note that MoveMask has converted the equal vector elements into a set of bit flags,
+ // So the bit position in 'matches' corresponds to the element offset.
+ if (matches == 0)
+ {
+ // Zero flags set so no matches
+ offset += Vector256<ushort>.Count;
+ lengthToExamine -= Vector256<ushort>.Count;
+ continue;
+ }
+
+ // Find bitflag offset of first match and add to current offset,
+ // flags are in bytes so divide for chars
+ return (int)(offset + ((uint)BitOperations.TrailingZeroCount(matches) / sizeof(char)));
+ } while (lengthToExamine > 0);
+ }
+
+ lengthToExamine = GetCharVector128SpanLength(offset, length);
+ if (lengthToExamine > 0)
+ {
+ Debug.Assert(lengthToExamine >= Vector128<ushort>.Count);
+
+ Vector128<ushort> values = Vector128.Create((ushort)value);
+ Vector128<ushort> search = LoadVector128(ref searchSpace, offset);
+
+ // Same method as above
+ int matches = Sse2.MoveMask(Sse2.CompareEqual(values, search).AsByte());
+ if (matches == 0)
+ {
+ // Zero flags set so no matches
+ offset += Vector128<ushort>.Count;
+ // Don't need to change lengthToExamine here as we don't use its current value again.
+ }
+ else
+ {
+ // Find bitflag offset of first match and add to current offset,
+ // flags are in bytes so divide for chars
+ return (int)(offset + ((uint)BitOperations.TrailingZeroCount(matches) / sizeof(char)));
+ }
+ }
+
+ if (offset < length)
+ {
+ lengthToExamine = length - offset;
+ goto SequentialScan;
+ }
+ }
+ }
+ else if (Sse2.IsSupported)
+ {
+ if (offset < length)
+ {
+ Debug.Assert(length - offset >= Vector128<ushort>.Count);
+
+ lengthToExamine = GetCharVector128SpanLength(offset, length);
+ if (lengthToExamine > 0)
+ {
+ Vector128<ushort> values = Vector128.Create((ushort)value);
+ do
+ {
+ Debug.Assert(lengthToExamine >= Vector128<ushort>.Count);
+
+ Vector128<ushort> search = LoadVector128(ref searchSpace, offset);
+
+ // Same method as above
+ int matches = Sse2.MoveMask(Sse2.CompareEqual(values, search).AsByte());
+ if (matches == 0)
+ {
+ // Zero flags set so no matches
+ offset += Vector128<ushort>.Count;
+ lengthToExamine -= Vector128<ushort>.Count;
+ continue;
+ }
+
+ // Find bitflag offset of first match and add to current offset,
+ // flags are in bytes so divide for chars
+ return (int)(offset + ((uint)BitOperations.TrailingZeroCount(matches) / sizeof(char)));
+ } while (lengthToExamine > 0);
+ }
+
+ if (offset < length)
+ {
+ lengthToExamine = length - offset;
+ goto SequentialScan;
+ }
+ }
+ }
+ else if (AdvSimd.Arm64.IsSupported)
+ {
+ if (offset < length)
+ {
+ Debug.Assert(length - offset >= Vector128<ushort>.Count);
+
+ lengthToExamine = GetCharVector128SpanLength(offset, length);
+ if (lengthToExamine > 0)
+ {
+ Vector128<ushort> values = Vector128.Create((ushort)value);
+ do
+ {
+ Debug.Assert(lengthToExamine >= Vector128<ushort>.Count);
+
+ Vector128<ushort> search = LoadVector128(ref searchSpace, offset);
+ Vector128<ushort> compareResult = AdvSimd.CompareEqual(values, search);
+
+ if (compareResult == Vector128<ushort>.Zero)
+ {
+ offset += Vector128<ushort>.Count;
+ lengthToExamine -= Vector128<ushort>.Count;
+ continue;
+ }
+
+ return (int)(offset + FindFirstMatchedLane(compareResult));
+ } while (lengthToExamine > 0);
+ }
+
+ if (offset < length)
+ {
+ lengthToExamine = length - offset;
+ goto SequentialScan;
+ }
+ }
+ }
+ else if (Vector.IsHardwareAccelerated)
+ {
+ if (offset < length)
+ {
+ Debug.Assert(length - offset >= Vector<ushort>.Count);
+
+ lengthToExamine = GetCharVectorSpanLength(offset, length);
+
+ if (lengthToExamine > 0)
+ {
+ Vector<ushort> values = new Vector<ushort>((ushort)value);
+ do
+ {
+ Debug.Assert(lengthToExamine >= Vector<ushort>.Count);
+
+ var matches = Vector.Equals(values, LoadVector(ref searchSpace, offset));
+ if (Vector<ushort>.Zero.Equals(matches))
+ {
+ offset += Vector<ushort>.Count;
+ lengthToExamine -= Vector<ushort>.Count;
+ continue;
+ }
+
+ // Find offset of first match
+ return (int)(offset + LocateFirstFoundChar(matches));
+ } while (lengthToExamine > 0);
+ }
+
+ if (offset < length)
+ {
+ lengthToExamine = length - offset;
+ goto SequentialScan;
+ }
+ }
+ }
+ return -1;
+ Found3:
+ return (int)(offset + 3);
+ Found2:
+ return (int)(offset + 2);
+ Found1:
+ return (int)(offset + 1);
+ Found:
+ return (int)(offset);
+ }
+
+ internal static unsafe int IndexOfValueType<T>(ref T searchSpace, T value, int length) where T : struct, IEquatable<T>
+ {
+ Debug.Assert(length >= 0);
+
+ nint index = 0; // Use nint for arithmetic to avoid unnecessary 64->32->64 truncations
+ if (Vector.IsHardwareAccelerated && Vector<T>.IsSupported && (Vector<T>.Count * 2) <= length)
+ {
+ Vector<T> valueVector = new Vector<T>(value);
+ Vector<T> compareVector;
+ Vector<T> matchVector;
+ if ((uint)length % (uint)Vector<T>.Count != 0)
+ {
+ // Number of elements is not a multiple of Vector<T>.Count, so do one
+ // check and shift only enough for the remaining set to be a multiple
+ // of Vector<T>.Count.
+ compareVector = Unsafe.As<T, Vector<T>>(ref Unsafe.Add(ref searchSpace, index));
+ matchVector = Vector.Equals(valueVector, compareVector);
+ if (matchVector != Vector<T>.Zero)
+ {
+ goto VectorMatch;
+ }
+ index += length % Vector<T>.Count;
+ length -= length % Vector<T>.Count;
+ }
+ while (length > 0)
+ {
+ compareVector = Unsafe.As<T, Vector<T>>(ref Unsafe.Add(ref searchSpace, index));
+ matchVector = Vector.Equals(valueVector, compareVector);
+ if (matchVector != Vector<T>.Zero)
+ {
+ goto VectorMatch;
+ }
+ index += Vector<T>.Count;
+ length -= Vector<T>.Count;
+ }
+ goto NotFound;
+ VectorMatch:
+ for (int i = 0; i < Vector<T>.Count; i++)
+ if (compareVector[i].Equals(value))
+ return (int)(index + i);
+ }
+
+ while (length >= 8)
+ {
+ if (value.Equals(Unsafe.Add(ref searchSpace, index)))
+ goto Found;
+ if (value.Equals(Unsafe.Add(ref searchSpace, index + 1)))
+ goto Found1;
+ if (value.Equals(Unsafe.Add(ref searchSpace, index + 2)))
+ goto Found2;
+ if (value.Equals(Unsafe.Add(ref searchSpace, index + 3)))
+ goto Found3;
+ if (value.Equals(Unsafe.Add(ref searchSpace, index + 4)))
+ goto Found4;
+ if (value.Equals(Unsafe.Add(ref searchSpace, index + 5)))
+ goto Found5;
+ if (value.Equals(Unsafe.Add(ref searchSpace, index + 6)))
+ goto Found6;
+ if (value.Equals(Unsafe.Add(ref searchSpace, index + 7)))
+ goto Found7;
+
+ length -= 8;
+ index += 8;
+ }
+
+ while (length >= 4)
+ {
+ if (value.Equals(Unsafe.Add(ref searchSpace, index)))
+ goto Found;
+ if (value.Equals(Unsafe.Add(ref searchSpace, index + 1)))
+ goto Found1;
+ if (value.Equals(Unsafe.Add(ref searchSpace, index + 2)))
+ goto Found2;
+ if (value.Equals(Unsafe.Add(ref searchSpace, index + 3)))
+ goto Found3;
+
+ length -= 4;
+ index += 4;
+ }
+
+ while (length > 0)
+ {
+ if (value.Equals(Unsafe.Add(ref searchSpace, index)))
+ goto Found;
+
+ index += 1;
+ length--;
+ }
+ NotFound:
+ return -1;
+
+ Found: // Workaround for https://github.com/dotnet/runtime/issues/8795
+ return (int)index;
+ Found1:
+ return (int)(index + 1);
+ Found2:
+ return (int)(index + 2);
+ Found3:
+ return (int)(index + 3);
+ Found4:
+ return (int)(index + 4);
+ Found5:
+ return (int)(index + 5);
+ Found6:
+ return (int)(index + 6);
+ Found7:
+ return (int)(index + 7);
+ }
+
+ internal static int IndexOfAnyExceptValueType<T>(ref T searchSpace, T value0, int length) where T : struct, IEquatable<T>
+ {
+ Debug.Assert(length >= 0, "Expected non-negative length");
+ Debug.Assert(value0 is byte or short or int or long, "Expected caller to normalize to one of these types");
+
+ if (!Vector128.IsHardwareAccelerated || length < Vector128<T>.Count)
+ {
+ for (int i = 0; i < length; i++)
+ {
+ if (!Unsafe.Add(ref searchSpace, i).Equals(value0))
+ {
+ return i;
+ }
+ }
+ }
+ else
+ {
+ Vector128<T> notEquals, value0Vector = Vector128.Create(value0);
+ ref T current = ref searchSpace;
+ ref T oneVectorAwayFromEnd = ref Unsafe.Add(ref searchSpace, length - Vector128<T>.Count);
+
+ // Loop until either we've finished all elements or there's less than a vector's-worth remaining.
+ do
+ {
+ notEquals = ~Vector128.Equals(value0Vector, Vector128.LoadUnsafe(ref current));
+ if (notEquals != Vector128<T>.Zero)
+ {
+ return ComputeIndex(ref searchSpace, ref current, notEquals);
+ }
+
+ current = ref Unsafe.Add(ref current, Vector128<T>.Count);
+ }
+ while (!Unsafe.IsAddressGreaterThan(ref current, ref oneVectorAwayFromEnd));
+
+ // If any elements remain, process the last vector in the search space.
+ if ((uint)length % Vector128<T>.Count != 0)
+ {
+ notEquals = ~Vector128.Equals(value0Vector, Vector128.LoadUnsafe(ref oneVectorAwayFromEnd));
+ if (notEquals != Vector128<T>.Zero)
+ {
+ return ComputeIndex(ref searchSpace, ref oneVectorAwayFromEnd, notEquals);
+ }
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ static int ComputeIndex(ref T searchSpace, ref T current, Vector128<T> notEquals)
+ {
+ uint notEqualsElements = notEquals.ExtractMostSignificantBits();
+ int index = BitOperations.TrailingZeroCount(notEqualsElements);
+ return index + (int)(Unsafe.ByteOffset(ref searchSpace, ref current) / Unsafe.SizeOf<T>());
+ }
+ }
+
+ return -1;
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveOptimization)]
+ internal static int LastIndexOfValueType(ref byte searchSpace, byte value, int length)
+ {
+ Debug.Assert(length >= 0);
+
+ uint uValue = value; // Use uint for comparisons to avoid unnecessary 8->32 extensions
+ nuint offset = (nuint)(uint)length; // Use nuint for arithmetic to avoid unnecessary 64->32->64 truncations
+ nuint lengthToExamine = (nuint)(uint)length;
+
+ if (Vector.IsHardwareAccelerated && length >= Vector<byte>.Count * 2)
+ {
+ lengthToExamine = UnalignedCountVectorFromEnd(ref searchSpace, length);
+ }
+ SequentialScan:
+ while (lengthToExamine >= 8)
+ {
+ lengthToExamine -= 8;
+ offset -= 8;
+
+ if (uValue == Unsafe.AddByteOffset(ref searchSpace, offset + 7))
+ goto Found7;
+ if (uValue == Unsafe.AddByteOffset(ref searchSpace, offset + 6))
+ goto Found6;
+ if (uValue == Unsafe.AddByteOffset(ref searchSpace, offset + 5))
+ goto Found5;
+ if (uValue == Unsafe.AddByteOffset(ref searchSpace, offset + 4))
+ goto Found4;
+ if (uValue == Unsafe.AddByteOffset(ref searchSpace, offset + 3))
+ goto Found3;
+ if (uValue == Unsafe.AddByteOffset(ref searchSpace, offset + 2))
+ goto Found2;
+ if (uValue == Unsafe.AddByteOffset(ref searchSpace, offset + 1))
+ goto Found1;
+ if (uValue == Unsafe.AddByteOffset(ref searchSpace, offset))
+ goto Found;
+ }
+
+ if (lengthToExamine >= 4)
+ {
+ lengthToExamine -= 4;
+ offset -= 4;
+
+ if (uValue == Unsafe.AddByteOffset(ref searchSpace, offset + 3))
+ goto Found3;
+ if (uValue == Unsafe.AddByteOffset(ref searchSpace, offset + 2))
+ goto Found2;
+ if (uValue == Unsafe.AddByteOffset(ref searchSpace, offset + 1))
+ goto Found1;
+ if (uValue == Unsafe.AddByteOffset(ref searchSpace, offset))
+ goto Found;
+ }
+
+ while (lengthToExamine > 0)
+ {
+ lengthToExamine -= 1;
+ offset -= 1;
+
+ if (uValue == Unsafe.AddByteOffset(ref searchSpace, offset))
+ goto Found;
+ }
+
+ if (Vector.IsHardwareAccelerated && (offset > 0))
+ {
+ lengthToExamine = (offset & (nuint)~(Vector<byte>.Count - 1));
+
+ Vector<byte> values = new Vector<byte>(value);
+
+ while (lengthToExamine > (nuint)(Vector<byte>.Count - 1))
+ {
+ var matches = Vector.Equals(values, LoadVector(ref searchSpace, offset - (nuint)Vector<byte>.Count));
+ if (Vector<byte>.Zero.Equals(matches))
+ {
+ offset -= (nuint)Vector<byte>.Count;
+ lengthToExamine -= (nuint)Vector<byte>.Count;
+ continue;
+ }
+
+ // Find offset of first match and add to current offset
+ return (int)(offset) - Vector<byte>.Count + LocateLastFoundByte(matches);
+ }
+ if (offset > 0)
+ {
+ lengthToExamine = offset;
+ goto SequentialScan;
+ }
+ }
+ return -1;
+ Found: // Workaround for https://github.com/dotnet/runtime/issues/8795
+ return (int)offset;
+ Found1:
+ return (int)(offset + 1);
+ Found2:
+ return (int)(offset + 2);
+ Found3:
+ return (int)(offset + 3);
+ Found4:
+ return (int)(offset + 4);
+ Found5:
+ return (int)(offset + 5);
+ Found6:
+ return (int)(offset + 6);
+ Found7:
+ return (int)(offset + 7);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ internal static unsafe int LastIndexOfValueType(ref short searchSpace, short value, int length)
+ => LastIndexOfValueType(ref Unsafe.As<short, char>(ref searchSpace), Unsafe.As<short, char>(ref value), length);
+
+ [MethodImpl(MethodImplOptions.AggressiveOptimization)]
+ internal static unsafe int LastIndexOfValueType(ref char searchSpace, char value, int length)
+ {
+ Debug.Assert(length >= 0);
+
+ fixed (char* pChars = &searchSpace)
+ {
+ char* pCh = pChars + length;
+ char* pEndCh = pChars;
+
+ if (Vector.IsHardwareAccelerated && length >= Vector<ushort>.Count * 2)
+ {
+ // Figure out how many characters to read sequentially from the end until we are vector aligned
+ // This is equivalent to: length = ((int)pCh % Unsafe.SizeOf<Vector<ushort>>()) / elementsPerByte
+ const int elementsPerByte = sizeof(ushort) / sizeof(byte);
+ length = ((int)pCh & (Unsafe.SizeOf<Vector<ushort>>() - 1)) / elementsPerByte;
+ }
+
+ SequentialScan:
+ while (length >= 4)
+ {
+ length -= 4;
+ pCh -= 4;
+
+ if (*(pCh + 3) == value)
+ goto Found3;
+ if (*(pCh + 2) == value)
+ goto Found2;
+ if (*(pCh + 1) == value)
+ goto Found1;
+ if (*pCh == value)
+ goto Found;
+ }
+
+ while (length > 0)
+ {
+ length--;
+ pCh--;
+
+ if (*pCh == value)
+ goto Found;
+ }
+
+ // We get past SequentialScan only if IsHardwareAccelerated is true. However, we still have the redundant check to allow
+ // the JIT to see that the code is unreachable and eliminate it when the platform does not have hardware accelerated.
+ if (Vector.IsHardwareAccelerated && pCh > pEndCh)
+ {
+ // Get the highest multiple of Vector<ushort>.Count that is within the search space.
+ // That will be how many times we iterate in the loop below.
+ // This is equivalent to: length = Vector<ushort>.Count * ((int)(pCh - pEndCh) / Vector<ushort>.Count)
+ length = (int)((pCh - pEndCh) & ~(Vector<ushort>.Count - 1));
+
+ // Get comparison Vector
+ Vector<ushort> vComparison = new Vector<ushort>(value);
+
+ while (length > 0)
+ {
+ char* pStart = pCh - Vector<ushort>.Count;
+ // Using Unsafe.Read instead of ReadUnaligned since the search space is pinned and pCh (and hence pSart) is always vector aligned
+ Debug.Assert(((int)pStart & (Unsafe.SizeOf<Vector<ushort>>() - 1)) == 0);
+ Vector<ushort> vMatches = Vector.Equals(vComparison, Unsafe.Read<Vector<ushort>>(pStart));
+ if (Vector<ushort>.Zero.Equals(vMatches))
+ {
+ pCh -= Vector<ushort>.Count;
+ length -= Vector<ushort>.Count;
+ continue;
+ }
+ // Find offset of last match
+ return (int)(pStart - pEndCh) + LocateLastFoundChar(vMatches);
+ }
+
+ if (pCh > pEndCh)
+ {
+ length = (int)(pCh - pEndCh);
+ goto SequentialScan;
+ }
+ }
+
+ return -1;
+ Found:
+ return (int)(pCh - pEndCh);
+ Found1:
+ return (int)(pCh - pEndCh) + 1;
+ Found2:
+ return (int)(pCh - pEndCh) + 2;
+ Found3:
+ return (int)(pCh - pEndCh) + 3;
+ }
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveOptimization)]
+ internal static unsafe int LastIndexOfValueType<T>(ref T searchSpace, T value, int length) where T : IEquatable<T>?
+ => LastIndexOf(ref searchSpace, value, length);
+
+ [MethodImpl(MethodImplOptions.AggressiveOptimization)]
+ internal static int IndexOfAnyValueType(ref byte searchSpace, byte value0, byte value1, int length)
+ {
+ Debug.Assert(length >= 0);
+
+ uint uValue0 = value0; // Use uint for comparisons to avoid unnecessary 8->32 extensions
+ uint uValue1 = value1; // Use uint for comparisons to avoid unnecessary 8->32 extensions
+ nuint offset = 0; // Use nuint for arithmetic to avoid unnecessary 64->32->64 truncations
+ nuint lengthToExamine = (nuint)(uint)length;
+
+ if (Sse2.IsSupported || AdvSimd.Arm64.IsSupported)
+ {
+ // Avx2 branch also operates on Sse2 sizes, so check is combined.
+ nint vectorDiff = (nint)length - Vector128<byte>.Count;
+ if (vectorDiff >= 0)
+ {
+ // >= Sse2 intrinsics are supported, and length is enough to use them so use that path.
+ // We jump forward to the intrinsics at the end of the method so a naive branch predict
+ // will choose the non-intrinsic path so short lengths which don't gain anything aren't
+ // overly disadvantaged by having to jump over a lot of code. Whereas the longer lengths
+ // more than make this back from the intrinsics.
+ lengthToExamine = (nuint)vectorDiff;
+ goto IntrinsicsCompare;
+ }
+ }
+ else if (Vector.IsHardwareAccelerated)
+ {
+ // Calculate lengthToExamine here for test, as it is used later
+ nint vectorDiff = (nint)length - Vector<byte>.Count;
+ if (vectorDiff >= 0)
+ {
+ // Similar as above for Vector version
+ lengthToExamine = (nuint)vectorDiff;
+ goto IntrinsicsCompare;
+ }
+ }
+
+ uint lookUp;
+ while (lengthToExamine >= 8)
+ {
+ lengthToExamine -= 8;
+
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset);
+ if (uValue0 == lookUp || uValue1 == lookUp)
+ goto Found;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 1);
+ if (uValue0 == lookUp || uValue1 == lookUp)
+ goto Found1;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 2);
+ if (uValue0 == lookUp || uValue1 == lookUp)
+ goto Found2;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 3);
+ if (uValue0 == lookUp || uValue1 == lookUp)
+ goto Found3;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 4);
+ if (uValue0 == lookUp || uValue1 == lookUp)
+ goto Found4;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 5);
+ if (uValue0 == lookUp || uValue1 == lookUp)
+ goto Found5;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 6);
+ if (uValue0 == lookUp || uValue1 == lookUp)
+ goto Found6;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 7);
+ if (uValue0 == lookUp || uValue1 == lookUp)
+ goto Found7;
+
+ offset += 8;
+ }
+
+ if (lengthToExamine >= 4)
+ {
+ lengthToExamine -= 4;
+
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset);
+ if (uValue0 == lookUp || uValue1 == lookUp)
+ goto Found;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 1);
+ if (uValue0 == lookUp || uValue1 == lookUp)
+ goto Found1;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 2);
+ if (uValue0 == lookUp || uValue1 == lookUp)
+ goto Found2;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 3);
+ if (uValue0 == lookUp || uValue1 == lookUp)
+ goto Found3;
+
+ offset += 4;
+ }
+
+ while (lengthToExamine > 0)
+ {
+
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset);
+ if (uValue0 == lookUp || uValue1 == lookUp)
+ goto Found;
+
+ offset += 1;
+ lengthToExamine -= 1;
+ }
+
+ NotFound:
+ return -1;
+ Found: // Workaround for https://github.com/dotnet/runtime/issues/8795
+ return (int)offset;
+ Found1:
+ return (int)(offset + 1);
+ Found2:
+ return (int)(offset + 2);
+ Found3:
+ return (int)(offset + 3);
+ Found4:
+ return (int)(offset + 4);
+ Found5:
+ return (int)(offset + 5);
+ Found6:
+ return (int)(offset + 6);
+ Found7:
+ return (int)(offset + 7);
+
+ IntrinsicsCompare:
+ // When we move into a Vectorized block, we process everything of Vector size;
+ // and then for any remainder we do a final compare of Vector size but starting at
+ // the end and forwards, which may overlap on an earlier compare.
+
+ // We include the Supported check again here even though path will not be taken, so the asm isn't generated if not supported.
+ if (Sse2.IsSupported)
+ {
+ int matches;
+ if (Avx2.IsSupported)
+ {
+ Vector256<byte> search;
+ // Guard as we may only have a valid size for Vector128; when we will move to the Sse2
+ // We have already subtracted Vector128<byte>.Count from lengthToExamine so compare against that
+ // to see if we have double the size for Vector256<byte>.Count
+ if (lengthToExamine >= (nuint)Vector128<byte>.Count)
+ {
+ Vector256<byte> values0 = Vector256.Create(value0);
+ Vector256<byte> values1 = Vector256.Create(value1);
+
+ // Subtract Vector128<byte>.Count so we have now subtracted Vector256<byte>.Count
+ lengthToExamine -= (nuint)Vector128<byte>.Count;
+ // First time this checks again against 0, however we will move into final compare if it fails.
+ while (lengthToExamine > offset)
+ {
+ search = LoadVector256(ref searchSpace, offset);
+ // Bitwise Or to combine the flagged matches for the second value to our match flags
+ matches = Avx2.MoveMask(
+ Avx2.Or(
+ Avx2.CompareEqual(values0, search),
+ Avx2.CompareEqual(values1, search)));
+ // Note that MoveMask has converted the equal vector elements into a set of bit flags,
+ // So the bit position in 'matches' corresponds to the element offset.
+ if (matches == 0)
+ {
+ // None matched
+ offset += (nuint)Vector256<byte>.Count;
+ continue;
+ }
+
+ goto IntrinsicsMatch;
+ }
+
+ // Move to Vector length from end for final compare
+ search = LoadVector256(ref searchSpace, lengthToExamine);
+ offset = lengthToExamine;
+ // Same as method as above
+ matches = Avx2.MoveMask(
+ Avx2.Or(
+ Avx2.CompareEqual(values0, search),
+ Avx2.CompareEqual(values1, search)));
+ if (matches == 0)
+ {
+ // None matched
+ goto NotFound;
+ }
+
+ goto IntrinsicsMatch;
+ }
+ }
+
+ // Initial size check was done on method entry.
+ Debug.Assert(length >= Vector128<byte>.Count);
+ {
+ Vector128<byte> search;
+ Vector128<byte> values0 = Vector128.Create(value0);
+ Vector128<byte> values1 = Vector128.Create(value1);
+ // First time this checks against 0 and we will move into final compare if it fails.
+ while (lengthToExamine > offset)
+ {
+ search = LoadVector128(ref searchSpace, offset);
+
+ matches = Sse2.MoveMask(
+ Sse2.Or(
+ Sse2.CompareEqual(values0, search),
+ Sse2.CompareEqual(values1, search))
+ .AsByte());
+ // Note that MoveMask has converted the equal vector elements into a set of bit flags,
+ // So the bit position in 'matches' corresponds to the element offset.
+ if (matches == 0)
+ {
+ // None matched
+ offset += (nuint)Vector128<byte>.Count;
+ continue;
+ }
+
+ goto IntrinsicsMatch;
+ }
+ // Move to Vector length from end for final compare
+ search = LoadVector128(ref searchSpace, lengthToExamine);
+ offset = lengthToExamine;
+ // Same as method as above
+ matches = Sse2.MoveMask(
+ Sse2.Or(
+ Sse2.CompareEqual(values0, search),
+ Sse2.CompareEqual(values1, search)));
+ if (matches == 0)
+ {
+ // None matched
+ goto NotFound;
+ }
+ }
+
+ IntrinsicsMatch:
+ // Find bitflag offset of first difference and add to current offset
+ offset += (nuint)BitOperations.TrailingZeroCount(matches);
+ goto Found;
+ }
+ else if (AdvSimd.Arm64.IsSupported)
+ {
+ Vector128<byte> search;
+ Vector128<byte> matches;
+ Vector128<byte> values0 = Vector128.Create(value0);
+ Vector128<byte> values1 = Vector128.Create(value1);
+ // First time this checks against 0 and we will move into final compare if it fails.
+ while (lengthToExamine > offset)
+ {
+ search = LoadVector128(ref searchSpace, offset);
+
+ matches = AdvSimd.Or(
+ AdvSimd.CompareEqual(values0, search),
+ AdvSimd.CompareEqual(values1, search));
+
+ if (matches == Vector128<byte>.Zero)
+ {
+ offset += (nuint)Vector128<byte>.Count;
+ continue;
+ }
+
+ // Find bitflag offset of first match and add to current offset
+ offset += FindFirstMatchedLane(matches);
+
+ goto Found;
+ }
+
+ // Move to Vector length from end for final compare
+ search = LoadVector128(ref searchSpace, lengthToExamine);
+ offset = lengthToExamine;
+ // Same as method as above
+ matches = AdvSimd.Or(
+ AdvSimd.CompareEqual(values0, search),
+ AdvSimd.CompareEqual(values1, search));
+
+ if (matches == Vector128<byte>.Zero)
+ {
+ // None matched
+ goto NotFound;
+ }
+
+ // Find bitflag offset of first match and add to current offset
+ offset += FindFirstMatchedLane(matches);
+
+ goto Found;
+ }
+ else if (Vector.IsHardwareAccelerated)
+ {
+ Vector<byte> values0 = new Vector<byte>(value0);
+ Vector<byte> values1 = new Vector<byte>(value1);
+
+ Vector<byte> search;
+ // First time this checks against 0 and we will move into final compare if it fails.
+ while (lengthToExamine > offset)
+ {
+ search = LoadVector(ref searchSpace, offset);
+ search = Vector.BitwiseOr(
+ Vector.Equals(search, values0),
+ Vector.Equals(search, values1));
+ if (Vector<byte>.Zero.Equals(search))
+ {
+ // None matched
+ offset += (nuint)Vector<byte>.Count;
+ continue;
+ }
+
+ goto VectorMatch;
+ }
+
+ // Move to Vector length from end for final compare
+ search = LoadVector(ref searchSpace, lengthToExamine);
+ offset = lengthToExamine;
+ search = Vector.BitwiseOr(
+ Vector.Equals(search, values0),
+ Vector.Equals(search, values1));
+ if (Vector<byte>.Zero.Equals(search))
+ {
+ // None matched
+ goto NotFound;
+ }
+
+ VectorMatch:
+ offset += (nuint)LocateFirstFoundByte(search);
+ goto Found;
+ }
+
+ Debug.Fail("Unreachable");
+ goto NotFound;
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ internal static unsafe int IndexOfAnyValueType(ref short searchSpace, short value0, short value1, int length)
+ => IndexOfAnyChar(ref Unsafe.As<short, char>(ref searchSpace), Unsafe.As<short, char>(ref value0), Unsafe.As<short, char>(ref value1), length);
+
+ [MethodImpl(MethodImplOptions.AggressiveOptimization)]
+ internal static unsafe int IndexOfAnyChar(ref char searchStart, char value0, char value1, int length)
+ {
+ Debug.Assert(length >= 0);
+
+ nuint offset = 0; // Use nuint for arithmetic to avoid unnecessary 64->32->64 truncations
+ nuint lengthToExamine = (nuint)(uint)length;
+
+ if (Sse2.IsSupported)
+ {
+ // Calculate lengthToExamine here for test, rather than just testing as it used later, rather than doing it twice.
+ nint vectorDiff = (nint)length - Vector128<ushort>.Count;
+ if (vectorDiff >= 0)
+ {
+ // >= Sse2 intrinsics are supported and length is enough to use them, so use that path.
+ // We jump forward to the intrinsics at the end of them method so a naive branch predict
+ // will choose the non-intrinsic path so short lengths which don't gain anything aren't
+ // overly disadvantaged by having to jump over a lot of code. Whereas the longer lengths
+ // more than make this back from the intrinsics.
+ lengthToExamine = (nuint)vectorDiff;
+ goto IntrinsicsCompare;
+ }
+ }
+ else if (Vector.IsHardwareAccelerated)
+ {
+ // Calculate lengthToExamine here for test, rather than just testing as it used later, rather than doing it twice.
+ nint vectorDiff = (nint)length - Vector<ushort>.Count;
+ if (vectorDiff >= 0)
+ {
+ // Similar as above for Vector version
+ lengthToExamine = (nuint)vectorDiff;
+ goto VectorCompare;
+ }
+ }
+
+ int lookUp;
+ while (lengthToExamine >= 4)
+ {
+ ref char current = ref Add(ref searchStart, offset);
+
+ lookUp = current;
+ if (value0 == lookUp || value1 == lookUp)
+ goto Found;
+ lookUp = Unsafe.Add(ref current, 1);
+ if (value0 == lookUp || value1 == lookUp)
+ goto Found1;
+ lookUp = Unsafe.Add(ref current, 2);
+ if (value0 == lookUp || value1 == lookUp)
+ goto Found2;
+ lookUp = Unsafe.Add(ref current, 3);
+ if (value0 == lookUp || value1 == lookUp)
+ goto Found3;
+
+ offset += 4;
+ lengthToExamine -= 4;
+ }
+
+ while (lengthToExamine > 0)
+ {
+ lookUp = Add(ref searchStart, offset);
+ if (value0 == lookUp || value1 == lookUp)
+ goto Found;
+
+ offset += 1;
+ lengthToExamine -= 1;
+ }
+
+ NotFound:
+ return -1;
+ Found3:
+ return (int)(offset + 3);
+ Found2:
+ return (int)(offset + 2);
+ Found1:
+ return (int)(offset + 1);
+ Found:
+ return (int)offset;
+
+ IntrinsicsCompare:
+ // When we move into a Vectorized block, we process everything of Vector size;
+ // and then for any remainder we do a final compare of Vector size but starting at
+ // the end and forwards, which may overlap on an earlier compare.
+
+ // We include the Supported check again here even though path will not be taken, so the asm isn't generated if not supported.
+ if (Sse2.IsSupported)
+ {
+ int matches;
+ if (Avx2.IsSupported)
+ {
+ Vector256<ushort> search;
+ // Guard as we may only have a valid size for Vector128; when we will move to the Sse2
+ // We have already subtracted Vector128<ushort>.Count from lengthToExamine so compare against that
+ // to see if we have double the size for Vector256<ushort>.Count
+ if (lengthToExamine >= (nuint)Vector128<ushort>.Count)
+ {
+ Vector256<ushort> values0 = Vector256.Create((ushort)value0);
+ Vector256<ushort> values1 = Vector256.Create((ushort)value1);
+
+ // Subtract Vector128<ushort>.Count so we have now subtracted Vector256<ushort>.Count
+ lengthToExamine -= (nuint)Vector128<ushort>.Count;
+ // First time this checks again against 0, however we will move into final compare if it fails.
+ while (lengthToExamine > offset)
+ {
+ search = LoadVector256(ref searchStart, offset);
+ // Bitwise Or to combine the flagged matches for the second value to our match flags
+ matches = Avx2.MoveMask(
+ Avx2.Or(
+ Avx2.CompareEqual(values0, search),
+ Avx2.CompareEqual(values1, search))
+ .AsByte());
+ // Note that MoveMask has converted the equal vector elements into a set of bit flags,
+ // So the bit position in 'matches' corresponds to the element offset.
+ if (matches == 0)
+ {
+ // None matched
+ offset += (nuint)Vector256<ushort>.Count;
+ continue;
+ }
+
+ goto IntrinsicsMatch;
+ }
+
+ // Move to Vector length from end for final compare
+ search = LoadVector256(ref searchStart, lengthToExamine);
+ offset = lengthToExamine;
+ // Same as method as above
+ matches = Avx2.MoveMask(
+ Avx2.Or(
+ Avx2.CompareEqual(values0, search),
+ Avx2.CompareEqual(values1, search))
+ .AsByte());
+ if (matches == 0)
+ {
+ // None matched
+ goto NotFound;
+ }
+
+ goto IntrinsicsMatch;
+ }
+ }
+
+ // Initial size check was done on method entry.
+ Debug.Assert(length >= Vector128<ushort>.Count);
+ {
+ Vector128<ushort> search;
+ Vector128<ushort> values0 = Vector128.Create((ushort)value0);
+ Vector128<ushort> values1 = Vector128.Create((ushort)value1);
+ // First time this checks against 0 and we will move into final compare if it fails.
+ while (lengthToExamine > offset)
+ {
+ search = LoadVector128(ref searchStart, offset);
+
+ matches = Sse2.MoveMask(
+ Sse2.Or(
+ Sse2.CompareEqual(values0, search),
+ Sse2.CompareEqual(values1, search))
+ .AsByte());
+ // Note that MoveMask has converted the equal vector elements into a set of bit flags,
+ // So the bit position in 'matches' corresponds to the element offset.
+ if (matches == 0)
+ {
+ // None matched
+ offset += (nuint)Vector128<ushort>.Count;
+ continue;
+ }
+
+ goto IntrinsicsMatch;
+ }
+ // Move to Vector length from end for final compare
+ search = LoadVector128(ref searchStart, lengthToExamine);
+ offset = lengthToExamine;
+ // Same as method as above
+ matches = Sse2.MoveMask(
+ Sse2.Or(
+ Sse2.CompareEqual(values0, search),
+ Sse2.CompareEqual(values1, search))
+ .AsByte());
+ if (matches == 0)
+ {
+ // None matched
+ goto NotFound;
+ }
+ }
+
+ IntrinsicsMatch:
+ // Find bitflag offset of first difference and add to current offset,
+ // flags are in bytes so divide by 2 for chars (shift right by 1)
+ offset += (nuint)(uint)BitOperations.TrailingZeroCount(matches) >> 1;
+ goto Found;
+ }
+
+ VectorCompare:
+ // We include the Supported check again here even though path will not be taken, so the asm isn't generated if not supported.
+ if (!Sse2.IsSupported && Vector.IsHardwareAccelerated)
+ {
+ Vector<ushort> values0 = new Vector<ushort>(value0);
+ Vector<ushort> values1 = new Vector<ushort>(value1);
+
+ Vector<ushort> search;
+ // First time this checks against 0 and we will move into final compare if it fails.
+ while (lengthToExamine > offset)
+ {
+ search = LoadVector(ref searchStart, offset);
+ search = Vector.BitwiseOr(
+ Vector.Equals(search, values0),
+ Vector.Equals(search, values1));
+ if (Vector<ushort>.Zero.Equals(search))
+ {
+ // None matched
+ offset += (nuint)Vector<ushort>.Count;
+ continue;
+ }
+
+ goto VectorMatch;
+ }
+
+ // Move to Vector length from end for final compare
+ search = LoadVector(ref searchStart, lengthToExamine);
+ offset = lengthToExamine;
+ search = Vector.BitwiseOr(
+ Vector.Equals(search, values0),
+ Vector.Equals(search, values1));
+ if (Vector<ushort>.Zero.Equals(search))
+ {
+ // None matched
+ goto NotFound;
+ }
+
+ VectorMatch:
+ offset += (nuint)(uint)LocateFirstFoundChar(search);
+ goto Found;
+ }
+
+ Debug.Fail("Unreachable");
+ goto NotFound;
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ internal static int IndexOfAnyExceptValueType<T>(ref T searchSpace, T value0, T value1, int length)
+ => IndexOfAnyExcept(ref searchSpace, value0, value1, length);
+
+ [MethodImpl(MethodImplOptions.AggressiveOptimization)]
+ internal static int IndexOfAnyValueType(ref byte searchSpace, byte value0, byte value1, byte value2, int length)
+ {
+ Debug.Assert(length >= 0);
+
+ uint uValue0 = value0; // Use uint for comparisons to avoid unnecessary 8->32 extensions
+ uint uValue1 = value1; // Use uint for comparisons to avoid unnecessary 8->32 extensions
+ uint uValue2 = value2; // Use uint for comparisons to avoid unnecessary 8->32 extensions
+ nuint offset = 0; // Use nuint for arithmetic to avoid unnecessary 64->32->64 truncations
+ nuint lengthToExamine = (nuint)(uint)length;
+
+ if (Sse2.IsSupported || AdvSimd.Arm64.IsSupported)
+ {
+ // Avx2 branch also operates on Sse2 sizes, so check is combined.
+ nint vectorDiff = (nint)length - Vector128<byte>.Count;
+ if (vectorDiff >= 0)
+ {
+ // >= Sse2 intrinsics are supported, and length is enough to use them so use that path.
+ // We jump forward to the intrinsics at the end of the method so a naive branch predict
+ // will choose the non-intrinsic path so short lengths which don't gain anything aren't
+ // overly disadvantaged by having to jump over a lot of code. Whereas the longer lengths
+ // more than make this back from the intrinsics.
+ lengthToExamine = (nuint)vectorDiff;
+ goto IntrinsicsCompare;
+ }
+ }
+ else if (Vector.IsHardwareAccelerated)
+ {
+ // Calculate lengthToExamine here for test, as it is used later
+ nint vectorDiff = (nint)length - Vector<byte>.Count;
+ if (vectorDiff >= 0)
+ {
+ // Similar as above for Vector version
+ lengthToExamine = (nuint)vectorDiff;
+ goto IntrinsicsCompare;
+ }
+ }
+
+ uint lookUp;
+ while (lengthToExamine >= 8)
+ {
+ lengthToExamine -= 8;
+
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset);
+ if (uValue0 == lookUp || uValue1 == lookUp || uValue2 == lookUp)
+ goto Found;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 1);
+ if (uValue0 == lookUp || uValue1 == lookUp || uValue2 == lookUp)
+ goto Found1;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 2);
+ if (uValue0 == lookUp || uValue1 == lookUp || uValue2 == lookUp)
+ goto Found2;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 3);
+ if (uValue0 == lookUp || uValue1 == lookUp || uValue2 == lookUp)
+ goto Found3;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 4);
+ if (uValue0 == lookUp || uValue1 == lookUp || uValue2 == lookUp)
+ goto Found4;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 5);
+ if (uValue0 == lookUp || uValue1 == lookUp || uValue2 == lookUp)
+ goto Found5;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 6);
+ if (uValue0 == lookUp || uValue1 == lookUp || uValue2 == lookUp)
+ goto Found6;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 7);
+ if (uValue0 == lookUp || uValue1 == lookUp || uValue2 == lookUp)
+ goto Found7;
+
+ offset += 8;
+ }
+
+ if (lengthToExamine >= 4)
+ {
+ lengthToExamine -= 4;
+
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset);
+ if (uValue0 == lookUp || uValue1 == lookUp || uValue2 == lookUp)
+ goto Found;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 1);
+ if (uValue0 == lookUp || uValue1 == lookUp || uValue2 == lookUp)
+ goto Found1;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 2);
+ if (uValue0 == lookUp || uValue1 == lookUp || uValue2 == lookUp)
+ goto Found2;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 3);
+ if (uValue0 == lookUp || uValue1 == lookUp || uValue2 == lookUp)
+ goto Found3;
+
+ offset += 4;
+ }
+
+ while (lengthToExamine > 0)
+ {
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset);
+ if (uValue0 == lookUp || uValue1 == lookUp || uValue2 == lookUp)
+ goto Found;
+
+ offset += 1;
+ lengthToExamine -= 1;
+ }
+
+ NotFound:
+ return -1;
+ Found: // Workaround for https://github.com/dotnet/runtime/issues/8795
+ return (int)offset;
+ Found1:
+ return (int)(offset + 1);
+ Found2:
+ return (int)(offset + 2);
+ Found3:
+ return (int)(offset + 3);
+ Found4:
+ return (int)(offset + 4);
+ Found5:
+ return (int)(offset + 5);
+ Found6:
+ return (int)(offset + 6);
+ Found7:
+ return (int)(offset + 7);
+
+ IntrinsicsCompare:
+ // When we move into a Vectorized block, we process everything of Vector size;
+ // and then for any remainder we do a final compare of Vector size but starting at
+ // the end and forwards, which may overlap on an earlier compare.
+
+ // We include the Supported check again here even though path will not be taken, so the asm isn't generated if not supported.
+ if (Sse2.IsSupported)
+ {
+ int matches;
+ if (Avx2.IsSupported)
+ {
+ Vector256<byte> search;
+ // Guard as we may only have a valid size for Vector128; when we will move to the Sse2
+ // We have already subtracted Vector128<byte>.Count from lengthToExamine so compare against that
+ // to see if we have double the size for Vector256<byte>.Count
+ if (lengthToExamine >= (nuint)Vector128<byte>.Count)
+ {
+ Vector256<byte> values0 = Vector256.Create(value0);
+ Vector256<byte> values1 = Vector256.Create(value1);
+ Vector256<byte> values2 = Vector256.Create(value2);
+
+ // Subtract Vector128<byte>.Count so we have now subtracted Vector256<byte>.Count
+ lengthToExamine -= (nuint)Vector128<byte>.Count;
+ // First time this checks again against 0, however we will move into final compare if it fails.
+ while (lengthToExamine > offset)
+ {
+ search = LoadVector256(ref searchSpace, offset);
+ // Bitwise Or to combine the flagged matches for the second value to our match flags
+ matches = Avx2.MoveMask(
+ Avx2.Or(
+ Avx2.Or(
+ Avx2.CompareEqual(values0, search),
+ Avx2.CompareEqual(values1, search)),
+ Avx2.CompareEqual(values2, search)));
+ // Note that MoveMask has converted the equal vector elements into a set of bit flags,
+ // So the bit position in 'matches' corresponds to the element offset.
+ if (matches == 0)
+ {
+ // None matched
+ offset += (nuint)Vector256<byte>.Count;
+ continue;
+ }
+
+ goto IntrinsicsMatch;
+ }
+
+ // Move to Vector length from end for final compare
+ search = LoadVector256(ref searchSpace, lengthToExamine);
+ offset = lengthToExamine;
+ // Same as method as above
+ matches = Avx2.MoveMask(
+ Avx2.Or(
+ Avx2.Or(
+ Avx2.CompareEqual(values0, search),
+ Avx2.CompareEqual(values1, search)),
+ Avx2.CompareEqual(values2, search)));
+ if (matches == 0)
+ {
+ // None matched
+ goto NotFound;
+ }
+
+ goto IntrinsicsMatch;
+ }
+ }
+
+ // Initial size check was done on method entry.
+ Debug.Assert(length >= Vector128<byte>.Count);
+ {
+ Vector128<byte> search;
+ Vector128<byte> values0 = Vector128.Create(value0);
+ Vector128<byte> values1 = Vector128.Create(value1);
+ Vector128<byte> values2 = Vector128.Create(value2);
+ // First time this checks against 0 and we will move into final compare if it fails.
+ while (lengthToExamine > offset)
+ {
+ search = LoadVector128(ref searchSpace, offset);
+
+ matches = Sse2.MoveMask(
+ Sse2.Or(
+ Sse2.Or(
+ Sse2.CompareEqual(values0, search),
+ Sse2.CompareEqual(values1, search)),
+ Sse2.CompareEqual(values2, search)));
+ // Note that MoveMask has converted the equal vector elements into a set of bit flags,
+ // So the bit position in 'matches' corresponds to the element offset.
+ if (matches == 0)
+ {
+ // None matched
+ offset += (nuint)Vector128<byte>.Count;
+ continue;
+ }
+
+ goto IntrinsicsMatch;
+ }
+ // Move to Vector length from end for final compare
+ search = LoadVector128(ref searchSpace, lengthToExamine);
+ offset = lengthToExamine;
+ // Same as method as above
+ matches = Sse2.MoveMask(
+ Sse2.Or(
+ Sse2.Or(
+ Sse2.CompareEqual(values0, search),
+ Sse2.CompareEqual(values1, search)),
+ Sse2.CompareEqual(values2, search)));
+ if (matches == 0)
+ {
+ // None matched
+ goto NotFound;
+ }
+ }
+
+ IntrinsicsMatch:
+ // Find bitflag offset of first difference and add to current offset
+ offset += (nuint)BitOperations.TrailingZeroCount(matches);
+ goto Found;
+ }
+ else if (AdvSimd.Arm64.IsSupported)
+ {
+ Vector128<byte> search;
+ Vector128<byte> matches;
+ Vector128<byte> values0 = Vector128.Create(value0);
+ Vector128<byte> values1 = Vector128.Create(value1);
+ Vector128<byte> values2 = Vector128.Create(value2);
+ // First time this checks against 0 and we will move into final compare if it fails.
+ while (lengthToExamine > offset)
+ {
+ search = LoadVector128(ref searchSpace, offset);
+
+ matches = AdvSimd.Or(
+ AdvSimd.Or(
+ AdvSimd.CompareEqual(values0, search),
+ AdvSimd.CompareEqual(values1, search)),
+ AdvSimd.CompareEqual(values2, search));
+
+ if (matches == Vector128<byte>.Zero)
+ {
+ offset += (nuint)Vector128<byte>.Count;
+ continue;
+ }
+
+ // Find bitflag offset of first match and add to current offset
+ offset += FindFirstMatchedLane(matches);
+
+ goto Found;
+ }
+
+ // Move to Vector length from end for final compare
+ search = LoadVector128(ref searchSpace, lengthToExamine);
+ offset = lengthToExamine;
+ // Same as method as above
+ matches = AdvSimd.Or(
+ AdvSimd.Or(
+ AdvSimd.CompareEqual(values0, search),
+ AdvSimd.CompareEqual(values1, search)),
+ AdvSimd.CompareEqual(values2, search));
+
+ if (matches == Vector128<byte>.Zero)
+ {
+ // None matched
+ goto NotFound;
+ }
+
+ // Find bitflag offset of first match and add to current offset
+ offset += FindFirstMatchedLane(matches);
+
+ goto Found;
+ }
+ else if (Vector.IsHardwareAccelerated)
+ {
+ Vector<byte> values0 = new Vector<byte>(value0);
+ Vector<byte> values1 = new Vector<byte>(value1);
+ Vector<byte> values2 = new Vector<byte>(value2);
+
+ Vector<byte> search;
+ // First time this checks against 0 and we will move into final compare if it fails.
+ while (lengthToExamine > offset)
+ {
+ search = LoadVector(ref searchSpace, offset);
+ search = Vector.BitwiseOr(
+ Vector.BitwiseOr(
+ Vector.Equals(search, values0),
+ Vector.Equals(search, values1)),
+ Vector.Equals(search, values2));
+ if (Vector<byte>.Zero.Equals(search))
+ {
+ // None matched
+ offset += (nuint)Vector<byte>.Count;
+ continue;
+ }
+
+ goto VectorMatch;
+ }
+
+ // Move to Vector length from end for final compare
+ search = LoadVector(ref searchSpace, lengthToExamine);
+ offset = lengthToExamine;
+ search = Vector.BitwiseOr(
+ Vector.BitwiseOr(
+ Vector.Equals(search, values0),
+ Vector.Equals(search, values1)),
+ Vector.Equals(search, values2));
+ if (Vector<byte>.Zero.Equals(search))
+ {
+ // None matched
+ goto NotFound;
+ }
+
+ VectorMatch:
+ offset += (nuint)LocateFirstFoundByte(search);
+ goto Found;
+ }
+
+ Debug.Fail("Unreachable");
+ goto NotFound;
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ internal static unsafe int IndexOfAnyValueType(ref short searchSpace, short value0, short value1, short value2, int length)
+ => IndexOfAnyValueType(
+ ref Unsafe.As<short, char>(ref searchSpace),
+ Unsafe.As<short, char>(ref value0),
+ Unsafe.As<short, char>(ref value1),
+ Unsafe.As<short, char>(ref value2),
+ length);
+
+ [MethodImpl(MethodImplOptions.AggressiveOptimization)]
+ internal static unsafe int IndexOfAnyValueType(ref char searchStart, char value0, char value1, char value2, int length)
+ {
+ Debug.Assert(length >= 0);
+
+ nuint offset = 0; // Use nuint for arithmetic to avoid unnecessary 64->32->64 truncations
+ nuint lengthToExamine = (nuint)(uint)length;
+
+ if (Sse2.IsSupported)
+ {
+ // Calculate lengthToExamine here for test, rather than just testing as it used later, rather than doing it twice.
+ nint vectorDiff = (nint)length - Vector128<ushort>.Count;
+ if (vectorDiff >= 0)
+ {
+ // >= Sse2 intrinsics are supported and length is enough to use them, so use that path.
+ // We jump forward to the intrinsics at the end of them method so a naive branch predict
+ // will choose the non-intrinsic path so short lengths which don't gain anything aren't
+ // overly disadvantaged by having to jump over a lot of code. Whereas the longer lengths
+ // more than make this back from the intrinsics.
+ lengthToExamine = (nuint)vectorDiff;
+ goto IntrinsicsCompare;
+ }
+ }
+ else if (Vector.IsHardwareAccelerated)
+ {
+ // Calculate lengthToExamine here for test, rather than just testing as it used later, rather than doing it twice.
+ nint vectorDiff = (nint)length - Vector<ushort>.Count;
+ if (vectorDiff >= 0)
+ {
+ // Similar as above for Vector version
+ lengthToExamine = (nuint)vectorDiff;
+ goto VectorCompare;
+ }
+ }
+
+ int lookUp;
+ while (lengthToExamine >= 4)
+ {
+ ref char current = ref Add(ref searchStart, offset);
+
+ lookUp = current;
+ if (value0 == lookUp || value1 == lookUp || value2 == lookUp)
+ goto Found;
+ lookUp = Unsafe.Add(ref current, 1);
+ if (value0 == lookUp || value1 == lookUp || value2 == lookUp)
+ goto Found1;
+ lookUp = Unsafe.Add(ref current, 2);
+ if (value0 == lookUp || value1 == lookUp || value2 == lookUp)
+ goto Found2;
+ lookUp = Unsafe.Add(ref current, 3);
+ if (value0 == lookUp || value1 == lookUp || value2 == lookUp)
+ goto Found3;
+
+ offset += 4;
+ lengthToExamine -= 4;
+ }
+
+ while (lengthToExamine > 0)
+ {
+ lookUp = Add(ref searchStart, offset);
+ if (value0 == lookUp || value1 == lookUp || value2 == lookUp)
+ goto Found;
+
+ offset += 1;
+ lengthToExamine -= 1;
+ }
+
+ NotFound:
+ return -1;
+ Found3:
+ return (int)(offset + 3);
+ Found2:
+ return (int)(offset + 2);
+ Found1:
+ return (int)(offset + 1);
+ Found:
+ return (int)offset;
+
+ IntrinsicsCompare:
+ // When we move into a Vectorized block, we process everything of Vector size;
+ // and then for any remainder we do a final compare of Vector size but starting at
+ // the end and forwards, which may overlap on an earlier compare.
+
+ // We include the Supported check again here even though path will not be taken, so the asm isn't generated if not supported.
+ if (Sse2.IsSupported)
+ {
+ int matches;
+ if (Avx2.IsSupported)
+ {
+ Vector256<ushort> search;
+ // Guard as we may only have a valid size for Vector128; when we will move to the Sse2
+ // We have already subtracted Vector128<ushort>.Count from lengthToExamine so compare against that
+ // to see if we have double the size for Vector256<ushort>.Count
+ if (lengthToExamine >= (nuint)Vector128<ushort>.Count)
+ {
+ Vector256<ushort> values0 = Vector256.Create((ushort)value0);
+ Vector256<ushort> values1 = Vector256.Create((ushort)value1);
+ Vector256<ushort> values2 = Vector256.Create((ushort)value2);
+
+ // Subtract Vector128<ushort>.Count so we have now subtracted Vector256<ushort>.Count
+ lengthToExamine -= (nuint)Vector128<ushort>.Count;
+ // First time this checks again against 0, however we will move into final compare if it fails.
+ while (lengthToExamine > offset)
+ {
+ search = LoadVector256(ref searchStart, offset);
+ // Bitwise Or to combine the flagged matches for the second value to our match flags
+ matches = Avx2.MoveMask(
+ Avx2.Or(
+ Avx2.Or(
+ Avx2.CompareEqual(values0, search),
+ Avx2.CompareEqual(values1, search)),
+ Avx2.CompareEqual(values2, search))
+ .AsByte());
+ // Note that MoveMask has converted the equal vector elements into a set of bit flags,
+ // So the bit position in 'matches' corresponds to the element offset.
+ if (matches == 0)
+ {
+ // None matched
+ offset += (nuint)Vector256<ushort>.Count;
+ continue;
+ }
+
+ goto IntrinsicsMatch;
+ }
+
+ // Move to Vector length from end for final compare
+ search = LoadVector256(ref searchStart, lengthToExamine);
+ offset = lengthToExamine;
+ // Same as method as above
+ matches = Avx2.MoveMask(
+ Avx2.Or(
+ Avx2.Or(
+ Avx2.CompareEqual(values0, search),
+ Avx2.CompareEqual(values1, search)),
+ Avx2.CompareEqual(values2, search))
+ .AsByte());
+ if (matches == 0)
+ {
+ // None matched
+ goto NotFound;
+ }
+
+ goto IntrinsicsMatch;
+ }
+ }
+
+ // Initial size check was done on method entry.
+ Debug.Assert(length >= Vector128<ushort>.Count);
+ {
+ Vector128<ushort> search;
+ Vector128<ushort> values0 = Vector128.Create((ushort)value0);
+ Vector128<ushort> values1 = Vector128.Create((ushort)value1);
+ Vector128<ushort> values2 = Vector128.Create((ushort)value2);
+ // First time this checks against 0 and we will move into final compare if it fails.
+ while (lengthToExamine > offset)
+ {
+ search = LoadVector128(ref searchStart, offset);
+
+ matches = Sse2.MoveMask(
+ Sse2.Or(
+ Sse2.Or(
+ Sse2.CompareEqual(values0, search),
+ Sse2.CompareEqual(values1, search)),
+ Sse2.CompareEqual(values2, search))
+ .AsByte());
+ // Note that MoveMask has converted the equal vector elements into a set of bit flags,
+ // So the bit position in 'matches' corresponds to the element offset.
+ if (matches == 0)
+ {
+ // None matched
+ offset += (nuint)Vector128<ushort>.Count;
+ continue;
+ }
+
+ goto IntrinsicsMatch;
+ }
+ // Move to Vector length from end for final compare
+ search = LoadVector128(ref searchStart, lengthToExamine);
+ offset = lengthToExamine;
+ // Same as method as above
+ matches = Sse2.MoveMask(
+ Sse2.Or(
+ Sse2.Or(
+ Sse2.CompareEqual(values0, search),
+ Sse2.CompareEqual(values1, search)),
+ Sse2.CompareEqual(values2, search))
+ .AsByte());
+ if (matches == 0)
+ {
+ // None matched
+ goto NotFound;
+ }
+ }
+
+ IntrinsicsMatch:
+ // Find bitflag offset of first difference and add to current offset,
+ // flags are in bytes so divide by 2 for chars (shift right by 1)
+ offset += (nuint)(uint)BitOperations.TrailingZeroCount(matches) >> 1;
+ goto Found;
+ }
+
+ VectorCompare:
+ // We include the Supported check again here even though path will not be taken, so the asm isn't generated if not supported.
+ if (!Sse2.IsSupported && Vector.IsHardwareAccelerated)
+ {
+ Vector<ushort> values0 = new Vector<ushort>(value0);
+ Vector<ushort> values1 = new Vector<ushort>(value1);
+ Vector<ushort> values2 = new Vector<ushort>(value2);
+
+ Vector<ushort> search;
+ // First time this checks against 0 and we will move into final compare if it fails.
+ while (lengthToExamine > offset)
+ {
+ search = LoadVector(ref searchStart, offset);
+ search = Vector.BitwiseOr(
+ Vector.BitwiseOr(
+ Vector.Equals(search, values0),
+ Vector.Equals(search, values1)),
+ Vector.Equals(search, values2));
+ if (Vector<ushort>.Zero.Equals(search))
+ {
+ // None matched
+ offset += (nuint)Vector<ushort>.Count;
+ continue;
+ }
+
+ goto VectorMatch;
+ }
+
+ // Move to Vector length from end for final compare
+ search = LoadVector(ref searchStart, lengthToExamine);
+ offset = lengthToExamine;
+ search = Vector.BitwiseOr(
+ Vector.BitwiseOr(
+ Vector.Equals(search, values0),
+ Vector.Equals(search, values1)),
+ Vector.Equals(search, values2));
+ if (Vector<ushort>.Zero.Equals(search))
+ {
+ // None matched
+ goto NotFound;
+ }
+
+ VectorMatch:
+ offset += (nuint)(uint)LocateFirstFoundChar(search);
+ goto Found;
+ }
+
+ Debug.Fail("Unreachable");
+ goto NotFound;
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ internal static int IndexOfAnyExceptValueType<T>(ref T searchSpace, T value0, T value1, T value2, int length)
+ => IndexOfAnyExcept(ref searchSpace, value0, value1, value2, length);
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ internal static unsafe int IndexOfAnyValueType(ref short searchSpace, short value0, short value1, short value2, short value3, int length)
+ => IndexOfAnyValueType(
+ ref Unsafe.As<short, char>(ref searchSpace),
+ Unsafe.As<short, char>(ref value0),
+ Unsafe.As<short, char>(ref value1),
+ Unsafe.As<short, char>(ref value2),
+ Unsafe.As<short, char>(ref value3),
+ length);
+
+ [MethodImpl(MethodImplOptions.AggressiveOptimization)]
+ internal static unsafe int IndexOfAnyValueType(ref char searchStart, char value0, char value1, char value2, char value3, int length)
+ {
+ Debug.Assert(length >= 0);
+
+ nuint offset = 0; // Use nuint for arithmetic to avoid unnecessary 64->32->64 truncations
+ nuint lengthToExamine = (nuint)(uint)length;
+
+ if (Sse2.IsSupported)
+ {
+ // Calculate lengthToExamine here for test, rather than just testing as it used later, rather than doing it twice.
+ nint vectorDiff = (nint)length - Vector128<ushort>.Count;
+ if (vectorDiff >= 0)
+ {
+ // >= Sse2 intrinsics are supported and length is enough to use them, so use that path.
+ // We jump forward to the intrinsics at the end of them method so a naive branch predict
+ // will choose the non-intrinsic path so short lengths which don't gain anything aren't
+ // overly disadvantaged by having to jump over a lot of code. Whereas the longer lengths
+ // more than make this back from the intrinsics.
+ lengthToExamine = (nuint)vectorDiff;
+ goto IntrinsicsCompare;
+ }
+ }
+ else if (Vector.IsHardwareAccelerated)
+ {
+ // Calculate lengthToExamine here for test, rather than just testing as it used later, rather than doing it twice.
+ nint vectorDiff = (nint)length - Vector<ushort>.Count;
+ if (vectorDiff >= 0)
+ {
+ // Similar as above for Vector version
+ lengthToExamine = (nuint)vectorDiff;
+ goto VectorCompare;
+ }
+ }
+
+ int lookUp;
+ while (lengthToExamine >= 4)
+ {
+ ref char current = ref Add(ref searchStart, offset);
+
+ lookUp = current;
+ if (value0 == lookUp || value1 == lookUp || value2 == lookUp || value3 == lookUp)
+ goto Found;
+ lookUp = Unsafe.Add(ref current, 1);
+ if (value0 == lookUp || value1 == lookUp || value2 == lookUp || value3 == lookUp)
+ goto Found1;
+ lookUp = Unsafe.Add(ref current, 2);
+ if (value0 == lookUp || value1 == lookUp || value2 == lookUp || value3 == lookUp)
+ goto Found2;
+ lookUp = Unsafe.Add(ref current, 3);
+ if (value0 == lookUp || value1 == lookUp || value2 == lookUp || value3 == lookUp)
+ goto Found3;
+
+ offset += 4;
+ lengthToExamine -= 4;
+ }
+
+ while (lengthToExamine > 0)
+ {
+ lookUp = Add(ref searchStart, offset);
+ if (value0 == lookUp || value1 == lookUp || value2 == lookUp || value3 == lookUp)
+ goto Found;
+
+ offset += 1;
+ lengthToExamine -= 1;
+ }
+
+ NotFound:
+ return -1;
+ Found3:
+ return (int)(offset + 3);
+ Found2:
+ return (int)(offset + 2);
+ Found1:
+ return (int)(offset + 1);
+ Found:
+ return (int)offset;
+
+ IntrinsicsCompare:
+ // When we move into a Vectorized block, we process everything of Vector size;
+ // and then for any remainder we do a final compare of Vector size but starting at
+ // the end and forwards, which may overlap on an earlier compare.
+
+ // We include the Supported check again here even though path will not be taken, so the asm isn't generated if not supported.
+ if (Sse2.IsSupported)
+ {
+ int matches;
+ if (Avx2.IsSupported)
+ {
+ Vector256<ushort> search;
+ // Guard as we may only have a valid size for Vector128; when we will move to the Sse2
+ // We have already subtracted Vector128<ushort>.Count from lengthToExamine so compare against that
+ // to see if we have double the size for Vector256<ushort>.Count
+ if (lengthToExamine >= (nuint)Vector128<ushort>.Count)
+ {
+ Vector256<ushort> values0 = Vector256.Create((ushort)value0);
+ Vector256<ushort> values1 = Vector256.Create((ushort)value1);
+ Vector256<ushort> values2 = Vector256.Create((ushort)value2);
+ Vector256<ushort> values3 = Vector256.Create((ushort)value3);
+
+ // Subtract Vector128<ushort>.Count so we have now subtracted Vector256<ushort>.Count
+ lengthToExamine -= (nuint)Vector128<ushort>.Count;
+ // First time this checks again against 0, however we will move into final compare if it fails.
+ while (lengthToExamine > offset)
+ {
+ search = LoadVector256(ref searchStart, offset);
+ // We preform the Or at non-Vector level as we are using the maximum number of non-preserved registers,
+ // and more causes them first to be pushed to stack and then popped on exit to preseve their values.
+ matches = Avx2.MoveMask(Avx2.CompareEqual(values0, search).AsByte());
+ // Bitwise Or to combine the flagged matches for the second, third and fourth values to our match flags
+ matches |= Avx2.MoveMask(Avx2.CompareEqual(values1, search).AsByte());
+ matches |= Avx2.MoveMask(Avx2.CompareEqual(values2, search).AsByte());
+ matches |= Avx2.MoveMask(Avx2.CompareEqual(values3, search).AsByte());
+ // Note that MoveMask has converted the equal vector elements into a set of bit flags,
+ // So the bit position in 'matches' corresponds to the element offset.
+ if (matches == 0)
+ {
+ // None matched
+ offset += (nuint)Vector256<ushort>.Count;
+ continue;
+ }
+
+ goto IntrinsicsMatch;
+ }
+
+ // Move to Vector length from end for final compare
+ search = LoadVector256(ref searchStart, lengthToExamine);
+ offset = lengthToExamine;
+ // Same as method as above
+ matches = Avx2.MoveMask(Avx2.CompareEqual(values0, search).AsByte());
+ // Bitwise Or to combine the flagged matches for the second, third and fourth values to our match flags
+ matches |= Avx2.MoveMask(Avx2.CompareEqual(values1, search).AsByte());
+ matches |= Avx2.MoveMask(Avx2.CompareEqual(values2, search).AsByte());
+ matches |= Avx2.MoveMask(Avx2.CompareEqual(values3, search).AsByte());
+ if (matches == 0)
+ {
+ // None matched
+ goto NotFound;
+ }
+
+ goto IntrinsicsMatch;
+ }
+ }
+
+ // Initial size check was done on method entry.
+ Debug.Assert(length >= Vector128<ushort>.Count);
+ {
+ Vector128<ushort> search;
+ Vector128<ushort> values0 = Vector128.Create((ushort)value0);
+ Vector128<ushort> values1 = Vector128.Create((ushort)value1);
+ Vector128<ushort> values2 = Vector128.Create((ushort)value2);
+ Vector128<ushort> values3 = Vector128.Create((ushort)value3);
+ // First time this checks against 0 and we will move into final compare if it fails.
+ while (lengthToExamine > offset)
+ {
+ search = LoadVector128(ref searchStart, offset);
+
+ matches = Sse2.MoveMask(Sse2.CompareEqual(values0, search).AsByte());
+ matches |= Sse2.MoveMask(Sse2.CompareEqual(values1, search).AsByte());
+ matches |= Sse2.MoveMask(Sse2.CompareEqual(values2, search).AsByte());
+ matches |= Sse2.MoveMask(Sse2.CompareEqual(values3, search).AsByte());
+ // Note that MoveMask has converted the equal vector elements into a set of bit flags,
+ // So the bit position in 'matches' corresponds to the element offset.
+ if (matches == 0)
+ {
+ // None matched
+ offset += (nuint)Vector128<ushort>.Count;
+ continue;
+ }
+
+ goto IntrinsicsMatch;
+ }
+ // Move to Vector length from end for final compare
+ search = LoadVector128(ref searchStart, lengthToExamine);
+ offset = lengthToExamine;
+ // Same as method as above
+ matches = Sse2.MoveMask(Sse2.CompareEqual(values0, search).AsByte());
+ matches |= Sse2.MoveMask(Sse2.CompareEqual(values1, search).AsByte());
+ matches |= Sse2.MoveMask(Sse2.CompareEqual(values2, search).AsByte());
+ matches |= Sse2.MoveMask(Sse2.CompareEqual(values3, search).AsByte());
+ if (matches == 0)
+ {
+ // None matched
+ goto NotFound;
+ }
+ }
+
+ IntrinsicsMatch:
+ // Find bitflag offset of first difference and add to current offset,
+ // flags are in bytes so divide by 2 for chars (shift right by 1)
+ offset += (nuint)(uint)BitOperations.TrailingZeroCount(matches) >> 1;
+ goto Found;
+ }
+
+ VectorCompare:
+ // We include the Supported check again here even though path will not be taken, so the asm isn't generated if not supported.
+ if (!Sse2.IsSupported && Vector.IsHardwareAccelerated)
+ {
+ Vector<ushort> values0 = new Vector<ushort>(value0);
+ Vector<ushort> values1 = new Vector<ushort>(value1);
+ Vector<ushort> values2 = new Vector<ushort>(value2);
+ Vector<ushort> values3 = new Vector<ushort>(value3);
+
+ Vector<ushort> search;
+ // First time this checks against 0 and we will move into final compare if it fails.
+ while (lengthToExamine > offset)
+ {
+ search = LoadVector(ref searchStart, offset);
+ search = Vector.BitwiseOr(
+ Vector.BitwiseOr(
+ Vector.BitwiseOr(
+ Vector.Equals(search, values0),
+ Vector.Equals(search, values1)),
+ Vector.Equals(search, values2)),
+ Vector.Equals(search, values3));
+ if (Vector<ushort>.Zero.Equals(search))
+ {
+ // None matched
+ offset += (nuint)Vector<ushort>.Count;
+ continue;
+ }
+
+ goto VectorMatch;
+ }
+
+ // Move to Vector length from end for final compare
+ search = LoadVector(ref searchStart, lengthToExamine);
+ offset = lengthToExamine;
+ search = Vector.BitwiseOr(
+ Vector.BitwiseOr(
+ Vector.BitwiseOr(
+ Vector.Equals(search, values0),
+ Vector.Equals(search, values1)),
+ Vector.Equals(search, values2)),
+ Vector.Equals(search, values3));
+ if (Vector<ushort>.Zero.Equals(search))
+ {
+ // None matched
+ goto NotFound;
+ }
+
+ VectorMatch:
+ offset += (nuint)(uint)LocateFirstFoundChar(search);
+ goto Found;
+ }
+
+ Debug.Fail("Unreachable");
+ goto NotFound;
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ internal static int IndexOfAnyExceptValueType<T>(ref T searchSpace, T value0, T value1, T value2, T value3, int length)
+ => IndexOfAnyExcept(ref searchSpace, value0, value1, value2, value3, length);
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ internal static int LastIndexOfAnyExceptValueType<T>(ref T searchSpace, T value, int length)
+ => LastIndexOfAnyExcept(ref searchSpace, value, length);
+
+ internal static int LastIndexOfAnyValueType(ref byte searchSpace, byte value0, byte value1, int length)
+ {
+ Debug.Assert(length >= 0);
+
+ uint uValue0 = value0; // Use uint for comparisons to avoid unnecessary 8->32 extensions
+ uint uValue1 = value1;
+ nuint offset = (nuint)(uint)length; // Use nuint for arithmetic to avoid unnecessary 64->32->64 truncations
+ nuint lengthToExamine = (nuint)(uint)length;
+
+ if (Vector.IsHardwareAccelerated && length >= Vector<byte>.Count * 2)
+ {
+ lengthToExamine = UnalignedCountVectorFromEnd(ref searchSpace, length);
+ }
+ SequentialScan:
+ uint lookUp;
+ while (lengthToExamine >= 8)
+ {
+ lengthToExamine -= 8;
+ offset -= 8;
+
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 7);
+ if (uValue0 == lookUp || uValue1 == lookUp)
+ goto Found7;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 6);
+ if (uValue0 == lookUp || uValue1 == lookUp)
+ goto Found6;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 5);
+ if (uValue0 == lookUp || uValue1 == lookUp)
+ goto Found5;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 4);
+ if (uValue0 == lookUp || uValue1 == lookUp)
+ goto Found4;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 3);
+ if (uValue0 == lookUp || uValue1 == lookUp)
+ goto Found3;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 2);
+ if (uValue0 == lookUp || uValue1 == lookUp)
+ goto Found2;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 1);
+ if (uValue0 == lookUp || uValue1 == lookUp)
+ goto Found1;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset);
+ if (uValue0 == lookUp || uValue1 == lookUp)
+ goto Found;
+ }
+
+ if (lengthToExamine >= 4)
+ {
+ lengthToExamine -= 4;
+ offset -= 4;
+
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 3);
+ if (uValue0 == lookUp || uValue1 == lookUp)
+ goto Found3;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 2);
+ if (uValue0 == lookUp || uValue1 == lookUp)
+ goto Found2;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 1);
+ if (uValue0 == lookUp || uValue1 == lookUp)
+ goto Found1;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset);
+ if (uValue0 == lookUp || uValue1 == lookUp)
+ goto Found;
+ }
+
+ while (lengthToExamine > 0)
+ {
+ lengthToExamine -= 1;
+ offset -= 1;
+
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset);
+ if (uValue0 == lookUp || uValue1 == lookUp)
+ goto Found;
+ }
+
+ if (Vector.IsHardwareAccelerated && (offset > 0))
+ {
+ lengthToExamine = (offset & (nuint)~(Vector<byte>.Count - 1));
+
+ Vector<byte> values0 = new Vector<byte>(value0);
+ Vector<byte> values1 = new Vector<byte>(value1);
+
+ while (lengthToExamine > (nuint)(Vector<byte>.Count - 1))
+ {
+ Vector<byte> search = LoadVector(ref searchSpace, offset - (nuint)Vector<byte>.Count);
+ var matches = Vector.BitwiseOr(
+ Vector.Equals(search, values0),
+ Vector.Equals(search, values1));
+ if (Vector<byte>.Zero.Equals(matches))
+ {
+ offset -= (nuint)Vector<byte>.Count;
+ lengthToExamine -= (nuint)Vector<byte>.Count;
+ continue;
+ }
+
+ // Find offset of first match and add to current offset
+ return (int)(offset) - Vector<byte>.Count + LocateLastFoundByte(matches);
+ }
+
+ if (offset > 0)
+ {
+ lengthToExamine = offset;
+ goto SequentialScan;
+ }
+ }
+ return -1;
+ Found: // Workaround for https://github.com/dotnet/runtime/issues/8795
+ return (int)offset;
+ Found1:
+ return (int)(offset + 1);
+ Found2:
+ return (int)(offset + 2);
+ Found3:
+ return (int)(offset + 3);
+ Found4:
+ return (int)(offset + 4);
+ Found5:
+ return (int)(offset + 5);
+ Found6:
+ return (int)(offset + 6);
+ Found7:
+ return (int)(offset + 7);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ internal static int LastIndexOfAnyValueType(ref short searchSpace, short value0, short value1, int length)
+ => LastIndexOfAny(ref searchSpace, value0, value1, length);
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ internal static int LastIndexOfAnyExceptValueType<T>(ref T searchSpace, T value0, T value1, int length)
+ => LastIndexOfAnyExcept(ref searchSpace, value0, value1, length);
+
+ internal static int LastIndexOfAnyValueType(ref byte searchSpace, byte value0, byte value1, byte value2, int length)
+ {
+ Debug.Assert(length >= 0);
+
+ uint uValue0 = value0; // Use uint for comparisons to avoid unnecessary 8->32 extensions
+ uint uValue1 = value1;
+ uint uValue2 = value2;
+ nuint offset = (nuint)(uint)length; // Use nuint for arithmetic to avoid unnecessary 64->32->64 truncations
+ nuint lengthToExamine = (nuint)(uint)length;
+
+ if (Vector.IsHardwareAccelerated && length >= Vector<byte>.Count * 2)
+ {
+ lengthToExamine = UnalignedCountVectorFromEnd(ref searchSpace, length);
+ }
+ SequentialScan:
+ uint lookUp;
+ while (lengthToExamine >= 8)
+ {
+ lengthToExamine -= 8;
+ offset -= 8;
+
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 7);
+ if (uValue0 == lookUp || uValue1 == lookUp || uValue2 == lookUp)
+ goto Found7;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 6);
+ if (uValue0 == lookUp || uValue1 == lookUp || uValue2 == lookUp)
+ goto Found6;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 5);
+ if (uValue0 == lookUp || uValue1 == lookUp || uValue2 == lookUp)
+ goto Found5;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 4);
+ if (uValue0 == lookUp || uValue1 == lookUp || uValue2 == lookUp)
+ goto Found4;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 3);
+ if (uValue0 == lookUp || uValue1 == lookUp || uValue2 == lookUp)
+ goto Found3;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 2);
+ if (uValue0 == lookUp || uValue1 == lookUp || uValue2 == lookUp)
+ goto Found2;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 1);
+ if (uValue0 == lookUp || uValue1 == lookUp || uValue2 == lookUp)
+ goto Found1;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset);
+ if (uValue0 == lookUp || uValue1 == lookUp || uValue2 == lookUp)
+ goto Found;
+ }
+
+ if (lengthToExamine >= 4)
+ {
+ lengthToExamine -= 4;
+ offset -= 4;
+
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 3);
+ if (uValue0 == lookUp || uValue1 == lookUp || uValue2 == lookUp)
+ goto Found3;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 2);
+ if (uValue0 == lookUp || uValue1 == lookUp || uValue2 == lookUp)
+ goto Found2;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset + 1);
+ if (uValue0 == lookUp || uValue1 == lookUp || uValue2 == lookUp)
+ goto Found1;
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset);
+ if (uValue0 == lookUp || uValue1 == lookUp || uValue2 == lookUp)
+ goto Found;
+ }
+
+ while (lengthToExamine > 0)
+ {
+ lengthToExamine -= 1;
+ offset -= 1;
+
+ lookUp = Unsafe.AddByteOffset(ref searchSpace, offset);
+ if (uValue0 == lookUp || uValue1 == lookUp || uValue2 == lookUp)
+ goto Found;
+ }
+
+ if (Vector.IsHardwareAccelerated && (offset > 0))
+ {
+ lengthToExamine = (offset & (nuint)~(Vector<byte>.Count - 1));
+
+ Vector<byte> values0 = new Vector<byte>(value0);
+ Vector<byte> values1 = new Vector<byte>(value1);
+ Vector<byte> values2 = new Vector<byte>(value2);
+
+ while (lengthToExamine > (nuint)(Vector<byte>.Count - 1))
+ {
+ Vector<byte> search = LoadVector(ref searchSpace, offset - (nuint)Vector<byte>.Count);
+
+ var matches = Vector.BitwiseOr(
+ Vector.BitwiseOr(
+ Vector.Equals(search, values0),
+ Vector.Equals(search, values1)),
+ Vector.Equals(search, values2));
+
+ if (Vector<byte>.Zero.Equals(matches))
+ {
+ offset -= (nuint)Vector<byte>.Count;
+ lengthToExamine -= (nuint)Vector<byte>.Count;
+ continue;
+ }
+
+ // Find offset of first match and add to current offset
+ return (int)(offset) - Vector<byte>.Count + LocateLastFoundByte(matches);
+ }
+
+ if (offset > 0)
+ {
+ lengthToExamine = offset;
+ goto SequentialScan;
+ }
+ }
+ return -1;
+ Found: // Workaround for https://github.com/dotnet/runtime/issues/8795
+ return (int)offset;
+ Found1:
+ return (int)(offset + 1);
+ Found2:
+ return (int)(offset + 2);
+ Found3:
+ return (int)(offset + 3);
+ Found4:
+ return (int)(offset + 4);
+ Found5:
+ return (int)(offset + 5);
+ Found6:
+ return (int)(offset + 6);
+ Found7:
+ return (int)(offset + 7);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ internal static int LastIndexOfAnyValueType(ref short searchSpace, short value0, short value1, short value2, int length)
+ => LastIndexOfAny(ref searchSpace, value0, value1, value2, length);
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ internal static int LastIndexOfAnyExceptValueType<T>(ref T searchSpace, T value0, T value1, T value2, int length)
+ => LastIndexOfAnyExcept(ref searchSpace, value0, value1, value2, length);
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ internal static int LastIndexOfAnyExceptValueType<T>(ref T searchSpace, T value0, T value1, T value2, T value3, int length)
+ => LastIndexOfAnyExcept(ref searchSpace, value0, value1, value2, value3, length);
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ private static Vector128<ushort> LoadVector128(ref char start, nint offset)
+ => Unsafe.ReadUnaligned<Vector128<ushort>>(ref Unsafe.As<char, byte>(ref Unsafe.Add(ref start, offset)));
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ private static Vector128<ushort> LoadVector128(ref char start, nuint offset)
+ => Unsafe.ReadUnaligned<Vector128<ushort>>(ref Unsafe.As<char, byte>(ref Unsafe.Add(ref start, (nint)offset)));
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ private static Vector256<ushort> LoadVector256(ref char start, nint offset)
+ => Unsafe.ReadUnaligned<Vector256<ushort>>(ref Unsafe.As<char, byte>(ref Unsafe.Add(ref start, offset)));
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ private static Vector256<ushort> LoadVector256(ref char start, nuint offset)
+ => Unsafe.ReadUnaligned<Vector256<ushort>>(ref Unsafe.As<char, byte>(ref Unsafe.Add(ref start, (nint)offset)));
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ private static ref char Add(ref char start, nuint offset) => ref Unsafe.Add(ref start, (nint)offset);
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ private static uint FindFirstMatchedLane(Vector128<byte> compareResult)
+ {
+ Debug.Assert(AdvSimd.Arm64.IsSupported);
+
+ // Mask to help find the first lane in compareResult that is set.
+ // MSB 0x10 corresponds to 1st lane, 0x01 corresponds to 0th lane and so forth.
+ Vector128<byte> mask = Vector128.Create((ushort)0x1001).AsByte();
+
+ // Find the first lane that is set inside compareResult.
+ Vector128<byte> maskedSelectedLanes = AdvSimd.And(compareResult, mask);
+ Vector128<byte> pairwiseSelectedLane = AdvSimd.Arm64.AddPairwise(maskedSelectedLanes, maskedSelectedLanes);
+ ulong selectedLanes = pairwiseSelectedLane.AsUInt64().ToScalar();
+
+ // It should be handled by compareResult != Vector.Zero
+ Debug.Assert(selectedLanes != 0);
+
+ // Find the first lane that is set inside compareResult.
+ return (uint)BitOperations.TrailingZeroCount(selectedLanes) >> 2;
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ private static int FindFirstMatchedLane(Vector128<ushort> compareResult)
+ {
+ Debug.Assert(AdvSimd.Arm64.IsSupported);
+
+ Vector128<byte> pairwiseSelectedLane = AdvSimd.Arm64.AddPairwise(compareResult.AsByte(), compareResult.AsByte());
+ ulong selectedLanes = pairwiseSelectedLane.AsUInt64().ToScalar();
+
+ // It should be handled by compareResult != Vector.Zero
+ Debug.Assert(selectedLanes != 0);
+
+ return BitOperations.TrailingZeroCount(selectedLanes) >> 3;
+ }
+
+ // Vector sub-search adapted from https://github.com/aspnet/KestrelHttpServer/pull/1138
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ private static int LocateLastFoundChar(Vector<ushort> match)
+ {
+ var vector64 = Vector.AsVectorUInt64(match);
+ ulong candidate = 0;
+ int i = Vector<ulong>.Count - 1;
+
+ // This pattern is only unrolled by the Jit if the limit is Vector<T>.Count
+ // As such, we need a dummy iteration variable for that condition to be satisfied
+ for (int j = 0; j < Vector<ulong>.Count; j++)
+ {
+ candidate = vector64[i];
+ if (candidate != 0)
+ {
+ break;
+ }
+
+ i--;
+ }
+
+ // Single LEA instruction with jitted const (using function result)
+ return i * 4 + LocateLastFoundChar(candidate);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ private static int LocateLastFoundChar(ulong match)
+ => BitOperations.Log2(match) >> 4;
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ private static unsafe nuint UnalignedCountVectorFromEnd(ref byte searchSpace, int length)
+ {
+ nint unaligned = (nint)Unsafe.AsPointer(ref searchSpace) & (Vector<byte>.Count - 1);
+ return (nuint)(uint)(((length & (Vector<byte>.Count - 1)) + unaligned) & (Vector<byte>.Count - 1));
+ }
+ }
+}
diff --git a/src/libraries/System.Private.CoreLib/src/System/SpanHelpers.T.cs b/src/libraries/System.Private.CoreLib/src/System/SpanHelpers.T.cs
index 877c2131187..5a4f52b4e67 100644
--- a/src/libraries/System.Private.CoreLib/src/System/SpanHelpers.T.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/SpanHelpers.T.cs
@@ -1442,6 +1442,7 @@ namespace System
return false;
}
+#if !MONO
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static int IndexOfChar(ref char searchSpace, char value, int length)
=> IndexOfValueType(ref Unsafe.As<char, short>(ref searchSpace), (short)value, length);
@@ -1453,6 +1454,7 @@ namespace System
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static int IndexOfAnyExceptValueType<T>(ref T searchSpace, T value, int length) where T : struct, INumber<T>
=> IndexOfValueType<T, Negate<T>>(ref searchSpace, value, length);
+#endif
[MethodImpl(MethodImplOptions.AggressiveOptimization)]
private static int IndexOfValueType<TValue, TNegator>(ref TValue searchSpace, TValue value, int length)
@@ -1567,6 +1569,7 @@ namespace System
return -1;
}
+#if !MONO
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static int IndexOfAnyChar(ref char searchSpace, char value0, char value1, int length)
=> IndexOfAnyValueType(ref Unsafe.As<char, short>(ref searchSpace), (short)value0, (short)value1, length);
@@ -1578,6 +1581,7 @@ namespace System
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static int IndexOfAnyExceptValueType<T>(ref T searchSpace, T value0, T value1, int length) where T : struct, INumber<T>
=> IndexOfAnyValueType<T, Negate<T>>(ref searchSpace, value0, value1, length);
+#endif
// having INumber<T> constraint here allows to use == operator and get better perf compared to .Equals
[MethodImpl(MethodImplOptions.AggressiveOptimization)]
@@ -1716,6 +1720,7 @@ namespace System
return -1;
}
+#if !MONO
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static int IndexOfAnyValueType<T>(ref T searchSpace, T value0, T value1, T value2, int length) where T : struct, INumber<T>
=> IndexOfAnyValueType<T, DontNegate<T>>(ref searchSpace, value0, value1, value2, length);
@@ -1723,6 +1728,7 @@ namespace System
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static int IndexOfAnyExceptValueType<T>(ref T searchSpace, T value0, T value1, T value2, int length) where T : struct, INumber<T>
=> IndexOfAnyValueType<T, Negate<T>>(ref searchSpace, value0, value1, value2, length);
+#endif
[MethodImpl(MethodImplOptions.AggressiveOptimization)]
private static int IndexOfAnyValueType<TValue, TNegator>(ref TValue searchSpace, TValue value0, TValue value1, TValue value2, int length)
@@ -1860,6 +1866,7 @@ namespace System
return -1;
}
+#if !MONO
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static int IndexOfAnyValueType<T>(ref T searchSpace, T value0, T value1, T value2, T value3, int length) where T : struct, INumber<T>
=> IndexOfAnyValueType<T, DontNegate<T>>(ref searchSpace, value0, value1, value2, value3, length);
@@ -1867,6 +1874,7 @@ namespace System
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static int IndexOfAnyExceptValueType<T>(ref T searchSpace, T value0, T value1, T value2, T value3, int length) where T : struct, INumber<T>
=> IndexOfAnyValueType<T, Negate<T>>(ref searchSpace, value0, value1, value2, value3, length);
+#endif
[MethodImpl(MethodImplOptions.AggressiveOptimization)]
private static int IndexOfAnyValueType<TValue, TNegator>(ref TValue searchSpace, TValue value0, TValue value1, TValue value2, TValue value3, int length)
@@ -2093,6 +2101,7 @@ namespace System
return -1;
}
+#if !MONO
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static int LastIndexOfValueType<T>(ref T searchSpace, T value, int length) where T : struct, INumber<T>
=> LastIndexOfValueType<T, DontNegate<T>>(ref searchSpace, value, length);
@@ -2100,6 +2109,7 @@ namespace System
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static int LastIndexOfAnyExceptValueType<T>(ref T searchSpace, T value, int length) where T : struct, INumber<T>
=> LastIndexOfValueType<T, Negate<T>>(ref searchSpace, value, length);
+#endif
[MethodImpl(MethodImplOptions.AggressiveOptimization)]
private static int LastIndexOfValueType<TValue, TNegator>(ref TValue searchSpace, TValue value, int length)
@@ -2153,65 +2163,65 @@ namespace System
else if (Vector256.IsHardwareAccelerated && length >= Vector256<TValue>.Count)
{
Vector256<TValue> equals, values = Vector256.Create(value);
- ref TValue currentSearchSpace = ref Unsafe.Add(ref searchSpace, length - Vector256<TValue>.Count);
+ nint offset = length - Vector256<TValue>.Count;
- // Loop until either we've finished all elements or there's less than a vector's-worth remaining.
- do
+ // Loop until either we've finished all elements -or- there's one or less than a vector's-worth remaining.
+ while (offset > 0)
{
- equals = TNegator.NegateIfNeeded(Vector256.Equals(values, Vector256.LoadUnsafe(ref currentSearchSpace)));
+ equals = TNegator.NegateIfNeeded(Vector256.Equals(values, Vector256.LoadUnsafe(ref searchSpace, (nuint)(offset))));
+
if (equals == Vector256<TValue>.Zero)
{
- currentSearchSpace = ref Unsafe.Subtract(ref currentSearchSpace, Vector256<TValue>.Count);
+ offset -= Vector256<TValue>.Count;
continue;
}
- return ComputeLastIndex(ref searchSpace, ref currentSearchSpace, equals);
+ return ComputeLastIndex(offset, equals);
}
- while (!Unsafe.IsAddressLessThan(ref currentSearchSpace, ref searchSpace));
- // If any elements remain, process the first vector in the search space.
- if ((uint)length % Vector256<TValue>.Count != 0)
+ // Process the first vector in the search space.
+
+ equals = TNegator.NegateIfNeeded(Vector256.Equals(values, Vector256.LoadUnsafe(ref searchSpace)));
+
+ if (equals != Vector256<TValue>.Zero)
{
- equals = TNegator.NegateIfNeeded(Vector256.Equals(values, Vector256.LoadUnsafe(ref searchSpace)));
- if (equals != Vector256<TValue>.Zero)
- {
- return ComputeLastIndex(ref searchSpace, ref searchSpace, equals);
- }
+ return ComputeLastIndex(offset: 0, equals);
}
}
else
{
Vector128<TValue> equals, values = Vector128.Create(value);
- ref TValue currentSearchSpace = ref Unsafe.Add(ref searchSpace, length - Vector128<TValue>.Count);
+ nint offset = length - Vector128<TValue>.Count;
- // Loop until either we've finished all elements or there's less than a vector's-worth remaining.
- do
+ // Loop until either we've finished all elements -or- there's one or less than a vector's-worth remaining.
+ while (offset > 0)
{
- equals = TNegator.NegateIfNeeded(Vector128.Equals(values, Vector128.LoadUnsafe(ref currentSearchSpace)));
+ equals = TNegator.NegateIfNeeded(Vector128.Equals(values, Vector128.LoadUnsafe(ref searchSpace, (nuint)(offset))));
+
if (equals == Vector128<TValue>.Zero)
{
- currentSearchSpace = ref Unsafe.Subtract(ref currentSearchSpace, Vector128<TValue>.Count);
+ offset -= Vector128<TValue>.Count;
continue;
}
- return ComputeLastIndex(ref searchSpace, ref currentSearchSpace, equals);
+ return ComputeLastIndex(offset, equals);
}
- while (!Unsafe.IsAddressLessThan(ref currentSearchSpace, ref searchSpace));
- // If any elements remain, process the first vector in the search space.
- if ((uint)length % Vector128<TValue>.Count != 0)
+
+ // Process the first vector in the search space.
+
+ equals = TNegator.NegateIfNeeded(Vector128.Equals(values, Vector128.LoadUnsafe(ref searchSpace)));
+
+ if (equals != Vector128<TValue>.Zero)
{
- equals = TNegator.NegateIfNeeded(Vector128.Equals(values, Vector128.LoadUnsafe(ref searchSpace)));
- if (equals != Vector128<TValue>.Zero)
- {
- return ComputeLastIndex(ref searchSpace, ref searchSpace, equals);
- }
+ return ComputeLastIndex(offset: 0, equals);
}
}
return -1;
}
+#if !MONO
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static int LastIndexOfAnyValueType<T>(ref T searchSpace, T value0, T value1, int length) where T : struct, INumber<T>
=> LastIndexOfAnyValueType<T, DontNegate<T>>(ref searchSpace, value0, value1, length);
@@ -2219,6 +2229,7 @@ namespace System
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static int LastIndexOfAnyExceptValueType<T>(ref T searchSpace, T value0, T value1, int length) where T : struct, INumber<T>
=> LastIndexOfAnyValueType<T, Negate<T>>(ref searchSpace, value0, value1, length);
+#endif
[MethodImpl(MethodImplOptions.AggressiveOptimization)]
private static int LastIndexOfAnyValueType<TValue, TNegator>(ref TValue searchSpace, TValue value0, TValue value1, int length)
@@ -2291,69 +2302,67 @@ namespace System
else if (Vector256.IsHardwareAccelerated && length >= Vector256<TValue>.Count)
{
Vector256<TValue> equals, current, values0 = Vector256.Create(value0), values1 = Vector256.Create(value1);
- ref TValue currentSearchSpace = ref Unsafe.Add(ref searchSpace, length - Vector256<TValue>.Count);
+ nint offset = length - Vector256<TValue>.Count;
// Loop until either we've finished all elements or there's less than a vector's-worth remaining.
- do
+ while (offset > 0)
{
- current = Vector256.LoadUnsafe(ref currentSearchSpace);
+ current = Vector256.LoadUnsafe(ref searchSpace, (nuint)(offset));
equals = TNegator.NegateIfNeeded(Vector256.Equals(current, values0) | Vector256.Equals(current, values1));
+
if (equals == Vector256<TValue>.Zero)
{
- currentSearchSpace = ref Unsafe.Subtract(ref currentSearchSpace, Vector256<TValue>.Count);
+ offset -= Vector256<TValue>.Count;
continue;
}
- return ComputeLastIndex(ref searchSpace, ref currentSearchSpace, equals);
+ return ComputeLastIndex(offset, equals);
}
- while (!Unsafe.IsAddressLessThan(ref currentSearchSpace, ref searchSpace));
- // If any elements remain, process the first vector in the search space.
- if ((uint)length % Vector256<TValue>.Count != 0)
+ // Process the first vector in the search space.
+
+ current = Vector256.LoadUnsafe(ref searchSpace);
+ equals = TNegator.NegateIfNeeded(Vector256.Equals(current, values0) | Vector256.Equals(current, values1));
+
+ if (equals != Vector256<TValue>.Zero)
{
- current = Vector256.LoadUnsafe(ref searchSpace);
- equals = TNegator.NegateIfNeeded(Vector256.Equals(current, values0) | Vector256.Equals(current, values1));
- if (equals != Vector256<TValue>.Zero)
- {
- return ComputeLastIndex(ref searchSpace, ref searchSpace, equals);
- }
+ return ComputeLastIndex(offset: 0, equals);
}
}
else
{
Vector128<TValue> equals, current, values0 = Vector128.Create(value0), values1 = Vector128.Create(value1);
- ref TValue currentSearchSpace = ref Unsafe.Add(ref searchSpace, length - Vector128<TValue>.Count);
+ nint offset = length - Vector128<TValue>.Count;
// Loop until either we've finished all elements or there's less than a vector's-worth remaining.
- do
+ while (offset > 0)
{
- current = Vector128.LoadUnsafe(ref currentSearchSpace);
+ current = Vector128.LoadUnsafe(ref searchSpace, (nuint)(offset));
equals = TNegator.NegateIfNeeded(Vector128.Equals(current, values0) | Vector128.Equals(current, values1));
if (equals == Vector128<TValue>.Zero)
{
- currentSearchSpace = ref Unsafe.Subtract(ref currentSearchSpace, Vector128<TValue>.Count);
+ offset -= Vector128<TValue>.Count;
continue;
}
- return ComputeLastIndex(ref searchSpace, ref currentSearchSpace, equals);
+ return ComputeLastIndex(offset, equals);
}
- while (!Unsafe.IsAddressLessThan(ref currentSearchSpace, ref searchSpace));
- // If any elements remain, process the first vector in the search space.
- if ((uint)length % Vector128<TValue>.Count != 0)
+ // Process the first vector in the search space.
+
+ current = Vector128.LoadUnsafe(ref searchSpace);
+ equals = TNegator.NegateIfNeeded(Vector128.Equals(current, values0) | Vector128.Equals(current, values1));
+
+ if (equals != Vector128<TValue>.Zero)
{
- current = Vector128.LoadUnsafe(ref searchSpace);
- equals = TNegator.NegateIfNeeded(Vector128.Equals(current, values0) | Vector128.Equals(current, values1));
- if (equals != Vector128<TValue>.Zero)
- {
- return ComputeLastIndex(ref searchSpace, ref searchSpace, equals);
- }
+ return ComputeLastIndex(offset: 0, equals);
}
}
return -1;
}
+#if !MONO
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static int LastIndexOfAnyValueType<T>(ref T searchSpace, T value0, T value1, T value2, int length) where T : struct, INumber<T>
=> LastIndexOfAnyValueType<T, DontNegate<T>>(ref searchSpace, value0, value1, value2, length);
@@ -2361,6 +2370,7 @@ namespace System
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static int LastIndexOfAnyExceptValueType<T>(ref T searchSpace, T value0, T value1, T value2, int length) where T : struct, INumber<T>
=> LastIndexOfAnyValueType<T, Negate<T>>(ref searchSpace, value0, value1, value2, length);
+#endif
[MethodImpl(MethodImplOptions.AggressiveOptimization)]
private static int LastIndexOfAnyValueType<TValue, TNegator>(ref TValue searchSpace, TValue value0, TValue value1, TValue value2, int length)
@@ -2433,69 +2443,68 @@ namespace System
else if (Vector256.IsHardwareAccelerated && length >= Vector256<TValue>.Count)
{
Vector256<TValue> equals, current, values0 = Vector256.Create(value0), values1 = Vector256.Create(value1), values2 = Vector256.Create(value2);
- ref TValue currentSearchSpace = ref Unsafe.Add(ref searchSpace, length - Vector256<TValue>.Count);
+ nint offset = length - Vector256<TValue>.Count;
// Loop until either we've finished all elements or there's less than a vector's-worth remaining.
- do
+ while (offset > 0)
{
- current = Vector256.LoadUnsafe(ref currentSearchSpace);
+ current = Vector256.LoadUnsafe(ref searchSpace, (nuint)(offset));
equals = TNegator.NegateIfNeeded(Vector256.Equals(current, values0) | Vector256.Equals(current, values1) | Vector256.Equals(current, values2));
+
if (equals == Vector256<TValue>.Zero)
{
- currentSearchSpace = ref Unsafe.Subtract(ref currentSearchSpace, Vector256<TValue>.Count);
+ offset -= Vector256<TValue>.Count;
continue;
}
- return ComputeLastIndex(ref searchSpace, ref currentSearchSpace, equals);
+ return ComputeLastIndex(offset, equals);
}
- while (!Unsafe.IsAddressLessThan(ref currentSearchSpace, ref searchSpace));
- // If any elements remain, process the first vector in the search space.
- if ((uint)length % Vector256<TValue>.Count != 0)
+ // Process the first vector in the search space.
+
+ current = Vector256.LoadUnsafe(ref searchSpace);
+ equals = TNegator.NegateIfNeeded(Vector256.Equals(current, values0) | Vector256.Equals(current, values1) | Vector256.Equals(current, values2));
+
+ if (equals != Vector256<TValue>.Zero)
{
- current = Vector256.LoadUnsafe(ref searchSpace);
- equals = TNegator.NegateIfNeeded(Vector256.Equals(current, values0) | Vector256.Equals(current, values1) | Vector256.Equals(current, values2));
- if (equals != Vector256<TValue>.Zero)
- {
- return ComputeLastIndex(ref searchSpace, ref searchSpace, equals);
- }
+ return ComputeLastIndex(offset: 0, equals);
}
}
else
{
Vector128<TValue> equals, current, values0 = Vector128.Create(value0), values1 = Vector128.Create(value1), values2 = Vector128.Create(value2);
- ref TValue currentSearchSpace = ref Unsafe.Add(ref searchSpace, length - Vector128<TValue>.Count);
+ nint offset = length - Vector128<TValue>.Count;
// Loop until either we've finished all elements or there's less than a vector's-worth remaining.
- do
+ while (offset > 0)
{
- current = Vector128.LoadUnsafe(ref currentSearchSpace);
+ current = Vector128.LoadUnsafe(ref searchSpace, (nuint)(offset));
equals = TNegator.NegateIfNeeded(Vector128.Equals(current, values0) | Vector128.Equals(current, values1) | Vector128.Equals(current, values2));
+
if (equals == Vector128<TValue>.Zero)
{
- currentSearchSpace = ref Unsafe.Subtract(ref currentSearchSpace, Vector128<TValue>.Count);
+ offset -= Vector128<TValue>.Count;
continue;
}
- return ComputeLastIndex(ref searchSpace, ref currentSearchSpace, equals);
+ return ComputeLastIndex(offset, equals);
}
- while (!Unsafe.IsAddressLessThan(ref currentSearchSpace, ref searchSpace));
- // If any elements remain, process the first vector in the search space.
- if ((uint)length % Vector128<TValue>.Count != 0)
+ // Process the first vector in the search space.
+
+ current = Vector128.LoadUnsafe(ref searchSpace);
+ equals = TNegator.NegateIfNeeded(Vector128.Equals(current, values0) | Vector128.Equals(current, values1) | Vector128.Equals(current, values2));
+
+ if (equals != Vector128<TValue>.Zero)
{
- current = Vector128.LoadUnsafe(ref searchSpace);
- equals = TNegator.NegateIfNeeded(Vector128.Equals(current, values0) | Vector128.Equals(current, values1) | Vector128.Equals(current, values2));
- if (equals != Vector128<TValue>.Zero)
- {
- return ComputeLastIndex(ref searchSpace, ref searchSpace, equals);
- }
+ return ComputeLastIndex(offset: 0, equals);
}
}
return -1;
}
+#if !MONO
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static int LastIndexOfAnyValueType<T>(ref T searchSpace, T value0, T value1, T value2, T value3, int length) where T : struct, INumber<T>
=> LastIndexOfAnyValueType<T, DontNegate<T>>(ref searchSpace, value0, value1, value2, value3, length);
@@ -2503,6 +2512,7 @@ namespace System
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static int LastIndexOfAnyExceptValueType<T>(ref T searchSpace, T value0, T value1, T value2, T value3, int length) where T : struct, INumber<T>
=> LastIndexOfAnyValueType<T, Negate<T>>(ref searchSpace, value0, value1, value2, value3, length);
+#endif
[MethodImpl(MethodImplOptions.AggressiveOptimization)]
private static int LastIndexOfAnyValueType<TValue, TNegator>(ref TValue searchSpace, TValue value0, TValue value1, TValue value2, TValue value3, int length)
@@ -2547,67 +2557,61 @@ namespace System
else if (Vector256.IsHardwareAccelerated && length >= Vector256<TValue>.Count)
{
Vector256<TValue> equals, current, values0 = Vector256.Create(value0), values1 = Vector256.Create(value1), values2 = Vector256.Create(value2), values3 = Vector256.Create(value3);
- ref TValue currentSearchSpace = ref Unsafe.Add(ref searchSpace, length - Vector256<TValue>.Count);
+ nint offset = length - Vector256<TValue>.Count;
// Loop until either we've finished all elements or there's less than a vector's-worth remaining.
- do
+ while (offset > 0)
{
- current = Vector256.LoadUnsafe(ref currentSearchSpace);
+ current = Vector256.LoadUnsafe(ref searchSpace, (nuint)(offset));
equals = TNegator.NegateIfNeeded(Vector256.Equals(current, values0) | Vector256.Equals(current, values1)
| Vector256.Equals(current, values2) | Vector256.Equals(current, values3));
if (equals == Vector256<TValue>.Zero)
{
- currentSearchSpace = ref Unsafe.Subtract(ref currentSearchSpace, Vector256<TValue>.Count);
+ offset -= Vector256<TValue>.Count;
continue;
}
- return ComputeLastIndex(ref searchSpace, ref currentSearchSpace, equals);
+ return ComputeLastIndex(offset, equals);
}
- while (!Unsafe.IsAddressLessThan(ref currentSearchSpace, ref searchSpace));
- // If any elements remain, process the first vector in the search space.
- if ((uint)length % Vector256<TValue>.Count != 0)
+ // Process the first vector in the search space.
+
+ current = Vector256.LoadUnsafe(ref searchSpace);
+ equals = TNegator.NegateIfNeeded(Vector256.Equals(current, values0) | Vector256.Equals(current, values1) | Vector256.Equals(current, values2) | Vector256.Equals(current, values3));
+
+ if (equals != Vector256<TValue>.Zero)
{
- current = Vector256.LoadUnsafe(ref searchSpace);
- equals = TNegator.NegateIfNeeded(Vector256.Equals(current, values0) | Vector256.Equals(current, values1)
- | Vector256.Equals(current, values2) | Vector256.Equals(current, values3));
- if (equals != Vector256<TValue>.Zero)
- {
- return ComputeLastIndex(ref searchSpace, ref searchSpace, equals);
- }
+ return ComputeLastIndex(offset: 0, equals);
}
}
else
{
Vector128<TValue> equals, current, values0 = Vector128.Create(value0), values1 = Vector128.Create(value1), values2 = Vector128.Create(value2), values3 = Vector128.Create(value3);
- ref TValue currentSearchSpace = ref Unsafe.Add(ref searchSpace, length - Vector128<TValue>.Count);
+ nint offset = length - Vector128<TValue>.Count;
// Loop until either we've finished all elements or there's less than a vector's-worth remaining.
- do
+ while (offset > 0)
{
- current = Vector128.LoadUnsafe(ref currentSearchSpace);
- equals = TNegator.NegateIfNeeded(Vector128.Equals(current, values0) | Vector128.Equals(current, values1)
- | Vector128.Equals(current, values2) | Vector128.Equals(current, values3));
+ current = Vector128.LoadUnsafe(ref searchSpace, (nuint)(offset));
+ equals = TNegator.NegateIfNeeded(Vector128.Equals(current, values0) | Vector128.Equals(current, values1) | Vector128.Equals(current, values2) | Vector128.Equals(current, values3));
+
if (equals == Vector128<TValue>.Zero)
{
- currentSearchSpace = ref Unsafe.Subtract(ref currentSearchSpace, Vector128<TValue>.Count);
+ offset -= Vector128<TValue>.Count;
continue;
}
- return ComputeLastIndex(ref searchSpace, ref currentSearchSpace, equals);
+ return ComputeLastIndex(offset, equals);
}
- while (!Unsafe.IsAddressLessThan(ref currentSearchSpace, ref searchSpace));
- // If any elements remain, process the first vector in the search space.
- if ((uint)length % Vector128<TValue>.Count != 0)
+ // Process the first vector in the search space.
+
+ current = Vector128.LoadUnsafe(ref searchSpace);
+ equals = TNegator.NegateIfNeeded(Vector128.Equals(current, values0) | Vector128.Equals(current, values1) | Vector128.Equals(current, values2) | Vector128.Equals(current, values3));
+
+ if (equals != Vector128<TValue>.Zero)
{
- current = Vector128.LoadUnsafe(ref searchSpace);
- equals = TNegator.NegateIfNeeded(Vector128.Equals(current, values0) | Vector128.Equals(current, values1)
- | Vector128.Equals(current, values2) | Vector128.Equals(current, values3));
- if (equals != Vector128<TValue>.Zero)
- {
- return ComputeLastIndex(ref searchSpace, ref searchSpace, equals);
- }
+ return ComputeLastIndex(offset: 0, equals);
}
}
@@ -2631,19 +2635,19 @@ namespace System
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- private static int ComputeLastIndex<T>(ref T searchSpace, ref T current, Vector128<T> equals) where T : struct
+ private static int ComputeLastIndex<T>(nint offset, Vector128<T> equals) where T : struct
{
uint notEqualsElements = equals.ExtractMostSignificantBits();
int index = 31 - BitOperations.LeadingZeroCount(notEqualsElements); // 31 = 32 (bits in Int32) - 1 (indexing from zero)
- return (int)(Unsafe.ByteOffset(ref searchSpace, ref current) / Unsafe.SizeOf<T>()) + index;
+ return (int)offset + index;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- private static int ComputeLastIndex<T>(ref T searchSpace, ref T current, Vector256<T> equals) where T : struct
+ private static int ComputeLastIndex<T>(nint offset, Vector256<T> equals) where T : struct
{
uint notEqualsElements = equals.ExtractMostSignificantBits();
int index = 31 - BitOperations.LeadingZeroCount(notEqualsElements); // 31 = 32 (bits in Int32) - 1 (indexing from zero)
- return (int)(Unsafe.ByteOffset(ref searchSpace, ref current) / Unsafe.SizeOf<T>()) + index;
+ return (int)offset + index;
}
private interface INegator<T> where T : struct
diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.GateThread.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.GateThread.cs
index 9eff225e794..c2a8544479b 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.GateThread.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.GateThread.cs
@@ -239,7 +239,7 @@ namespace System.Threading
{
IsThreadPoolThread = true,
IsBackground = true,
- Name = ".NET ThreadPool Gate"
+ Name = ".NET TP Gate"
};
gateThread.UnsafeStart();
}
diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.WaitThread.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.WaitThread.cs
index ff944b29597..4c8512f9cdc 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.WaitThread.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.WaitThread.cs
@@ -187,7 +187,7 @@ namespace System.Threading
{
IsThreadPoolThread = true,
IsBackground = true,
- Name = ".NET ThreadPool Wait"
+ Name = ".NET TP Wait"
};
waitThread.UnsafeStart();
}
diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs
index 97ebb29c0f5..6230fda2605 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs
@@ -5249,21 +5249,18 @@ namespace System.Threading.Tasks
return Unsafe.As<Task<TResult>>(task); // Unsafe.As avoids a type check we know will succeed
}
}
- // For other known value types, we only special-case 0 / default(TResult). We don't include
- // floating point types as == may return true for different bit representations of the same value.
- else if (
- (typeof(TResult) == typeof(uint) && default == (uint)(object)result!) ||
- (typeof(TResult) == typeof(byte) && default(byte) == (byte)(object)result!) ||
- (typeof(TResult) == typeof(sbyte) && default(sbyte) == (sbyte)(object)result!) ||
- (typeof(TResult) == typeof(char) && default(char) == (char)(object)result!) ||
- (typeof(TResult) == typeof(long) && default == (long)(object)result!) ||
- (typeof(TResult) == typeof(ulong) && default == (ulong)(object)result!) ||
- (typeof(TResult) == typeof(short) && default(short) == (short)(object)result!) ||
- (typeof(TResult) == typeof(ushort) && default(ushort) == (ushort)(object)result!) ||
- (typeof(TResult) == typeof(IntPtr) && default == (IntPtr)(object)result!) ||
- (typeof(TResult) == typeof(UIntPtr) && default == (UIntPtr)(object)result!))
+ // For other value types, we special-case default(TResult) if we can easily compare bit patterns to default/0.
+ else if (!RuntimeHelpers.IsReferenceOrContainsReferences<TResult>())
{
- return Task<TResult>.s_defaultResultTask;
+ // We don't need to go through the equality operator of the TResult because we cached a task for default(TResult),
+ // so we only need to confirm that this TResult has the same bits as default(TResult).
+ if ((Unsafe.SizeOf<TResult>() == sizeof(byte) && Unsafe.As<TResult, byte>(ref result) == default(byte)) ||
+ (Unsafe.SizeOf<TResult>() == sizeof(ushort) && Unsafe.As<TResult, ushort>(ref result) == default(ushort)) ||
+ (Unsafe.SizeOf<TResult>() == sizeof(uint) && Unsafe.As<TResult, uint>(ref result) == default) ||
+ (Unsafe.SizeOf<TResult>() == sizeof(ulong) && Unsafe.As<TResult, ulong>(ref result) == default))
+ {
+ return Task<TResult>.s_defaultResultTask;
+ }
}
}
diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPoolWorkQueue.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPoolWorkQueue.cs
index 21a1e6bf0ac..8ad921e002c 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPoolWorkQueue.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPoolWorkQueue.cs
@@ -1355,7 +1355,7 @@ namespace System.Threading
public static partial class ThreadPool
{
- internal const string WorkerThreadName = ".NET ThreadPool Worker";
+ internal const string WorkerThreadName = ".NET TP Worker";
internal static readonly ThreadPoolWorkQueue s_workQueue = new ThreadPoolWorkQueue();
diff --git a/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.cs b/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.cs
index 236442359f0..b3e8964bdb5 100644
--- a/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.cs
@@ -775,29 +775,29 @@ namespace System
PopulateAllSystemTimeZones(cachedData);
cachedData._allSystemTimeZonesRead = true;
- List<TimeZoneInfo> list;
if (cachedData._systemTimeZones != null)
{
// return a collection of the cached system time zones
- list = new List<TimeZoneInfo>(cachedData._systemTimeZones.Values);
+ TimeZoneInfo[] array = new TimeZoneInfo[cachedData._systemTimeZones.Count];
+ cachedData._systemTimeZones.Values.CopyTo(array, 0);
+
+ // sort and copy the TimeZoneInfo's into a ReadOnlyCollection for the user
+ Array.Sort(array, static (x, y) =>
+ {
+ // sort by BaseUtcOffset first and by DisplayName second - this is similar to the Windows Date/Time control panel
+ int comparison = x.BaseUtcOffset.CompareTo(y.BaseUtcOffset);
+ return comparison == 0 ? string.CompareOrdinal(x.DisplayName, y.DisplayName) : comparison;
+ });
+
+ cachedData._readOnlySystemTimeZones = new ReadOnlyCollection<TimeZoneInfo>(array);
}
else
{
- // return an empty collection
- list = new List<TimeZoneInfo>();
+ cachedData._readOnlySystemTimeZones = ReadOnlyCollection<TimeZoneInfo>.Empty;
}
-
- // sort and copy the TimeZoneInfo's into a ReadOnlyCollection for the user
- list.Sort(static (x, y) =>
- {
- // sort by BaseUtcOffset first and by DisplayName second - this is similar to the Windows Date/Time control panel
- int comparison = x.BaseUtcOffset.CompareTo(y.BaseUtcOffset);
- return comparison == 0 ? string.CompareOrdinal(x.DisplayName, y.DisplayName) : comparison;
- });
-
- cachedData._readOnlySystemTimeZones = new ReadOnlyCollection<TimeZoneInfo>(list);
}
}
+
return cachedData._readOnlySystemTimeZones;
}
diff --git a/src/libraries/System.Private.CoreLib/src/System/Type.cs b/src/libraries/System.Private.CoreLib/src/System/Type.cs
index e7a64d26f68..5a7ebed457d 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Type.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Type.cs
@@ -527,16 +527,14 @@ namespace System
}
/// <summary>
- /// Retrieves an array of the values of the underlying type constants in a specified enumeration type.
+ /// Retrieves an array of the values of the underlying type constants of this enumeration type.
/// </summary>
/// <remarks>
- /// This method can be used to get enumeration values when creating an array of the enumeration type is challenging.
- /// For example, <see cref="T:System.Reflection.MetadataLoadContext" /> or on a platform where runtime codegen is not available.
+ /// You can use this method to get enumeration values when it's hard to create an array of the enumeration type.
+ /// For example, you might use this method for the <see cref="T:System.Reflection.MetadataLoadContext" /> enumeration or on a platform where run-time code generation is not available.
/// </remarks>
- /// <returns>An array that contains the values of the underlying type constants in enumType.</returns>
- /// <exception cref="ArgumentException">
- /// Thrown when the type is not an enumeration type.
- /// </exception>
+ /// <returns>An array that contains the values of the underlying type constants in this enumeration type.</returns>
+ /// <exception cref="T:System.ArgumentException">This type is not an enumeration type.</exception>
public virtual Array GetEnumValuesAsUnderlyingType() => throw new NotSupportedException(SR.NotSupported_SubclassOverride);
[RequiresDynamicCode("The code for an array of the specified type might not be available.")]
diff --git a/src/libraries/System.Private.CoreLib/src/System/UInt128.cs b/src/libraries/System.Private.CoreLib/src/System/UInt128.cs
index fb30f2c9996..0ae4d6bee34 100644
--- a/src/libraries/System.Private.CoreLib/src/System/UInt128.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/UInt128.cs
@@ -2023,6 +2023,7 @@ namespace System
// IParsable
//
+ /// <inheritdoc cref="IParsable{TSelf}.TryParse(string?, IFormatProvider?, out TSelf)" />
public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out UInt128 result) => TryParse(s, NumberStyles.Integer, provider, out result);
//
diff --git a/src/libraries/System.Private.CoreLib/src/System/UInt16.cs b/src/libraries/System.Private.CoreLib/src/System/UInt16.cs
index 5e50f54f641..025a6adddea 100644
--- a/src/libraries/System.Private.CoreLib/src/System/UInt16.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/UInt16.cs
@@ -1170,6 +1170,7 @@ namespace System
// IParsable
//
+ /// <inheritdoc cref="IParsable{TSelf}.TryParse(string?, IFormatProvider?, out TSelf)" />
public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out ushort result) => TryParse(s, NumberStyles.Integer, provider, out result);
//
diff --git a/src/libraries/System.Private.CoreLib/src/System/UInt32.cs b/src/libraries/System.Private.CoreLib/src/System/UInt32.cs
index 4f137f25dd3..a07509d7e61 100644
--- a/src/libraries/System.Private.CoreLib/src/System/UInt32.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/UInt32.cs
@@ -1179,6 +1179,7 @@ namespace System
// IParsable
//
+ /// <inheritdoc cref="IParsable{TSelf}.TryParse(string?, IFormatProvider?, out TSelf)" />
public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out uint result) => TryParse(s, NumberStyles.Integer, provider, out result);
//
diff --git a/src/libraries/System.Private.CoreLib/src/System/UInt64.cs b/src/libraries/System.Private.CoreLib/src/System/UInt64.cs
index c3f210e350d..15cff1631ba 100644
--- a/src/libraries/System.Private.CoreLib/src/System/UInt64.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/UInt64.cs
@@ -1172,6 +1172,7 @@ namespace System
// IParsable
//
+ /// <inheritdoc cref="IParsable{TSelf}.TryParse(string?, IFormatProvider?, out TSelf)" />
public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out ulong result) => TryParse(s, NumberStyles.Integer, provider, out result);
//
diff --git a/src/libraries/System.Private.CoreLib/src/System/UIntPtr.cs b/src/libraries/System.Private.CoreLib/src/System/UIntPtr.cs
index 04c8384c349..b0458bf60ac 100644
--- a/src/libraries/System.Private.CoreLib/src/System/UIntPtr.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/UIntPtr.cs
@@ -219,6 +219,7 @@ namespace System
return nuint_t.TryParse(s, out Unsafe.As<nuint, nuint_t>(ref result));
}
+ /// <inheritdoc cref="IParsable{TSelf}.TryParse(string?, IFormatProvider?, out TSelf)" />
public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out nuint result)
{
Unsafe.SkipInit(out result);
diff --git a/src/libraries/System.Private.CoreLib/src/System/WeakReference.T.cs b/src/libraries/System.Private.CoreLib/src/System/WeakReference.T.cs
index 3e48b74ae5c..3d48ec61d81 100644
--- a/src/libraries/System.Private.CoreLib/src/System/WeakReference.T.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/WeakReference.T.cs
@@ -3,7 +3,9 @@
using System.Runtime.Serialization;
using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
using System.Diagnostics.CodeAnalysis;
+using System.Diagnostics;
namespace System
{
@@ -13,7 +15,19 @@ namespace System
public sealed partial class WeakReference<T> : ISerializable
where T : class?
{
- // If you fix bugs here, please fix them in WeakReference at the same time.
+ // If you fix bugs here, please fix them in WeakReference<T> at the same time.
+
+ // Most methods using the handle should use GC.KeepAlive(this) to avoid potential handle recycling
+ // attacks (i.e. if the WeakReference instance is finalized away underneath you when you're still
+ // handling a cached value of the handle then the handle could be freed and reused).
+
+#if !CORECLR
+ // the handle field is effectively readonly until the object is finalized.
+ private IntPtr _handleAndKind;
+
+ // the lowermost bit is used to indicate whether the handle is tracking resurrection
+ private const nint TracksResurrectionBit = 1;
+#endif
// Creates a new WeakReference that keeps track of target.
// Assumes a Short Weak Reference (ie TrackResurrection is false.)
@@ -63,5 +77,69 @@ namespace System
info.AddValue("TrackedObject", this.Target, typeof(T)); // Do not rename (binary serialization)
info.AddValue("TrackResurrection", IsTrackResurrection()); // Do not rename (binary serialization)
}
+
+#if !CORECLR
+ // Returns a boolean indicating whether or not we're tracking objects until they're collected (true)
+ // or just until they're finalized (false).
+ private bool IsTrackResurrection() => (_handleAndKind & TracksResurrectionBit) != 0;
+
+ // Creates a new WeakReference that keeps track of target.
+ private void Create(T target, bool trackResurrection)
+ {
+ IntPtr h = GCHandle.InternalAlloc(target, trackResurrection ? GCHandleType.WeakTrackResurrection : GCHandleType.Weak);
+ _handleAndKind = trackResurrection ?
+ h | TracksResurrectionBit :
+ h;
+ }
+
+ private IntPtr Handle => _handleAndKind & ~TracksResurrectionBit;
+
+ public void SetTarget(T target)
+ {
+ IntPtr h = Handle;
+ // Should only happen for corner cases, like using a WeakReference from a finalizer.
+ // GC can finalize the instance if it becomes F-Reachable.
+ // That, however, cannot happen while we use the instance.
+ if (default(IntPtr) == h)
+ throw new InvalidOperationException(SR.InvalidOperation_HandleIsNotInitialized);
+
+ GCHandle.InternalSet(h, target);
+
+ // must keep the instance alive as long as we use the handle.
+ GC.KeepAlive(this);
+ }
+
+ private T? Target
+ {
+ get
+ {
+ IntPtr h = Handle;
+ // Should only happen for corner cases, like using a WeakReference from a finalizer.
+ // GC can finalize the instance if it becomes F-Reachable.
+ // That, however, cannot happen while we use the instance.
+ if (default(IntPtr) == h)
+ return default;
+
+ // unsafe cast is ok as the handle cannot be destroyed and recycled while we keep the instance alive
+ T? target = Unsafe.As<T?>(GCHandle.InternalGet(h));
+
+ // must keep the instance alive as long as we use the handle.
+ GC.KeepAlive(this);
+
+ return target;
+ }
+ }
+
+ // Note: While WeakReference<T> is formally a finalizable type, the finalizer does not actually run.
+ // Instead the instances are treated specially in GC when scanning for no longer strongly-reachable
+ // finalizable objects.
+#pragma warning disable CA1821 // Remove empty Finalizers
+ ~WeakReference()
+ {
+ Debug.Assert(false, " WeakReference<T> finalizer should never run");
+ }
+#pragma warning restore CA1821 // Remove empty Finalizers
+
+#endif
}
}
diff --git a/src/libraries/System.Private.CoreLib/src/System/WeakReference.cs b/src/libraries/System.Private.CoreLib/src/System/WeakReference.cs
index 37b65bae9be..2f56806b48c 100644
--- a/src/libraries/System.Private.CoreLib/src/System/WeakReference.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/WeakReference.cs
@@ -1,6 +1,8 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+using System.Diagnostics;
+using System.Runtime.InteropServices;
using System.Runtime.Serialization;
namespace System
@@ -11,6 +13,18 @@ namespace System
{
// If you fix bugs here, please fix them in WeakReference<T> at the same time.
+ // Most methods using the handle should use GC.KeepAlive(this) to avoid potential handle recycling
+ // attacks (i.e. if the WeakReference instance is finalized away underneath you when you're still
+ // handling a cached value of the handle then the handle could be freed and reused).
+
+#if !CORECLR
+ // the handle field is effectively readonly until the object is finalized.
+ private IntPtr _handleAndKind;
+
+ // the lowermost bit is used to indicate whether the handle is tracking resurrection
+ private const nint TracksResurrectionBit = 1;
+#endif
+
// Creates a new WeakReference that keeps track of target.
// Assumes a Short Weak Reference (ie TrackResurrection is false.)
//
@@ -44,7 +58,109 @@ namespace System
// Returns a boolean indicating whether or not we're tracking objects until they're collected (true)
// or just until they're finalized (false).
- //
public virtual bool TrackResurrection => IsTrackResurrection();
+
+#if !CORECLR
+ private void Create(object? target, bool trackResurrection)
+ {
+ IntPtr h = GCHandle.InternalAlloc(target, trackResurrection ? GCHandleType.WeakTrackResurrection : GCHandleType.Weak);
+ _handleAndKind = trackResurrection ?
+ h | TracksResurrectionBit :
+ h;
+ }
+
+ // Returns a boolean indicating whether or not we're tracking objects until they're collected (true)
+ // or just until they're finalized (false).
+ private bool IsTrackResurrection() => (_handleAndKind & TracksResurrectionBit) != 0;
+
+ internal IntPtr Handle => _handleAndKind & ~TracksResurrectionBit;
+
+ // Determines whether or not this instance of WeakReference still refers to an object
+ // that has not been collected.
+ public virtual bool IsAlive
+ {
+ get
+ {
+ IntPtr h = Handle;
+
+ // In determining whether it is valid to use this object, we need to at least expose this
+ // without throwing an exception.
+ if (default(IntPtr) == h)
+ return false;
+
+ bool result = GCHandle.InternalGet(h) != null;
+
+ // must keep the instance alive as long as we use the handle.
+ GC.KeepAlive(this);
+
+ return result;
+ }
+ }
+
+ //Gets the Object stored in the handle if it's accessible.
+ // Or sets it.
+ public virtual object? Target
+ {
+ get
+ {
+ IntPtr h = Handle;
+ // Should only happen for corner cases, like using a WeakReference from a finalizer.
+ // GC can finalize the instance if it becomes F-Reachable.
+ // That, however, cannot happen while we use the instance.
+ //
+ // A derived class will be finalized with an actual Finalize, but the finalizer queue is single threaded,
+ // thus the default implementation will never access Target concurrently with finalizing.
+ //
+ // There is a possibility that a derived type overrides the default finalizer and arranges concurrent access.
+ // There is nothing that we can do about that and a few other exotic ways to break this.
+ //
+ if (default(IntPtr) == h)
+ return default;
+
+ object? target = GCHandle.InternalGet(h);
+
+ // must keep the instance alive as long as we use the handle.
+ GC.KeepAlive(this);
+
+ return target;
+ }
+
+ set
+ {
+ IntPtr h = Handle;
+ // Should only happen for corner cases, like using a WeakReference from a finalizer.
+ // See the comment in the getter.
+ if (default(IntPtr) == h)
+ throw new InvalidOperationException(SR.InvalidOperation_HandleIsNotInitialized);
+
+ GCHandle.InternalSet(h, value);
+
+ // must keep the instance alive as long as we use the handle.
+ GC.KeepAlive(this);
+ }
+ }
+
+ // Free all system resources associated with this reference.
+ ~WeakReference()
+ {
+ // Note: While WeakReference is formally a finalizable type, the finalizer does not actually run.
+ // Instead the instances are treated specially in GC when scanning for no longer strongly-reachable
+ // finalizable objects.
+ //
+ // Unlike WeakReference<T> case, the instance could be of a derived type and
+ // in such case it is finalized via a finalizer.
+
+ Debug.Assert(this.GetType() != typeof(WeakReference));
+
+ IntPtr handle = Handle;
+ if (handle != default(IntPtr))
+ {
+ GCHandle.InternalFree(handle);
+
+ // keep the bit that indicates whether this reference was tracking resurrection
+ _handleAndKind &= TracksResurrectionBit;
+ }
+ }
+#endif
}
}
diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlCanonicalWriter.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlCanonicalWriter.cs
index 4b94ed46ce2..fa040004e0b 100644
--- a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlCanonicalWriter.cs
+++ b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlCanonicalWriter.cs
@@ -698,9 +698,6 @@ namespace System.Xml
[MemberNotNull(nameof(_xmlnsAttributes))]
private void AddXmlnsAttribute(ref XmlnsAttribute xmlnsAttribute)
{
- // Console.WriteLine("{0}={1}", Encoding.UTF8.GetString(xmlnsBuffer, xmlnsAttribute.prefixOffset, xmlnsAttribute.prefixLength),
- // Encoding.UTF8.GetString(xmlnsBuffer, xmlnsAttribute.nsOffset, xmlnsAttribute.nsLength));
-
if (_xmlnsAttributes == null)
{
_xmlnsAttributes = new XmlnsAttribute[4];
@@ -856,8 +853,6 @@ namespace System.Xml
private static int Compare(byte[] buffer1, int offset1, int length1, byte[] buffer2, int offset2, int length2)
{
- // Console.WriteLine("Compare: \"{0}\", \"{1}\"", Encoding.UTF8.GetString(sourceBuffer, offset1, length1), Encoding.UTF8.GetString(sourceBuffer, offset2, length2));
-
int length = Math.Min(length1, length2);
int s = 0;
@@ -876,8 +871,6 @@ namespace System.Xml
private static bool Equals(byte[] buffer1, int offset1, int length1, byte[] buffer2, int offset2, int length2)
{
- // Console.WriteLine("Equals: \"{0}\", \"{1}\"", Encoding.UTF8.GetString(buffer1, offset1, length1), Encoding.UTF8.GetString(buffer2, offset2, length2));
-
if (length1 != length2)
return false;
diff --git a/src/libraries/System.Private.Uri/System.Private.Uri.sln b/src/libraries/System.Private.Uri/System.Private.Uri.sln
index 1cdddf27ea4..cbd89580961 100644
--- a/src/libraries/System.Private.Uri/System.Private.Uri.sln
+++ b/src/libraries/System.Private.Uri/System.Private.Uri.sln
@@ -5,6 +5,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{D9F21DA7-0FE6-419E-9CE3-DFFBC3F0067F}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{8153A96E-335B-4872-9EC0-39178850617B}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.Uri", "src\System.Private.Uri.csproj", "{98AC821B-892E-4F58-AF3D-503747FD6A8F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.Uri.ExtendedFunctional.Tests", "tests\ExtendedFunctionalTests\System.Private.Uri.ExtendedFunctional.Tests.csproj", "{37859855-7E5C-4772-B5D2-7029211EAB92}"
@@ -23,6 +25,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{DBF81CE3
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{E3179181-D7ED-459C-B0ED-40DF10FC1959}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{89A8524B-6E70-43E0-AD13-E53D499BB0A1}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -67,11 +71,8 @@ Global
{ADD88187-83E2-4EAF-BFB4-BC6249E76457}.Release|x86.ActiveCfg = Release|Any CPU
{ADD88187-83E2-4EAF-BFB4-BC6249E76457}.Release|x86.Build.0 = Release|Any CPU
{ADD88187-83E2-4EAF-BFB4-BC6249E76457}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {ADD88187-83E2-4EAF-BFB4-BC6249E76457}.Checked|Any CPU.Build.0 = Debug|Any CPU
{ADD88187-83E2-4EAF-BFB4-BC6249E76457}.Checked|x64.ActiveCfg = Debug|Any CPU
- {ADD88187-83E2-4EAF-BFB4-BC6249E76457}.Checked|x64.Build.0 = Debug|Any CPU
{ADD88187-83E2-4EAF-BFB4-BC6249E76457}.Checked|x86.ActiveCfg = Debug|Any CPU
- {ADD88187-83E2-4EAF-BFB4-BC6249E76457}.Checked|x86.Build.0 = Debug|Any CPU
{D9F21DA7-0FE6-419E-9CE3-DFFBC3F0067F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D9F21DA7-0FE6-419E-9CE3-DFFBC3F0067F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D9F21DA7-0FE6-419E-9CE3-DFFBC3F0067F}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -85,11 +86,23 @@ Global
{D9F21DA7-0FE6-419E-9CE3-DFFBC3F0067F}.Release|x86.ActiveCfg = Release|Any CPU
{D9F21DA7-0FE6-419E-9CE3-DFFBC3F0067F}.Release|x86.Build.0 = Release|Any CPU
{D9F21DA7-0FE6-419E-9CE3-DFFBC3F0067F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {D9F21DA7-0FE6-419E-9CE3-DFFBC3F0067F}.Checked|Any CPU.Build.0 = Debug|Any CPU
{D9F21DA7-0FE6-419E-9CE3-DFFBC3F0067F}.Checked|x64.ActiveCfg = Debug|Any CPU
- {D9F21DA7-0FE6-419E-9CE3-DFFBC3F0067F}.Checked|x64.Build.0 = Debug|Any CPU
{D9F21DA7-0FE6-419E-9CE3-DFFBC3F0067F}.Checked|x86.ActiveCfg = Debug|Any CPU
- {D9F21DA7-0FE6-419E-9CE3-DFFBC3F0067F}.Checked|x86.Build.0 = Debug|Any CPU
+ {8153A96E-335B-4872-9EC0-39178850617B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8153A96E-335B-4872-9EC0-39178850617B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8153A96E-335B-4872-9EC0-39178850617B}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {8153A96E-335B-4872-9EC0-39178850617B}.Debug|x64.Build.0 = Debug|Any CPU
+ {8153A96E-335B-4872-9EC0-39178850617B}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {8153A96E-335B-4872-9EC0-39178850617B}.Debug|x86.Build.0 = Debug|Any CPU
+ {8153A96E-335B-4872-9EC0-39178850617B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8153A96E-335B-4872-9EC0-39178850617B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8153A96E-335B-4872-9EC0-39178850617B}.Release|x64.ActiveCfg = Release|Any CPU
+ {8153A96E-335B-4872-9EC0-39178850617B}.Release|x64.Build.0 = Release|Any CPU
+ {8153A96E-335B-4872-9EC0-39178850617B}.Release|x86.ActiveCfg = Release|Any CPU
+ {8153A96E-335B-4872-9EC0-39178850617B}.Release|x86.Build.0 = Release|Any CPU
+ {8153A96E-335B-4872-9EC0-39178850617B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {8153A96E-335B-4872-9EC0-39178850617B}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {8153A96E-335B-4872-9EC0-39178850617B}.Checked|x86.ActiveCfg = Debug|Any CPU
{98AC821B-892E-4F58-AF3D-503747FD6A8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{98AC821B-892E-4F58-AF3D-503747FD6A8F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{98AC821B-892E-4F58-AF3D-503747FD6A8F}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -103,11 +116,8 @@ Global
{98AC821B-892E-4F58-AF3D-503747FD6A8F}.Release|x86.ActiveCfg = Release|Any CPU
{98AC821B-892E-4F58-AF3D-503747FD6A8F}.Release|x86.Build.0 = Release|Any CPU
{98AC821B-892E-4F58-AF3D-503747FD6A8F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {98AC821B-892E-4F58-AF3D-503747FD6A8F}.Checked|Any CPU.Build.0 = Debug|Any CPU
{98AC821B-892E-4F58-AF3D-503747FD6A8F}.Checked|x64.ActiveCfg = Debug|Any CPU
- {98AC821B-892E-4F58-AF3D-503747FD6A8F}.Checked|x64.Build.0 = Debug|Any CPU
{98AC821B-892E-4F58-AF3D-503747FD6A8F}.Checked|x86.ActiveCfg = Debug|Any CPU
- {98AC821B-892E-4F58-AF3D-503747FD6A8F}.Checked|x86.Build.0 = Debug|Any CPU
{37859855-7E5C-4772-B5D2-7029211EAB92}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{37859855-7E5C-4772-B5D2-7029211EAB92}.Debug|Any CPU.Build.0 = Debug|Any CPU
{37859855-7E5C-4772-B5D2-7029211EAB92}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -121,11 +131,8 @@ Global
{37859855-7E5C-4772-B5D2-7029211EAB92}.Release|x86.ActiveCfg = Release|Any CPU
{37859855-7E5C-4772-B5D2-7029211EAB92}.Release|x86.Build.0 = Release|Any CPU
{37859855-7E5C-4772-B5D2-7029211EAB92}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {37859855-7E5C-4772-B5D2-7029211EAB92}.Checked|Any CPU.Build.0 = Debug|Any CPU
{37859855-7E5C-4772-B5D2-7029211EAB92}.Checked|x64.ActiveCfg = Debug|Any CPU
- {37859855-7E5C-4772-B5D2-7029211EAB92}.Checked|x64.Build.0 = Debug|Any CPU
{37859855-7E5C-4772-B5D2-7029211EAB92}.Checked|x86.ActiveCfg = Debug|Any CPU
- {37859855-7E5C-4772-B5D2-7029211EAB92}.Checked|x86.Build.0 = Debug|Any CPU
{BDD0866A-D856-40EE-A9D5-1DAC11095E42}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BDD0866A-D856-40EE-A9D5-1DAC11095E42}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BDD0866A-D856-40EE-A9D5-1DAC11095E42}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -139,11 +146,8 @@ Global
{BDD0866A-D856-40EE-A9D5-1DAC11095E42}.Release|x86.ActiveCfg = Release|Any CPU
{BDD0866A-D856-40EE-A9D5-1DAC11095E42}.Release|x86.Build.0 = Release|Any CPU
{BDD0866A-D856-40EE-A9D5-1DAC11095E42}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {BDD0866A-D856-40EE-A9D5-1DAC11095E42}.Checked|Any CPU.Build.0 = Debug|Any CPU
{BDD0866A-D856-40EE-A9D5-1DAC11095E42}.Checked|x64.ActiveCfg = Debug|Any CPU
- {BDD0866A-D856-40EE-A9D5-1DAC11095E42}.Checked|x64.Build.0 = Debug|Any CPU
{BDD0866A-D856-40EE-A9D5-1DAC11095E42}.Checked|x86.ActiveCfg = Debug|Any CPU
- {BDD0866A-D856-40EE-A9D5-1DAC11095E42}.Checked|x86.Build.0 = Debug|Any CPU
{650441DF-021A-45C3-9560-F9FDB3037A64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{650441DF-021A-45C3-9560-F9FDB3037A64}.Debug|Any CPU.Build.0 = Debug|Any CPU
{650441DF-021A-45C3-9560-F9FDB3037A64}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -157,11 +161,8 @@ Global
{650441DF-021A-45C3-9560-F9FDB3037A64}.Release|x86.ActiveCfg = Release|Any CPU
{650441DF-021A-45C3-9560-F9FDB3037A64}.Release|x86.Build.0 = Release|Any CPU
{650441DF-021A-45C3-9560-F9FDB3037A64}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {650441DF-021A-45C3-9560-F9FDB3037A64}.Checked|Any CPU.Build.0 = Debug|Any CPU
{650441DF-021A-45C3-9560-F9FDB3037A64}.Checked|x64.ActiveCfg = Debug|Any CPU
- {650441DF-021A-45C3-9560-F9FDB3037A64}.Checked|x64.Build.0 = Debug|Any CPU
{650441DF-021A-45C3-9560-F9FDB3037A64}.Checked|x86.ActiveCfg = Debug|Any CPU
- {650441DF-021A-45C3-9560-F9FDB3037A64}.Checked|x86.Build.0 = Debug|Any CPU
{DC61379F-5CAE-4744-A71C-3E7AAF921877}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DC61379F-5CAE-4744-A71C-3E7AAF921877}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DC61379F-5CAE-4744-A71C-3E7AAF921877}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -175,11 +176,8 @@ Global
{DC61379F-5CAE-4744-A71C-3E7AAF921877}.Release|x86.ActiveCfg = Release|Any CPU
{DC61379F-5CAE-4744-A71C-3E7AAF921877}.Release|x86.Build.0 = Release|Any CPU
{DC61379F-5CAE-4744-A71C-3E7AAF921877}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {DC61379F-5CAE-4744-A71C-3E7AAF921877}.Checked|Any CPU.Build.0 = Debug|Any CPU
{DC61379F-5CAE-4744-A71C-3E7AAF921877}.Checked|x64.ActiveCfg = Debug|Any CPU
- {DC61379F-5CAE-4744-A71C-3E7AAF921877}.Checked|x64.Build.0 = Debug|Any CPU
{DC61379F-5CAE-4744-A71C-3E7AAF921877}.Checked|x86.ActiveCfg = Debug|Any CPU
- {DC61379F-5CAE-4744-A71C-3E7AAF921877}.Checked|x86.Build.0 = Debug|Any CPU
{B532288A-97AF-473C-B334-E5F6F572907C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B532288A-97AF-473C-B334-E5F6F572907C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B532288A-97AF-473C-B334-E5F6F572907C}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -193,11 +191,8 @@ Global
{B532288A-97AF-473C-B334-E5F6F572907C}.Release|x86.ActiveCfg = Release|Any CPU
{B532288A-97AF-473C-B334-E5F6F572907C}.Release|x86.Build.0 = Release|Any CPU
{B532288A-97AF-473C-B334-E5F6F572907C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {B532288A-97AF-473C-B334-E5F6F572907C}.Checked|Any CPU.Build.0 = Debug|Any CPU
{B532288A-97AF-473C-B334-E5F6F572907C}.Checked|x64.ActiveCfg = Debug|Any CPU
- {B532288A-97AF-473C-B334-E5F6F572907C}.Checked|x64.Build.0 = Debug|Any CPU
{B532288A-97AF-473C-B334-E5F6F572907C}.Checked|x86.ActiveCfg = Debug|Any CPU
- {B532288A-97AF-473C-B334-E5F6F572907C}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -212,6 +207,7 @@ Global
{D9F21DA7-0FE6-419E-9CE3-DFFBC3F0067F} = {E3179181-D7ED-459C-B0ED-40DF10FC1959}
{DC61379F-5CAE-4744-A71C-3E7AAF921877} = {E3179181-D7ED-459C-B0ED-40DF10FC1959}
{B532288A-97AF-473C-B334-E5F6F572907C} = {E3179181-D7ED-459C-B0ED-40DF10FC1959}
+ {8153A96E-335B-4872-9EC0-39178850617B} = {89A8524B-6E70-43E0-AD13-E53D499BB0A1}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {EB54DAE5-7032-48C6-8714-21ED3B5B2D1E}
diff --git a/src/libraries/System.Private.Xml.Linq/System.Private.Xml.Linq.sln b/src/libraries/System.Private.Xml.Linq/System.Private.Xml.Linq.sln
index b2a6474bfef..aaac523bd4e 100644
--- a/src/libraries/System.Private.Xml.Linq/System.Private.Xml.Linq.sln
+++ b/src/libraries/System.Private.Xml.Linq/System.Private.Xml.Linq.sln
@@ -33,8 +33,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Xml.Linq.xNodeBuilde
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Xml.Linq.xNodeReader.Tests", "tests\xNodeReader\System.Xml.Linq.xNodeReader.Tests.csproj", "{8720F0F6-D1E2-4699-8B83-638A85ACFB2E}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Xml.XPath.XDocument.Tests", "tests\XPath\XDocument\System.Xml.XPath.XDocument.Tests.csproj", "{557CBDC5-16E6-44FD-B34B-6386AFDC300D}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.Xml", "..\System.Private.Xml\src\System.Private.Xml.csproj", "{A4F479E3-A0AD-4646-BD4B-F3CD2C29046B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{7F136EB7-C602-403B-84CD-753B32D699A8}"
@@ -123,10 +121,6 @@ Global
{8720F0F6-D1E2-4699-8B83-638A85ACFB2E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8720F0F6-D1E2-4699-8B83-638A85ACFB2E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8720F0F6-D1E2-4699-8B83-638A85ACFB2E}.Release|Any CPU.Build.0 = Release|Any CPU
- {557CBDC5-16E6-44FD-B34B-6386AFDC300D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {557CBDC5-16E6-44FD-B34B-6386AFDC300D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {557CBDC5-16E6-44FD-B34B-6386AFDC300D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {557CBDC5-16E6-44FD-B34B-6386AFDC300D}.Release|Any CPU.Build.0 = Release|Any CPU
{A4F479E3-A0AD-4646-BD4B-F3CD2C29046B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A4F479E3-A0AD-4646-BD4B-F3CD2C29046B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A4F479E3-A0AD-4646-BD4B-F3CD2C29046B}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -164,7 +158,6 @@ Global
{0B05F02C-9E65-422F-8192-D06CAF7D6DD6} = {4CB964C2-C69D-4A48-96A7-ACB28FBCB223}
{146FEC0E-2AF0-47B4-8F95-8E64F91D1147} = {4CB964C2-C69D-4A48-96A7-ACB28FBCB223}
{8720F0F6-D1E2-4699-8B83-638A85ACFB2E} = {4CB964C2-C69D-4A48-96A7-ACB28FBCB223}
- {557CBDC5-16E6-44FD-B34B-6386AFDC300D} = {4CB964C2-C69D-4A48-96A7-ACB28FBCB223}
{61FD926A-2ED8-4CA5-8D75-854C8C9D9CCD} = {1C4146F1-CF77-449B-865C-5E67ECF0362B}
{A4F479E3-A0AD-4646-BD4B-F3CD2C29046B} = {1C4146F1-CF77-449B-865C-5E67ECF0362B}
{7F136EB7-C602-403B-84CD-753B32D699A8} = {E9DEC5AA-D875-466B-9E3C-26CFD3C806D3}
diff --git a/src/libraries/System.Private.Xml/System.Private.Xml.sln b/src/libraries/System.Private.Xml/System.Private.Xml.sln
index 06f09b8de34..47b5194abaa 100644
--- a/src/libraries/System.Private.Xml/System.Private.Xml.sln
+++ b/src/libraries/System.Private.Xml/System.Private.Xml.sln
@@ -1,8 +1,4 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.4.32907.410
-MinimumVisualStudioVersion = 10.0.40219.1
+Microsoft Visual Studio Solution File, Format Version 12.00
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BaseLibManaged", "..\Common\tests\System\Xml\BaseLibManaged\BaseLibManaged.csproj", "{301E53B9-AF30-4759-953B-8C2396D96E41}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ModuleCore", "..\Common\tests\System\Xml\ModuleCore\ModuleCore.csproj", "{497F8F6C-CE19-4B51-9A6E-5176231F22F3}"
@@ -17,6 +13,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SerializableAssembly", "..\
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.Xml", "src\System.Private.Xml.csproj", "{B49AD269-3938-4F33-AEF8-029D3A94138F}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.Xml.Tests", "tests\System.Private.Xml.Tests.csproj", "{6E5C53F1-1C16-4CFF-B735-6F49E554C906}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Xml.RW.XmlReaderLib", "tests\XmlReaderLib\System.Xml.RW.XmlReaderLib.csproj", "{64441DE6-F486-411A-B965-F12785171B38}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Xml.XmlSerializer.ReflectionOnly.Tests", "tests\XmlSerializer\ReflectionOnly\System.Xml.XmlSerializer.ReflectionOnly.Tests.csproj", "{AD461557-2DDB-4A3C-8433-FFB5E31A5E6F}"
@@ -33,8 +31,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{41E18B29-2DB
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{75FE1E48-B986-46E6-874F-336D74FF6C94}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.Xml.Tests", "tests\System.Private.Xml.Tests.csproj", "{6E5C53F1-1C16-4CFF-B735-6F49E554C906}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -69,6 +65,10 @@ Global
{B49AD269-3938-4F33-AEF8-029D3A94138F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B49AD269-3938-4F33-AEF8-029D3A94138F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B49AD269-3938-4F33-AEF8-029D3A94138F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6E5C53F1-1C16-4CFF-B735-6F49E554C906}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6E5C53F1-1C16-4CFF-B735-6F49E554C906}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6E5C53F1-1C16-4CFF-B735-6F49E554C906}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6E5C53F1-1C16-4CFF-B735-6F49E554C906}.Release|Any CPU.Build.0 = Release|Any CPU
{64441DE6-F486-411A-B965-F12785171B38}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{64441DE6-F486-411A-B965-F12785171B38}.Debug|Any CPU.Build.0 = Debug|Any CPU
{64441DE6-F486-411A-B965-F12785171B38}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -89,10 +89,6 @@ Global
{19C87966-6C1B-4CFA-9798-E989270CAB2B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{19C87966-6C1B-4CFA-9798-E989270CAB2B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{19C87966-6C1B-4CFA-9798-E989270CAB2B}.Release|Any CPU.Build.0 = Release|Any CPU
- {6E5C53F1-1C16-4CFF-B735-6F49E554C906}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {6E5C53F1-1C16-4CFF-B735-6F49E554C906}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {6E5C53F1-1C16-4CFF-B735-6F49E554C906}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {6E5C53F1-1C16-4CFF-B735-6F49E554C906}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -104,13 +100,13 @@ Global
{ADD6F934-4933-47A1-A700-AA63D6474097} = {E96EBB95-6AC7-4ECD-AD77-30F089F2C1F9}
{6222F04D-AF3C-4CA3-A564-F4FED0A60F64} = {E96EBB95-6AC7-4ECD-AD77-30F089F2C1F9}
{8FC1BB5E-395F-469B-80D8-4EE782C04AD9} = {E96EBB95-6AC7-4ECD-AD77-30F089F2C1F9}
- {B49AD269-3938-4F33-AEF8-029D3A94138F} = {41E18B29-2DB1-495A-8460-E7A257F8EA07}
+ {6E5C53F1-1C16-4CFF-B735-6F49E554C906} = {E96EBB95-6AC7-4ECD-AD77-30F089F2C1F9}
{64441DE6-F486-411A-B965-F12785171B38} = {E96EBB95-6AC7-4ECD-AD77-30F089F2C1F9}
{AD461557-2DDB-4A3C-8433-FFB5E31A5E6F} = {E96EBB95-6AC7-4ECD-AD77-30F089F2C1F9}
+ {B49AD269-3938-4F33-AEF8-029D3A94138F} = {41E18B29-2DB1-495A-8460-E7A257F8EA07}
{6BC66CAC-5D61-48C2-8343-FF32DC7BC626} = {75FE1E48-B986-46E6-874F-336D74FF6C94}
{9CDA14FB-7312-45E7-BF4C-1E446C2242BC} = {75FE1E48-B986-46E6-874F-336D74FF6C94}
{19C87966-6C1B-4CFA-9798-E989270CAB2B} = {75FE1E48-B986-46E6-874F-336D74FF6C94}
- {6E5C53F1-1C16-4CFF-B735-6F49E554C906} = {E96EBB95-6AC7-4ECD-AD77-30F089F2C1F9}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {80121011-1A73-45DC-80FC-B3727F3DF58C}
diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/ReadOnlyTernaryTree.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/ReadOnlyTernaryTree.cs
index 05a5ffc3a5e..96e625dfa9f 100644
--- a/src/libraries/System.Private.Xml/src/System/Xml/Core/ReadOnlyTernaryTree.cs
+++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/ReadOnlyTernaryTree.cs
@@ -156,7 +156,6 @@ namespace System.Xml
{
int pos = nodePos * 4;
int charInTheTree = nodeBuffer[pos + (int)TernaryTreeByte.CharacterByte];
- //Console.WriteLine("charToFind: {0},charInTheTree: {1}, nodePos: {2}", charToFind, charInTheTree, nodePos);
if (charToFind < charInTheTree)
{
diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReaderImpl.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReaderImpl.cs
index dfc7c93ce69..02db7686b08 100644
--- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReaderImpl.cs
+++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReaderImpl.cs
@@ -5119,7 +5119,7 @@ namespace System.Xml
PushXmlContext();
}
- switch (XmlConvert.TrimString(attr.StringValue))
+ switch (attr.StringValue.AsSpan().Trim(XmlConvert.WhitespaceChars))
{
case "preserve":
_xmlContext.xmlSpace = XmlSpace.Preserve;
diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextWriter.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextWriter.cs
index d593a97e7d5..f0cd667e171 100644
--- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextWriter.cs
+++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextWriter.cs
@@ -1758,18 +1758,16 @@ namespace System.Xml
break;
case SpecialAttr.XmlSpace:
// validate XmlSpace attribute
- value = XmlConvert.TrimString(value);
- if (value == "default")
+ switch (value.AsSpan().Trim(XmlConvert.WhitespaceChars))
{
- _stack[_top].xmlSpace = XmlSpace.Default;
- }
- else if (value == "preserve")
- {
- _stack[_top].xmlSpace = XmlSpace.Preserve;
- }
- else
- {
- throw new ArgumentException(SR.Format(SR.Xml_InvalidXmlSpace, value));
+ case "default":
+ _stack[_top].xmlSpace = XmlSpace.Default;
+ break;
+ case "preserve":
+ _stack[_top].xmlSpace = XmlSpace.Preserve;
+ break;
+ default:
+ throw new ArgumentException(SR.Format(SR.Xml_InvalidXmlSpace, value));
}
break;
case SpecialAttr.XmlNs:
diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWellFormedWriterHelpers.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWellFormedWriterHelpers.cs
index e905d9663c3..9652a0b3489 100644
--- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWellFormedWriterHelpers.cs
+++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWellFormedWriterHelpers.cs
@@ -403,10 +403,11 @@ namespace System.Xml
// trim the string in StringBuilder
string valBefore = _stringValue.ToString();
- string valAfter = XmlConvert.TrimString(valBefore);
+ ReadOnlySpan<char> valAfter = valBefore.AsSpan().Trim(XmlConvert.WhitespaceChars);
if (valBefore != valAfter)
{
- _stringValue = new StringBuilder(valAfter);
+ _stringValue = new StringBuilder();
+ _stringValue.Append(valAfter);
}
// trim the beginning of the recorded writer events
diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Dom/XmlNode.cs b/src/libraries/System.Private.Xml/src/System/Xml/Dom/XmlNode.cs
index d0dda8c64c5..32e77bc9cff 100644
--- a/src/libraries/System.Private.Xml/src/System/Xml/Dom/XmlNode.cs
+++ b/src/libraries/System.Private.Xml/src/System/Xml/Dom/XmlNode.cs
@@ -1349,7 +1349,7 @@ namespace System.Xml
elem = node as XmlElement;
if (elem != null && elem.HasAttribute("xml:space"))
{
- switch (XmlConvert.TrimString(elem.GetAttribute("xml:space")))
+ switch (elem.GetAttribute("xml:space").AsSpan().Trim(XmlConvert.WhitespaceChars))
{
case "default":
return XmlSpace.Default;
diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/FacetChecker.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/FacetChecker.cs
index faaac5c18c7..ad0484beba7 100644
--- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/FacetChecker.cs
+++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/FacetChecker.cs
@@ -700,27 +700,26 @@ namespace System.Xml.Schema
StringBuilder bufBld = new StringBuilder();
bufBld.Append('^');
- char[] source = pattern.ToCharArray();
int length = pattern.Length;
int copyPosition = 0;
for (int position = 0; position < length - 2; position++)
{
- if (source[position] == '\\')
+ if (pattern[position] == '\\')
{
- if (source[position + 1] == '\\')
+ if (pattern[position + 1] == '\\')
{
position++; // skip it
}
else
{
- char ch = source[position + 1];
+ char ch = pattern[position + 1];
for (int i = 0; i < s_map.Length; i++)
{
if (s_map[i].match == ch)
{
if (copyPosition < position)
{
- bufBld.Append(source, copyPosition, position - copyPosition);
+ bufBld.Append(pattern, copyPosition, position - copyPosition);
}
bufBld.Append(s_map[i].replacement);
position++;
@@ -733,7 +732,7 @@ namespace System.Xml.Schema
}
if (copyPosition < length)
{
- bufBld.Append(source, copyPosition, length - copyPosition);
+ bufBld.Append(pattern, copyPosition, length - copyPosition);
}
bufBld.Append('$');
diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlValueConverter.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlValueConverter.cs
index 7fc4393af3d..a52eb320166 100644
--- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlValueConverter.cs
+++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlValueConverter.cs
@@ -588,7 +588,7 @@ namespace System.Xml.Schema
{
try
{
- return XmlConvert.FromBinHexString(XmlConvert.TrimString(value), false);
+ return XmlConvert.FromBinHexString(value.AsSpan().Trim(XmlConvert.WhitespaceChars), false);
}
catch (XmlException e)
{
diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Xmlcustomformatter.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Xmlcustomformatter.cs
index 385d54e3181..2338d8d46e9 100644
--- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Xmlcustomformatter.cs
+++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Xmlcustomformatter.cs
@@ -437,8 +437,7 @@ namespace System.Xml.Serialization
internal static byte[]? ToByteArrayHex(string? value)
{
if (value == null) return null;
- value = value.Trim();
- return XmlConvert.FromBinHexString(value);
+ return XmlConvert.FromBinHexString(value.AsSpan().Trim(), true);
}
internal static long ToEnum(string val, Hashtable vals, string? typeName, bool validate)
diff --git a/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/XPathScanner.cs b/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/XPathScanner.cs
index cfe089ba53f..c946d8edbd1 100644
--- a/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/XPathScanner.cs
+++ b/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/XPathScanner.cs
@@ -182,7 +182,7 @@ namespace MS.Internal.Xml.XPath
_kind = LexKind.DotDot;
NextChar();
}
- else if (XmlCharType.IsDigit(CurrentChar))
+ else if (char.IsAsciiDigit(CurrentChar))
{
_kind = LexKind.Number;
_numberValue = ScanFraction();
@@ -203,7 +203,7 @@ namespace MS.Internal.Xml.XPath
_stringValue = ScanString();
break;
default:
- if (XmlCharType.IsDigit(CurrentChar))
+ if (char.IsAsciiDigit(CurrentChar))
{
_kind = LexKind.Number;
_numberValue = ScanNumber();
@@ -274,17 +274,17 @@ namespace MS.Internal.Xml.XPath
private double ScanNumber()
{
- Debug.Assert(CurrentChar == '.' || XmlCharType.IsDigit(CurrentChar));
+ Debug.Assert(CurrentChar == '.' || char.IsAsciiDigit(CurrentChar));
int start = _xpathExprIndex - 1;
int len = 0;
- while (XmlCharType.IsDigit(CurrentChar))
+ while (char.IsAsciiDigit(CurrentChar))
{
NextChar(); len++;
}
if (CurrentChar == '.')
{
NextChar(); len++;
- while (XmlCharType.IsDigit(CurrentChar))
+ while (char.IsAsciiDigit(CurrentChar))
{
NextChar(); len++;
}
@@ -294,11 +294,11 @@ namespace MS.Internal.Xml.XPath
private double ScanFraction()
{
- Debug.Assert(XmlCharType.IsDigit(CurrentChar));
+ Debug.Assert(char.IsAsciiDigit(CurrentChar));
int start = _xpathExprIndex - 2;
Debug.Assert(0 <= start && _xpathExpr[start] == '.');
int len = 1; // '.'
- while (XmlCharType.IsDigit(CurrentChar))
+ while (char.IsAsciiDigit(CurrentChar))
{
NextChar(); len++;
}
diff --git a/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathNavigatorReader.cs b/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathNavigatorReader.cs
index 3f07b88a265..2d721747ace 100644
--- a/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathNavigatorReader.cs
+++ b/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathNavigatorReader.cs
@@ -264,7 +264,7 @@ namespace System.Xml.XPath
{
if (tempNav.MoveToAttribute(XPathNavigatorReader.space, XmlReservedNs.NsXml))
{
- switch (XmlConvert.TrimString(tempNav.Value))
+ switch (tempNav.Value.AsSpan().Trim(XmlConvert.WhitespaceChars))
{
case "default":
return XmlSpace.Default;
diff --git a/src/libraries/System.Private.Xml/src/System/Xml/XmlCharType.cs b/src/libraries/System.Private.Xml/src/System/Xml/XmlCharType.cs
index 3216608fbbe..4a4ae14dd09 100644
--- a/src/libraries/System.Private.Xml/src/System/Xml/XmlCharType.cs
+++ b/src/libraries/System.Private.Xml/src/System/Xml/XmlCharType.cs
@@ -90,9 +90,6 @@ namespace System.Xml
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool IsNameCharXml4e(char ch) => IsNCNameCharXml4e(ch) || ch == ':';
- // Digit methods
- public static bool IsDigit(char ch) => InRange(ch, 0x30, 0x39);
-
// Surrogate methods
internal static bool IsHighSurrogate(int ch) => InRange(ch, SurHighStart, SurHighEnd);
@@ -163,7 +160,7 @@ namespace System.Xml
for (int i = startPos; i < startPos + len; i++)
{
- if (!IsDigit(str[i]))
+ if (!char.IsAsciiDigit(str[i]))
{
return false;
}
diff --git a/src/libraries/System.Private.Xml/src/System/Xml/XmlComplianceUtil.cs b/src/libraries/System.Private.Xml/src/System/Xml/XmlComplianceUtil.cs
index 6d032d39f4d..1cf207586c3 100644
--- a/src/libraries/System.Private.Xml/src/System/Xml/XmlComplianceUtil.cs
+++ b/src/libraries/System.Private.Xml/src/System/Xml/XmlComplianceUtil.cs
@@ -147,16 +147,16 @@ namespace System.Xml
}
}
- public static bool IsValidLanguageID(char[] value, int startPos, int length)
+ public static bool IsValidLanguageID(string value)
{
- int len = length;
+ int len = value.Length;
if (len < 2)
{
return false;
}
bool fSeenLetter = false;
- int i = startPos;
+ int i = 0;
char ch = value[i];
if (XmlCharType.IsLetter(ch))
diff --git a/src/libraries/System.Private.Xml/src/System/Xml/XmlConvert.cs b/src/libraries/System.Private.Xml/src/System/Xml/XmlConvert.cs
index c5935daf6ae..760d2a6c2ef 100644
--- a/src/libraries/System.Private.Xml/src/System/Xml/XmlConvert.cs
+++ b/src/libraries/System.Private.Xml/src/System/Xml/XmlConvert.cs
@@ -291,16 +291,9 @@ namespace System.Xml
return HexConverter.FromChar(digit);
}
- internal static byte[] FromBinHexString(string s)
+ internal static byte[] FromBinHexString(ReadOnlySpan<char> s, bool allowOddCount)
{
- return FromBinHexString(s, true);
- }
-
- internal static byte[] FromBinHexString(string s, bool allowOddCount)
- {
- ArgumentNullException.ThrowIfNull(s);
-
- return BinHexDecoder.Decode(s.AsSpan(), allowOddCount);
+ return BinHexDecoder.Decode(s, allowOddCount);
}
internal static string ToBinHexString(byte[] inArray)
@@ -761,28 +754,35 @@ namespace System.Xml
public static bool ToBoolean(string s)
{
- s = TrimString(s);
- if (s == "1" || s == "true") return true;
- if (s == "0" || s == "false") return false;
- throw new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Boolean"));
+ switch (s.AsSpan().Trim(WhitespaceChars))
+ {
+ case "1":
+ case "true":
+ return true;
+ case "0":
+ case "false":
+ return false;
+ default:
+ throw new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Boolean"));
+ }
}
internal static Exception? TryToBoolean(string s, out bool result)
{
- s = TrimString(s);
- if (s == "0" || s == "false")
- {
- result = false;
- return null;
- }
- else if (s == "1" || s == "true")
+ switch (s.AsSpan().Trim(WhitespaceChars))
{
- result = true;
- return null;
+ case "0":
+ case "false":
+ result = false;
+ return null;
+ case "1":
+ case "true":
+ result = true;
+ return null;
+ default:
+ result = false;
+ return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Boolean"));
}
-
- result = false;
- return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Boolean"));
}
public static char ToChar(string s)
@@ -963,143 +963,150 @@ namespace System.Xml
public static float ToSingle(string s)
{
- s = TrimString(s);
- if (s == "-INF") return float.NegativeInfinity;
- if (s == "INF") return float.PositiveInfinity;
- float f = float.Parse(s, NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint | NumberStyles.AllowExponent, NumberFormatInfo.InvariantInfo);
- if (f == 0 && s[0] == '-')
+ ArgumentNullException.ThrowIfNull(s);
+
+ ReadOnlySpan<char> value = s.AsSpan().Trim(WhitespaceChars);
+ switch (value)
{
- return -0f;
- }
+ case "-INF":
+ return float.NegativeInfinity;
+ case "INF":
+ return float.PositiveInfinity;
+ default:
+ float f = float.Parse(value, NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint | NumberStyles.AllowExponent, NumberFormatInfo.InvariantInfo);
+ if (f == 0 && value[0] == '-')
+ {
+ return -0f;
+ }
- return f;
+ return f;
+ }
}
internal static Exception? TryToSingle(string s, out float result)
{
- s = TrimString(s);
- if (s == "-INF")
- {
- result = float.NegativeInfinity;
- return null;
- }
- else if (s == "INF")
+ ReadOnlySpan<char> value = s.AsSpan().Trim(WhitespaceChars);
+ switch (value)
{
- result = float.PositiveInfinity;
- return null;
- }
- else if (!float.TryParse(s, NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint | NumberStyles.AllowExponent, NumberFormatInfo.InvariantInfo, out result))
- {
- return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Single"));
- }
+ case "-INF":
+ result = float.NegativeInfinity;
+ return null;
+ case "INF":
+ result = float.PositiveInfinity;
+ return null;
+ default:
+ if (!float.TryParse(value, NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint | NumberStyles.AllowExponent, NumberFormatInfo.InvariantInfo, out result))
+ {
+ return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Single"));
+ }
+ if (result == 0 && value[0] == '-')
+ {
+ result = -0f;
+ }
- if (result == 0 && s[0] == '-')
- {
- result = -0f;
+ return null;
}
-
- return null;
}
public static double ToDouble(string s)
{
- s = TrimString(s);
- if (s == "-INF") return double.NegativeInfinity;
- if (s == "INF") return double.PositiveInfinity;
+ ArgumentNullException.ThrowIfNull(s);
- double dVal = double.Parse(s, NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint | NumberStyles.AllowExponent | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo);
- if (dVal == 0 && s[0] == '-')
+ ReadOnlySpan<char> value = s.AsSpan().Trim(WhitespaceChars);
+ switch (value)
{
- return -0d;
- }
+ case "-INF":
+ return double.NegativeInfinity;
+ case "INF":
+ return double.PositiveInfinity;
+ default:
+ double dVal = double.Parse(value, NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint | NumberStyles.AllowExponent | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo);
+ if (dVal == 0 && value[0] == '-')
+ {
+ return -0d;
+ }
- return dVal;
+ return dVal;
+ }
}
internal static Exception? TryToDouble(string s, out double result)
{
- s = TrimString(s);
- if (s == "-INF")
- {
- result = double.NegativeInfinity;
- return null;
- }
- else if (s == "INF")
- {
- result = double.PositiveInfinity;
- return null;
- }
- else if (!double.TryParse(s, NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint | NumberStyles.AllowExponent, NumberFormatInfo.InvariantInfo, out result))
+ ReadOnlySpan<char> value = s.AsSpan().Trim(WhitespaceChars);
+ switch (value)
{
- return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Double"));
- }
+ case "-INF":
+ result = double.NegativeInfinity;
+ return null;
+ case "INF":
+ result = double.PositiveInfinity;
+ return null;
+ default:
+ if (!double.TryParse(value, NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint | NumberStyles.AllowExponent, NumberFormatInfo.InvariantInfo, out result))
+ {
+ return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Double"));
+ }
- if (result == 0 && s[0] == '-')
- {
- result = -0d;
- }
+ if (result == 0 && value[0] == '-')
+ {
+ result = -0d;
+ }
- return null;
+ return null;
+ }
}
internal static double ToXPathDouble(object? o)
{
- if (o is string str)
+ switch (o)
{
- str = TrimString(str);
- if (str.Length != 0 && str[0] != '+')
- {
- double d;
- if (double.TryParse(str, NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo, out d))
+ case string str:
{
- return d;
- }
- }
- return double.NaN;
- }
-
- if (o is double oDouble)
- {
- return oDouble;
- }
+ ArgumentNullException.ThrowIfNull(str);
- if (o is bool oBool)
- {
- return oBool ? 1.0 : 0.0;
- }
+ ReadOnlySpan<char> value = str.AsSpan().Trim(WhitespaceChars);
+ if (value.Length != 0 && value[0] != '+')
+ {
+ if (double.TryParse(value, NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo, out double d))
+ {
+ return d;
+ }
+ }
+ return double.NaN;
+ }
+ case double oDouble:
+ return oDouble;
+ case bool oBool:
+ return oBool ? 1.0 : 0.0;
+ default:
+ try
+ {
+ return Convert.ToDouble(o, NumberFormatInfo.InvariantInfo);
+ }
+ catch (FormatException)
+ {
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (ArgumentNullException) { }
- try
- {
- return Convert.ToDouble(o, NumberFormatInfo.InvariantInfo);
- }
- catch (FormatException)
- {
+ return double.NaN;
}
- catch (OverflowException)
- {
- }
- catch (ArgumentNullException) { }
-
- return double.NaN;
}
internal static string? ToXPathString(object? value)
{
- if (value is string s)
+ switch (value)
{
- return s;
- }
- else if (value is double)
- {
- return ((double)value).ToString("R", NumberFormatInfo.InvariantInfo);
- }
- else if (value is bool)
- {
- return (bool)value ? "true" : "false";
- }
- else
- {
- return Convert.ToString(value, NumberFormatInfo.InvariantInfo);
+ case string s:
+ return s;
+ case double d:
+ return d.ToString("R", NumberFormatInfo.InvariantInfo);
+ case bool b:
+ return b ? "true" : "false";
+ default:
+ return Convert.ToString(value, NumberFormatInfo.InvariantInfo);
}
}
diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/SortAction.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/SortAction.cs
index 0e51622fd84..edc54de3642 100644
--- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/SortAction.cs
+++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/SortAction.cs
@@ -35,7 +35,7 @@ namespace System.Xml.Xsl.XsltOld
// better to remove this method completely and not call it here, but that may
// change exception types for some stylesheets.
CultureInfo cultInfo = new CultureInfo(value);
- if (!XmlComplianceUtil.IsValidLanguageID(value.ToCharArray(), 0, value.Length)
+ if (!XmlComplianceUtil.IsValidLanguageID(value)
&& (value.Length == 0 || cultInfo == null)
)
{
diff --git a/src/libraries/System.Private.Xml/src/Utils/System.Xml.Utils.txt b/src/libraries/System.Private.Xml/src/Utils/System.Xml.Utils.txt
deleted file mode 100644
index 0446b982a30..00000000000
--- a/src/libraries/System.Private.Xml/src/Utils/System.Xml.Utils.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-;==++==
-;
-; Copyright (c) Microsoft Corporation. All rights reserved.
-;
-;==--==
-
-; NOTE: do not use \", use ' instead
-; NOTE: Use # or ; for comments
-
-; These are the managed resources for System.Xml.Utils.dll in Silverlight. See
-; ResourceManager documentation and the ResGen tool.
-
-Xml_UnsupportedClass=Object type is not supported.
-Xml_CannotResolveUrl=Cannot resolve '{0}'.
-
diff --git a/src/libraries/System.Private.Xml/src/Utils/native.rc b/src/libraries/System.Private.Xml/src/Utils/native.rc
deleted file mode 100644
index d9ba7b29fa6..00000000000
--- a/src/libraries/System.Private.Xml/src/Utils/native.rc
+++ /dev/null
@@ -1,4 +0,0 @@
-#define FX_VER_FILEDESCRIPTION_STR ".NET Framework"
-
-#include <fxver.h>
-#include <fxver.rc>
diff --git a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ExceptionVerifier.cs b/src/libraries/System.Private.Xml/tests/ExceptionVerifier.cs
index 7d8fe958f7a..12897b355ef 100644
--- a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ExceptionVerifier.cs
+++ b/src/libraries/System.Private.Xml/tests/ExceptionVerifier.cs
@@ -10,7 +10,7 @@ using System.Resources;
using System.Text.RegularExpressions;
using Xunit.Abstractions;
-namespace System.Xml.XmlSchemaValidatorApiTests
+namespace System.Xml.Tests
{
public class LineInfo
{
@@ -134,13 +134,18 @@ namespace System.Xml.XmlSchemaValidatorApiTests
{
_output.WriteLine(e2.ToString());
}
+ catch (PlatformNotSupportedException e3)
+ {
+ // NativeAOT doesn't support assembly loading
+ _output.WriteLine(e3.ToString());
+ }
}
}
catch (Exception e)
{
_output.WriteLine("Exception: " + e.Message);
_output.WriteLine("Stack: " + e.StackTrace);
- throw new VerifyException("Error while loading assembly");
+ throw new VerifyException("Error while loading assembly", e);
}
string[] resArray;
@@ -175,7 +180,6 @@ namespace System.Xml.XmlSchemaValidatorApiTests
}
resReader.Dispose();
}
- //break;
}
}
@@ -209,8 +213,7 @@ namespace System.Xml.XmlSchemaValidatorApiTests
"\n===== Original Exception Message =====\n" + _ex.Message +
"\n===== Resource Id =====\n" + fInfo.GetValue(_ex) +
"\n===== HelpLink =====\n" + _ex.HelpLink +
- "\n===== Source =====\n" + _ex.Source /*+
- "\n===== TargetSite =====\n" + ex.TargetSite + "\n"*/);
+ "\n===== Source =====\n" + _ex.Source);
_output.WriteLine(
"\n===== InnerException =====\n" + _ex.InnerException +
@@ -395,5 +398,9 @@ namespace System.Xml.XmlSchemaValidatorApiTests
public VerifyException(string msg)
: base(msg)
{ }
+
+ public VerifyException(string msg, Exception innerException)
+ : base(msg, innerException)
+ { }
}
}
diff --git a/src/libraries/System.Private.Xml/tests/System.Private.Xml.Tests.csproj b/src/libraries/System.Private.Xml/tests/System.Private.Xml.Tests.csproj
index 46b3cf44153..bce17d6636d 100644
--- a/src/libraries/System.Private.Xml/tests/System.Private.Xml.Tests.csproj
+++ b/src/libraries/System.Private.Xml/tests/System.Private.Xml.Tests.csproj
@@ -17,6 +17,7 @@
<ItemGroup>
<Compile Include="AllowDefaultResolverContext.cs" />
+ <Compile Include="ExceptionVerifier.cs" />
<Compile Include="$(CommonTestPath)\TestUtilities\System\DisableParallelizationPerAssembly.cs" Link="Common\TestUtilities\System\DisableParallelizationPerAssembly.cs" />
</ItemGroup>
@@ -401,7 +402,6 @@
<ItemGroup>
<Compile Include="XmlSchema\XmlSchemaValidatorApi\Constructor_AddSchema.cs" />
<Compile Include="XmlSchema\XmlSchemaValidatorApi\CustomImplementations.cs" />
- <Compile Include="XmlSchema\XmlSchemaValidatorApi\ExceptionVerifier.cs" />
<Compile Include="XmlSchema\XmlSchemaValidatorApi\GetExpectedAttributes.cs" />
<Compile Include="XmlSchema\XmlSchemaValidatorApi\GetExpectedParticles.cs" />
<Compile Include="XmlSchema\XmlSchemaValidatorApi\Initialize_EndValidation.cs" />
@@ -641,7 +641,6 @@
<Compile Include="Xslt\XslTransformApi\CThreads.cs" />
<Compile Include="Xslt\XslTransformApi\CXmlCache.cs" />
<Compile Include="Xslt\XslTransformApi\DataHelper.cs" />
- <Compile Include="Xslt\XslTransformApi\ExceptionVerifier.cs" />
<Compile Include="Xslt\XslTransformApi\MyNavigator.cs" />
<Compile Include="Xslt\XslTransformApi\ReaderType.cs" />
<Compile Include="Xslt\XslTransformApi\ThreadFunc.cs" />
diff --git a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/Initialize_EndValidation.cs b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/Initialize_EndValidation.cs
index 9deba7048c8..6841f97695e 100644
--- a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/Initialize_EndValidation.cs
+++ b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/Initialize_EndValidation.cs
@@ -3,6 +3,7 @@
using System.IO;
using System.Xml.Schema;
+using System.Xml.Tests;
using Xunit;
using Xunit.Abstractions;
diff --git a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/PropertiesTests.cs b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/PropertiesTests.cs
index 9193f315b89..03387e85c08 100644
--- a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/PropertiesTests.cs
+++ b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/PropertiesTests.cs
@@ -4,6 +4,7 @@
using System.Collections;
using System.IO;
using System.Xml.Schema;
+using System.Xml.Tests;
using Xunit;
using Xunit.Abstractions;
diff --git a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateAttribute.cs b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateAttribute.cs
index 12c1dc848e0..906a1116b7b 100644
--- a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateAttribute.cs
+++ b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateAttribute.cs
@@ -4,6 +4,7 @@
using System.Collections;
using System.IO;
using System.Xml.Schema;
+using System.Xml.Tests;
using Xunit;
using Xunit.Abstractions;
diff --git a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateAttribute_String.cs b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateAttribute_String.cs
index b2943e64d09..6138514462d 100644
--- a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateAttribute_String.cs
+++ b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateAttribute_String.cs
@@ -4,6 +4,7 @@
using System.Collections;
using System.IO;
using System.Xml.Schema;
+using System.Xml.Tests;
using Xunit;
using Xunit.Abstractions;
diff --git a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateElement.cs b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateElement.cs
index 7fcafeb2ea7..8731e36ca76 100644
--- a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateElement.cs
+++ b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateElement.cs
@@ -3,6 +3,7 @@
using System.IO;
using System.Xml.Schema;
+using System.Xml.Tests;
using Xunit;
using Xunit.Abstractions;
diff --git a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateText_EndElement.cs b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateText_EndElement.cs
index 94de287d334..be3d020366d 100644
--- a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateText_EndElement.cs
+++ b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateText_EndElement.cs
@@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
using System.Xml.Schema;
+using System.Xml.Tests;
using Xunit;
using Xunit.Abstractions;
diff --git a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateText_String.cs b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateText_String.cs
index fe9affd1e32..dcbd300d94f 100644
--- a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateText_String.cs
+++ b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateText_String.cs
@@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
using System.Xml.Schema;
+using System.Xml.Tests;
using Xunit;
using Xunit.Abstractions;
diff --git a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateWhitespace_String.cs b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateWhitespace_String.cs
index c4afb2ece7f..9ae71cdff65 100644
--- a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateWhitespace_String.cs
+++ b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateWhitespace_String.cs
@@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
using System.Xml.Schema;
+using System.Xml.Tests;
using Xunit;
using Xunit.Abstractions;
diff --git a/src/libraries/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.RuntimeOnly.cs b/src/libraries/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.RuntimeOnly.cs
index f3e9a8f958c..29a7880968a 100644
--- a/src/libraries/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.RuntimeOnly.cs
+++ b/src/libraries/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.RuntimeOnly.cs
@@ -1059,7 +1059,7 @@ public static partial class XmlSerializerTests
});
}
- [ConditionalFact(nameof(IsTimeSpanSerializationAvailable))]
+ [Fact]
public static void Xml_TimeSpanAsRoot()
{
Assert.StrictEqual(new TimeSpan(1, 2, 3), SerializeAndDeserialize<TimeSpan>(new TimeSpan(1, 2, 3),
@@ -3013,7 +3013,7 @@ public static partial class XmlSerializerTests
Assert.StrictEqual(value, actual);
}
- [ConditionalFact(nameof(IsTimeSpanSerializationAvailable))]
+ [Fact]
public static void VerifyRestrictionElementForTimeSpanTest()
{
var schemas = new XmlSchemas();
diff --git a/src/libraries/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.cs b/src/libraries/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.cs
index b834792eebf..4a4235bb617 100644
--- a/src/libraries/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.cs
+++ b/src/libraries/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.cs
@@ -21,9 +21,13 @@ using System.Xml.Serialization;
using SerializationTypes;
using Xunit;
+#if !ReflectionOnly && !XMLSERIALIZERGENERATORTESTS
+// Many test failures due to trimming and MakeGeneric. XmlSerializer is not currently supported with NativeAOT.
+[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBuiltWithAggressiveTrimming))]
+#endif
public static partial class XmlSerializerTests
{
-#if ReflectionOnly|| XMLSERIALIZERGENERATORTESTS
+#if ReflectionOnly || XMLSERIALIZERGENERATORTESTS
private static readonly string SerializationModeSetterName = "set_Mode";
static XmlSerializerTests()
@@ -39,8 +43,6 @@ public static partial class XmlSerializerTests
}
#endif
- private static bool IsTimeSpanSerializationAvailable => true;
-
[Fact]
public static void Xml_TypeWithDateTimePropertyAsXmlTime()
{
@@ -64,14 +66,11 @@ string.Format(@"<?xml version=""1.0"" encoding=""utf-8""?>
Value = new DateTime(549269870000L, DateTimeKind.Utc)
};
- if (IsTimeSpanSerializationAvailable)
- {
- TypeWithDateTimePropertyAsXmlTime utcTimeRoundTrip = SerializeAndDeserialize(utcTimeObject,
- @"<?xml version=""1.0"" encoding=""utf-8""?>
+ TypeWithDateTimePropertyAsXmlTime utcTimeRoundTrip = SerializeAndDeserialize(utcTimeObject,
+@"<?xml version=""1.0"" encoding=""utf-8""?>
<TypeWithDateTimePropertyAsXmlTime xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"">15:15:26.9870000Z</TypeWithDateTimePropertyAsXmlTime>");
- Assert.StrictEqual(utcTimeObject.Value, utcTimeRoundTrip.Value);
- }
+ Assert.StrictEqual(utcTimeObject.Value, utcTimeRoundTrip.Value);
}
[Fact]
@@ -812,7 +811,7 @@ string.Format(@"<?xml version=""1.0"" encoding=""utf-8""?>
}
}
- [ConditionalFact(nameof(IsTimeSpanSerializationAvailable))]
+ [Fact]
public static void Xml_TypeWithTimeSpanProperty()
{
var obj = new TypeWithTimeSpanProperty { TimeSpanProperty = TimeSpan.FromMilliseconds(1) };
@@ -824,7 +823,7 @@ string.Format(@"<?xml version=""1.0"" encoding=""utf-8""?>
Assert.StrictEqual(obj.TimeSpanProperty, deserializedObj.TimeSpanProperty);
}
- [ConditionalFact(nameof(IsTimeSpanSerializationAvailable))]
+ [Fact]
public static void Xml_TypeWithDefaultTimeSpanProperty()
{
var obj = new TypeWithDefaultTimeSpanProperty { TimeSpanProperty2 = new TimeSpan(0, 1, 0) };
diff --git a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/Errata4.cs b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/Errata4.cs
index 6846c462c17..68e0964199f 100644
--- a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/Errata4.cs
+++ b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/Errata4.cs
@@ -13,6 +13,7 @@ using Xunit.Abstractions;
namespace System.Xml.XslCompiledTransformApiTests
{
//[TestCase(Name = "Xml 4th Errata tests for XslCompiledTransform", Params = new object[] { 300 })]
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class Errata4 : XsltApiTestCaseBase2
{
private ITestOutputHelper _output;
diff --git a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/OutputSettings.cs b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/OutputSettings.cs
index 4c0b3500f46..5bf09df20ed 100644
--- a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/OutputSettings.cs
+++ b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/OutputSettings.cs
@@ -10,6 +10,7 @@ using Xunit.Abstractions;
namespace System.Xml.XslCompiledTransformApiTests
{
//[TestCase(Name = "OutputSettings", Desc = "This testcase tests the OutputSettings on XslCompiledTransform", Param = "Debug")]
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class COutputSettings : XsltApiTestCaseBase2
{
private XslCompiledTransform _xsl = null;
diff --git a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/TempFiles.cs b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/TempFiles.cs
index f9532bb061e..373314df7bb 100644
--- a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/TempFiles.cs
+++ b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/TempFiles.cs
@@ -9,6 +9,7 @@ using Xunit.Abstractions;
namespace System.Xml.XslCompiledTransformApiTests
{
//[TestCase(Name = "TemporaryFiles", Desc = "This testcase tests the Temporary Files property on XslCompiledTransform")]
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class TempFiles : XsltApiTestCaseBase2
{
private XslCompiledTransform _xsl = null;
diff --git a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslCompiledTransform.cs b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslCompiledTransform.cs
index 20bdea92a91..3739812954e 100644
--- a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslCompiledTransform.cs
+++ b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslCompiledTransform.cs
@@ -81,6 +81,7 @@ namespace System.Xml.XslCompiledTransformApiTests
}
//[TestCase(Name = "Load(MethodInfo, ByteArray, TypeArray) tests", Desc = "This testcase tests private Load method via Reflection. This method is used by sharepoint")]
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CLoadMethInfoTest : ReflectionTestCaseBase
{
private ITestOutputHelper _output;
@@ -476,6 +477,7 @@ namespace System.Xml.XslCompiledTransformApiTests
//[TestCase(Name = "XslCompiledTransform.XmlResolver : Navigator, Stream", Desc = "NAVIGATOR,STREAM")]
//[TestCase(Name = "XslCompiledTransform.XmlResolver : Navigator, Writer", Desc = "NAVIGATOR,WRITER")]
//[TestCase(Name = "XslCompiledTransform.XmlResolver : Navigator, TextWriter", Desc = "NAVIGATOR,TEXTWRITER")]
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CXmlResolverTest : XsltApiTestCaseBase2, IDisposable
{
private ITestOutputHelper _output;
@@ -666,6 +668,7 @@ namespace System.Xml.XslCompiledTransformApiTests
//[TestCase(Name = "XslCompiledTransform.Load() - Integrity : Navigator, Stream", Desc = "NAVIGATOR,STREAM")]
//[TestCase(Name = "XslCompiledTransform.Load() - Integrity : Navigator, Writer", Desc = "NAVIGATOR,WRITER")]
//[TestCase(Name = "XslCompiledTransform.Load() - Integrity : Navigator, TextWriter", Desc = "NAVIGATOR,TEXTWRITER")]
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CLoadTest : XsltApiTestCaseBase2
{
private ITestOutputHelper _output;
@@ -1004,6 +1007,7 @@ namespace System.Xml.XslCompiledTransformApiTests
//[TestCase(Name = "XslCompiledTransform.Load(XmlResolver) - Integrity : URI, Stream", Desc = "URI,STREAM")]
//[TestCase(Name = "XslCompiledTransform.Load(XmlResolver) - Integrity : URI, Writer", Desc = "URI,WRITER")]
//[TestCase(Name = "XslCompiledTransform.Load(XmlResolver) - Integrity : URI, TextWriter", Desc = "URI,TEXTWRITER")]
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CLoadXmlResolverTest : XsltApiTestCaseBase2
{
private ITestOutputHelper _output;
@@ -1435,6 +1439,7 @@ namespace System.Xml.XslCompiledTransformApiTests
//[TestCase(Name = "XslCompiledTransform.Load(Url, Resolver) : URI, Stream", Desc = "URI,STREAM")]
//[TestCase(Name = "XslCompiledTransform.Load(Url, Resolver) : URI, Writer", Desc = "URI,WRITER")]
//[TestCase(Name = "XslCompiledTransform.Load(Url, Resolver) : URI, TextWriter", Desc = "URI,TEXTWRITER")]
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CLoadUrlResolverTest : XsltApiTestCaseBase2
{
private ITestOutputHelper _output;
@@ -1534,6 +1539,7 @@ namespace System.Xml.XslCompiledTransformApiTests
/***********************************************************/
//[TestCase(Name = "XslCompiledTransform.Load(Url) Integrity : URI, Stream", Desc = "URI,STREAM")]
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CLoadStringTest : XsltApiTestCaseBase2
{
private ITestOutputHelper _output;
@@ -1652,6 +1658,7 @@ namespace System.Xml.XslCompiledTransformApiTests
/***********************************************************/
//[TestCase(Name = "XslCompiledTransform .Load(IXPathNavigable) : Navigator, TextWriter", Desc = "NAVIGATOR,TEXTWRITER")]
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CLoadXPathNavigableTest : XsltApiTestCaseBase2
{
private ITestOutputHelper _output;
@@ -1760,6 +1767,7 @@ namespace System.Xml.XslCompiledTransformApiTests
/***********************************************************/
//[TestCase(Name = "XslCompiledTransform.Load(Reader) : Reader, Stream", Desc = "READER,STREAM")]
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CLoadReaderTest : XsltApiTestCaseBase2
{
private ITestOutputHelper _output;
@@ -2149,6 +2157,7 @@ namespace System.Xml.XslCompiledTransformApiTests
//[TestCase(Name = "XslCompiledTransform.Transform() Integrity : Navigator, Stream", Desc = "NAVIGATOR,STREAM")]
//[TestCase(Name = "XslCompiledTransform.Transform() Integrity : Navigator, Writer", Desc = "NAVIGATOR,WRITER")]
//[TestCase(Name = "XslCompiledTransform.Transform() Integrity : Navigator, TextWriter", Desc = "NAVIGATOR,TEXTWRITER")]
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CTransformTestGeneric : XsltApiTestCaseBase2
{
private ITestOutputHelper _output;
@@ -2404,6 +2413,7 @@ namespace System.Xml.XslCompiledTransformApiTests
//[TestCase(Name = "XslCompiledTransform.Transform(XmlResolver) : Navigator, Stream", Desc = "NAVIGATOR,STREAM")]
//[TestCase(Name = "XslCompiledTransform.Transform(XmlResolver) : Navigator, Writer", Desc = "NAVIGATOR,WRITER")]
//[TestCase(Name = "XslCompiledTransform.Transform(XmlResolver) : Navigator, TextWriter", Desc = "NAVIGATOR,TEXTWRITER")]
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CTransformResolverTest : XsltApiTestCaseBase2, IDisposable
{
private ITestOutputHelper _output;
@@ -2615,6 +2625,7 @@ namespace System.Xml.XslCompiledTransformApiTests
//[TestCase(Name = "XslCompiledTransform.Transform(String, String) : Reader , String", Desc = "READER,STREAM")]
//[TestCase(Name = "XslCompiledTransform.Transform(String, String) : URI, String", Desc = "URI,STREAM")]
//[TestCase(Name = "XslCompiledTransform.Transform(String, String) : Navigator, String", Desc = "NAVIGATOR,STREAM")]
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CTransformStrStrTest : XsltApiTestCaseBase2
{
private ITestOutputHelper _output;
@@ -2987,6 +2998,7 @@ namespace System.Xml.XslCompiledTransformApiTests
//[TestCase(Name = "XslCompiledTransform.Transform(String, String, Resolver) : Reader , String", Desc = "READER,STREAM")]
//[TestCase(Name = "XslCompiledTransform.Transform(String, String, Resolver) : URI, String", Desc = "URI,STREAM")]
//[TestCase(Name = "XslCompiledTransform.Transform(String, String, Resolver) : Navigator, String", Desc = "NAVIGATOR,STREAM")]
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CTransformStrStrResolverTest : XsltApiTestCaseBase2, IDisposable
{
private ITestOutputHelper _output;
@@ -3091,6 +3103,7 @@ namespace System.Xml.XslCompiledTransformApiTests
//[TestCase(Name = "XslCompiledTransform.Transform(IXPathNavigable, XsltArgumentList, XmlWriter, XmlResolver)", Desc = "Constructor Tests", Param = "IXPathNavigable")]
//[TestCase(Name = "XslCompiledTransform.Transform(XmlReader, XsltArgumentList, XmlWriter, XmlResolver)", Desc = "Constructor Tests", Param = "XmlReader")]
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CTransformConstructorWithFourParametersTest : XsltApiTestCaseBase2
{
private ITestOutputHelper _output;
@@ -3295,6 +3308,7 @@ namespace System.Xml.XslCompiledTransformApiTests
// This testcase is for bugs 109429, 111075 and 109644 fixed in Everett SP1
//[TestCase(Name = "NDP1_1SP1 Bugs (URI,STREAM)", Desc = "URI,STREAM")]
//[TestCase(Name = "NDP1_1SP1 Bugs (NAVIGATOR,TEXTWRITER)", Desc = "NAVIGATOR,TEXTWRITER")]
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CNDP1_1SP1Test : XsltApiTestCaseBase2
{
private ITestOutputHelper _output;
@@ -3386,6 +3400,7 @@ param2 (correct answer is 'local-param2-arg'): local-param2-arg
}
//[TestCase(Name = "XslCompiledTransform Regression Tests for API", Desc = "XslCompiledTransform Regression Tests")]
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CTransformRegressionTest : XsltApiTestCaseBase2, IDisposable
{
private ITestOutputHelper _output;
diff --git a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslCompilerTests.cs b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslCompilerTests.cs
index b788db89bfd..77230c4d625 100644
--- a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslCompilerTests.cs
+++ b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslCompilerTests.cs
@@ -7,6 +7,7 @@ using Xunit;
namespace System.Xml.XslCompiledTransformApiTests
{
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class XslCompilerTests
{
[Fact]
diff --git a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslTransformMultith.cs b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslTransformMultith.cs
index 0532519a87e..5699868c280 100644
--- a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslTransformMultith.cs
+++ b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslTransformMultith.cs
@@ -35,6 +35,7 @@ namespace System.Xml.XslCompiledTransformApiTests
}
//[TestCase(Name = "Same instance testing: Transform() - READER")]
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class SameInstanceXslTransformReader : SameInstanceXslTransformTestCase
{
private XPathDocument _xd; // Loads XML file
@@ -318,6 +319,7 @@ namespace System.Xml.XslCompiledTransformApiTests
}
//[TestCase(Name = "Same instance testing: Transform() - TEXTWRITER")]
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class SameInstanceXslTransformWriter : SameInstanceXslTransformTestCase
{
private XPathDocument _xd; // Loads XML file
diff --git a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltApiV2.cs b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltApiV2.cs
index 6184bfc0e31..0e7dd962fce 100644
--- a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltApiV2.cs
+++ b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltApiV2.cs
@@ -37,6 +37,7 @@ namespace System.Xml.XslCompiledTransformApiTests
// Base class for test cases
//
////////////////////////////////////////////////////////////////
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class XsltApiTestCaseBase2
{
// Generic data for all derived test cases
diff --git a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltArgumentList.cs b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltArgumentList.cs
index 5e9d7a877cc..6bf0e435b2e 100644
--- a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltArgumentList.cs
+++ b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltArgumentList.cs
@@ -17,6 +17,7 @@ namespace System.Xml.XslCompiledTransformApiTests
/***********************************************************/
//[TestCase(Name = "XsltArgumentList - GetParam", Desc = "Get Param Test Cases")]
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CArgIntegrity : XsltApiTestCaseBase2
{
private ITestOutputHelper _output;
diff --git a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltArgumentListMultith.cs b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltArgumentListMultith.cs
index 39a6646ecaf..bfa3788d0c9 100644
--- a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltArgumentListMultith.cs
+++ b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltArgumentListMultith.cs
@@ -55,6 +55,7 @@ namespace System.Xml.XslCompiledTransformApiTests
}
//[TestCase(Name = "Same instance testing: XsltArgList - GetParam", Desc = "GetParam test cases")]
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CSameInstanceXsltArgumentListGetParam : CSameInstanceXsltArgTestCase2
{
private ITestOutputHelper _output;
@@ -140,6 +141,7 @@ namespace System.Xml.XslCompiledTransformApiTests
}
//[TestCase(Name = "Same instance testing: XsltArgList - GetExtensionObject", Desc = "GetExtensionObject test cases")]
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CSameInstanceXsltArgumentListGetExtnObject : CSameInstanceXsltArgTestCase2
{
private ITestOutputHelper _output;
@@ -224,6 +226,7 @@ namespace System.Xml.XslCompiledTransformApiTests
}
//[TestCase(Name = "Same instance testing: XsltArgList - Transform", Desc = "Multiple transforms")]
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CSameInstanceXsltArgumentListTransform : CSameInstanceXsltArgTestCase2
{
private ITestOutputHelper _output;
diff --git a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltSettings.cs b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltSettings.cs
index 0ef104833f8..e780f556cfd 100644
--- a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltSettings.cs
+++ b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltSettings.cs
@@ -13,6 +13,7 @@ namespace System.Xml.XslCompiledTransformApiTests
{
//[TestCase(Name = "XsltSettings-Retail", Desc = "This testcase tests the different settings on XsltSettings and the corresponding behavior in retail mode", Param = "Retail")]
//[TestCase(Name = "XsltSettings-Debug", Desc = "This testcase tests the different settings on XsltSettings and the corresponding behavior in debug mode", Param = "Debug")]
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CXsltSettings : XsltApiTestCaseBase2
{
private ITestOutputHelper _output;
diff --git a/src/libraries/System.Private.Xml/tests/Xslt/XslTransformApi/ExceptionVerifier.cs b/src/libraries/System.Private.Xml/tests/Xslt/XslTransformApi/ExceptionVerifier.cs
deleted file mode 100644
index 3cd3490ef9c..00000000000
--- a/src/libraries/System.Private.Xml/tests/Xslt/XslTransformApi/ExceptionVerifier.cs
+++ /dev/null
@@ -1,397 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.Collections;
-using System.Globalization;
-using System.IO;
-using System.Linq;
-using System.Reflection;
-using System.Resources;
-using System.Text.RegularExpressions;
-using Xunit.Abstractions;
-
-namespace System.Xml.Tests
-{
- public class LineInfo
- {
- public int LineNumber { get; private set; }
-
- public int LinePosition { get; private set; }
-
- public string FilePath { get; private set; }
-
- public LineInfo(int lineNum, int linePos)
- {
- LineNumber = lineNum;
- LinePosition = linePos;
- FilePath = string.Empty;
- }
-
- public LineInfo(int lineNum, int linePos, string filePath)
- {
- LineNumber = lineNum;
- LinePosition = linePos;
- FilePath = filePath;
- }
- }
-
- [Flags]
- public enum ExceptionVerificationFlags
- {
- None = 0,
- IgnoreMultipleDots = 1,
- IgnoreLineInfo = 2,
- }
-
- public class ExceptionVerifier
- {
- private readonly Assembly _asm;
- private Assembly _locAsm;
- private readonly Hashtable _resources;
-
- private string _actualMessage;
- private string _expectedMessage;
- private Exception _ex;
-
- private ExceptionVerificationFlags _verificationFlags = ExceptionVerificationFlags.None;
-
- private ITestOutputHelper _output;
-
- public bool IgnoreMultipleDots
- {
- get
- {
- return (_verificationFlags & ExceptionVerificationFlags.IgnoreMultipleDots) != 0;
- }
- set
- {
- if (value)
- _verificationFlags = _verificationFlags | ExceptionVerificationFlags.IgnoreMultipleDots;
- else
- _verificationFlags = _verificationFlags & (~ExceptionVerificationFlags.IgnoreMultipleDots);
- }
- }
-
- public bool IgnoreLineInfo
- {
- get
- {
- return (_verificationFlags & ExceptionVerificationFlags.IgnoreLineInfo) != 0;
- }
- set
- {
- if (value)
- _verificationFlags = _verificationFlags | ExceptionVerificationFlags.IgnoreLineInfo;
- else
- _verificationFlags = _verificationFlags & (~ExceptionVerificationFlags.IgnoreLineInfo);
- }
- }
-
- private const string ESCAPE_ANY = "~%anything%~";
- private const string ESCAPE_NUMBER = "~%number%~";
-
- public ExceptionVerifier(string assemblyName, ExceptionVerificationFlags flags, ITestOutputHelper output)
- {
- _output = output;
-
- if (assemblyName == null)
- throw new VerifyException("Assembly name cannot be null");
-
- _verificationFlags = flags;
-
- try
- {
- switch (assemblyName.ToUpper())
- {
- case "SYSTEM.XML":
- {
- var dom = new XmlDocument();
- _asm = dom.GetType().Assembly;
- }
- break;
- default:
- _asm = Assembly.LoadFrom(GetRuntimeInstallDir() + assemblyName + ".dll");
- break;
- }
-
- if (_asm == null)
- throw new VerifyException("Can not load assembly " + assemblyName);
-
- // let's determine if this is a loc run, if it is then we need to load satellite assembly
- _locAsm = null;
- if (!CultureInfo.CurrentCulture.Equals(new CultureInfo("en-US")) && !CultureInfo.CurrentCulture.Equals(new CultureInfo("en")))
- {
- try
- {
- // load satellite assembly
- _locAsm = _asm.GetSatelliteAssembly(new CultureInfo(CultureInfo.CurrentCulture.Parent.IetfLanguageTag));
- }
- catch (FileNotFoundException e1)
- {
- _output.WriteLine(e1.ToString());
- }
- catch (FileLoadException e2)
- {
- _output.WriteLine(e2.ToString());
- }
- }
- }
- catch (Exception e)
- {
- _output.WriteLine("Exception: " + e.Message);
- _output.WriteLine("Stack: " + e.StackTrace);
- throw new VerifyException("Error while loading assembly");
- }
-
- string[] resArray;
- Stream resStream = null;
- var bFound = false;
-
- // Check that assembly manifest has resources
- if (null != _locAsm)
- resArray = _locAsm.GetManifestResourceNames();
- else
- resArray = _asm.GetManifestResourceNames();
-
- foreach (var s in resArray)
- {
- if (s.EndsWith(".resources"))
- {
- resStream = null != _locAsm ? _locAsm.GetManifestResourceStream(s) : _asm.GetManifestResourceStream(s);
- bFound = true;
- if (bFound && resStream != null)
- {
- // Populate hashtable from resources
- var resReader = new ResourceReader(resStream);
- if (_resources == null)
- {
- _resources = new Hashtable();
- }
- var ide = resReader.GetEnumerator();
- while (ide.MoveNext())
- {
- if (!_resources.ContainsKey(ide.Key.ToString()))
- _resources.Add(ide.Key.ToString(), ide.Value.ToString());
- }
- resReader.Dispose();
- }
- }
- }
-
- if (!bFound || resStream == null)
- throw new VerifyException("GetManifestResourceStream() failed");
- }
-
- private static string GetRuntimeInstallDir()
- {
- // Get mscorlib path
- var s = typeof(object).Module.FullyQualifiedName;
- // Remove mscorlib.dll from the path
- return Directory.GetParent(s).ToString() + "\\";
- }
-
- public ExceptionVerifier(string assemblyName, ITestOutputHelper output)
- : this(assemblyName, ExceptionVerificationFlags.None, output)
- { }
-
- private void ExceptionInfoOutput()
- {
- // Use reflection to obtain "res" property value
- var exceptionType = _ex.GetType();
- var fInfo = exceptionType.GetField("res", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.IgnoreCase) ??
- exceptionType.BaseType.GetField("res", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.IgnoreCase);
-
- if (fInfo == null)
- throw new VerifyException("Cannot obtain Resource ID from Exception.");
-
- _output.WriteLine(
- "\n===== Original Exception Message =====\n" + _ex.Message +
- "\n===== Resource Id =====\n" + fInfo.GetValue(_ex) +
- "\n===== HelpLink =====\n" + _ex.HelpLink +
- "\n===== Source =====\n" + _ex.Source);
-
- _output.WriteLine(
- "\n===== InnerException =====\n" + _ex.InnerException +
- "\n===== StackTrace =====\n" + _ex.StackTrace);
- }
-
- public string[] ReturnAllMatchingResIds(string message)
- {
- var ide = _resources.GetEnumerator();
- var list = new ArrayList();
-
- _output.WriteLine("===== All mached ResIDs =====");
- while (ide.MoveNext())
- {
- var resMessage = ide.Value.ToString();
-
- resMessage = ESCAPE_ANY + Regex.Replace(resMessage, @"\{\d*\}", ESCAPE_ANY) + ESCAPE_ANY;
- resMessage = MakeEscapes(resMessage).Replace(ESCAPE_ANY, ".*");
- if (Regex.Match(message, resMessage, RegexOptions.Singleline).ToString() == message)
- {
- list.Add(ide.Key);
- _output.WriteLine(" [" + ide.Key.ToString() + "] = \"" + ide.Value.ToString() + "\"");
- }
- }
-
- return (string[])list.ToArray(typeof(string[]));
- }
-
- // Common helper methods used by different overloads of IsExceptionOk()
- private static void CheckNull(Exception e)
- {
- if (e == null)
- {
- throw new VerifyException("NULL exception passed to IsExceptionOk()");
- }
- }
-
- private void CompareMessages()
- {
- if (IgnoreMultipleDots && _expectedMessage.EndsWith("."))
- _expectedMessage = _expectedMessage.TrimEnd(new char[] { '.' }) + ".";
- _expectedMessage = Regex.Escape(_expectedMessage);
- _expectedMessage = _expectedMessage.Replace(ESCAPE_ANY, ".*");
- _expectedMessage = _expectedMessage.Replace(ESCAPE_NUMBER, @"\d*");
-
- // ignore case
- _expectedMessage = _expectedMessage.ToLowerInvariant();
- _actualMessage = _actualMessage.ToLowerInvariant();
-
- if (Regex.Match(_actualMessage, _expectedMessage, RegexOptions.Singleline).ToString() != _actualMessage)
- {
- // Unescape before printing the expected message string
- _expectedMessage = Regex.Unescape(_expectedMessage);
- _output.WriteLine("Mismatch in error message");
- _output.WriteLine("===== Expected Message =====\n" + _expectedMessage);
- _output.WriteLine("===== Expected Message Length =====\n" + _expectedMessage.Length);
- _output.WriteLine("===== Actual Message =====\n" + _actualMessage);
- _output.WriteLine("===== Actual Message Length =====\n" + _actualMessage.Length);
- throw new VerifyException("Mismatch in error message");
- }
- }
-
- public void IsExceptionOk(Exception e, string expectedResId)
- {
- CheckNull(e);
- _ex = e;
- if (expectedResId == null)
- {
- // Pint actual exception info and quit
- // This can be used to dump exception properties, verify them and then plug them into our expected results
- ExceptionInfoOutput();
- throw new VerifyException("Did not pass resource ID to verify");
- }
-
- IsExceptionOk(e, new object[] { expectedResId });
- }
-
- public void IsExceptionOk(Exception e, string expectedResId, string[] paramValues)
- {
- var list = new ArrayList { expectedResId };
-
- foreach (var param in paramValues)
- list.Add(param);
-
- IsExceptionOk(e, list.ToArray());
- }
-
- public void IsExceptionOk(Exception e, string expectedResId, string[] paramValues, LineInfo lineInfo)
- {
- var list = new ArrayList { expectedResId, lineInfo };
-
- foreach (var param in paramValues)
- list.Add(param);
-
- IsExceptionOk(e, list.ToArray());
- }
-
- public void IsExceptionOk(Exception e, object[] IdsAndParams)
- {
- CheckNull(e);
- _ex = e;
-
- _actualMessage = e.Message;
- _expectedMessage = ConstructExpectedMessage(IdsAndParams);
-
- CompareMessages();
- }
-
- private static string MakeEscapes(string str)
- {
- return new[] { "\\", "$", "{", "[", "(", "|", ")", "*", "+", "?" }.Aggregate(str, (current, esc) => current.Replace(esc, "\\" + esc));
- }
-
- public string ConstructExpectedMessage(object[] IdsAndParams)
- {
- var lineInfoMessage = "";
- var paramList = new ArrayList();
- var paramsStartPosition = 1;
-
- // Verify that input list contains at least one element - ResId
- if (IdsAndParams.Length == 0 || !(IdsAndParams[0] is string))
- throw new VerifyException("ResID at IDsAndParams[0] missing!");
- string expectedResId = (IdsAndParams[0] as string);
-
- // Verify that resource id exists in resources
- if (!_resources.ContainsKey(expectedResId))
- {
- ExceptionInfoOutput();
- throw new VerifyException("Resources in [" + _asm.GetName().Name + "] does not contain string resource: " + expectedResId);
- }
-
- // If LineInfo exist, construct LineInfo message
- if (IdsAndParams.Length > 1 && (IdsAndParams[1] is LineInfo))
- {
- if (!IgnoreLineInfo)
- {
- var lineInfo = (IdsAndParams[1] as LineInfo);
-
- // Xml_ErrorPosition = "Line {0}, position {1}."
- lineInfoMessage = string.IsNullOrEmpty(lineInfo.FilePath) ? _resources["Xml_ErrorPosition"].ToString() : _resources["Xml_ErrorFilePosition"].ToString();
-
- var lineNumber = lineInfo.LineNumber.ToString();
- var linePosition = lineInfo.LinePosition.ToString();
- lineInfoMessage = string.IsNullOrEmpty(lineInfo.FilePath) ? string.Format(lineInfoMessage, lineNumber, linePosition) : string.Format(lineInfoMessage, lineInfo.FilePath, lineNumber, linePosition);
- }
- else
- lineInfoMessage = ESCAPE_ANY;
-
- lineInfoMessage = " " + lineInfoMessage;
- paramsStartPosition = 2;
- }
-
- string message = _resources[expectedResId].ToString();
- for (var i = paramsStartPosition; i < IdsAndParams.Length; i++)
- {
- if (IdsAndParams[i] is object[])
- paramList.Add(ConstructExpectedMessage(IdsAndParams[i] as object[]));
- else
- {
- if (IdsAndParams[i] == null)
- paramList.Add(ESCAPE_ANY);
- else
- paramList.Add(IdsAndParams[i] as string);
- }
- }
-
- try
- {
- message = string.Format(message, paramList.ToArray());
- }
- catch (FormatException)
- {
- throw new VerifyException("Mismatch in number of parameters!");
- }
-
- return message + lineInfoMessage;
- }
- }
-
- public class VerifyException : Exception
- {
- public VerifyException(string msg)
- : base(msg)
- { }
- }
-}
diff --git a/src/libraries/System.Reflection.Context/tests/CustomReflectionContextTests.cs b/src/libraries/System.Reflection.Context/tests/CustomReflectionContextTests.cs
index 18636bf7a03..b23d5a7cbfe 100644
--- a/src/libraries/System.Reflection.Context/tests/CustomReflectionContextTests.cs
+++ b/src/libraries/System.Reflection.Context/tests/CustomReflectionContextTests.cs
@@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Xunit;
@@ -65,6 +66,7 @@ namespace System.Reflection.Context.Tests
}
[Fact]
+ [DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(ICloneable))]
[ActiveIssue("https://github.com/mono/mono/issues/15191", TestRuntimes.Mono)]
public void MapType_Interface_Throws()
{
diff --git a/src/libraries/System.Reflection.Emit.ILGeneration/System.Reflection.Emit.ILGeneration.sln b/src/libraries/System.Reflection.Emit.ILGeneration/System.Reflection.Emit.ILGeneration.sln
index 225e615fd32..21bd0ffaeee 100644
--- a/src/libraries/System.Reflection.Emit.ILGeneration/System.Reflection.Emit.ILGeneration.sln
+++ b/src/libraries/System.Reflection.Emit.ILGeneration/System.Reflection.Emit.ILGeneration.sln
@@ -7,6 +7,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Collections", "..\Sy
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{8843EA69-AD8F-4C73-8436-1641470199DC}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{132E55C7-7862-45EB-A8D3-0B795FF75FE0}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reflection.Emit.ILGeneration", "ref\System.Reflection.Emit.ILGeneration.csproj", "{64BBA40A-8DB5-4829-815A-3D612A12222D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reflection.Emit.ILGeneration", "src\System.Reflection.Emit.ILGeneration.csproj", "{A18E814C-13D6-4859-B6FA-3CAB8673B31F}"
@@ -75,11 +77,8 @@ Global
{05696F45-ACF1-4C02-B8D9-E8C1F5E28717}.Release|x86.ActiveCfg = Release|Any CPU
{05696F45-ACF1-4C02-B8D9-E8C1F5E28717}.Release|x86.Build.0 = Release|Any CPU
{05696F45-ACF1-4C02-B8D9-E8C1F5E28717}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {05696F45-ACF1-4C02-B8D9-E8C1F5E28717}.Checked|Any CPU.Build.0 = Debug|Any CPU
{05696F45-ACF1-4C02-B8D9-E8C1F5E28717}.Checked|x64.ActiveCfg = Debug|Any CPU
- {05696F45-ACF1-4C02-B8D9-E8C1F5E28717}.Checked|x64.Build.0 = Debug|Any CPU
{05696F45-ACF1-4C02-B8D9-E8C1F5E28717}.Checked|x86.ActiveCfg = Debug|Any CPU
- {05696F45-ACF1-4C02-B8D9-E8C1F5E28717}.Checked|x86.Build.0 = Debug|Any CPU
{5EC8FDE3-DD46-4D89-80AC-AEF571C405B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5EC8FDE3-DD46-4D89-80AC-AEF571C405B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5EC8FDE3-DD46-4D89-80AC-AEF571C405B1}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -93,11 +92,8 @@ Global
{5EC8FDE3-DD46-4D89-80AC-AEF571C405B1}.Release|x86.ActiveCfg = Release|Any CPU
{5EC8FDE3-DD46-4D89-80AC-AEF571C405B1}.Release|x86.Build.0 = Release|Any CPU
{5EC8FDE3-DD46-4D89-80AC-AEF571C405B1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {5EC8FDE3-DD46-4D89-80AC-AEF571C405B1}.Checked|Any CPU.Build.0 = Debug|Any CPU
{5EC8FDE3-DD46-4D89-80AC-AEF571C405B1}.Checked|x64.ActiveCfg = Debug|Any CPU
- {5EC8FDE3-DD46-4D89-80AC-AEF571C405B1}.Checked|x64.Build.0 = Debug|Any CPU
{5EC8FDE3-DD46-4D89-80AC-AEF571C405B1}.Checked|x86.ActiveCfg = Debug|Any CPU
- {5EC8FDE3-DD46-4D89-80AC-AEF571C405B1}.Checked|x86.Build.0 = Debug|Any CPU
{8843EA69-AD8F-4C73-8436-1641470199DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8843EA69-AD8F-4C73-8436-1641470199DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8843EA69-AD8F-4C73-8436-1641470199DC}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -111,11 +107,23 @@ Global
{8843EA69-AD8F-4C73-8436-1641470199DC}.Release|x86.ActiveCfg = Release|Any CPU
{8843EA69-AD8F-4C73-8436-1641470199DC}.Release|x86.Build.0 = Release|Any CPU
{8843EA69-AD8F-4C73-8436-1641470199DC}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {8843EA69-AD8F-4C73-8436-1641470199DC}.Checked|Any CPU.Build.0 = Debug|Any CPU
{8843EA69-AD8F-4C73-8436-1641470199DC}.Checked|x64.ActiveCfg = Debug|Any CPU
- {8843EA69-AD8F-4C73-8436-1641470199DC}.Checked|x64.Build.0 = Debug|Any CPU
{8843EA69-AD8F-4C73-8436-1641470199DC}.Checked|x86.ActiveCfg = Debug|Any CPU
- {8843EA69-AD8F-4C73-8436-1641470199DC}.Checked|x86.Build.0 = Debug|Any CPU
+ {132E55C7-7862-45EB-A8D3-0B795FF75FE0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {132E55C7-7862-45EB-A8D3-0B795FF75FE0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {132E55C7-7862-45EB-A8D3-0B795FF75FE0}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {132E55C7-7862-45EB-A8D3-0B795FF75FE0}.Debug|x64.Build.0 = Debug|Any CPU
+ {132E55C7-7862-45EB-A8D3-0B795FF75FE0}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {132E55C7-7862-45EB-A8D3-0B795FF75FE0}.Debug|x86.Build.0 = Debug|Any CPU
+ {132E55C7-7862-45EB-A8D3-0B795FF75FE0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {132E55C7-7862-45EB-A8D3-0B795FF75FE0}.Release|Any CPU.Build.0 = Release|Any CPU
+ {132E55C7-7862-45EB-A8D3-0B795FF75FE0}.Release|x64.ActiveCfg = Release|Any CPU
+ {132E55C7-7862-45EB-A8D3-0B795FF75FE0}.Release|x64.Build.0 = Release|Any CPU
+ {132E55C7-7862-45EB-A8D3-0B795FF75FE0}.Release|x86.ActiveCfg = Release|Any CPU
+ {132E55C7-7862-45EB-A8D3-0B795FF75FE0}.Release|x86.Build.0 = Release|Any CPU
+ {132E55C7-7862-45EB-A8D3-0B795FF75FE0}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {132E55C7-7862-45EB-A8D3-0B795FF75FE0}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {132E55C7-7862-45EB-A8D3-0B795FF75FE0}.Checked|x86.ActiveCfg = Debug|Any CPU
{64BBA40A-8DB5-4829-815A-3D612A12222D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{64BBA40A-8DB5-4829-815A-3D612A12222D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{64BBA40A-8DB5-4829-815A-3D612A12222D}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -129,11 +137,8 @@ Global
{64BBA40A-8DB5-4829-815A-3D612A12222D}.Release|x86.ActiveCfg = Release|Any CPU
{64BBA40A-8DB5-4829-815A-3D612A12222D}.Release|x86.Build.0 = Release|Any CPU
{64BBA40A-8DB5-4829-815A-3D612A12222D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {64BBA40A-8DB5-4829-815A-3D612A12222D}.Checked|Any CPU.Build.0 = Debug|Any CPU
{64BBA40A-8DB5-4829-815A-3D612A12222D}.Checked|x64.ActiveCfg = Debug|Any CPU
- {64BBA40A-8DB5-4829-815A-3D612A12222D}.Checked|x64.Build.0 = Debug|Any CPU
{64BBA40A-8DB5-4829-815A-3D612A12222D}.Checked|x86.ActiveCfg = Debug|Any CPU
- {64BBA40A-8DB5-4829-815A-3D612A12222D}.Checked|x86.Build.0 = Debug|Any CPU
{A18E814C-13D6-4859-B6FA-3CAB8673B31F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A18E814C-13D6-4859-B6FA-3CAB8673B31F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A18E814C-13D6-4859-B6FA-3CAB8673B31F}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -147,11 +152,8 @@ Global
{A18E814C-13D6-4859-B6FA-3CAB8673B31F}.Release|x86.ActiveCfg = Release|Any CPU
{A18E814C-13D6-4859-B6FA-3CAB8673B31F}.Release|x86.Build.0 = Release|Any CPU
{A18E814C-13D6-4859-B6FA-3CAB8673B31F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {A18E814C-13D6-4859-B6FA-3CAB8673B31F}.Checked|Any CPU.Build.0 = Debug|Any CPU
{A18E814C-13D6-4859-B6FA-3CAB8673B31F}.Checked|x64.ActiveCfg = Debug|Any CPU
- {A18E814C-13D6-4859-B6FA-3CAB8673B31F}.Checked|x64.Build.0 = Debug|Any CPU
{A18E814C-13D6-4859-B6FA-3CAB8673B31F}.Checked|x86.ActiveCfg = Debug|Any CPU
- {A18E814C-13D6-4859-B6FA-3CAB8673B31F}.Checked|x86.Build.0 = Debug|Any CPU
{EA6F01DF-1F63-49FF-A6E8-CA9104296196}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EA6F01DF-1F63-49FF-A6E8-CA9104296196}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EA6F01DF-1F63-49FF-A6E8-CA9104296196}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -165,11 +167,8 @@ Global
{EA6F01DF-1F63-49FF-A6E8-CA9104296196}.Release|x86.ActiveCfg = Release|Any CPU
{EA6F01DF-1F63-49FF-A6E8-CA9104296196}.Release|x86.Build.0 = Release|Any CPU
{EA6F01DF-1F63-49FF-A6E8-CA9104296196}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {EA6F01DF-1F63-49FF-A6E8-CA9104296196}.Checked|Any CPU.Build.0 = Debug|Any CPU
{EA6F01DF-1F63-49FF-A6E8-CA9104296196}.Checked|x64.ActiveCfg = Debug|Any CPU
- {EA6F01DF-1F63-49FF-A6E8-CA9104296196}.Checked|x64.Build.0 = Debug|Any CPU
{EA6F01DF-1F63-49FF-A6E8-CA9104296196}.Checked|x86.ActiveCfg = Debug|Any CPU
- {EA6F01DF-1F63-49FF-A6E8-CA9104296196}.Checked|x86.Build.0 = Debug|Any CPU
{1F1F9925-48BB-4384-9C46-ADBDCC7E72D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1F1F9925-48BB-4384-9C46-ADBDCC7E72D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1F1F9925-48BB-4384-9C46-ADBDCC7E72D1}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -183,11 +182,8 @@ Global
{1F1F9925-48BB-4384-9C46-ADBDCC7E72D1}.Release|x86.ActiveCfg = Release|Any CPU
{1F1F9925-48BB-4384-9C46-ADBDCC7E72D1}.Release|x86.Build.0 = Release|Any CPU
{1F1F9925-48BB-4384-9C46-ADBDCC7E72D1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {1F1F9925-48BB-4384-9C46-ADBDCC7E72D1}.Checked|Any CPU.Build.0 = Debug|Any CPU
{1F1F9925-48BB-4384-9C46-ADBDCC7E72D1}.Checked|x64.ActiveCfg = Debug|Any CPU
- {1F1F9925-48BB-4384-9C46-ADBDCC7E72D1}.Checked|x64.Build.0 = Debug|Any CPU
{1F1F9925-48BB-4384-9C46-ADBDCC7E72D1}.Checked|x86.ActiveCfg = Debug|Any CPU
- {1F1F9925-48BB-4384-9C46-ADBDCC7E72D1}.Checked|x86.Build.0 = Debug|Any CPU
{FFA71ACB-EAD8-4242-A5D6-FBB3F704949D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FFA71ACB-EAD8-4242-A5D6-FBB3F704949D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FFA71ACB-EAD8-4242-A5D6-FBB3F704949D}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -201,11 +197,8 @@ Global
{FFA71ACB-EAD8-4242-A5D6-FBB3F704949D}.Release|x86.ActiveCfg = Release|Any CPU
{FFA71ACB-EAD8-4242-A5D6-FBB3F704949D}.Release|x86.Build.0 = Release|Any CPU
{FFA71ACB-EAD8-4242-A5D6-FBB3F704949D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {FFA71ACB-EAD8-4242-A5D6-FBB3F704949D}.Checked|Any CPU.Build.0 = Debug|Any CPU
{FFA71ACB-EAD8-4242-A5D6-FBB3F704949D}.Checked|x64.ActiveCfg = Debug|Any CPU
- {FFA71ACB-EAD8-4242-A5D6-FBB3F704949D}.Checked|x64.Build.0 = Debug|Any CPU
{FFA71ACB-EAD8-4242-A5D6-FBB3F704949D}.Checked|x86.ActiveCfg = Debug|Any CPU
- {FFA71ACB-EAD8-4242-A5D6-FBB3F704949D}.Checked|x86.Build.0 = Debug|Any CPU
{3461E542-7F19-4B98-B206-BDF932529A5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3461E542-7F19-4B98-B206-BDF932529A5B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3461E542-7F19-4B98-B206-BDF932529A5B}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -219,11 +212,8 @@ Global
{3461E542-7F19-4B98-B206-BDF932529A5B}.Release|x86.ActiveCfg = Release|Any CPU
{3461E542-7F19-4B98-B206-BDF932529A5B}.Release|x86.Build.0 = Release|Any CPU
{3461E542-7F19-4B98-B206-BDF932529A5B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {3461E542-7F19-4B98-B206-BDF932529A5B}.Checked|Any CPU.Build.0 = Debug|Any CPU
{3461E542-7F19-4B98-B206-BDF932529A5B}.Checked|x64.ActiveCfg = Debug|Any CPU
- {3461E542-7F19-4B98-B206-BDF932529A5B}.Checked|x64.Build.0 = Debug|Any CPU
{3461E542-7F19-4B98-B206-BDF932529A5B}.Checked|x86.ActiveCfg = Debug|Any CPU
- {3461E542-7F19-4B98-B206-BDF932529A5B}.Checked|x86.Build.0 = Debug|Any CPU
{D2A00A5C-148B-43D2-BD72-4B70D8E990EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D2A00A5C-148B-43D2-BD72-4B70D8E990EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D2A00A5C-148B-43D2-BD72-4B70D8E990EB}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -237,11 +227,8 @@ Global
{D2A00A5C-148B-43D2-BD72-4B70D8E990EB}.Release|x86.ActiveCfg = Release|Any CPU
{D2A00A5C-148B-43D2-BD72-4B70D8E990EB}.Release|x86.Build.0 = Release|Any CPU
{D2A00A5C-148B-43D2-BD72-4B70D8E990EB}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {D2A00A5C-148B-43D2-BD72-4B70D8E990EB}.Checked|Any CPU.Build.0 = Debug|Any CPU
{D2A00A5C-148B-43D2-BD72-4B70D8E990EB}.Checked|x64.ActiveCfg = Debug|Any CPU
- {D2A00A5C-148B-43D2-BD72-4B70D8E990EB}.Checked|x64.Build.0 = Debug|Any CPU
{D2A00A5C-148B-43D2-BD72-4B70D8E990EB}.Checked|x86.ActiveCfg = Debug|Any CPU
- {D2A00A5C-148B-43D2-BD72-4B70D8E990EB}.Checked|x86.Build.0 = Debug|Any CPU
{81204A19-8DF3-461B-A5FE-7B85149F5CCD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{81204A19-8DF3-461B-A5FE-7B85149F5CCD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{81204A19-8DF3-461B-A5FE-7B85149F5CCD}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -255,11 +242,8 @@ Global
{81204A19-8DF3-461B-A5FE-7B85149F5CCD}.Release|x86.ActiveCfg = Release|Any CPU
{81204A19-8DF3-461B-A5FE-7B85149F5CCD}.Release|x86.Build.0 = Release|Any CPU
{81204A19-8DF3-461B-A5FE-7B85149F5CCD}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {81204A19-8DF3-461B-A5FE-7B85149F5CCD}.Checked|Any CPU.Build.0 = Debug|Any CPU
{81204A19-8DF3-461B-A5FE-7B85149F5CCD}.Checked|x64.ActiveCfg = Debug|Any CPU
- {81204A19-8DF3-461B-A5FE-7B85149F5CCD}.Checked|x64.Build.0 = Debug|Any CPU
{81204A19-8DF3-461B-A5FE-7B85149F5CCD}.Checked|x86.ActiveCfg = Debug|Any CPU
- {81204A19-8DF3-461B-A5FE-7B85149F5CCD}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -270,6 +254,7 @@ Global
{05696F45-ACF1-4C02-B8D9-E8C1F5E28717} = {61C529DF-66C4-42E9-AE70-3427838FAFE3}
{EA6F01DF-1F63-49FF-A6E8-CA9104296196} = {61C529DF-66C4-42E9-AE70-3427838FAFE3}
{5EC8FDE3-DD46-4D89-80AC-AEF571C405B1} = {A20A0878-5647-4145-B224-C390446B7676}
+ {132E55C7-7862-45EB-A8D3-0B795FF75FE0} = {A20A0878-5647-4145-B224-C390446B7676}
{64BBA40A-8DB5-4829-815A-3D612A12222D} = {A20A0878-5647-4145-B224-C390446B7676}
{1F1F9925-48BB-4384-9C46-ADBDCC7E72D1} = {A20A0878-5647-4145-B224-C390446B7676}
{D2A00A5C-148B-43D2-BD72-4B70D8E990EB} = {A20A0878-5647-4145-B224-C390446B7676}
diff --git a/src/libraries/System.Reflection.Emit.Lightweight/System.Reflection.Emit.Lightweight.sln b/src/libraries/System.Reflection.Emit.Lightweight/System.Reflection.Emit.Lightweight.sln
index 27666745104..e1c404c6527 100644
--- a/src/libraries/System.Reflection.Emit.Lightweight/System.Reflection.Emit.Lightweight.sln
+++ b/src/libraries/System.Reflection.Emit.Lightweight/System.Reflection.Emit.Lightweight.sln
@@ -7,6 +7,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Collections", "..\Sy
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{165A3077-1F79-46E7-8BFA-88AACEB6D026}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{02D4729C-D5AE-4DB6-91D7-37786A8C3A20}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reflection.Emit.ILGeneration", "..\System.Reflection.Emit.ILGeneration\ref\System.Reflection.Emit.ILGeneration.csproj", "{419FD394-31D9-4539-9CC9-BBD5A1C3809C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reflection.Emit.Lightweight", "ref\System.Reflection.Emit.Lightweight.csproj", "{EE535D8F-D21B-4C18-A915-60E94CE19CA2}"
@@ -77,11 +79,8 @@ Global
{ECDDE645-347C-46D8-B6B6-BCFF6B9AFD4A}.Release|x86.ActiveCfg = Release|Any CPU
{ECDDE645-347C-46D8-B6B6-BCFF6B9AFD4A}.Release|x86.Build.0 = Release|Any CPU
{ECDDE645-347C-46D8-B6B6-BCFF6B9AFD4A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {ECDDE645-347C-46D8-B6B6-BCFF6B9AFD4A}.Checked|Any CPU.Build.0 = Debug|Any CPU
{ECDDE645-347C-46D8-B6B6-BCFF6B9AFD4A}.Checked|x64.ActiveCfg = Debug|Any CPU
- {ECDDE645-347C-46D8-B6B6-BCFF6B9AFD4A}.Checked|x64.Build.0 = Debug|Any CPU
{ECDDE645-347C-46D8-B6B6-BCFF6B9AFD4A}.Checked|x86.ActiveCfg = Debug|Any CPU
- {ECDDE645-347C-46D8-B6B6-BCFF6B9AFD4A}.Checked|x86.Build.0 = Debug|Any CPU
{9F022877-F110-4761-BA97-CC89BBC16D5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9F022877-F110-4761-BA97-CC89BBC16D5A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9F022877-F110-4761-BA97-CC89BBC16D5A}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -95,11 +94,8 @@ Global
{9F022877-F110-4761-BA97-CC89BBC16D5A}.Release|x86.ActiveCfg = Release|Any CPU
{9F022877-F110-4761-BA97-CC89BBC16D5A}.Release|x86.Build.0 = Release|Any CPU
{9F022877-F110-4761-BA97-CC89BBC16D5A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {9F022877-F110-4761-BA97-CC89BBC16D5A}.Checked|Any CPU.Build.0 = Debug|Any CPU
{9F022877-F110-4761-BA97-CC89BBC16D5A}.Checked|x64.ActiveCfg = Debug|Any CPU
- {9F022877-F110-4761-BA97-CC89BBC16D5A}.Checked|x64.Build.0 = Debug|Any CPU
{9F022877-F110-4761-BA97-CC89BBC16D5A}.Checked|x86.ActiveCfg = Debug|Any CPU
- {9F022877-F110-4761-BA97-CC89BBC16D5A}.Checked|x86.Build.0 = Debug|Any CPU
{165A3077-1F79-46E7-8BFA-88AACEB6D026}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{165A3077-1F79-46E7-8BFA-88AACEB6D026}.Debug|Any CPU.Build.0 = Debug|Any CPU
{165A3077-1F79-46E7-8BFA-88AACEB6D026}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -113,11 +109,23 @@ Global
{165A3077-1F79-46E7-8BFA-88AACEB6D026}.Release|x86.ActiveCfg = Release|Any CPU
{165A3077-1F79-46E7-8BFA-88AACEB6D026}.Release|x86.Build.0 = Release|Any CPU
{165A3077-1F79-46E7-8BFA-88AACEB6D026}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {165A3077-1F79-46E7-8BFA-88AACEB6D026}.Checked|Any CPU.Build.0 = Debug|Any CPU
{165A3077-1F79-46E7-8BFA-88AACEB6D026}.Checked|x64.ActiveCfg = Debug|Any CPU
- {165A3077-1F79-46E7-8BFA-88AACEB6D026}.Checked|x64.Build.0 = Debug|Any CPU
{165A3077-1F79-46E7-8BFA-88AACEB6D026}.Checked|x86.ActiveCfg = Debug|Any CPU
- {165A3077-1F79-46E7-8BFA-88AACEB6D026}.Checked|x86.Build.0 = Debug|Any CPU
+ {02D4729C-D5AE-4DB6-91D7-37786A8C3A20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {02D4729C-D5AE-4DB6-91D7-37786A8C3A20}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {02D4729C-D5AE-4DB6-91D7-37786A8C3A20}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {02D4729C-D5AE-4DB6-91D7-37786A8C3A20}.Debug|x64.Build.0 = Debug|Any CPU
+ {02D4729C-D5AE-4DB6-91D7-37786A8C3A20}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {02D4729C-D5AE-4DB6-91D7-37786A8C3A20}.Debug|x86.Build.0 = Debug|Any CPU
+ {02D4729C-D5AE-4DB6-91D7-37786A8C3A20}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {02D4729C-D5AE-4DB6-91D7-37786A8C3A20}.Release|Any CPU.Build.0 = Release|Any CPU
+ {02D4729C-D5AE-4DB6-91D7-37786A8C3A20}.Release|x64.ActiveCfg = Release|Any CPU
+ {02D4729C-D5AE-4DB6-91D7-37786A8C3A20}.Release|x64.Build.0 = Release|Any CPU
+ {02D4729C-D5AE-4DB6-91D7-37786A8C3A20}.Release|x86.ActiveCfg = Release|Any CPU
+ {02D4729C-D5AE-4DB6-91D7-37786A8C3A20}.Release|x86.Build.0 = Release|Any CPU
+ {02D4729C-D5AE-4DB6-91D7-37786A8C3A20}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {02D4729C-D5AE-4DB6-91D7-37786A8C3A20}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {02D4729C-D5AE-4DB6-91D7-37786A8C3A20}.Checked|x86.ActiveCfg = Debug|Any CPU
{419FD394-31D9-4539-9CC9-BBD5A1C3809C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{419FD394-31D9-4539-9CC9-BBD5A1C3809C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{419FD394-31D9-4539-9CC9-BBD5A1C3809C}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -131,11 +139,8 @@ Global
{419FD394-31D9-4539-9CC9-BBD5A1C3809C}.Release|x86.ActiveCfg = Release|Any CPU
{419FD394-31D9-4539-9CC9-BBD5A1C3809C}.Release|x86.Build.0 = Release|Any CPU
{419FD394-31D9-4539-9CC9-BBD5A1C3809C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {419FD394-31D9-4539-9CC9-BBD5A1C3809C}.Checked|Any CPU.Build.0 = Debug|Any CPU
{419FD394-31D9-4539-9CC9-BBD5A1C3809C}.Checked|x64.ActiveCfg = Debug|Any CPU
- {419FD394-31D9-4539-9CC9-BBD5A1C3809C}.Checked|x64.Build.0 = Debug|Any CPU
{419FD394-31D9-4539-9CC9-BBD5A1C3809C}.Checked|x86.ActiveCfg = Debug|Any CPU
- {419FD394-31D9-4539-9CC9-BBD5A1C3809C}.Checked|x86.Build.0 = Debug|Any CPU
{EE535D8F-D21B-4C18-A915-60E94CE19CA2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EE535D8F-D21B-4C18-A915-60E94CE19CA2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EE535D8F-D21B-4C18-A915-60E94CE19CA2}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -149,11 +154,8 @@ Global
{EE535D8F-D21B-4C18-A915-60E94CE19CA2}.Release|x86.ActiveCfg = Release|Any CPU
{EE535D8F-D21B-4C18-A915-60E94CE19CA2}.Release|x86.Build.0 = Release|Any CPU
{EE535D8F-D21B-4C18-A915-60E94CE19CA2}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {EE535D8F-D21B-4C18-A915-60E94CE19CA2}.Checked|Any CPU.Build.0 = Debug|Any CPU
{EE535D8F-D21B-4C18-A915-60E94CE19CA2}.Checked|x64.ActiveCfg = Debug|Any CPU
- {EE535D8F-D21B-4C18-A915-60E94CE19CA2}.Checked|x64.Build.0 = Debug|Any CPU
{EE535D8F-D21B-4C18-A915-60E94CE19CA2}.Checked|x86.ActiveCfg = Debug|Any CPU
- {EE535D8F-D21B-4C18-A915-60E94CE19CA2}.Checked|x86.Build.0 = Debug|Any CPU
{BC6947B4-C61B-4066-B75F-937992548E54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BC6947B4-C61B-4066-B75F-937992548E54}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BC6947B4-C61B-4066-B75F-937992548E54}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -167,11 +169,8 @@ Global
{BC6947B4-C61B-4066-B75F-937992548E54}.Release|x86.ActiveCfg = Release|Any CPU
{BC6947B4-C61B-4066-B75F-937992548E54}.Release|x86.Build.0 = Release|Any CPU
{BC6947B4-C61B-4066-B75F-937992548E54}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {BC6947B4-C61B-4066-B75F-937992548E54}.Checked|Any CPU.Build.0 = Debug|Any CPU
{BC6947B4-C61B-4066-B75F-937992548E54}.Checked|x64.ActiveCfg = Debug|Any CPU
- {BC6947B4-C61B-4066-B75F-937992548E54}.Checked|x64.Build.0 = Debug|Any CPU
{BC6947B4-C61B-4066-B75F-937992548E54}.Checked|x86.ActiveCfg = Debug|Any CPU
- {BC6947B4-C61B-4066-B75F-937992548E54}.Checked|x86.Build.0 = Debug|Any CPU
{13447BAB-2762-4CCC-95DF-531FC82FE39A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{13447BAB-2762-4CCC-95DF-531FC82FE39A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{13447BAB-2762-4CCC-95DF-531FC82FE39A}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -185,11 +184,8 @@ Global
{13447BAB-2762-4CCC-95DF-531FC82FE39A}.Release|x86.ActiveCfg = Release|Any CPU
{13447BAB-2762-4CCC-95DF-531FC82FE39A}.Release|x86.Build.0 = Release|Any CPU
{13447BAB-2762-4CCC-95DF-531FC82FE39A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {13447BAB-2762-4CCC-95DF-531FC82FE39A}.Checked|Any CPU.Build.0 = Debug|Any CPU
{13447BAB-2762-4CCC-95DF-531FC82FE39A}.Checked|x64.ActiveCfg = Debug|Any CPU
- {13447BAB-2762-4CCC-95DF-531FC82FE39A}.Checked|x64.Build.0 = Debug|Any CPU
{13447BAB-2762-4CCC-95DF-531FC82FE39A}.Checked|x86.ActiveCfg = Debug|Any CPU
- {13447BAB-2762-4CCC-95DF-531FC82FE39A}.Checked|x86.Build.0 = Debug|Any CPU
{048A4B69-9E22-4B0B-9F05-BBA8E0A47910}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{048A4B69-9E22-4B0B-9F05-BBA8E0A47910}.Debug|Any CPU.Build.0 = Debug|Any CPU
{048A4B69-9E22-4B0B-9F05-BBA8E0A47910}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -203,11 +199,8 @@ Global
{048A4B69-9E22-4B0B-9F05-BBA8E0A47910}.Release|x86.ActiveCfg = Release|Any CPU
{048A4B69-9E22-4B0B-9F05-BBA8E0A47910}.Release|x86.Build.0 = Release|Any CPU
{048A4B69-9E22-4B0B-9F05-BBA8E0A47910}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {048A4B69-9E22-4B0B-9F05-BBA8E0A47910}.Checked|Any CPU.Build.0 = Debug|Any CPU
{048A4B69-9E22-4B0B-9F05-BBA8E0A47910}.Checked|x64.ActiveCfg = Debug|Any CPU
- {048A4B69-9E22-4B0B-9F05-BBA8E0A47910}.Checked|x64.Build.0 = Debug|Any CPU
{048A4B69-9E22-4B0B-9F05-BBA8E0A47910}.Checked|x86.ActiveCfg = Debug|Any CPU
- {048A4B69-9E22-4B0B-9F05-BBA8E0A47910}.Checked|x86.Build.0 = Debug|Any CPU
{40E15C1B-0AB8-4FC5-9CE2-062B736F9021}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{40E15C1B-0AB8-4FC5-9CE2-062B736F9021}.Debug|Any CPU.Build.0 = Debug|Any CPU
{40E15C1B-0AB8-4FC5-9CE2-062B736F9021}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -221,11 +214,8 @@ Global
{40E15C1B-0AB8-4FC5-9CE2-062B736F9021}.Release|x86.ActiveCfg = Release|Any CPU
{40E15C1B-0AB8-4FC5-9CE2-062B736F9021}.Release|x86.Build.0 = Release|Any CPU
{40E15C1B-0AB8-4FC5-9CE2-062B736F9021}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {40E15C1B-0AB8-4FC5-9CE2-062B736F9021}.Checked|Any CPU.Build.0 = Debug|Any CPU
{40E15C1B-0AB8-4FC5-9CE2-062B736F9021}.Checked|x64.ActiveCfg = Debug|Any CPU
- {40E15C1B-0AB8-4FC5-9CE2-062B736F9021}.Checked|x64.Build.0 = Debug|Any CPU
{40E15C1B-0AB8-4FC5-9CE2-062B736F9021}.Checked|x86.ActiveCfg = Debug|Any CPU
- {40E15C1B-0AB8-4FC5-9CE2-062B736F9021}.Checked|x86.Build.0 = Debug|Any CPU
{913E983B-B16C-4B1E-BD37-906CFF93CAB4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{913E983B-B16C-4B1E-BD37-906CFF93CAB4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{913E983B-B16C-4B1E-BD37-906CFF93CAB4}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -239,11 +229,8 @@ Global
{913E983B-B16C-4B1E-BD37-906CFF93CAB4}.Release|x86.ActiveCfg = Release|Any CPU
{913E983B-B16C-4B1E-BD37-906CFF93CAB4}.Release|x86.Build.0 = Release|Any CPU
{913E983B-B16C-4B1E-BD37-906CFF93CAB4}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {913E983B-B16C-4B1E-BD37-906CFF93CAB4}.Checked|Any CPU.Build.0 = Debug|Any CPU
{913E983B-B16C-4B1E-BD37-906CFF93CAB4}.Checked|x64.ActiveCfg = Debug|Any CPU
- {913E983B-B16C-4B1E-BD37-906CFF93CAB4}.Checked|x64.Build.0 = Debug|Any CPU
{913E983B-B16C-4B1E-BD37-906CFF93CAB4}.Checked|x86.ActiveCfg = Debug|Any CPU
- {913E983B-B16C-4B1E-BD37-906CFF93CAB4}.Checked|x86.Build.0 = Debug|Any CPU
{E6ECE0CE-B568-4BAE-A3E4-5C795B869832}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E6ECE0CE-B568-4BAE-A3E4-5C795B869832}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E6ECE0CE-B568-4BAE-A3E4-5C795B869832}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -257,11 +244,8 @@ Global
{E6ECE0CE-B568-4BAE-A3E4-5C795B869832}.Release|x86.ActiveCfg = Release|Any CPU
{E6ECE0CE-B568-4BAE-A3E4-5C795B869832}.Release|x86.Build.0 = Release|Any CPU
{E6ECE0CE-B568-4BAE-A3E4-5C795B869832}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {E6ECE0CE-B568-4BAE-A3E4-5C795B869832}.Checked|Any CPU.Build.0 = Debug|Any CPU
{E6ECE0CE-B568-4BAE-A3E4-5C795B869832}.Checked|x64.ActiveCfg = Debug|Any CPU
- {E6ECE0CE-B568-4BAE-A3E4-5C795B869832}.Checked|x64.Build.0 = Debug|Any CPU
{E6ECE0CE-B568-4BAE-A3E4-5C795B869832}.Checked|x86.ActiveCfg = Debug|Any CPU
- {E6ECE0CE-B568-4BAE-A3E4-5C795B869832}.Checked|x86.Build.0 = Debug|Any CPU
{86ED21D3-93FC-4FFE-927F-CDB404D71434}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{86ED21D3-93FC-4FFE-927F-CDB404D71434}.Debug|Any CPU.Build.0 = Debug|Any CPU
{86ED21D3-93FC-4FFE-927F-CDB404D71434}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -275,11 +259,8 @@ Global
{86ED21D3-93FC-4FFE-927F-CDB404D71434}.Release|x86.ActiveCfg = Release|Any CPU
{86ED21D3-93FC-4FFE-927F-CDB404D71434}.Release|x86.Build.0 = Release|Any CPU
{86ED21D3-93FC-4FFE-927F-CDB404D71434}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {86ED21D3-93FC-4FFE-927F-CDB404D71434}.Checked|Any CPU.Build.0 = Debug|Any CPU
{86ED21D3-93FC-4FFE-927F-CDB404D71434}.Checked|x64.ActiveCfg = Debug|Any CPU
- {86ED21D3-93FC-4FFE-927F-CDB404D71434}.Checked|x64.Build.0 = Debug|Any CPU
{86ED21D3-93FC-4FFE-927F-CDB404D71434}.Checked|x86.ActiveCfg = Debug|Any CPU
- {86ED21D3-93FC-4FFE-927F-CDB404D71434}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -290,6 +271,7 @@ Global
{ECDDE645-347C-46D8-B6B6-BCFF6B9AFD4A} = {FF41EFDD-DD1F-428F-B25E-DD9B85D5A992}
{13447BAB-2762-4CCC-95DF-531FC82FE39A} = {FF41EFDD-DD1F-428F-B25E-DD9B85D5A992}
{9F022877-F110-4761-BA97-CC89BBC16D5A} = {2AB40A0A-24D5-40B9-AA94-5BF17878879A}
+ {02D4729C-D5AE-4DB6-91D7-37786A8C3A20} = {2AB40A0A-24D5-40B9-AA94-5BF17878879A}
{419FD394-31D9-4539-9CC9-BBD5A1C3809C} = {2AB40A0A-24D5-40B9-AA94-5BF17878879A}
{EE535D8F-D21B-4C18-A915-60E94CE19CA2} = {2AB40A0A-24D5-40B9-AA94-5BF17878879A}
{048A4B69-9E22-4B0B-9F05-BBA8E0A47910} = {2AB40A0A-24D5-40B9-AA94-5BF17878879A}
diff --git a/src/libraries/System.Reflection.Emit.Lightweight/tests/DynamicMethodCtor.cs b/src/libraries/System.Reflection.Emit.Lightweight/tests/DynamicMethodCtor.cs
index 45edc4b8323..935d0abbff6 100644
--- a/src/libraries/System.Reflection.Emit.Lightweight/tests/DynamicMethodCtor.cs
+++ b/src/libraries/System.Reflection.Emit.Lightweight/tests/DynamicMethodCtor.cs
@@ -159,7 +159,6 @@ namespace System.Reflection.Emit.Tests
}
[Theory]
- [ActiveIssue("https://github.com/dotnet/runtime/issues/31858", TestRuntimes.Mono)]
[InlineData(typeof(int[]))]
[InlineData(typeof(TestInterface))]
[InlineData(typeof(GenericClass<>))]
diff --git a/src/libraries/System.Reflection.Emit/System.Reflection.Emit.sln b/src/libraries/System.Reflection.Emit/System.Reflection.Emit.sln
index cfb19855e27..6d9d06fd00f 100644
--- a/src/libraries/System.Reflection.Emit/System.Reflection.Emit.sln
+++ b/src/libraries/System.Reflection.Emit/System.Reflection.Emit.sln
@@ -7,6 +7,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Collections", "..\Sy
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{848EFB55-86B5-4259-BAA2-A49C6E3421A9}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{C5EC183F-7276-43DB-9916-E861AEC47418}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reflection.Emit.ILGeneration", "..\System.Reflection.Emit.ILGeneration\ref\System.Reflection.Emit.ILGeneration.csproj", "{8D5878A9-E855-4E70-A3D5-42EB71037D96}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reflection.Emit", "ref\System.Reflection.Emit.csproj", "{6A176C5B-206D-4550-AC36-0530218E29F5}"
@@ -77,11 +79,8 @@ Global
{E5543842-139D-43BD-B604-E65EBB91649E}.Release|x86.ActiveCfg = Release|Any CPU
{E5543842-139D-43BD-B604-E65EBB91649E}.Release|x86.Build.0 = Release|Any CPU
{E5543842-139D-43BD-B604-E65EBB91649E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {E5543842-139D-43BD-B604-E65EBB91649E}.Checked|Any CPU.Build.0 = Debug|Any CPU
{E5543842-139D-43BD-B604-E65EBB91649E}.Checked|x64.ActiveCfg = Debug|Any CPU
- {E5543842-139D-43BD-B604-E65EBB91649E}.Checked|x64.Build.0 = Debug|Any CPU
{E5543842-139D-43BD-B604-E65EBB91649E}.Checked|x86.ActiveCfg = Debug|Any CPU
- {E5543842-139D-43BD-B604-E65EBB91649E}.Checked|x86.Build.0 = Debug|Any CPU
{6DEFA77D-1BCB-4E95-B4FB-BCD2D943340D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6DEFA77D-1BCB-4E95-B4FB-BCD2D943340D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6DEFA77D-1BCB-4E95-B4FB-BCD2D943340D}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -95,11 +94,8 @@ Global
{6DEFA77D-1BCB-4E95-B4FB-BCD2D943340D}.Release|x86.ActiveCfg = Release|Any CPU
{6DEFA77D-1BCB-4E95-B4FB-BCD2D943340D}.Release|x86.Build.0 = Release|Any CPU
{6DEFA77D-1BCB-4E95-B4FB-BCD2D943340D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {6DEFA77D-1BCB-4E95-B4FB-BCD2D943340D}.Checked|Any CPU.Build.0 = Debug|Any CPU
{6DEFA77D-1BCB-4E95-B4FB-BCD2D943340D}.Checked|x64.ActiveCfg = Debug|Any CPU
- {6DEFA77D-1BCB-4E95-B4FB-BCD2D943340D}.Checked|x64.Build.0 = Debug|Any CPU
{6DEFA77D-1BCB-4E95-B4FB-BCD2D943340D}.Checked|x86.ActiveCfg = Debug|Any CPU
- {6DEFA77D-1BCB-4E95-B4FB-BCD2D943340D}.Checked|x86.Build.0 = Debug|Any CPU
{848EFB55-86B5-4259-BAA2-A49C6E3421A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{848EFB55-86B5-4259-BAA2-A49C6E3421A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{848EFB55-86B5-4259-BAA2-A49C6E3421A9}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -113,11 +109,23 @@ Global
{848EFB55-86B5-4259-BAA2-A49C6E3421A9}.Release|x86.ActiveCfg = Release|Any CPU
{848EFB55-86B5-4259-BAA2-A49C6E3421A9}.Release|x86.Build.0 = Release|Any CPU
{848EFB55-86B5-4259-BAA2-A49C6E3421A9}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {848EFB55-86B5-4259-BAA2-A49C6E3421A9}.Checked|Any CPU.Build.0 = Debug|Any CPU
{848EFB55-86B5-4259-BAA2-A49C6E3421A9}.Checked|x64.ActiveCfg = Debug|Any CPU
- {848EFB55-86B5-4259-BAA2-A49C6E3421A9}.Checked|x64.Build.0 = Debug|Any CPU
{848EFB55-86B5-4259-BAA2-A49C6E3421A9}.Checked|x86.ActiveCfg = Debug|Any CPU
- {848EFB55-86B5-4259-BAA2-A49C6E3421A9}.Checked|x86.Build.0 = Debug|Any CPU
+ {C5EC183F-7276-43DB-9916-E861AEC47418}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C5EC183F-7276-43DB-9916-E861AEC47418}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C5EC183F-7276-43DB-9916-E861AEC47418}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {C5EC183F-7276-43DB-9916-E861AEC47418}.Debug|x64.Build.0 = Debug|Any CPU
+ {C5EC183F-7276-43DB-9916-E861AEC47418}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {C5EC183F-7276-43DB-9916-E861AEC47418}.Debug|x86.Build.0 = Debug|Any CPU
+ {C5EC183F-7276-43DB-9916-E861AEC47418}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C5EC183F-7276-43DB-9916-E861AEC47418}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C5EC183F-7276-43DB-9916-E861AEC47418}.Release|x64.ActiveCfg = Release|Any CPU
+ {C5EC183F-7276-43DB-9916-E861AEC47418}.Release|x64.Build.0 = Release|Any CPU
+ {C5EC183F-7276-43DB-9916-E861AEC47418}.Release|x86.ActiveCfg = Release|Any CPU
+ {C5EC183F-7276-43DB-9916-E861AEC47418}.Release|x86.Build.0 = Release|Any CPU
+ {C5EC183F-7276-43DB-9916-E861AEC47418}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {C5EC183F-7276-43DB-9916-E861AEC47418}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {C5EC183F-7276-43DB-9916-E861AEC47418}.Checked|x86.ActiveCfg = Debug|Any CPU
{8D5878A9-E855-4E70-A3D5-42EB71037D96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8D5878A9-E855-4E70-A3D5-42EB71037D96}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8D5878A9-E855-4E70-A3D5-42EB71037D96}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -131,11 +139,8 @@ Global
{8D5878A9-E855-4E70-A3D5-42EB71037D96}.Release|x86.ActiveCfg = Release|Any CPU
{8D5878A9-E855-4E70-A3D5-42EB71037D96}.Release|x86.Build.0 = Release|Any CPU
{8D5878A9-E855-4E70-A3D5-42EB71037D96}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {8D5878A9-E855-4E70-A3D5-42EB71037D96}.Checked|Any CPU.Build.0 = Debug|Any CPU
{8D5878A9-E855-4E70-A3D5-42EB71037D96}.Checked|x64.ActiveCfg = Debug|Any CPU
- {8D5878A9-E855-4E70-A3D5-42EB71037D96}.Checked|x64.Build.0 = Debug|Any CPU
{8D5878A9-E855-4E70-A3D5-42EB71037D96}.Checked|x86.ActiveCfg = Debug|Any CPU
- {8D5878A9-E855-4E70-A3D5-42EB71037D96}.Checked|x86.Build.0 = Debug|Any CPU
{6A176C5B-206D-4550-AC36-0530218E29F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6A176C5B-206D-4550-AC36-0530218E29F5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6A176C5B-206D-4550-AC36-0530218E29F5}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -149,11 +154,8 @@ Global
{6A176C5B-206D-4550-AC36-0530218E29F5}.Release|x86.ActiveCfg = Release|Any CPU
{6A176C5B-206D-4550-AC36-0530218E29F5}.Release|x86.Build.0 = Release|Any CPU
{6A176C5B-206D-4550-AC36-0530218E29F5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {6A176C5B-206D-4550-AC36-0530218E29F5}.Checked|Any CPU.Build.0 = Debug|Any CPU
{6A176C5B-206D-4550-AC36-0530218E29F5}.Checked|x64.ActiveCfg = Debug|Any CPU
- {6A176C5B-206D-4550-AC36-0530218E29F5}.Checked|x64.Build.0 = Debug|Any CPU
{6A176C5B-206D-4550-AC36-0530218E29F5}.Checked|x86.ActiveCfg = Debug|Any CPU
- {6A176C5B-206D-4550-AC36-0530218E29F5}.Checked|x86.Build.0 = Debug|Any CPU
{B479A4BF-A3A5-4255-A3EF-135015BD877F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B479A4BF-A3A5-4255-A3EF-135015BD877F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B479A4BF-A3A5-4255-A3EF-135015BD877F}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -167,11 +169,8 @@ Global
{B479A4BF-A3A5-4255-A3EF-135015BD877F}.Release|x86.ActiveCfg = Release|Any CPU
{B479A4BF-A3A5-4255-A3EF-135015BD877F}.Release|x86.Build.0 = Release|Any CPU
{B479A4BF-A3A5-4255-A3EF-135015BD877F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {B479A4BF-A3A5-4255-A3EF-135015BD877F}.Checked|Any CPU.Build.0 = Debug|Any CPU
{B479A4BF-A3A5-4255-A3EF-135015BD877F}.Checked|x64.ActiveCfg = Debug|Any CPU
- {B479A4BF-A3A5-4255-A3EF-135015BD877F}.Checked|x64.Build.0 = Debug|Any CPU
{B479A4BF-A3A5-4255-A3EF-135015BD877F}.Checked|x86.ActiveCfg = Debug|Any CPU
- {B479A4BF-A3A5-4255-A3EF-135015BD877F}.Checked|x86.Build.0 = Debug|Any CPU
{82899000-791E-42FF-A594-6DE65DE07C9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{82899000-791E-42FF-A594-6DE65DE07C9E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{82899000-791E-42FF-A594-6DE65DE07C9E}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -185,11 +184,8 @@ Global
{82899000-791E-42FF-A594-6DE65DE07C9E}.Release|x86.ActiveCfg = Release|Any CPU
{82899000-791E-42FF-A594-6DE65DE07C9E}.Release|x86.Build.0 = Release|Any CPU
{82899000-791E-42FF-A594-6DE65DE07C9E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {82899000-791E-42FF-A594-6DE65DE07C9E}.Checked|Any CPU.Build.0 = Debug|Any CPU
{82899000-791E-42FF-A594-6DE65DE07C9E}.Checked|x64.ActiveCfg = Debug|Any CPU
- {82899000-791E-42FF-A594-6DE65DE07C9E}.Checked|x64.Build.0 = Debug|Any CPU
{82899000-791E-42FF-A594-6DE65DE07C9E}.Checked|x86.ActiveCfg = Debug|Any CPU
- {82899000-791E-42FF-A594-6DE65DE07C9E}.Checked|x86.Build.0 = Debug|Any CPU
{FD4D647F-490B-420A-B2FD-29751E0C3454}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FD4D647F-490B-420A-B2FD-29751E0C3454}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FD4D647F-490B-420A-B2FD-29751E0C3454}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -203,11 +199,8 @@ Global
{FD4D647F-490B-420A-B2FD-29751E0C3454}.Release|x86.ActiveCfg = Release|Any CPU
{FD4D647F-490B-420A-B2FD-29751E0C3454}.Release|x86.Build.0 = Release|Any CPU
{FD4D647F-490B-420A-B2FD-29751E0C3454}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {FD4D647F-490B-420A-B2FD-29751E0C3454}.Checked|Any CPU.Build.0 = Debug|Any CPU
{FD4D647F-490B-420A-B2FD-29751E0C3454}.Checked|x64.ActiveCfg = Debug|Any CPU
- {FD4D647F-490B-420A-B2FD-29751E0C3454}.Checked|x64.Build.0 = Debug|Any CPU
{FD4D647F-490B-420A-B2FD-29751E0C3454}.Checked|x86.ActiveCfg = Debug|Any CPU
- {FD4D647F-490B-420A-B2FD-29751E0C3454}.Checked|x86.Build.0 = Debug|Any CPU
{73EA94AD-0C65-47C8-851C-12D136A0DCC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{73EA94AD-0C65-47C8-851C-12D136A0DCC1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{73EA94AD-0C65-47C8-851C-12D136A0DCC1}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -221,11 +214,8 @@ Global
{73EA94AD-0C65-47C8-851C-12D136A0DCC1}.Release|x86.ActiveCfg = Release|Any CPU
{73EA94AD-0C65-47C8-851C-12D136A0DCC1}.Release|x86.Build.0 = Release|Any CPU
{73EA94AD-0C65-47C8-851C-12D136A0DCC1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {73EA94AD-0C65-47C8-851C-12D136A0DCC1}.Checked|Any CPU.Build.0 = Debug|Any CPU
{73EA94AD-0C65-47C8-851C-12D136A0DCC1}.Checked|x64.ActiveCfg = Debug|Any CPU
- {73EA94AD-0C65-47C8-851C-12D136A0DCC1}.Checked|x64.Build.0 = Debug|Any CPU
{73EA94AD-0C65-47C8-851C-12D136A0DCC1}.Checked|x86.ActiveCfg = Debug|Any CPU
- {73EA94AD-0C65-47C8-851C-12D136A0DCC1}.Checked|x86.Build.0 = Debug|Any CPU
{506EBBFA-FF57-4141-A725-882110C17598}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{506EBBFA-FF57-4141-A725-882110C17598}.Debug|Any CPU.Build.0 = Debug|Any CPU
{506EBBFA-FF57-4141-A725-882110C17598}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -239,11 +229,8 @@ Global
{506EBBFA-FF57-4141-A725-882110C17598}.Release|x86.ActiveCfg = Release|Any CPU
{506EBBFA-FF57-4141-A725-882110C17598}.Release|x86.Build.0 = Release|Any CPU
{506EBBFA-FF57-4141-A725-882110C17598}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {506EBBFA-FF57-4141-A725-882110C17598}.Checked|Any CPU.Build.0 = Debug|Any CPU
{506EBBFA-FF57-4141-A725-882110C17598}.Checked|x64.ActiveCfg = Debug|Any CPU
- {506EBBFA-FF57-4141-A725-882110C17598}.Checked|x64.Build.0 = Debug|Any CPU
{506EBBFA-FF57-4141-A725-882110C17598}.Checked|x86.ActiveCfg = Debug|Any CPU
- {506EBBFA-FF57-4141-A725-882110C17598}.Checked|x86.Build.0 = Debug|Any CPU
{8E08BBCB-E2D1-464F-96F1-7B1801CE48B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8E08BBCB-E2D1-464F-96F1-7B1801CE48B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8E08BBCB-E2D1-464F-96F1-7B1801CE48B6}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -257,11 +244,8 @@ Global
{8E08BBCB-E2D1-464F-96F1-7B1801CE48B6}.Release|x86.ActiveCfg = Release|Any CPU
{8E08BBCB-E2D1-464F-96F1-7B1801CE48B6}.Release|x86.Build.0 = Release|Any CPU
{8E08BBCB-E2D1-464F-96F1-7B1801CE48B6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {8E08BBCB-E2D1-464F-96F1-7B1801CE48B6}.Checked|Any CPU.Build.0 = Debug|Any CPU
{8E08BBCB-E2D1-464F-96F1-7B1801CE48B6}.Checked|x64.ActiveCfg = Debug|Any CPU
- {8E08BBCB-E2D1-464F-96F1-7B1801CE48B6}.Checked|x64.Build.0 = Debug|Any CPU
{8E08BBCB-E2D1-464F-96F1-7B1801CE48B6}.Checked|x86.ActiveCfg = Debug|Any CPU
- {8E08BBCB-E2D1-464F-96F1-7B1801CE48B6}.Checked|x86.Build.0 = Debug|Any CPU
{613C42F2-847A-42B3-9F5E-F5A670356BF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{613C42F2-847A-42B3-9F5E-F5A670356BF7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{613C42F2-847A-42B3-9F5E-F5A670356BF7}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -275,11 +259,8 @@ Global
{613C42F2-847A-42B3-9F5E-F5A670356BF7}.Release|x86.ActiveCfg = Release|Any CPU
{613C42F2-847A-42B3-9F5E-F5A670356BF7}.Release|x86.Build.0 = Release|Any CPU
{613C42F2-847A-42B3-9F5E-F5A670356BF7}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {613C42F2-847A-42B3-9F5E-F5A670356BF7}.Checked|Any CPU.Build.0 = Debug|Any CPU
{613C42F2-847A-42B3-9F5E-F5A670356BF7}.Checked|x64.ActiveCfg = Debug|Any CPU
- {613C42F2-847A-42B3-9F5E-F5A670356BF7}.Checked|x64.Build.0 = Debug|Any CPU
{613C42F2-847A-42B3-9F5E-F5A670356BF7}.Checked|x86.ActiveCfg = Debug|Any CPU
- {613C42F2-847A-42B3-9F5E-F5A670356BF7}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -290,6 +271,7 @@ Global
{E5543842-139D-43BD-B604-E65EBB91649E} = {2FC35C2F-76DB-4D84-B421-9700BEA4D161}
{82899000-791E-42FF-A594-6DE65DE07C9E} = {2FC35C2F-76DB-4D84-B421-9700BEA4D161}
{6DEFA77D-1BCB-4E95-B4FB-BCD2D943340D} = {C36D185D-9B3D-42E5-985F-E21B3BAF3B6D}
+ {C5EC183F-7276-43DB-9916-E861AEC47418} = {C36D185D-9B3D-42E5-985F-E21B3BAF3B6D}
{8D5878A9-E855-4E70-A3D5-42EB71037D96} = {C36D185D-9B3D-42E5-985F-E21B3BAF3B6D}
{6A176C5B-206D-4550-AC36-0530218E29F5} = {C36D185D-9B3D-42E5-985F-E21B3BAF3B6D}
{FD4D647F-490B-420A-B2FD-29751E0C3454} = {C36D185D-9B3D-42E5-985F-E21B3BAF3B6D}
diff --git a/src/libraries/System.Reflection.Metadata/tests/Resources/Interop/Interop.Mock01.cs b/src/libraries/System.Reflection.Metadata/tests/Resources/Interop/Interop.Mock01.cs
index 0ad8ac99a04..ef6ab5b7f20 100644
--- a/src/libraries/System.Reflection.Metadata/tests/Resources/Interop/Interop.Mock01.cs
+++ b/src/libraries/System.Reflection.Metadata/tests/Resources/Interop/Interop.Mock01.cs
@@ -17,7 +17,6 @@ using System.Runtime.InteropServices;
[assembly: ComVisible(true)] // not embed
[assembly: TypeLibVersion(1, 0)] // not embed
// [assembly: SetWin32ContextInIDispatch()]
-// [assembly: IDispatchImpl(IDispatchImplType.CompatibleImpl)] // not embed
namespace MockInterop01
{
diff --git a/src/libraries/System.Reflection.MetadataLoadContext/tests/src/Tests/CustomAttributes/CustomAttributeTests.cs b/src/libraries/System.Reflection.MetadataLoadContext/tests/src/Tests/CustomAttributes/CustomAttributeTests.cs
index 15d1fa8d2fc..c8661c8b1ba 100644
--- a/src/libraries/System.Reflection.MetadataLoadContext/tests/src/Tests/CustomAttributes/CustomAttributeTests.cs
+++ b/src/libraries/System.Reflection.MetadataLoadContext/tests/src/Tests/CustomAttributes/CustomAttributeTests.cs
@@ -146,8 +146,12 @@ namespace System.Reflection.Tests
{
Assert.NotSame(cad1.ConstructorArguments, cad2.ConstructorArguments);
}
- Assert.True(cad1.ConstructorArguments is ReadOnlyCollection<CustomAttributeTypedArgument>);
- Assert.True(cad2.ConstructorArguments is ReadOnlyCollection<CustomAttributeTypedArgument>);
+ Assert.True(
+ (cad1.ConstructorArguments is ReadOnlyCollection<CustomAttributeTypedArgument>) ||
+ (cad1.ConstructorArguments is CustomAttributeTypedArgument[] cataArr1 && cataArr1.Length == 0));
+ Assert.True(
+ (cad2.ConstructorArguments is ReadOnlyCollection<CustomAttributeTypedArgument>) ||
+ (cad2.ConstructorArguments is CustomAttributeTypedArgument[] cataArr2 && cataArr2.Length == 0));
for (int j = 0; j < cad1.ConstructorArguments.Count; j++)
{
cad1.ConstructorArguments[j].ValidateEqualButFreshlyAllocated(cad2.ConstructorArguments[j]);
@@ -158,8 +162,12 @@ namespace System.Reflection.Tests
{
Assert.NotSame(cad1.NamedArguments, cad2.NamedArguments);
}
- Assert.True(cad1.NamedArguments is ReadOnlyCollection<CustomAttributeNamedArgument>);
- Assert.True(cad2.NamedArguments is ReadOnlyCollection<CustomAttributeNamedArgument>);
+ Assert.True(
+ (cad1.NamedArguments is ReadOnlyCollection<CustomAttributeNamedArgument>) ||
+ (cad1.NamedArguments is CustomAttributeNamedArgument[] canaArr1 && canaArr1.Length == 0));
+ Assert.True(
+ (cad2.NamedArguments is ReadOnlyCollection<CustomAttributeNamedArgument>) ||
+ (cad2.NamedArguments is CustomAttributeNamedArgument[] canaArr2 && canaArr2.Length == 0));
for (int j = 0; j < cad1.NamedArguments.Count; j++)
{
cad1.NamedArguments[j].TypedValue.ValidateEqualButFreshlyAllocated(cad2.NamedArguments[j].TypedValue);
diff --git a/src/libraries/System.Reflection.Primitives/System.Reflection.Primitives.sln b/src/libraries/System.Reflection.Primitives/System.Reflection.Primitives.sln
index 75d2909ff25..59f7ef27716 100644
--- a/src/libraries/System.Reflection.Primitives/System.Reflection.Primitives.sln
+++ b/src/libraries/System.Reflection.Primitives/System.Reflection.Primitives.sln
@@ -3,6 +3,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", ".
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{869B6F76-2329-474A-854E-5AD5541A1CA0}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{B6734AD0-410E-4B0F-B767-D586E92D4D56}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reflection.Primitives", "ref\System.Reflection.Primitives.csproj", "{9D308994-9721-4883-B32D-531FA8D9025B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reflection.Primitives", "src\System.Reflection.Primitives.csproj", "{5D40069E-7CC2-4B40-A41D-6B003CCB4075}"
@@ -63,11 +65,23 @@ Global
{869B6F76-2329-474A-854E-5AD5541A1CA0}.Release|x86.ActiveCfg = Release|Any CPU
{869B6F76-2329-474A-854E-5AD5541A1CA0}.Release|x86.Build.0 = Release|Any CPU
{869B6F76-2329-474A-854E-5AD5541A1CA0}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {869B6F76-2329-474A-854E-5AD5541A1CA0}.Checked|Any CPU.Build.0 = Debug|Any CPU
{869B6F76-2329-474A-854E-5AD5541A1CA0}.Checked|x64.ActiveCfg = Debug|Any CPU
- {869B6F76-2329-474A-854E-5AD5541A1CA0}.Checked|x64.Build.0 = Debug|Any CPU
{869B6F76-2329-474A-854E-5AD5541A1CA0}.Checked|x86.ActiveCfg = Debug|Any CPU
- {869B6F76-2329-474A-854E-5AD5541A1CA0}.Checked|x86.Build.0 = Debug|Any CPU
+ {B6734AD0-410E-4B0F-B767-D586E92D4D56}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B6734AD0-410E-4B0F-B767-D586E92D4D56}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B6734AD0-410E-4B0F-B767-D586E92D4D56}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {B6734AD0-410E-4B0F-B767-D586E92D4D56}.Debug|x64.Build.0 = Debug|Any CPU
+ {B6734AD0-410E-4B0F-B767-D586E92D4D56}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {B6734AD0-410E-4B0F-B767-D586E92D4D56}.Debug|x86.Build.0 = Debug|Any CPU
+ {B6734AD0-410E-4B0F-B767-D586E92D4D56}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B6734AD0-410E-4B0F-B767-D586E92D4D56}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B6734AD0-410E-4B0F-B767-D586E92D4D56}.Release|x64.ActiveCfg = Release|Any CPU
+ {B6734AD0-410E-4B0F-B767-D586E92D4D56}.Release|x64.Build.0 = Release|Any CPU
+ {B6734AD0-410E-4B0F-B767-D586E92D4D56}.Release|x86.ActiveCfg = Release|Any CPU
+ {B6734AD0-410E-4B0F-B767-D586E92D4D56}.Release|x86.Build.0 = Release|Any CPU
+ {B6734AD0-410E-4B0F-B767-D586E92D4D56}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {B6734AD0-410E-4B0F-B767-D586E92D4D56}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {B6734AD0-410E-4B0F-B767-D586E92D4D56}.Checked|x86.ActiveCfg = Debug|Any CPU
{9D308994-9721-4883-B32D-531FA8D9025B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9D308994-9721-4883-B32D-531FA8D9025B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9D308994-9721-4883-B32D-531FA8D9025B}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -81,11 +95,8 @@ Global
{9D308994-9721-4883-B32D-531FA8D9025B}.Release|x86.ActiveCfg = Release|Any CPU
{9D308994-9721-4883-B32D-531FA8D9025B}.Release|x86.Build.0 = Release|Any CPU
{9D308994-9721-4883-B32D-531FA8D9025B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {9D308994-9721-4883-B32D-531FA8D9025B}.Checked|Any CPU.Build.0 = Debug|Any CPU
{9D308994-9721-4883-B32D-531FA8D9025B}.Checked|x64.ActiveCfg = Debug|Any CPU
- {9D308994-9721-4883-B32D-531FA8D9025B}.Checked|x64.Build.0 = Debug|Any CPU
{9D308994-9721-4883-B32D-531FA8D9025B}.Checked|x86.ActiveCfg = Debug|Any CPU
- {9D308994-9721-4883-B32D-531FA8D9025B}.Checked|x86.Build.0 = Debug|Any CPU
{5D40069E-7CC2-4B40-A41D-6B003CCB4075}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5D40069E-7CC2-4B40-A41D-6B003CCB4075}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5D40069E-7CC2-4B40-A41D-6B003CCB4075}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -99,11 +110,8 @@ Global
{5D40069E-7CC2-4B40-A41D-6B003CCB4075}.Release|x86.ActiveCfg = Release|Any CPU
{5D40069E-7CC2-4B40-A41D-6B003CCB4075}.Release|x86.Build.0 = Release|Any CPU
{5D40069E-7CC2-4B40-A41D-6B003CCB4075}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {5D40069E-7CC2-4B40-A41D-6B003CCB4075}.Checked|Any CPU.Build.0 = Debug|Any CPU
{5D40069E-7CC2-4B40-A41D-6B003CCB4075}.Checked|x64.ActiveCfg = Debug|Any CPU
- {5D40069E-7CC2-4B40-A41D-6B003CCB4075}.Checked|x64.Build.0 = Debug|Any CPU
{5D40069E-7CC2-4B40-A41D-6B003CCB4075}.Checked|x86.ActiveCfg = Debug|Any CPU
- {5D40069E-7CC2-4B40-A41D-6B003CCB4075}.Checked|x86.Build.0 = Debug|Any CPU
{E8860A76-C8CE-4965-8B6D-C64F1BCAB9F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E8860A76-C8CE-4965-8B6D-C64F1BCAB9F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E8860A76-C8CE-4965-8B6D-C64F1BCAB9F2}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -117,11 +125,8 @@ Global
{E8860A76-C8CE-4965-8B6D-C64F1BCAB9F2}.Release|x86.ActiveCfg = Release|Any CPU
{E8860A76-C8CE-4965-8B6D-C64F1BCAB9F2}.Release|x86.Build.0 = Release|Any CPU
{E8860A76-C8CE-4965-8B6D-C64F1BCAB9F2}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {E8860A76-C8CE-4965-8B6D-C64F1BCAB9F2}.Checked|Any CPU.Build.0 = Debug|Any CPU
{E8860A76-C8CE-4965-8B6D-C64F1BCAB9F2}.Checked|x64.ActiveCfg = Debug|Any CPU
- {E8860A76-C8CE-4965-8B6D-C64F1BCAB9F2}.Checked|x64.Build.0 = Debug|Any CPU
{E8860A76-C8CE-4965-8B6D-C64F1BCAB9F2}.Checked|x86.ActiveCfg = Debug|Any CPU
- {E8860A76-C8CE-4965-8B6D-C64F1BCAB9F2}.Checked|x86.Build.0 = Debug|Any CPU
{6DF455E8-D2C8-40EC-AEF2-AE05A66405F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6DF455E8-D2C8-40EC-AEF2-AE05A66405F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6DF455E8-D2C8-40EC-AEF2-AE05A66405F7}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -135,11 +140,8 @@ Global
{6DF455E8-D2C8-40EC-AEF2-AE05A66405F7}.Release|x86.ActiveCfg = Release|Any CPU
{6DF455E8-D2C8-40EC-AEF2-AE05A66405F7}.Release|x86.Build.0 = Release|Any CPU
{6DF455E8-D2C8-40EC-AEF2-AE05A66405F7}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {6DF455E8-D2C8-40EC-AEF2-AE05A66405F7}.Checked|Any CPU.Build.0 = Debug|Any CPU
{6DF455E8-D2C8-40EC-AEF2-AE05A66405F7}.Checked|x64.ActiveCfg = Debug|Any CPU
- {6DF455E8-D2C8-40EC-AEF2-AE05A66405F7}.Checked|x64.Build.0 = Debug|Any CPU
{6DF455E8-D2C8-40EC-AEF2-AE05A66405F7}.Checked|x86.ActiveCfg = Debug|Any CPU
- {6DF455E8-D2C8-40EC-AEF2-AE05A66405F7}.Checked|x86.Build.0 = Debug|Any CPU
{04E09F3E-1897-43EE-94D3-786B679CB741}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{04E09F3E-1897-43EE-94D3-786B679CB741}.Debug|Any CPU.Build.0 = Debug|Any CPU
{04E09F3E-1897-43EE-94D3-786B679CB741}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -153,11 +155,8 @@ Global
{04E09F3E-1897-43EE-94D3-786B679CB741}.Release|x86.ActiveCfg = Release|Any CPU
{04E09F3E-1897-43EE-94D3-786B679CB741}.Release|x86.Build.0 = Release|Any CPU
{04E09F3E-1897-43EE-94D3-786B679CB741}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {04E09F3E-1897-43EE-94D3-786B679CB741}.Checked|Any CPU.Build.0 = Debug|Any CPU
{04E09F3E-1897-43EE-94D3-786B679CB741}.Checked|x64.ActiveCfg = Debug|Any CPU
- {04E09F3E-1897-43EE-94D3-786B679CB741}.Checked|x64.Build.0 = Debug|Any CPU
{04E09F3E-1897-43EE-94D3-786B679CB741}.Checked|x86.ActiveCfg = Debug|Any CPU
- {04E09F3E-1897-43EE-94D3-786B679CB741}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -168,6 +167,7 @@ Global
{869B6F76-2329-474A-854E-5AD5541A1CA0} = {654344FB-C5C8-4364-B43B-C2C9530B96F8}
{E8860A76-C8CE-4965-8B6D-C64F1BCAB9F2} = {654344FB-C5C8-4364-B43B-C2C9530B96F8}
{6DF455E8-D2C8-40EC-AEF2-AE05A66405F7} = {654344FB-C5C8-4364-B43B-C2C9530B96F8}
+ {B6734AD0-410E-4B0F-B767-D586E92D4D56} = {4599348B-0480-47D4-9763-F3C6716D3CCC}
{9D308994-9721-4883-B32D-531FA8D9025B} = {4599348B-0480-47D4-9763-F3C6716D3CCC}
{04E09F3E-1897-43EE-94D3-786B679CB741} = {4599348B-0480-47D4-9763-F3C6716D3CCC}
EndGlobalSection
diff --git a/src/libraries/System.Reflection.TypeExtensions/System.Reflection.TypeExtensions.sln b/src/libraries/System.Reflection.TypeExtensions/System.Reflection.TypeExtensions.sln
index c89507734c6..d0d153d2d83 100644
--- a/src/libraries/System.Reflection.TypeExtensions/System.Reflection.TypeExtensions.sln
+++ b/src/libraries/System.Reflection.TypeExtensions/System.Reflection.TypeExtensions.sln
@@ -5,6 +5,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{EAE41D82-CFFA-4934-89B2-399D12530E84}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{919F14ED-E86A-4757-BFEB-8AEEDBCB09E4}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reflection.TypeExtensions", "ref\System.Reflection.TypeExtensions.csproj", "{03C0F6B8-A04B-4822-8089-3918F02AD281}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reflection.TypeExtensions", "src\System.Reflection.TypeExtensions.csproj", "{B958EACD-B145-4B48-A11B-C5E5B565E311}"
@@ -69,11 +71,8 @@ Global
{41438432-4DC0-4724-8C8F-0D100083490F}.Release|x86.ActiveCfg = Release|Any CPU
{41438432-4DC0-4724-8C8F-0D100083490F}.Release|x86.Build.0 = Release|Any CPU
{41438432-4DC0-4724-8C8F-0D100083490F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {41438432-4DC0-4724-8C8F-0D100083490F}.Checked|Any CPU.Build.0 = Debug|Any CPU
{41438432-4DC0-4724-8C8F-0D100083490F}.Checked|x64.ActiveCfg = Debug|Any CPU
- {41438432-4DC0-4724-8C8F-0D100083490F}.Checked|x64.Build.0 = Debug|Any CPU
{41438432-4DC0-4724-8C8F-0D100083490F}.Checked|x86.ActiveCfg = Debug|Any CPU
- {41438432-4DC0-4724-8C8F-0D100083490F}.Checked|x86.Build.0 = Debug|Any CPU
{EAE41D82-CFFA-4934-89B2-399D12530E84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EAE41D82-CFFA-4934-89B2-399D12530E84}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EAE41D82-CFFA-4934-89B2-399D12530E84}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -87,11 +86,23 @@ Global
{EAE41D82-CFFA-4934-89B2-399D12530E84}.Release|x86.ActiveCfg = Release|Any CPU
{EAE41D82-CFFA-4934-89B2-399D12530E84}.Release|x86.Build.0 = Release|Any CPU
{EAE41D82-CFFA-4934-89B2-399D12530E84}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {EAE41D82-CFFA-4934-89B2-399D12530E84}.Checked|Any CPU.Build.0 = Debug|Any CPU
{EAE41D82-CFFA-4934-89B2-399D12530E84}.Checked|x64.ActiveCfg = Debug|Any CPU
- {EAE41D82-CFFA-4934-89B2-399D12530E84}.Checked|x64.Build.0 = Debug|Any CPU
{EAE41D82-CFFA-4934-89B2-399D12530E84}.Checked|x86.ActiveCfg = Debug|Any CPU
- {EAE41D82-CFFA-4934-89B2-399D12530E84}.Checked|x86.Build.0 = Debug|Any CPU
+ {919F14ED-E86A-4757-BFEB-8AEEDBCB09E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {919F14ED-E86A-4757-BFEB-8AEEDBCB09E4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {919F14ED-E86A-4757-BFEB-8AEEDBCB09E4}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {919F14ED-E86A-4757-BFEB-8AEEDBCB09E4}.Debug|x64.Build.0 = Debug|Any CPU
+ {919F14ED-E86A-4757-BFEB-8AEEDBCB09E4}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {919F14ED-E86A-4757-BFEB-8AEEDBCB09E4}.Debug|x86.Build.0 = Debug|Any CPU
+ {919F14ED-E86A-4757-BFEB-8AEEDBCB09E4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {919F14ED-E86A-4757-BFEB-8AEEDBCB09E4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {919F14ED-E86A-4757-BFEB-8AEEDBCB09E4}.Release|x64.ActiveCfg = Release|Any CPU
+ {919F14ED-E86A-4757-BFEB-8AEEDBCB09E4}.Release|x64.Build.0 = Release|Any CPU
+ {919F14ED-E86A-4757-BFEB-8AEEDBCB09E4}.Release|x86.ActiveCfg = Release|Any CPU
+ {919F14ED-E86A-4757-BFEB-8AEEDBCB09E4}.Release|x86.Build.0 = Release|Any CPU
+ {919F14ED-E86A-4757-BFEB-8AEEDBCB09E4}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {919F14ED-E86A-4757-BFEB-8AEEDBCB09E4}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {919F14ED-E86A-4757-BFEB-8AEEDBCB09E4}.Checked|x86.ActiveCfg = Debug|Any CPU
{03C0F6B8-A04B-4822-8089-3918F02AD281}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{03C0F6B8-A04B-4822-8089-3918F02AD281}.Debug|Any CPU.Build.0 = Debug|Any CPU
{03C0F6B8-A04B-4822-8089-3918F02AD281}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -105,11 +116,8 @@ Global
{03C0F6B8-A04B-4822-8089-3918F02AD281}.Release|x86.ActiveCfg = Release|Any CPU
{03C0F6B8-A04B-4822-8089-3918F02AD281}.Release|x86.Build.0 = Release|Any CPU
{03C0F6B8-A04B-4822-8089-3918F02AD281}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {03C0F6B8-A04B-4822-8089-3918F02AD281}.Checked|Any CPU.Build.0 = Debug|Any CPU
{03C0F6B8-A04B-4822-8089-3918F02AD281}.Checked|x64.ActiveCfg = Debug|Any CPU
- {03C0F6B8-A04B-4822-8089-3918F02AD281}.Checked|x64.Build.0 = Debug|Any CPU
{03C0F6B8-A04B-4822-8089-3918F02AD281}.Checked|x86.ActiveCfg = Debug|Any CPU
- {03C0F6B8-A04B-4822-8089-3918F02AD281}.Checked|x86.Build.0 = Debug|Any CPU
{B958EACD-B145-4B48-A11B-C5E5B565E311}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B958EACD-B145-4B48-A11B-C5E5B565E311}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B958EACD-B145-4B48-A11B-C5E5B565E311}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -123,11 +131,8 @@ Global
{B958EACD-B145-4B48-A11B-C5E5B565E311}.Release|x86.ActiveCfg = Release|Any CPU
{B958EACD-B145-4B48-A11B-C5E5B565E311}.Release|x86.Build.0 = Release|Any CPU
{B958EACD-B145-4B48-A11B-C5E5B565E311}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {B958EACD-B145-4B48-A11B-C5E5B565E311}.Checked|Any CPU.Build.0 = Debug|Any CPU
{B958EACD-B145-4B48-A11B-C5E5B565E311}.Checked|x64.ActiveCfg = Debug|Any CPU
- {B958EACD-B145-4B48-A11B-C5E5B565E311}.Checked|x64.Build.0 = Debug|Any CPU
{B958EACD-B145-4B48-A11B-C5E5B565E311}.Checked|x86.ActiveCfg = Debug|Any CPU
- {B958EACD-B145-4B48-A11B-C5E5B565E311}.Checked|x86.Build.0 = Debug|Any CPU
{FEFD49C5-E2A2-411E-ABF4-DE7B58861750}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FEFD49C5-E2A2-411E-ABF4-DE7B58861750}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FEFD49C5-E2A2-411E-ABF4-DE7B58861750}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -141,11 +146,8 @@ Global
{FEFD49C5-E2A2-411E-ABF4-DE7B58861750}.Release|x86.ActiveCfg = Release|Any CPU
{FEFD49C5-E2A2-411E-ABF4-DE7B58861750}.Release|x86.Build.0 = Release|Any CPU
{FEFD49C5-E2A2-411E-ABF4-DE7B58861750}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {FEFD49C5-E2A2-411E-ABF4-DE7B58861750}.Checked|Any CPU.Build.0 = Debug|Any CPU
{FEFD49C5-E2A2-411E-ABF4-DE7B58861750}.Checked|x64.ActiveCfg = Debug|Any CPU
- {FEFD49C5-E2A2-411E-ABF4-DE7B58861750}.Checked|x64.Build.0 = Debug|Any CPU
{FEFD49C5-E2A2-411E-ABF4-DE7B58861750}.Checked|x86.ActiveCfg = Debug|Any CPU
- {FEFD49C5-E2A2-411E-ABF4-DE7B58861750}.Checked|x86.Build.0 = Debug|Any CPU
{58441636-1844-462C-A3DF-C63CE8442E8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{58441636-1844-462C-A3DF-C63CE8442E8F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{58441636-1844-462C-A3DF-C63CE8442E8F}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -159,11 +161,8 @@ Global
{58441636-1844-462C-A3DF-C63CE8442E8F}.Release|x86.ActiveCfg = Release|Any CPU
{58441636-1844-462C-A3DF-C63CE8442E8F}.Release|x86.Build.0 = Release|Any CPU
{58441636-1844-462C-A3DF-C63CE8442E8F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {58441636-1844-462C-A3DF-C63CE8442E8F}.Checked|Any CPU.Build.0 = Debug|Any CPU
{58441636-1844-462C-A3DF-C63CE8442E8F}.Checked|x64.ActiveCfg = Debug|Any CPU
- {58441636-1844-462C-A3DF-C63CE8442E8F}.Checked|x64.Build.0 = Debug|Any CPU
{58441636-1844-462C-A3DF-C63CE8442E8F}.Checked|x86.ActiveCfg = Debug|Any CPU
- {58441636-1844-462C-A3DF-C63CE8442E8F}.Checked|x86.Build.0 = Debug|Any CPU
{8A6C5539-2206-4A07-8EBE-1C7260B29F31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8A6C5539-2206-4A07-8EBE-1C7260B29F31}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8A6C5539-2206-4A07-8EBE-1C7260B29F31}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -177,11 +176,8 @@ Global
{8A6C5539-2206-4A07-8EBE-1C7260B29F31}.Release|x86.ActiveCfg = Release|Any CPU
{8A6C5539-2206-4A07-8EBE-1C7260B29F31}.Release|x86.Build.0 = Release|Any CPU
{8A6C5539-2206-4A07-8EBE-1C7260B29F31}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {8A6C5539-2206-4A07-8EBE-1C7260B29F31}.Checked|Any CPU.Build.0 = Debug|Any CPU
{8A6C5539-2206-4A07-8EBE-1C7260B29F31}.Checked|x64.ActiveCfg = Debug|Any CPU
- {8A6C5539-2206-4A07-8EBE-1C7260B29F31}.Checked|x64.Build.0 = Debug|Any CPU
{8A6C5539-2206-4A07-8EBE-1C7260B29F31}.Checked|x86.ActiveCfg = Debug|Any CPU
- {8A6C5539-2206-4A07-8EBE-1C7260B29F31}.Checked|x86.Build.0 = Debug|Any CPU
{35509CE1-7BCA-4390-8F9E-56997A2AD9AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{35509CE1-7BCA-4390-8F9E-56997A2AD9AB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{35509CE1-7BCA-4390-8F9E-56997A2AD9AB}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -195,11 +191,8 @@ Global
{35509CE1-7BCA-4390-8F9E-56997A2AD9AB}.Release|x86.ActiveCfg = Release|Any CPU
{35509CE1-7BCA-4390-8F9E-56997A2AD9AB}.Release|x86.Build.0 = Release|Any CPU
{35509CE1-7BCA-4390-8F9E-56997A2AD9AB}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {35509CE1-7BCA-4390-8F9E-56997A2AD9AB}.Checked|Any CPU.Build.0 = Debug|Any CPU
{35509CE1-7BCA-4390-8F9E-56997A2AD9AB}.Checked|x64.ActiveCfg = Debug|Any CPU
- {35509CE1-7BCA-4390-8F9E-56997A2AD9AB}.Checked|x64.Build.0 = Debug|Any CPU
{35509CE1-7BCA-4390-8F9E-56997A2AD9AB}.Checked|x86.ActiveCfg = Debug|Any CPU
- {35509CE1-7BCA-4390-8F9E-56997A2AD9AB}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -212,6 +205,7 @@ Global
{EAE41D82-CFFA-4934-89B2-399D12530E84} = {89B14D9D-2BBE-446A-8ED8-020F7BBA6CFC}
{58441636-1844-462C-A3DF-C63CE8442E8F} = {89B14D9D-2BBE-446A-8ED8-020F7BBA6CFC}
{8A6C5539-2206-4A07-8EBE-1C7260B29F31} = {89B14D9D-2BBE-446A-8ED8-020F7BBA6CFC}
+ {919F14ED-E86A-4757-BFEB-8AEEDBCB09E4} = {B05E90C8-0282-4D7D-955E-3BE8A400D3A6}
{03C0F6B8-A04B-4822-8089-3918F02AD281} = {B05E90C8-0282-4D7D-955E-3BE8A400D3A6}
{35509CE1-7BCA-4390-8F9E-56997A2AD9AB} = {B05E90C8-0282-4D7D-955E-3BE8A400D3A6}
EndGlobalSection
diff --git a/src/libraries/System.Reflection/System.Reflection.sln b/src/libraries/System.Reflection/System.Reflection.sln
index a5dfc8f818a..dac058bbd6d 100644
--- a/src/libraries/System.Reflection/System.Reflection.sln
+++ b/src/libraries/System.Reflection/System.Reflection.sln
@@ -5,6 +5,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{1F5C28EE-FA69-4A3A-934C-88FEBBDE2489}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{D01D932F-2B0A-4AE3-AC2D-5D4B766FC15A}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reflection", "ref\System.Reflection.csproj", "{319997BC-5DF6-4E23-A768-ED9905690EF4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reflection", "src\System.Reflection.csproj", "{2A4650E3-E199-41E4-AD2B-32818E57D1C7}"
@@ -105,11 +107,8 @@ Global
{C5A7E7E7-E43B-4C87-9A92-13C3C817E714}.Release|x86.ActiveCfg = Release|Any CPU
{C5A7E7E7-E43B-4C87-9A92-13C3C817E714}.Release|x86.Build.0 = Release|Any CPU
{C5A7E7E7-E43B-4C87-9A92-13C3C817E714}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {C5A7E7E7-E43B-4C87-9A92-13C3C817E714}.Checked|Any CPU.Build.0 = Debug|Any CPU
{C5A7E7E7-E43B-4C87-9A92-13C3C817E714}.Checked|x64.ActiveCfg = Debug|Any CPU
- {C5A7E7E7-E43B-4C87-9A92-13C3C817E714}.Checked|x64.Build.0 = Debug|Any CPU
{C5A7E7E7-E43B-4C87-9A92-13C3C817E714}.Checked|x86.ActiveCfg = Debug|Any CPU
- {C5A7E7E7-E43B-4C87-9A92-13C3C817E714}.Checked|x86.Build.0 = Debug|Any CPU
{1F5C28EE-FA69-4A3A-934C-88FEBBDE2489}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1F5C28EE-FA69-4A3A-934C-88FEBBDE2489}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1F5C28EE-FA69-4A3A-934C-88FEBBDE2489}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -123,11 +122,23 @@ Global
{1F5C28EE-FA69-4A3A-934C-88FEBBDE2489}.Release|x86.ActiveCfg = Release|Any CPU
{1F5C28EE-FA69-4A3A-934C-88FEBBDE2489}.Release|x86.Build.0 = Release|Any CPU
{1F5C28EE-FA69-4A3A-934C-88FEBBDE2489}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {1F5C28EE-FA69-4A3A-934C-88FEBBDE2489}.Checked|Any CPU.Build.0 = Debug|Any CPU
{1F5C28EE-FA69-4A3A-934C-88FEBBDE2489}.Checked|x64.ActiveCfg = Debug|Any CPU
- {1F5C28EE-FA69-4A3A-934C-88FEBBDE2489}.Checked|x64.Build.0 = Debug|Any CPU
{1F5C28EE-FA69-4A3A-934C-88FEBBDE2489}.Checked|x86.ActiveCfg = Debug|Any CPU
- {1F5C28EE-FA69-4A3A-934C-88FEBBDE2489}.Checked|x86.Build.0 = Debug|Any CPU
+ {D01D932F-2B0A-4AE3-AC2D-5D4B766FC15A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D01D932F-2B0A-4AE3-AC2D-5D4B766FC15A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D01D932F-2B0A-4AE3-AC2D-5D4B766FC15A}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {D01D932F-2B0A-4AE3-AC2D-5D4B766FC15A}.Debug|x64.Build.0 = Debug|Any CPU
+ {D01D932F-2B0A-4AE3-AC2D-5D4B766FC15A}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {D01D932F-2B0A-4AE3-AC2D-5D4B766FC15A}.Debug|x86.Build.0 = Debug|Any CPU
+ {D01D932F-2B0A-4AE3-AC2D-5D4B766FC15A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D01D932F-2B0A-4AE3-AC2D-5D4B766FC15A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D01D932F-2B0A-4AE3-AC2D-5D4B766FC15A}.Release|x64.ActiveCfg = Release|Any CPU
+ {D01D932F-2B0A-4AE3-AC2D-5D4B766FC15A}.Release|x64.Build.0 = Release|Any CPU
+ {D01D932F-2B0A-4AE3-AC2D-5D4B766FC15A}.Release|x86.ActiveCfg = Release|Any CPU
+ {D01D932F-2B0A-4AE3-AC2D-5D4B766FC15A}.Release|x86.Build.0 = Release|Any CPU
+ {D01D932F-2B0A-4AE3-AC2D-5D4B766FC15A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {D01D932F-2B0A-4AE3-AC2D-5D4B766FC15A}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {D01D932F-2B0A-4AE3-AC2D-5D4B766FC15A}.Checked|x86.ActiveCfg = Debug|Any CPU
{319997BC-5DF6-4E23-A768-ED9905690EF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{319997BC-5DF6-4E23-A768-ED9905690EF4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{319997BC-5DF6-4E23-A768-ED9905690EF4}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -141,11 +152,8 @@ Global
{319997BC-5DF6-4E23-A768-ED9905690EF4}.Release|x86.ActiveCfg = Release|Any CPU
{319997BC-5DF6-4E23-A768-ED9905690EF4}.Release|x86.Build.0 = Release|Any CPU
{319997BC-5DF6-4E23-A768-ED9905690EF4}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {319997BC-5DF6-4E23-A768-ED9905690EF4}.Checked|Any CPU.Build.0 = Debug|Any CPU
{319997BC-5DF6-4E23-A768-ED9905690EF4}.Checked|x64.ActiveCfg = Debug|Any CPU
- {319997BC-5DF6-4E23-A768-ED9905690EF4}.Checked|x64.Build.0 = Debug|Any CPU
{319997BC-5DF6-4E23-A768-ED9905690EF4}.Checked|x86.ActiveCfg = Debug|Any CPU
- {319997BC-5DF6-4E23-A768-ED9905690EF4}.Checked|x86.Build.0 = Debug|Any CPU
{2A4650E3-E199-41E4-AD2B-32818E57D1C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2A4650E3-E199-41E4-AD2B-32818E57D1C7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2A4650E3-E199-41E4-AD2B-32818E57D1C7}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -159,11 +167,8 @@ Global
{2A4650E3-E199-41E4-AD2B-32818E57D1C7}.Release|x86.ActiveCfg = Release|Any CPU
{2A4650E3-E199-41E4-AD2B-32818E57D1C7}.Release|x86.Build.0 = Release|Any CPU
{2A4650E3-E199-41E4-AD2B-32818E57D1C7}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {2A4650E3-E199-41E4-AD2B-32818E57D1C7}.Checked|Any CPU.Build.0 = Debug|Any CPU
{2A4650E3-E199-41E4-AD2B-32818E57D1C7}.Checked|x64.ActiveCfg = Debug|Any CPU
- {2A4650E3-E199-41E4-AD2B-32818E57D1C7}.Checked|x64.Build.0 = Debug|Any CPU
{2A4650E3-E199-41E4-AD2B-32818E57D1C7}.Checked|x86.ActiveCfg = Debug|Any CPU
- {2A4650E3-E199-41E4-AD2B-32818E57D1C7}.Checked|x86.Build.0 = Debug|Any CPU
{F5998D9E-69A3-4F43-9AA5-B1BB33B54C64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F5998D9E-69A3-4F43-9AA5-B1BB33B54C64}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F5998D9E-69A3-4F43-9AA5-B1BB33B54C64}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -177,11 +182,8 @@ Global
{F5998D9E-69A3-4F43-9AA5-B1BB33B54C64}.Release|x86.ActiveCfg = Release|Any CPU
{F5998D9E-69A3-4F43-9AA5-B1BB33B54C64}.Release|x86.Build.0 = Release|Any CPU
{F5998D9E-69A3-4F43-9AA5-B1BB33B54C64}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {F5998D9E-69A3-4F43-9AA5-B1BB33B54C64}.Checked|Any CPU.Build.0 = Debug|Any CPU
{F5998D9E-69A3-4F43-9AA5-B1BB33B54C64}.Checked|x64.ActiveCfg = Debug|Any CPU
- {F5998D9E-69A3-4F43-9AA5-B1BB33B54C64}.Checked|x64.Build.0 = Debug|Any CPU
{F5998D9E-69A3-4F43-9AA5-B1BB33B54C64}.Checked|x86.ActiveCfg = Debug|Any CPU
- {F5998D9E-69A3-4F43-9AA5-B1BB33B54C64}.Checked|x86.Build.0 = Debug|Any CPU
{7873C6BF-74FA-4DCF-ADCD-15C75B20132D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7873C6BF-74FA-4DCF-ADCD-15C75B20132D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7873C6BF-74FA-4DCF-ADCD-15C75B20132D}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -195,11 +197,8 @@ Global
{7873C6BF-74FA-4DCF-ADCD-15C75B20132D}.Release|x86.ActiveCfg = Release|Any CPU
{7873C6BF-74FA-4DCF-ADCD-15C75B20132D}.Release|x86.Build.0 = Release|Any CPU
{7873C6BF-74FA-4DCF-ADCD-15C75B20132D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {7873C6BF-74FA-4DCF-ADCD-15C75B20132D}.Checked|Any CPU.Build.0 = Debug|Any CPU
{7873C6BF-74FA-4DCF-ADCD-15C75B20132D}.Checked|x64.ActiveCfg = Debug|Any CPU
- {7873C6BF-74FA-4DCF-ADCD-15C75B20132D}.Checked|x64.Build.0 = Debug|Any CPU
{7873C6BF-74FA-4DCF-ADCD-15C75B20132D}.Checked|x86.ActiveCfg = Debug|Any CPU
- {7873C6BF-74FA-4DCF-ADCD-15C75B20132D}.Checked|x86.Build.0 = Debug|Any CPU
{9A5D32AB-91C7-4439-8ACA-4F17252EA3F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9A5D32AB-91C7-4439-8ACA-4F17252EA3F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9A5D32AB-91C7-4439-8ACA-4F17252EA3F1}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -213,11 +212,8 @@ Global
{9A5D32AB-91C7-4439-8ACA-4F17252EA3F1}.Release|x86.ActiveCfg = Release|Any CPU
{9A5D32AB-91C7-4439-8ACA-4F17252EA3F1}.Release|x86.Build.0 = Release|Any CPU
{9A5D32AB-91C7-4439-8ACA-4F17252EA3F1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {9A5D32AB-91C7-4439-8ACA-4F17252EA3F1}.Checked|Any CPU.Build.0 = Debug|Any CPU
{9A5D32AB-91C7-4439-8ACA-4F17252EA3F1}.Checked|x64.ActiveCfg = Debug|Any CPU
- {9A5D32AB-91C7-4439-8ACA-4F17252EA3F1}.Checked|x64.Build.0 = Debug|Any CPU
{9A5D32AB-91C7-4439-8ACA-4F17252EA3F1}.Checked|x86.ActiveCfg = Debug|Any CPU
- {9A5D32AB-91C7-4439-8ACA-4F17252EA3F1}.Checked|x86.Build.0 = Debug|Any CPU
{C14AA1F5-6319-4F35-967F-B76E3E7283B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C14AA1F5-6319-4F35-967F-B76E3E7283B0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C14AA1F5-6319-4F35-967F-B76E3E7283B0}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -231,11 +227,8 @@ Global
{C14AA1F5-6319-4F35-967F-B76E3E7283B0}.Release|x86.ActiveCfg = Release|Any CPU
{C14AA1F5-6319-4F35-967F-B76E3E7283B0}.Release|x86.Build.0 = Release|Any CPU
{C14AA1F5-6319-4F35-967F-B76E3E7283B0}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {C14AA1F5-6319-4F35-967F-B76E3E7283B0}.Checked|Any CPU.Build.0 = Debug|Any CPU
{C14AA1F5-6319-4F35-967F-B76E3E7283B0}.Checked|x64.ActiveCfg = Debug|Any CPU
- {C14AA1F5-6319-4F35-967F-B76E3E7283B0}.Checked|x64.Build.0 = Debug|Any CPU
{C14AA1F5-6319-4F35-967F-B76E3E7283B0}.Checked|x86.ActiveCfg = Debug|Any CPU
- {C14AA1F5-6319-4F35-967F-B76E3E7283B0}.Checked|x86.Build.0 = Debug|Any CPU
{BB496AA6-1841-4A40-A5B5-2DFB7F04CC7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BB496AA6-1841-4A40-A5B5-2DFB7F04CC7A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BB496AA6-1841-4A40-A5B5-2DFB7F04CC7A}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -249,11 +242,8 @@ Global
{BB496AA6-1841-4A40-A5B5-2DFB7F04CC7A}.Release|x86.ActiveCfg = Release|Any CPU
{BB496AA6-1841-4A40-A5B5-2DFB7F04CC7A}.Release|x86.Build.0 = Release|Any CPU
{BB496AA6-1841-4A40-A5B5-2DFB7F04CC7A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {BB496AA6-1841-4A40-A5B5-2DFB7F04CC7A}.Checked|Any CPU.Build.0 = Debug|Any CPU
{BB496AA6-1841-4A40-A5B5-2DFB7F04CC7A}.Checked|x64.ActiveCfg = Debug|Any CPU
- {BB496AA6-1841-4A40-A5B5-2DFB7F04CC7A}.Checked|x64.Build.0 = Debug|Any CPU
{BB496AA6-1841-4A40-A5B5-2DFB7F04CC7A}.Checked|x86.ActiveCfg = Debug|Any CPU
- {BB496AA6-1841-4A40-A5B5-2DFB7F04CC7A}.Checked|x86.Build.0 = Debug|Any CPU
{F0864C35-F7D0-41BD-B7E8-A54630D9537B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F0864C35-F7D0-41BD-B7E8-A54630D9537B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F0864C35-F7D0-41BD-B7E8-A54630D9537B}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -267,11 +257,8 @@ Global
{F0864C35-F7D0-41BD-B7E8-A54630D9537B}.Release|x86.ActiveCfg = Release|Any CPU
{F0864C35-F7D0-41BD-B7E8-A54630D9537B}.Release|x86.Build.0 = Release|Any CPU
{F0864C35-F7D0-41BD-B7E8-A54630D9537B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {F0864C35-F7D0-41BD-B7E8-A54630D9537B}.Checked|Any CPU.Build.0 = Debug|Any CPU
{F0864C35-F7D0-41BD-B7E8-A54630D9537B}.Checked|x64.ActiveCfg = Debug|Any CPU
- {F0864C35-F7D0-41BD-B7E8-A54630D9537B}.Checked|x64.Build.0 = Debug|Any CPU
{F0864C35-F7D0-41BD-B7E8-A54630D9537B}.Checked|x86.ActiveCfg = Debug|Any CPU
- {F0864C35-F7D0-41BD-B7E8-A54630D9537B}.Checked|x86.Build.0 = Debug|Any CPU
{6DACBD8C-A8FF-490D-9434-AB78283C1BDA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6DACBD8C-A8FF-490D-9434-AB78283C1BDA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6DACBD8C-A8FF-490D-9434-AB78283C1BDA}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -285,11 +272,8 @@ Global
{6DACBD8C-A8FF-490D-9434-AB78283C1BDA}.Release|x86.ActiveCfg = Release|Any CPU
{6DACBD8C-A8FF-490D-9434-AB78283C1BDA}.Release|x86.Build.0 = Release|Any CPU
{6DACBD8C-A8FF-490D-9434-AB78283C1BDA}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {6DACBD8C-A8FF-490D-9434-AB78283C1BDA}.Checked|Any CPU.Build.0 = Debug|Any CPU
{6DACBD8C-A8FF-490D-9434-AB78283C1BDA}.Checked|x64.ActiveCfg = Debug|Any CPU
- {6DACBD8C-A8FF-490D-9434-AB78283C1BDA}.Checked|x64.Build.0 = Debug|Any CPU
{6DACBD8C-A8FF-490D-9434-AB78283C1BDA}.Checked|x86.ActiveCfg = Debug|Any CPU
- {6DACBD8C-A8FF-490D-9434-AB78283C1BDA}.Checked|x86.Build.0 = Debug|Any CPU
{882B2F3F-31C0-4BB0-8289-AEF4378864B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{882B2F3F-31C0-4BB0-8289-AEF4378864B4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{882B2F3F-31C0-4BB0-8289-AEF4378864B4}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -303,11 +287,8 @@ Global
{882B2F3F-31C0-4BB0-8289-AEF4378864B4}.Release|x86.ActiveCfg = Release|Any CPU
{882B2F3F-31C0-4BB0-8289-AEF4378864B4}.Release|x86.Build.0 = Release|Any CPU
{882B2F3F-31C0-4BB0-8289-AEF4378864B4}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {882B2F3F-31C0-4BB0-8289-AEF4378864B4}.Checked|Any CPU.Build.0 = Debug|Any CPU
{882B2F3F-31C0-4BB0-8289-AEF4378864B4}.Checked|x64.ActiveCfg = Debug|Any CPU
- {882B2F3F-31C0-4BB0-8289-AEF4378864B4}.Checked|x64.Build.0 = Debug|Any CPU
{882B2F3F-31C0-4BB0-8289-AEF4378864B4}.Checked|x86.ActiveCfg = Debug|Any CPU
- {882B2F3F-31C0-4BB0-8289-AEF4378864B4}.Checked|x86.Build.0 = Debug|Any CPU
{0082F4DC-2BB1-4119-9678-64CE0315B04D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0082F4DC-2BB1-4119-9678-64CE0315B04D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0082F4DC-2BB1-4119-9678-64CE0315B04D}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -321,11 +302,8 @@ Global
{0082F4DC-2BB1-4119-9678-64CE0315B04D}.Release|x86.ActiveCfg = Release|Any CPU
{0082F4DC-2BB1-4119-9678-64CE0315B04D}.Release|x86.Build.0 = Release|Any CPU
{0082F4DC-2BB1-4119-9678-64CE0315B04D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {0082F4DC-2BB1-4119-9678-64CE0315B04D}.Checked|Any CPU.Build.0 = Debug|Any CPU
{0082F4DC-2BB1-4119-9678-64CE0315B04D}.Checked|x64.ActiveCfg = Debug|Any CPU
- {0082F4DC-2BB1-4119-9678-64CE0315B04D}.Checked|x64.Build.0 = Debug|Any CPU
{0082F4DC-2BB1-4119-9678-64CE0315B04D}.Checked|x86.ActiveCfg = Debug|Any CPU
- {0082F4DC-2BB1-4119-9678-64CE0315B04D}.Checked|x86.Build.0 = Debug|Any CPU
{CFF89A7E-E462-4A34-9352-86C908E0F34C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CFF89A7E-E462-4A34-9352-86C908E0F34C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CFF89A7E-E462-4A34-9352-86C908E0F34C}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -339,11 +317,8 @@ Global
{CFF89A7E-E462-4A34-9352-86C908E0F34C}.Release|x86.ActiveCfg = Release|Any CPU
{CFF89A7E-E462-4A34-9352-86C908E0F34C}.Release|x86.Build.0 = Release|Any CPU
{CFF89A7E-E462-4A34-9352-86C908E0F34C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {CFF89A7E-E462-4A34-9352-86C908E0F34C}.Checked|Any CPU.Build.0 = Debug|Any CPU
{CFF89A7E-E462-4A34-9352-86C908E0F34C}.Checked|x64.ActiveCfg = Debug|Any CPU
- {CFF89A7E-E462-4A34-9352-86C908E0F34C}.Checked|x64.Build.0 = Debug|Any CPU
{CFF89A7E-E462-4A34-9352-86C908E0F34C}.Checked|x86.ActiveCfg = Debug|Any CPU
- {CFF89A7E-E462-4A34-9352-86C908E0F34C}.Checked|x86.Build.0 = Debug|Any CPU
{F262C9E1-EBC3-4EC2-9CF7-AD266BDD9F58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F262C9E1-EBC3-4EC2-9CF7-AD266BDD9F58}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F262C9E1-EBC3-4EC2-9CF7-AD266BDD9F58}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -357,11 +332,8 @@ Global
{F262C9E1-EBC3-4EC2-9CF7-AD266BDD9F58}.Release|x86.ActiveCfg = Release|Any CPU
{F262C9E1-EBC3-4EC2-9CF7-AD266BDD9F58}.Release|x86.Build.0 = Release|Any CPU
{F262C9E1-EBC3-4EC2-9CF7-AD266BDD9F58}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {F262C9E1-EBC3-4EC2-9CF7-AD266BDD9F58}.Checked|Any CPU.Build.0 = Debug|Any CPU
{F262C9E1-EBC3-4EC2-9CF7-AD266BDD9F58}.Checked|x64.ActiveCfg = Debug|Any CPU
- {F262C9E1-EBC3-4EC2-9CF7-AD266BDD9F58}.Checked|x64.Build.0 = Debug|Any CPU
{F262C9E1-EBC3-4EC2-9CF7-AD266BDD9F58}.Checked|x86.ActiveCfg = Debug|Any CPU
- {F262C9E1-EBC3-4EC2-9CF7-AD266BDD9F58}.Checked|x86.Build.0 = Debug|Any CPU
{CCB3A96A-9DCA-49F1-A1D6-80D0395C1DD3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CCB3A96A-9DCA-49F1-A1D6-80D0395C1DD3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CCB3A96A-9DCA-49F1-A1D6-80D0395C1DD3}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -375,11 +347,8 @@ Global
{CCB3A96A-9DCA-49F1-A1D6-80D0395C1DD3}.Release|x86.ActiveCfg = Release|Any CPU
{CCB3A96A-9DCA-49F1-A1D6-80D0395C1DD3}.Release|x86.Build.0 = Release|Any CPU
{CCB3A96A-9DCA-49F1-A1D6-80D0395C1DD3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {CCB3A96A-9DCA-49F1-A1D6-80D0395C1DD3}.Checked|Any CPU.Build.0 = Debug|Any CPU
{CCB3A96A-9DCA-49F1-A1D6-80D0395C1DD3}.Checked|x64.ActiveCfg = Debug|Any CPU
- {CCB3A96A-9DCA-49F1-A1D6-80D0395C1DD3}.Checked|x64.Build.0 = Debug|Any CPU
{CCB3A96A-9DCA-49F1-A1D6-80D0395C1DD3}.Checked|x86.ActiveCfg = Debug|Any CPU
- {CCB3A96A-9DCA-49F1-A1D6-80D0395C1DD3}.Checked|x86.Build.0 = Debug|Any CPU
{006DEC5A-067B-4099-934E-830ABB10BC26}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{006DEC5A-067B-4099-934E-830ABB10BC26}.Debug|Any CPU.Build.0 = Debug|Any CPU
{006DEC5A-067B-4099-934E-830ABB10BC26}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -393,11 +362,8 @@ Global
{006DEC5A-067B-4099-934E-830ABB10BC26}.Release|x86.ActiveCfg = Release|Any CPU
{006DEC5A-067B-4099-934E-830ABB10BC26}.Release|x86.Build.0 = Release|Any CPU
{006DEC5A-067B-4099-934E-830ABB10BC26}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {006DEC5A-067B-4099-934E-830ABB10BC26}.Checked|Any CPU.Build.0 = Debug|Any CPU
{006DEC5A-067B-4099-934E-830ABB10BC26}.Checked|x64.ActiveCfg = Debug|Any CPU
- {006DEC5A-067B-4099-934E-830ABB10BC26}.Checked|x64.Build.0 = Debug|Any CPU
{006DEC5A-067B-4099-934E-830ABB10BC26}.Checked|x86.ActiveCfg = Debug|Any CPU
- {006DEC5A-067B-4099-934E-830ABB10BC26}.Checked|x86.Build.0 = Debug|Any CPU
{EE38FA51-BA38-4FC9-9655-C8EBB768969D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EE38FA51-BA38-4FC9-9655-C8EBB768969D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EE38FA51-BA38-4FC9-9655-C8EBB768969D}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -411,11 +377,8 @@ Global
{EE38FA51-BA38-4FC9-9655-C8EBB768969D}.Release|x86.ActiveCfg = Release|Any CPU
{EE38FA51-BA38-4FC9-9655-C8EBB768969D}.Release|x86.Build.0 = Release|Any CPU
{EE38FA51-BA38-4FC9-9655-C8EBB768969D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {EE38FA51-BA38-4FC9-9655-C8EBB768969D}.Checked|Any CPU.Build.0 = Debug|Any CPU
{EE38FA51-BA38-4FC9-9655-C8EBB768969D}.Checked|x64.ActiveCfg = Debug|Any CPU
- {EE38FA51-BA38-4FC9-9655-C8EBB768969D}.Checked|x64.Build.0 = Debug|Any CPU
{EE38FA51-BA38-4FC9-9655-C8EBB768969D}.Checked|x86.ActiveCfg = Debug|Any CPU
- {EE38FA51-BA38-4FC9-9655-C8EBB768969D}.Checked|x86.Build.0 = Debug|Any CPU
{CB2060E9-094A-4E8A-851B-84EF56491F5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CB2060E9-094A-4E8A-851B-84EF56491F5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CB2060E9-094A-4E8A-851B-84EF56491F5D}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -429,11 +392,8 @@ Global
{CB2060E9-094A-4E8A-851B-84EF56491F5D}.Release|x86.ActiveCfg = Release|Any CPU
{CB2060E9-094A-4E8A-851B-84EF56491F5D}.Release|x86.Build.0 = Release|Any CPU
{CB2060E9-094A-4E8A-851B-84EF56491F5D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {CB2060E9-094A-4E8A-851B-84EF56491F5D}.Checked|Any CPU.Build.0 = Debug|Any CPU
{CB2060E9-094A-4E8A-851B-84EF56491F5D}.Checked|x64.ActiveCfg = Debug|Any CPU
- {CB2060E9-094A-4E8A-851B-84EF56491F5D}.Checked|x64.Build.0 = Debug|Any CPU
{CB2060E9-094A-4E8A-851B-84EF56491F5D}.Checked|x86.ActiveCfg = Debug|Any CPU
- {CB2060E9-094A-4E8A-851B-84EF56491F5D}.Checked|x86.Build.0 = Debug|Any CPU
{F2E5F428-418B-41B9-BF14-36EB67486A71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F2E5F428-418B-41B9-BF14-36EB67486A71}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F2E5F428-418B-41B9-BF14-36EB67486A71}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -447,11 +407,8 @@ Global
{F2E5F428-418B-41B9-BF14-36EB67486A71}.Release|x86.ActiveCfg = Release|Any CPU
{F2E5F428-418B-41B9-BF14-36EB67486A71}.Release|x86.Build.0 = Release|Any CPU
{F2E5F428-418B-41B9-BF14-36EB67486A71}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {F2E5F428-418B-41B9-BF14-36EB67486A71}.Checked|Any CPU.Build.0 = Debug|Any CPU
{F2E5F428-418B-41B9-BF14-36EB67486A71}.Checked|x64.ActiveCfg = Debug|Any CPU
- {F2E5F428-418B-41B9-BF14-36EB67486A71}.Checked|x64.Build.0 = Debug|Any CPU
{F2E5F428-418B-41B9-BF14-36EB67486A71}.Checked|x86.ActiveCfg = Debug|Any CPU
- {F2E5F428-418B-41B9-BF14-36EB67486A71}.Checked|x86.Build.0 = Debug|Any CPU
{E6F16442-FB0F-4666-8309-F8B1EBA5B860}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E6F16442-FB0F-4666-8309-F8B1EBA5B860}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E6F16442-FB0F-4666-8309-F8B1EBA5B860}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -465,11 +422,8 @@ Global
{E6F16442-FB0F-4666-8309-F8B1EBA5B860}.Release|x86.ActiveCfg = Release|Any CPU
{E6F16442-FB0F-4666-8309-F8B1EBA5B860}.Release|x86.Build.0 = Release|Any CPU
{E6F16442-FB0F-4666-8309-F8B1EBA5B860}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {E6F16442-FB0F-4666-8309-F8B1EBA5B860}.Checked|Any CPU.Build.0 = Debug|Any CPU
{E6F16442-FB0F-4666-8309-F8B1EBA5B860}.Checked|x64.ActiveCfg = Debug|Any CPU
- {E6F16442-FB0F-4666-8309-F8B1EBA5B860}.Checked|x64.Build.0 = Debug|Any CPU
{E6F16442-FB0F-4666-8309-F8B1EBA5B860}.Checked|x86.ActiveCfg = Debug|Any CPU
- {E6F16442-FB0F-4666-8309-F8B1EBA5B860}.Checked|x86.Build.0 = Debug|Any CPU
{42BEE4BD-C378-41C5-A94F-4EA01F8D6E88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{42BEE4BD-C378-41C5-A94F-4EA01F8D6E88}.Debug|Any CPU.Build.0 = Debug|Any CPU
{42BEE4BD-C378-41C5-A94F-4EA01F8D6E88}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -483,11 +437,8 @@ Global
{42BEE4BD-C378-41C5-A94F-4EA01F8D6E88}.Release|x86.ActiveCfg = Release|Any CPU
{42BEE4BD-C378-41C5-A94F-4EA01F8D6E88}.Release|x86.Build.0 = Release|Any CPU
{42BEE4BD-C378-41C5-A94F-4EA01F8D6E88}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {42BEE4BD-C378-41C5-A94F-4EA01F8D6E88}.Checked|Any CPU.Build.0 = Debug|Any CPU
{42BEE4BD-C378-41C5-A94F-4EA01F8D6E88}.Checked|x64.ActiveCfg = Debug|Any CPU
- {42BEE4BD-C378-41C5-A94F-4EA01F8D6E88}.Checked|x64.Build.0 = Debug|Any CPU
{42BEE4BD-C378-41C5-A94F-4EA01F8D6E88}.Checked|x86.ActiveCfg = Debug|Any CPU
- {42BEE4BD-C378-41C5-A94F-4EA01F8D6E88}.Checked|x86.Build.0 = Debug|Any CPU
{C4AF78A8-28D7-434B-8F85-0B0E902AF8E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C4AF78A8-28D7-434B-8F85-0B0E902AF8E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C4AF78A8-28D7-434B-8F85-0B0E902AF8E0}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -501,11 +452,8 @@ Global
{C4AF78A8-28D7-434B-8F85-0B0E902AF8E0}.Release|x86.ActiveCfg = Release|Any CPU
{C4AF78A8-28D7-434B-8F85-0B0E902AF8E0}.Release|x86.Build.0 = Release|Any CPU
{C4AF78A8-28D7-434B-8F85-0B0E902AF8E0}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {C4AF78A8-28D7-434B-8F85-0B0E902AF8E0}.Checked|Any CPU.Build.0 = Debug|Any CPU
{C4AF78A8-28D7-434B-8F85-0B0E902AF8E0}.Checked|x64.ActiveCfg = Debug|Any CPU
- {C4AF78A8-28D7-434B-8F85-0B0E902AF8E0}.Checked|x64.Build.0 = Debug|Any CPU
{C4AF78A8-28D7-434B-8F85-0B0E902AF8E0}.Checked|x86.ActiveCfg = Debug|Any CPU
- {C4AF78A8-28D7-434B-8F85-0B0E902AF8E0}.Checked|x86.Build.0 = Debug|Any CPU
{A2B3A339-4792-4561-A973-11FE5EEEB54A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A2B3A339-4792-4561-A973-11FE5EEEB54A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A2B3A339-4792-4561-A973-11FE5EEEB54A}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -519,11 +467,8 @@ Global
{A2B3A339-4792-4561-A973-11FE5EEEB54A}.Release|x86.ActiveCfg = Release|Any CPU
{A2B3A339-4792-4561-A973-11FE5EEEB54A}.Release|x86.Build.0 = Release|Any CPU
{A2B3A339-4792-4561-A973-11FE5EEEB54A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {A2B3A339-4792-4561-A973-11FE5EEEB54A}.Checked|Any CPU.Build.0 = Debug|Any CPU
{A2B3A339-4792-4561-A973-11FE5EEEB54A}.Checked|x64.ActiveCfg = Debug|Any CPU
- {A2B3A339-4792-4561-A973-11FE5EEEB54A}.Checked|x64.Build.0 = Debug|Any CPU
{A2B3A339-4792-4561-A973-11FE5EEEB54A}.Checked|x86.ActiveCfg = Debug|Any CPU
- {A2B3A339-4792-4561-A973-11FE5EEEB54A}.Checked|x86.Build.0 = Debug|Any CPU
{7625A3EB-C76C-41FE-85DC-C8B792062F9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7625A3EB-C76C-41FE-85DC-C8B792062F9C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7625A3EB-C76C-41FE-85DC-C8B792062F9C}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -537,11 +482,8 @@ Global
{7625A3EB-C76C-41FE-85DC-C8B792062F9C}.Release|x86.ActiveCfg = Release|Any CPU
{7625A3EB-C76C-41FE-85DC-C8B792062F9C}.Release|x86.Build.0 = Release|Any CPU
{7625A3EB-C76C-41FE-85DC-C8B792062F9C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {7625A3EB-C76C-41FE-85DC-C8B792062F9C}.Checked|Any CPU.Build.0 = Debug|Any CPU
{7625A3EB-C76C-41FE-85DC-C8B792062F9C}.Checked|x64.ActiveCfg = Debug|Any CPU
- {7625A3EB-C76C-41FE-85DC-C8B792062F9C}.Checked|x64.Build.0 = Debug|Any CPU
{7625A3EB-C76C-41FE-85DC-C8B792062F9C}.Checked|x86.ActiveCfg = Debug|Any CPU
- {7625A3EB-C76C-41FE-85DC-C8B792062F9C}.Checked|x86.Build.0 = Debug|Any CPU
{95C7E01D-B35D-431C-A50E-D52956ABBFB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{95C7E01D-B35D-431C-A50E-D52956ABBFB3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{95C7E01D-B35D-431C-A50E-D52956ABBFB3}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -555,11 +497,8 @@ Global
{95C7E01D-B35D-431C-A50E-D52956ABBFB3}.Release|x86.ActiveCfg = Release|Any CPU
{95C7E01D-B35D-431C-A50E-D52956ABBFB3}.Release|x86.Build.0 = Release|Any CPU
{95C7E01D-B35D-431C-A50E-D52956ABBFB3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {95C7E01D-B35D-431C-A50E-D52956ABBFB3}.Checked|Any CPU.Build.0 = Debug|Any CPU
{95C7E01D-B35D-431C-A50E-D52956ABBFB3}.Checked|x64.ActiveCfg = Debug|Any CPU
- {95C7E01D-B35D-431C-A50E-D52956ABBFB3}.Checked|x64.Build.0 = Debug|Any CPU
{95C7E01D-B35D-431C-A50E-D52956ABBFB3}.Checked|x86.ActiveCfg = Debug|Any CPU
- {95C7E01D-B35D-431C-A50E-D52956ABBFB3}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -590,6 +529,7 @@ Global
{1F5C28EE-FA69-4A3A-934C-88FEBBDE2489} = {5BEA3DA5-3D9A-4642-B049-C04392B78D4B}
{A2B3A339-4792-4561-A973-11FE5EEEB54A} = {5BEA3DA5-3D9A-4642-B049-C04392B78D4B}
{7625A3EB-C76C-41FE-85DC-C8B792062F9C} = {5BEA3DA5-3D9A-4642-B049-C04392B78D4B}
+ {D01D932F-2B0A-4AE3-AC2D-5D4B766FC15A} = {548F3513-E3A5-4741-A8C5-00D0CF99B2D3}
{319997BC-5DF6-4E23-A768-ED9905690EF4} = {548F3513-E3A5-4741-A8C5-00D0CF99B2D3}
{95C7E01D-B35D-431C-A50E-D52956ABBFB3} = {548F3513-E3A5-4741-A8C5-00D0CF99B2D3}
EndGlobalSection
diff --git a/src/libraries/System.Reflection/tests/AssemblyTests.cs b/src/libraries/System.Reflection/tests/AssemblyTests.cs
index bd86b761db5..61059307625 100644
--- a/src/libraries/System.Reflection/tests/AssemblyTests.cs
+++ b/src/libraries/System.Reflection/tests/AssemblyTests.cs
@@ -154,10 +154,19 @@ namespace System.Reflection.Tests
Assert.NotNull(Assembly.GetEntryAssembly());
string assembly = Assembly.GetEntryAssembly().ToString();
- // The single file test runner is not xunit.console
- string expectedAssembly = PlatformDetection.IsNativeAot ? "System.Reflection.Tests" : "xunit.console";
+ bool correct;
+ if (PlatformDetection.IsNativeAot)
+ {
+ // The single file test runner is not 'xunit.console'.
+ correct = assembly.IndexOf("System.Reflection.Tests", StringComparison.OrdinalIgnoreCase) != -1;
+ }
+ else
+ {
+ // Under Visual Studio, the runner is 'testhost', otherwise it is 'xunit.console'.
+ correct = assembly.IndexOf("xunit.console", StringComparison.OrdinalIgnoreCase) != -1 ||
+ assembly.IndexOf("testhost", StringComparison.OrdinalIgnoreCase) != -1;
+ }
- bool correct = assembly.IndexOf(expectedAssembly, StringComparison.OrdinalIgnoreCase) != -1;
Assert.True(correct, $"Unexpected assembly name {assembly}");
}
diff --git a/src/libraries/System.Reflection/tests/System.Reflection.Tests.csproj b/src/libraries/System.Reflection/tests/System.Reflection.Tests.csproj
index 5da8f6dbc76..bc011a8a600 100644
--- a/src/libraries/System.Reflection/tests/System.Reflection.Tests.csproj
+++ b/src/libraries/System.Reflection/tests/System.Reflection.Tests.csproj
@@ -2,8 +2,6 @@
<PropertyGroup>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<TestRuntime>true</TestRuntime>
- <!-- LoadFrom_SameIdentityAsAssemblyWithDifferentPath_ReturnsEqualAssemblies test relies on no deps.json -->
- <GenerateDependencyFile>false</GenerateDependencyFile>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<!-- SYSLIB0013: Uri.EscapeUriString is obsolete
SYSLIB0037: AssemblyName members HashAlgorithm, ProcessorArchitecture, and VersionCompatibility are obsolete. -->
diff --git a/src/libraries/System.Resources.ResourceManager/System.Resources.ResourceManager.sln b/src/libraries/System.Resources.ResourceManager/System.Resources.ResourceManager.sln
index 896b1cd51cd..9fedb7559f9 100644
--- a/src/libraries/System.Resources.ResourceManager/System.Resources.ResourceManager.sln
+++ b/src/libraries/System.Resources.ResourceManager/System.Resources.ResourceManager.sln
@@ -13,6 +13,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Drawing.Common", "..
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{497FC2E7-EFA3-4F6F-A883-527900B60D4F}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{B1658B56-CFAC-4034-B102-41C9B082FCD6}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Resources.Extensions", "..\System.Resources.Extensions\ref\System.Resources.Extensions.csproj", "{F98F08E3-520B-49CA-B038-FF20857CEAA7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Resources.Extensions", "..\System.Resources.Extensions\src\System.Resources.Extensions.csproj", "{DE2EC027-CD6F-4C5B-8B49-66B5FE795472}"
@@ -81,11 +83,8 @@ Global
{B93B5C05-FB28-4173-8786-57B42CFE38F3}.Release|x86.ActiveCfg = Release|Any CPU
{B93B5C05-FB28-4173-8786-57B42CFE38F3}.Release|x86.Build.0 = Release|Any CPU
{B93B5C05-FB28-4173-8786-57B42CFE38F3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {B93B5C05-FB28-4173-8786-57B42CFE38F3}.Checked|Any CPU.Build.0 = Debug|Any CPU
{B93B5C05-FB28-4173-8786-57B42CFE38F3}.Checked|x64.ActiveCfg = Debug|Any CPU
- {B93B5C05-FB28-4173-8786-57B42CFE38F3}.Checked|x64.Build.0 = Debug|Any CPU
{B93B5C05-FB28-4173-8786-57B42CFE38F3}.Checked|x86.ActiveCfg = Debug|Any CPU
- {B93B5C05-FB28-4173-8786-57B42CFE38F3}.Checked|x86.Build.0 = Debug|Any CPU
{AFC17385-4DE6-40FF-AEF9-F117B0F1C00B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AFC17385-4DE6-40FF-AEF9-F117B0F1C00B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AFC17385-4DE6-40FF-AEF9-F117B0F1C00B}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -99,11 +98,8 @@ Global
{AFC17385-4DE6-40FF-AEF9-F117B0F1C00B}.Release|x86.ActiveCfg = Release|Any CPU
{AFC17385-4DE6-40FF-AEF9-F117B0F1C00B}.Release|x86.Build.0 = Release|Any CPU
{AFC17385-4DE6-40FF-AEF9-F117B0F1C00B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {AFC17385-4DE6-40FF-AEF9-F117B0F1C00B}.Checked|Any CPU.Build.0 = Debug|Any CPU
{AFC17385-4DE6-40FF-AEF9-F117B0F1C00B}.Checked|x64.ActiveCfg = Debug|Any CPU
- {AFC17385-4DE6-40FF-AEF9-F117B0F1C00B}.Checked|x64.Build.0 = Debug|Any CPU
{AFC17385-4DE6-40FF-AEF9-F117B0F1C00B}.Checked|x86.ActiveCfg = Debug|Any CPU
- {AFC17385-4DE6-40FF-AEF9-F117B0F1C00B}.Checked|x86.Build.0 = Debug|Any CPU
{7A7EB655-E233-4824-BE13-34693F452D1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7A7EB655-E233-4824-BE13-34693F452D1E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7A7EB655-E233-4824-BE13-34693F452D1E}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -117,11 +113,8 @@ Global
{7A7EB655-E233-4824-BE13-34693F452D1E}.Release|x86.ActiveCfg = Release|Any CPU
{7A7EB655-E233-4824-BE13-34693F452D1E}.Release|x86.Build.0 = Release|Any CPU
{7A7EB655-E233-4824-BE13-34693F452D1E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {7A7EB655-E233-4824-BE13-34693F452D1E}.Checked|Any CPU.Build.0 = Debug|Any CPU
{7A7EB655-E233-4824-BE13-34693F452D1E}.Checked|x64.ActiveCfg = Debug|Any CPU
- {7A7EB655-E233-4824-BE13-34693F452D1E}.Checked|x64.Build.0 = Debug|Any CPU
{7A7EB655-E233-4824-BE13-34693F452D1E}.Checked|x86.ActiveCfg = Debug|Any CPU
- {7A7EB655-E233-4824-BE13-34693F452D1E}.Checked|x86.Build.0 = Debug|Any CPU
{B44796C1-71A0-4E3A-B369-5B0A9D2E7FB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B44796C1-71A0-4E3A-B369-5B0A9D2E7FB6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B44796C1-71A0-4E3A-B369-5B0A9D2E7FB6}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -135,11 +128,8 @@ Global
{B44796C1-71A0-4E3A-B369-5B0A9D2E7FB6}.Release|x86.ActiveCfg = Release|Any CPU
{B44796C1-71A0-4E3A-B369-5B0A9D2E7FB6}.Release|x86.Build.0 = Release|Any CPU
{B44796C1-71A0-4E3A-B369-5B0A9D2E7FB6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {B44796C1-71A0-4E3A-B369-5B0A9D2E7FB6}.Checked|Any CPU.Build.0 = Debug|Any CPU
{B44796C1-71A0-4E3A-B369-5B0A9D2E7FB6}.Checked|x64.ActiveCfg = Debug|Any CPU
- {B44796C1-71A0-4E3A-B369-5B0A9D2E7FB6}.Checked|x64.Build.0 = Debug|Any CPU
{B44796C1-71A0-4E3A-B369-5B0A9D2E7FB6}.Checked|x86.ActiveCfg = Debug|Any CPU
- {B44796C1-71A0-4E3A-B369-5B0A9D2E7FB6}.Checked|x86.Build.0 = Debug|Any CPU
{00F48AD2-CCF6-4F52-A63E-AC2D00574375}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{00F48AD2-CCF6-4F52-A63E-AC2D00574375}.Debug|Any CPU.Build.0 = Debug|Any CPU
{00F48AD2-CCF6-4F52-A63E-AC2D00574375}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -153,11 +143,8 @@ Global
{00F48AD2-CCF6-4F52-A63E-AC2D00574375}.Release|x86.ActiveCfg = Release|Any CPU
{00F48AD2-CCF6-4F52-A63E-AC2D00574375}.Release|x86.Build.0 = Release|Any CPU
{00F48AD2-CCF6-4F52-A63E-AC2D00574375}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {00F48AD2-CCF6-4F52-A63E-AC2D00574375}.Checked|Any CPU.Build.0 = Debug|Any CPU
{00F48AD2-CCF6-4F52-A63E-AC2D00574375}.Checked|x64.ActiveCfg = Debug|Any CPU
- {00F48AD2-CCF6-4F52-A63E-AC2D00574375}.Checked|x64.Build.0 = Debug|Any CPU
{00F48AD2-CCF6-4F52-A63E-AC2D00574375}.Checked|x86.ActiveCfg = Debug|Any CPU
- {00F48AD2-CCF6-4F52-A63E-AC2D00574375}.Checked|x86.Build.0 = Debug|Any CPU
{497FC2E7-EFA3-4F6F-A883-527900B60D4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{497FC2E7-EFA3-4F6F-A883-527900B60D4F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{497FC2E7-EFA3-4F6F-A883-527900B60D4F}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -171,11 +158,23 @@ Global
{497FC2E7-EFA3-4F6F-A883-527900B60D4F}.Release|x86.ActiveCfg = Release|Any CPU
{497FC2E7-EFA3-4F6F-A883-527900B60D4F}.Release|x86.Build.0 = Release|Any CPU
{497FC2E7-EFA3-4F6F-A883-527900B60D4F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {497FC2E7-EFA3-4F6F-A883-527900B60D4F}.Checked|Any CPU.Build.0 = Debug|Any CPU
{497FC2E7-EFA3-4F6F-A883-527900B60D4F}.Checked|x64.ActiveCfg = Debug|Any CPU
- {497FC2E7-EFA3-4F6F-A883-527900B60D4F}.Checked|x64.Build.0 = Debug|Any CPU
{497FC2E7-EFA3-4F6F-A883-527900B60D4F}.Checked|x86.ActiveCfg = Debug|Any CPU
- {497FC2E7-EFA3-4F6F-A883-527900B60D4F}.Checked|x86.Build.0 = Debug|Any CPU
+ {B1658B56-CFAC-4034-B102-41C9B082FCD6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B1658B56-CFAC-4034-B102-41C9B082FCD6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B1658B56-CFAC-4034-B102-41C9B082FCD6}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {B1658B56-CFAC-4034-B102-41C9B082FCD6}.Debug|x64.Build.0 = Debug|Any CPU
+ {B1658B56-CFAC-4034-B102-41C9B082FCD6}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {B1658B56-CFAC-4034-B102-41C9B082FCD6}.Debug|x86.Build.0 = Debug|Any CPU
+ {B1658B56-CFAC-4034-B102-41C9B082FCD6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B1658B56-CFAC-4034-B102-41C9B082FCD6}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B1658B56-CFAC-4034-B102-41C9B082FCD6}.Release|x64.ActiveCfg = Release|Any CPU
+ {B1658B56-CFAC-4034-B102-41C9B082FCD6}.Release|x64.Build.0 = Release|Any CPU
+ {B1658B56-CFAC-4034-B102-41C9B082FCD6}.Release|x86.ActiveCfg = Release|Any CPU
+ {B1658B56-CFAC-4034-B102-41C9B082FCD6}.Release|x86.Build.0 = Release|Any CPU
+ {B1658B56-CFAC-4034-B102-41C9B082FCD6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {B1658B56-CFAC-4034-B102-41C9B082FCD6}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {B1658B56-CFAC-4034-B102-41C9B082FCD6}.Checked|x86.ActiveCfg = Debug|Any CPU
{F98F08E3-520B-49CA-B038-FF20857CEAA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F98F08E3-520B-49CA-B038-FF20857CEAA7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F98F08E3-520B-49CA-B038-FF20857CEAA7}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -189,11 +188,8 @@ Global
{F98F08E3-520B-49CA-B038-FF20857CEAA7}.Release|x86.ActiveCfg = Release|Any CPU
{F98F08E3-520B-49CA-B038-FF20857CEAA7}.Release|x86.Build.0 = Release|Any CPU
{F98F08E3-520B-49CA-B038-FF20857CEAA7}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {F98F08E3-520B-49CA-B038-FF20857CEAA7}.Checked|Any CPU.Build.0 = Debug|Any CPU
{F98F08E3-520B-49CA-B038-FF20857CEAA7}.Checked|x64.ActiveCfg = Debug|Any CPU
- {F98F08E3-520B-49CA-B038-FF20857CEAA7}.Checked|x64.Build.0 = Debug|Any CPU
{F98F08E3-520B-49CA-B038-FF20857CEAA7}.Checked|x86.ActiveCfg = Debug|Any CPU
- {F98F08E3-520B-49CA-B038-FF20857CEAA7}.Checked|x86.Build.0 = Debug|Any CPU
{DE2EC027-CD6F-4C5B-8B49-66B5FE795472}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DE2EC027-CD6F-4C5B-8B49-66B5FE795472}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DE2EC027-CD6F-4C5B-8B49-66B5FE795472}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -207,11 +203,8 @@ Global
{DE2EC027-CD6F-4C5B-8B49-66B5FE795472}.Release|x86.ActiveCfg = Release|Any CPU
{DE2EC027-CD6F-4C5B-8B49-66B5FE795472}.Release|x86.Build.0 = Release|Any CPU
{DE2EC027-CD6F-4C5B-8B49-66B5FE795472}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {DE2EC027-CD6F-4C5B-8B49-66B5FE795472}.Checked|Any CPU.Build.0 = Debug|Any CPU
{DE2EC027-CD6F-4C5B-8B49-66B5FE795472}.Checked|x64.ActiveCfg = Debug|Any CPU
- {DE2EC027-CD6F-4C5B-8B49-66B5FE795472}.Checked|x64.Build.0 = Debug|Any CPU
{DE2EC027-CD6F-4C5B-8B49-66B5FE795472}.Checked|x86.ActiveCfg = Debug|Any CPU
- {DE2EC027-CD6F-4C5B-8B49-66B5FE795472}.Checked|x86.Build.0 = Debug|Any CPU
{16C50BBF-58E6-46B0-99EC-89927A65557B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{16C50BBF-58E6-46B0-99EC-89927A65557B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{16C50BBF-58E6-46B0-99EC-89927A65557B}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -225,11 +218,8 @@ Global
{16C50BBF-58E6-46B0-99EC-89927A65557B}.Release|x86.ActiveCfg = Release|Any CPU
{16C50BBF-58E6-46B0-99EC-89927A65557B}.Release|x86.Build.0 = Release|Any CPU
{16C50BBF-58E6-46B0-99EC-89927A65557B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {16C50BBF-58E6-46B0-99EC-89927A65557B}.Checked|Any CPU.Build.0 = Debug|Any CPU
{16C50BBF-58E6-46B0-99EC-89927A65557B}.Checked|x64.ActiveCfg = Debug|Any CPU
- {16C50BBF-58E6-46B0-99EC-89927A65557B}.Checked|x64.Build.0 = Debug|Any CPU
{16C50BBF-58E6-46B0-99EC-89927A65557B}.Checked|x86.ActiveCfg = Debug|Any CPU
- {16C50BBF-58E6-46B0-99EC-89927A65557B}.Checked|x86.Build.0 = Debug|Any CPU
{5C0A720D-EF35-4403-B246-89AFBFC6C7AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5C0A720D-EF35-4403-B246-89AFBFC6C7AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5C0A720D-EF35-4403-B246-89AFBFC6C7AF}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -243,11 +233,8 @@ Global
{5C0A720D-EF35-4403-B246-89AFBFC6C7AF}.Release|x86.ActiveCfg = Release|Any CPU
{5C0A720D-EF35-4403-B246-89AFBFC6C7AF}.Release|x86.Build.0 = Release|Any CPU
{5C0A720D-EF35-4403-B246-89AFBFC6C7AF}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {5C0A720D-EF35-4403-B246-89AFBFC6C7AF}.Checked|Any CPU.Build.0 = Debug|Any CPU
{5C0A720D-EF35-4403-B246-89AFBFC6C7AF}.Checked|x64.ActiveCfg = Debug|Any CPU
- {5C0A720D-EF35-4403-B246-89AFBFC6C7AF}.Checked|x64.Build.0 = Debug|Any CPU
{5C0A720D-EF35-4403-B246-89AFBFC6C7AF}.Checked|x86.ActiveCfg = Debug|Any CPU
- {5C0A720D-EF35-4403-B246-89AFBFC6C7AF}.Checked|x86.Build.0 = Debug|Any CPU
{DE363A06-8C3D-4DDA-AD67-3B6C253E0424}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DE363A06-8C3D-4DDA-AD67-3B6C253E0424}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DE363A06-8C3D-4DDA-AD67-3B6C253E0424}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -261,11 +248,8 @@ Global
{DE363A06-8C3D-4DDA-AD67-3B6C253E0424}.Release|x86.ActiveCfg = Release|Any CPU
{DE363A06-8C3D-4DDA-AD67-3B6C253E0424}.Release|x86.Build.0 = Release|Any CPU
{DE363A06-8C3D-4DDA-AD67-3B6C253E0424}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {DE363A06-8C3D-4DDA-AD67-3B6C253E0424}.Checked|Any CPU.Build.0 = Debug|Any CPU
{DE363A06-8C3D-4DDA-AD67-3B6C253E0424}.Checked|x64.ActiveCfg = Debug|Any CPU
- {DE363A06-8C3D-4DDA-AD67-3B6C253E0424}.Checked|x64.Build.0 = Debug|Any CPU
{DE363A06-8C3D-4DDA-AD67-3B6C253E0424}.Checked|x86.ActiveCfg = Debug|Any CPU
- {DE363A06-8C3D-4DDA-AD67-3B6C253E0424}.Checked|x86.Build.0 = Debug|Any CPU
{889B5A3E-556F-42AE-B2D9-9C2E72CF0886}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{889B5A3E-556F-42AE-B2D9-9C2E72CF0886}.Debug|Any CPU.Build.0 = Debug|Any CPU
{889B5A3E-556F-42AE-B2D9-9C2E72CF0886}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -279,11 +263,8 @@ Global
{889B5A3E-556F-42AE-B2D9-9C2E72CF0886}.Release|x86.ActiveCfg = Release|Any CPU
{889B5A3E-556F-42AE-B2D9-9C2E72CF0886}.Release|x86.Build.0 = Release|Any CPU
{889B5A3E-556F-42AE-B2D9-9C2E72CF0886}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {889B5A3E-556F-42AE-B2D9-9C2E72CF0886}.Checked|Any CPU.Build.0 = Debug|Any CPU
{889B5A3E-556F-42AE-B2D9-9C2E72CF0886}.Checked|x64.ActiveCfg = Debug|Any CPU
- {889B5A3E-556F-42AE-B2D9-9C2E72CF0886}.Checked|x64.Build.0 = Debug|Any CPU
{889B5A3E-556F-42AE-B2D9-9C2E72CF0886}.Checked|x86.ActiveCfg = Debug|Any CPU
- {889B5A3E-556F-42AE-B2D9-9C2E72CF0886}.Checked|x86.Build.0 = Debug|Any CPU
{0DDB3EFF-A01D-463D-AEC1-4C472147A471}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0DDB3EFF-A01D-463D-AEC1-4C472147A471}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0DDB3EFF-A01D-463D-AEC1-4C472147A471}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -297,11 +278,8 @@ Global
{0DDB3EFF-A01D-463D-AEC1-4C472147A471}.Release|x86.ActiveCfg = Release|Any CPU
{0DDB3EFF-A01D-463D-AEC1-4C472147A471}.Release|x86.Build.0 = Release|Any CPU
{0DDB3EFF-A01D-463D-AEC1-4C472147A471}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {0DDB3EFF-A01D-463D-AEC1-4C472147A471}.Checked|Any CPU.Build.0 = Debug|Any CPU
{0DDB3EFF-A01D-463D-AEC1-4C472147A471}.Checked|x64.ActiveCfg = Debug|Any CPU
- {0DDB3EFF-A01D-463D-AEC1-4C472147A471}.Checked|x64.Build.0 = Debug|Any CPU
{0DDB3EFF-A01D-463D-AEC1-4C472147A471}.Checked|x86.ActiveCfg = Debug|Any CPU
- {0DDB3EFF-A01D-463D-AEC1-4C472147A471}.Checked|x86.Build.0 = Debug|Any CPU
{9BB05C76-DC3F-407A-A580-CCE713611F23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9BB05C76-DC3F-407A-A580-CCE713611F23}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9BB05C76-DC3F-407A-A580-CCE713611F23}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -315,11 +293,8 @@ Global
{9BB05C76-DC3F-407A-A580-CCE713611F23}.Release|x86.ActiveCfg = Release|Any CPU
{9BB05C76-DC3F-407A-A580-CCE713611F23}.Release|x86.Build.0 = Release|Any CPU
{9BB05C76-DC3F-407A-A580-CCE713611F23}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {9BB05C76-DC3F-407A-A580-CCE713611F23}.Checked|Any CPU.Build.0 = Debug|Any CPU
{9BB05C76-DC3F-407A-A580-CCE713611F23}.Checked|x64.ActiveCfg = Debug|Any CPU
- {9BB05C76-DC3F-407A-A580-CCE713611F23}.Checked|x64.Build.0 = Debug|Any CPU
{9BB05C76-DC3F-407A-A580-CCE713611F23}.Checked|x86.ActiveCfg = Debug|Any CPU
- {9BB05C76-DC3F-407A-A580-CCE713611F23}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -334,6 +309,7 @@ Global
{DE363A06-8C3D-4DDA-AD67-3B6C253E0424} = {8FA5B4E7-5580-4E8A-909E-F1D0B4E60195}
{AFC17385-4DE6-40FF-AEF9-F117B0F1C00B} = {5F76ABD3-6169-46FF-A7B7-CB6CF5FBBFCD}
{B44796C1-71A0-4E3A-B369-5B0A9D2E7FB6} = {5F76ABD3-6169-46FF-A7B7-CB6CF5FBBFCD}
+ {B1658B56-CFAC-4034-B102-41C9B082FCD6} = {5F76ABD3-6169-46FF-A7B7-CB6CF5FBBFCD}
{F98F08E3-520B-49CA-B038-FF20857CEAA7} = {5F76ABD3-6169-46FF-A7B7-CB6CF5FBBFCD}
{16C50BBF-58E6-46B0-99EC-89927A65557B} = {5F76ABD3-6169-46FF-A7B7-CB6CF5FBBFCD}
{9BB05C76-DC3F-407A-A580-CCE713611F23} = {5F76ABD3-6169-46FF-A7B7-CB6CF5FBBFCD}
diff --git a/src/libraries/System.Runtime.Caching/System.Runtime.Caching.sln b/src/libraries/System.Runtime.Caching/System.Runtime.Caching.sln
index afc06fdf0eb..788a03b84f8 100644
--- a/src/libraries/System.Runtime.Caching/System.Runtime.Caching.sln
+++ b/src/libraries/System.Runtime.Caching/System.Runtime.Caching.sln
@@ -9,6 +9,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Configuration.Config
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Configuration.ConfigurationManager", "..\System.Configuration.ConfigurationManager\src\System.Configuration.ConfigurationManager.csproj", "{2AC9B23C-C788-4607-86EB-E7F66F14AFDB}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.EventLog", "..\System.Diagnostics.EventLog\ref\System.Diagnostics.EventLog.csproj", "{7F228E60-0AD6-4CBE-BD88-2D9AFCCE5B16}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.EventLog.Messages", "..\System.Diagnostics.EventLog\src\Messages\System.Diagnostics.EventLog.Messages.csproj", "{F4F0D06A-2324-4B3F-A2D2-E74330DA1B7C}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.EventLog", "..\System.Diagnostics.EventLog\src\System.Diagnostics.EventLog.csproj", "{57970B50-FB9F-40A5-9073-A7A48A473682}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Drawing.Common", "..\System.Drawing.Common\ref\System.Drawing.Common.csproj", "{4607440C-7237-4077-ACAB-E0910673B162}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Drawing.Common", "..\System.Drawing.Common\src\System.Drawing.Common.csproj", "{460D6560-3CD4-4D2D-A961-407564D42D62}"
@@ -69,6 +75,18 @@ Global
{2AC9B23C-C788-4607-86EB-E7F66F14AFDB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2AC9B23C-C788-4607-86EB-E7F66F14AFDB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2AC9B23C-C788-4607-86EB-E7F66F14AFDB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7F228E60-0AD6-4CBE-BD88-2D9AFCCE5B16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7F228E60-0AD6-4CBE-BD88-2D9AFCCE5B16}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7F228E60-0AD6-4CBE-BD88-2D9AFCCE5B16}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7F228E60-0AD6-4CBE-BD88-2D9AFCCE5B16}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F4F0D06A-2324-4B3F-A2D2-E74330DA1B7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F4F0D06A-2324-4B3F-A2D2-E74330DA1B7C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F4F0D06A-2324-4B3F-A2D2-E74330DA1B7C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F4F0D06A-2324-4B3F-A2D2-E74330DA1B7C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {57970B50-FB9F-40A5-9073-A7A48A473682}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {57970B50-FB9F-40A5-9073-A7A48A473682}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {57970B50-FB9F-40A5-9073-A7A48A473682}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {57970B50-FB9F-40A5-9073-A7A48A473682}.Release|Any CPU.Build.0 = Release|Any CPU
{4607440C-7237-4077-ACAB-E0910673B162}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4607440C-7237-4077-ACAB-E0910673B162}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4607440C-7237-4077-ACAB-E0910673B162}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -130,6 +148,7 @@ Global
{AA05074D-88AF-482E-A44A-F1AC13494E9F} = {28BE2B3F-890C-45EF-B90A-9FA92302365E}
{11CFC209-EA63-4492-8E76-017781F5FB61} = {C315269F-EEA6-4F74-BA10-65ECAA6351C8}
{D2CB0E92-8F52-49A3-A2CA-9F77C8ED4A6D} = {C315269F-EEA6-4F74-BA10-65ECAA6351C8}
+ {7F228E60-0AD6-4CBE-BD88-2D9AFCCE5B16} = {C315269F-EEA6-4F74-BA10-65ECAA6351C8}
{4607440C-7237-4077-ACAB-E0910673B162} = {C315269F-EEA6-4F74-BA10-65ECAA6351C8}
{B8D8A7D0-EAE7-4D04-97CA-7B14DA9D0BD5} = {C315269F-EEA6-4F74-BA10-65ECAA6351C8}
{986272FB-E5C6-4881-9867-DC3427D883AE} = {C315269F-EEA6-4F74-BA10-65ECAA6351C8}
@@ -137,6 +156,8 @@ Global
{A154C9F1-845A-4596-9061-92C462E971A6} = {C315269F-EEA6-4F74-BA10-65ECAA6351C8}
{974C8D15-BC21-4A49-8E36-788B6C7FE51A} = {7CAD8D92-ABBF-4ED8-ACF7-7121F99F89EC}
{2AC9B23C-C788-4607-86EB-E7F66F14AFDB} = {7CAD8D92-ABBF-4ED8-ACF7-7121F99F89EC}
+ {F4F0D06A-2324-4B3F-A2D2-E74330DA1B7C} = {7CAD8D92-ABBF-4ED8-ACF7-7121F99F89EC}
+ {57970B50-FB9F-40A5-9073-A7A48A473682} = {7CAD8D92-ABBF-4ED8-ACF7-7121F99F89EC}
{460D6560-3CD4-4D2D-A961-407564D42D62} = {7CAD8D92-ABBF-4ED8-ACF7-7121F99F89EC}
{6311C025-F6D3-43A0-A9DA-A58AA6602568} = {7CAD8D92-ABBF-4ED8-ACF7-7121F99F89EC}
{AFBFBBE6-F5EC-4889-9F34-03E07562630D} = {7CAD8D92-ABBF-4ED8-ACF7-7121F99F89EC}
diff --git a/src/libraries/System.Runtime.CompilerServices.Unsafe/System.Runtime.CompilerServices.Unsafe.sln b/src/libraries/System.Runtime.CompilerServices.Unsafe/System.Runtime.CompilerServices.Unsafe.sln
index b8007a46d73..5cdb9bb025a 100644
--- a/src/libraries/System.Runtime.CompilerServices.Unsafe/System.Runtime.CompilerServices.Unsafe.sln
+++ b/src/libraries/System.Runtime.CompilerServices.Unsafe/System.Runtime.CompilerServices.Unsafe.sln
@@ -5,6 +5,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{6B5FD502-FE51-4E0E-B153-568515646BBF}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{1CD62AE3-FC89-4C2A-96E9-977DF195832B}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.CompilerServices.Unsafe", "ref\System.Runtime.CompilerServices.Unsafe.csproj", "{C75CDE9E-42CE-41E6-81BC-BD44FBC113E8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.CompilerServices.Unsafe", "src\System.Runtime.CompilerServices.Unsafe.csproj", "{2337CD5D-12B3-43B9-8D38-461EF83A1473}"
@@ -69,11 +71,8 @@ Global
{D1D35FBB-464B-4403-A933-9A96861999D1}.Release|x86.ActiveCfg = Release|Any CPU
{D1D35FBB-464B-4403-A933-9A96861999D1}.Release|x86.Build.0 = Release|Any CPU
{D1D35FBB-464B-4403-A933-9A96861999D1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {D1D35FBB-464B-4403-A933-9A96861999D1}.Checked|Any CPU.Build.0 = Debug|Any CPU
{D1D35FBB-464B-4403-A933-9A96861999D1}.Checked|x64.ActiveCfg = Debug|Any CPU
- {D1D35FBB-464B-4403-A933-9A96861999D1}.Checked|x64.Build.0 = Debug|Any CPU
{D1D35FBB-464B-4403-A933-9A96861999D1}.Checked|x86.ActiveCfg = Debug|Any CPU
- {D1D35FBB-464B-4403-A933-9A96861999D1}.Checked|x86.Build.0 = Debug|Any CPU
{6B5FD502-FE51-4E0E-B153-568515646BBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6B5FD502-FE51-4E0E-B153-568515646BBF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6B5FD502-FE51-4E0E-B153-568515646BBF}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -87,11 +86,23 @@ Global
{6B5FD502-FE51-4E0E-B153-568515646BBF}.Release|x86.ActiveCfg = Release|Any CPU
{6B5FD502-FE51-4E0E-B153-568515646BBF}.Release|x86.Build.0 = Release|Any CPU
{6B5FD502-FE51-4E0E-B153-568515646BBF}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {6B5FD502-FE51-4E0E-B153-568515646BBF}.Checked|Any CPU.Build.0 = Debug|Any CPU
{6B5FD502-FE51-4E0E-B153-568515646BBF}.Checked|x64.ActiveCfg = Debug|Any CPU
- {6B5FD502-FE51-4E0E-B153-568515646BBF}.Checked|x64.Build.0 = Debug|Any CPU
{6B5FD502-FE51-4E0E-B153-568515646BBF}.Checked|x86.ActiveCfg = Debug|Any CPU
- {6B5FD502-FE51-4E0E-B153-568515646BBF}.Checked|x86.Build.0 = Debug|Any CPU
+ {1CD62AE3-FC89-4C2A-96E9-977DF195832B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1CD62AE3-FC89-4C2A-96E9-977DF195832B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1CD62AE3-FC89-4C2A-96E9-977DF195832B}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {1CD62AE3-FC89-4C2A-96E9-977DF195832B}.Debug|x64.Build.0 = Debug|Any CPU
+ {1CD62AE3-FC89-4C2A-96E9-977DF195832B}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {1CD62AE3-FC89-4C2A-96E9-977DF195832B}.Debug|x86.Build.0 = Debug|Any CPU
+ {1CD62AE3-FC89-4C2A-96E9-977DF195832B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1CD62AE3-FC89-4C2A-96E9-977DF195832B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1CD62AE3-FC89-4C2A-96E9-977DF195832B}.Release|x64.ActiveCfg = Release|Any CPU
+ {1CD62AE3-FC89-4C2A-96E9-977DF195832B}.Release|x64.Build.0 = Release|Any CPU
+ {1CD62AE3-FC89-4C2A-96E9-977DF195832B}.Release|x86.ActiveCfg = Release|Any CPU
+ {1CD62AE3-FC89-4C2A-96E9-977DF195832B}.Release|x86.Build.0 = Release|Any CPU
+ {1CD62AE3-FC89-4C2A-96E9-977DF195832B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {1CD62AE3-FC89-4C2A-96E9-977DF195832B}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {1CD62AE3-FC89-4C2A-96E9-977DF195832B}.Checked|x86.ActiveCfg = Debug|Any CPU
{C75CDE9E-42CE-41E6-81BC-BD44FBC113E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C75CDE9E-42CE-41E6-81BC-BD44FBC113E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C75CDE9E-42CE-41E6-81BC-BD44FBC113E8}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -105,11 +116,8 @@ Global
{C75CDE9E-42CE-41E6-81BC-BD44FBC113E8}.Release|x86.ActiveCfg = Release|Any CPU
{C75CDE9E-42CE-41E6-81BC-BD44FBC113E8}.Release|x86.Build.0 = Release|Any CPU
{C75CDE9E-42CE-41E6-81BC-BD44FBC113E8}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {C75CDE9E-42CE-41E6-81BC-BD44FBC113E8}.Checked|Any CPU.Build.0 = Debug|Any CPU
{C75CDE9E-42CE-41E6-81BC-BD44FBC113E8}.Checked|x64.ActiveCfg = Debug|Any CPU
- {C75CDE9E-42CE-41E6-81BC-BD44FBC113E8}.Checked|x64.Build.0 = Debug|Any CPU
{C75CDE9E-42CE-41E6-81BC-BD44FBC113E8}.Checked|x86.ActiveCfg = Debug|Any CPU
- {C75CDE9E-42CE-41E6-81BC-BD44FBC113E8}.Checked|x86.Build.0 = Debug|Any CPU
{2337CD5D-12B3-43B9-8D38-461EF83A1473}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2337CD5D-12B3-43B9-8D38-461EF83A1473}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2337CD5D-12B3-43B9-8D38-461EF83A1473}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -123,11 +131,8 @@ Global
{2337CD5D-12B3-43B9-8D38-461EF83A1473}.Release|x86.ActiveCfg = Release|Any CPU
{2337CD5D-12B3-43B9-8D38-461EF83A1473}.Release|x86.Build.0 = Release|Any CPU
{2337CD5D-12B3-43B9-8D38-461EF83A1473}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {2337CD5D-12B3-43B9-8D38-461EF83A1473}.Checked|Any CPU.Build.0 = Debug|Any CPU
{2337CD5D-12B3-43B9-8D38-461EF83A1473}.Checked|x64.ActiveCfg = Debug|Any CPU
- {2337CD5D-12B3-43B9-8D38-461EF83A1473}.Checked|x64.Build.0 = Debug|Any CPU
{2337CD5D-12B3-43B9-8D38-461EF83A1473}.Checked|x86.ActiveCfg = Debug|Any CPU
- {2337CD5D-12B3-43B9-8D38-461EF83A1473}.Checked|x86.Build.0 = Debug|Any CPU
{03B3163A-B7D7-4BEC-90BC-12E04072969E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{03B3163A-B7D7-4BEC-90BC-12E04072969E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{03B3163A-B7D7-4BEC-90BC-12E04072969E}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -141,11 +146,8 @@ Global
{03B3163A-B7D7-4BEC-90BC-12E04072969E}.Release|x86.ActiveCfg = Release|Any CPU
{03B3163A-B7D7-4BEC-90BC-12E04072969E}.Release|x86.Build.0 = Release|Any CPU
{03B3163A-B7D7-4BEC-90BC-12E04072969E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {03B3163A-B7D7-4BEC-90BC-12E04072969E}.Checked|Any CPU.Build.0 = Debug|Any CPU
{03B3163A-B7D7-4BEC-90BC-12E04072969E}.Checked|x64.ActiveCfg = Debug|Any CPU
- {03B3163A-B7D7-4BEC-90BC-12E04072969E}.Checked|x64.Build.0 = Debug|Any CPU
{03B3163A-B7D7-4BEC-90BC-12E04072969E}.Checked|x86.ActiveCfg = Debug|Any CPU
- {03B3163A-B7D7-4BEC-90BC-12E04072969E}.Checked|x86.Build.0 = Debug|Any CPU
{1727FEA0-51D7-48BF-AD76-3D6F67A1424F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1727FEA0-51D7-48BF-AD76-3D6F67A1424F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1727FEA0-51D7-48BF-AD76-3D6F67A1424F}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -159,11 +161,8 @@ Global
{1727FEA0-51D7-48BF-AD76-3D6F67A1424F}.Release|x86.ActiveCfg = Release|Any CPU
{1727FEA0-51D7-48BF-AD76-3D6F67A1424F}.Release|x86.Build.0 = Release|Any CPU
{1727FEA0-51D7-48BF-AD76-3D6F67A1424F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {1727FEA0-51D7-48BF-AD76-3D6F67A1424F}.Checked|Any CPU.Build.0 = Debug|Any CPU
{1727FEA0-51D7-48BF-AD76-3D6F67A1424F}.Checked|x64.ActiveCfg = Debug|Any CPU
- {1727FEA0-51D7-48BF-AD76-3D6F67A1424F}.Checked|x64.Build.0 = Debug|Any CPU
{1727FEA0-51D7-48BF-AD76-3D6F67A1424F}.Checked|x86.ActiveCfg = Debug|Any CPU
- {1727FEA0-51D7-48BF-AD76-3D6F67A1424F}.Checked|x86.Build.0 = Debug|Any CPU
{7D9E653A-38DF-4862-9C01-6CEA92098F8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7D9E653A-38DF-4862-9C01-6CEA92098F8C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7D9E653A-38DF-4862-9C01-6CEA92098F8C}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -177,11 +176,8 @@ Global
{7D9E653A-38DF-4862-9C01-6CEA92098F8C}.Release|x86.ActiveCfg = Release|Any CPU
{7D9E653A-38DF-4862-9C01-6CEA92098F8C}.Release|x86.Build.0 = Release|Any CPU
{7D9E653A-38DF-4862-9C01-6CEA92098F8C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {7D9E653A-38DF-4862-9C01-6CEA92098F8C}.Checked|Any CPU.Build.0 = Debug|Any CPU
{7D9E653A-38DF-4862-9C01-6CEA92098F8C}.Checked|x64.ActiveCfg = Debug|Any CPU
- {7D9E653A-38DF-4862-9C01-6CEA92098F8C}.Checked|x64.Build.0 = Debug|Any CPU
{7D9E653A-38DF-4862-9C01-6CEA92098F8C}.Checked|x86.ActiveCfg = Debug|Any CPU
- {7D9E653A-38DF-4862-9C01-6CEA92098F8C}.Checked|x86.Build.0 = Debug|Any CPU
{5FBAB593-23D7-4205-87DE-CA033C106012}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5FBAB593-23D7-4205-87DE-CA033C106012}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5FBAB593-23D7-4205-87DE-CA033C106012}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -195,11 +191,8 @@ Global
{5FBAB593-23D7-4205-87DE-CA033C106012}.Release|x86.ActiveCfg = Release|Any CPU
{5FBAB593-23D7-4205-87DE-CA033C106012}.Release|x86.Build.0 = Release|Any CPU
{5FBAB593-23D7-4205-87DE-CA033C106012}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {5FBAB593-23D7-4205-87DE-CA033C106012}.Checked|Any CPU.Build.0 = Debug|Any CPU
{5FBAB593-23D7-4205-87DE-CA033C106012}.Checked|x64.ActiveCfg = Debug|Any CPU
- {5FBAB593-23D7-4205-87DE-CA033C106012}.Checked|x64.Build.0 = Debug|Any CPU
{5FBAB593-23D7-4205-87DE-CA033C106012}.Checked|x86.ActiveCfg = Debug|Any CPU
- {5FBAB593-23D7-4205-87DE-CA033C106012}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -212,6 +205,7 @@ Global
{6B5FD502-FE51-4E0E-B153-568515646BBF} = {2C2CC48C-282A-4841-9893-485DDF29E13B}
{1727FEA0-51D7-48BF-AD76-3D6F67A1424F} = {2C2CC48C-282A-4841-9893-485DDF29E13B}
{7D9E653A-38DF-4862-9C01-6CEA92098F8C} = {2C2CC48C-282A-4841-9893-485DDF29E13B}
+ {1CD62AE3-FC89-4C2A-96E9-977DF195832B} = {723971AB-AD5C-4E5D-B6F1-215004ED533F}
{C75CDE9E-42CE-41E6-81BC-BD44FBC113E8} = {723971AB-AD5C-4E5D-B6F1-215004ED533F}
{5FBAB593-23D7-4205-87DE-CA033C106012} = {723971AB-AD5C-4E5D-B6F1-215004ED533F}
EndGlobalSection
diff --git a/src/libraries/System.Runtime.Extensions/System.Runtime.Extensions.sln b/src/libraries/System.Runtime.Extensions/System.Runtime.Extensions.sln
index d6b9a91e8b1..3f6f5a1893b 100644
--- a/src/libraries/System.Runtime.Extensions/System.Runtime.Extensions.sln
+++ b/src/libraries/System.Runtime.Extensions/System.Runtime.Extensions.sln
@@ -5,6 +5,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{C7112A41-1DC9-421E-88A0-8830D081A7B1}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{2BEFD92B-145C-42D2-B2A8-C3232FA10709}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.Uri", "..\System.Private.Uri\src\System.Private.Uri.csproj", "{1E0C4DD8-3A04-4B4C-9699-DB5844F2CFB2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Extensions", "ref\System.Runtime.Extensions.csproj", "{959EAFBC-9394-4E25-9A84-0B85152A7FCD}"
@@ -83,11 +85,8 @@ Global
{D7A1E176-1515-41FE-86D0-A46C82B87B05}.Release|x86.ActiveCfg = Release|Any CPU
{D7A1E176-1515-41FE-86D0-A46C82B87B05}.Release|x86.Build.0 = Release|Any CPU
{D7A1E176-1515-41FE-86D0-A46C82B87B05}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {D7A1E176-1515-41FE-86D0-A46C82B87B05}.Checked|Any CPU.Build.0 = Debug|Any CPU
{D7A1E176-1515-41FE-86D0-A46C82B87B05}.Checked|x64.ActiveCfg = Debug|Any CPU
- {D7A1E176-1515-41FE-86D0-A46C82B87B05}.Checked|x64.Build.0 = Debug|Any CPU
{D7A1E176-1515-41FE-86D0-A46C82B87B05}.Checked|x86.ActiveCfg = Debug|Any CPU
- {D7A1E176-1515-41FE-86D0-A46C82B87B05}.Checked|x86.Build.0 = Debug|Any CPU
{C7112A41-1DC9-421E-88A0-8830D081A7B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C7112A41-1DC9-421E-88A0-8830D081A7B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C7112A41-1DC9-421E-88A0-8830D081A7B1}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -101,11 +100,23 @@ Global
{C7112A41-1DC9-421E-88A0-8830D081A7B1}.Release|x86.ActiveCfg = Release|Any CPU
{C7112A41-1DC9-421E-88A0-8830D081A7B1}.Release|x86.Build.0 = Release|Any CPU
{C7112A41-1DC9-421E-88A0-8830D081A7B1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {C7112A41-1DC9-421E-88A0-8830D081A7B1}.Checked|Any CPU.Build.0 = Debug|Any CPU
{C7112A41-1DC9-421E-88A0-8830D081A7B1}.Checked|x64.ActiveCfg = Debug|Any CPU
- {C7112A41-1DC9-421E-88A0-8830D081A7B1}.Checked|x64.Build.0 = Debug|Any CPU
{C7112A41-1DC9-421E-88A0-8830D081A7B1}.Checked|x86.ActiveCfg = Debug|Any CPU
- {C7112A41-1DC9-421E-88A0-8830D081A7B1}.Checked|x86.Build.0 = Debug|Any CPU
+ {2BEFD92B-145C-42D2-B2A8-C3232FA10709}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2BEFD92B-145C-42D2-B2A8-C3232FA10709}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2BEFD92B-145C-42D2-B2A8-C3232FA10709}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {2BEFD92B-145C-42D2-B2A8-C3232FA10709}.Debug|x64.Build.0 = Debug|Any CPU
+ {2BEFD92B-145C-42D2-B2A8-C3232FA10709}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {2BEFD92B-145C-42D2-B2A8-C3232FA10709}.Debug|x86.Build.0 = Debug|Any CPU
+ {2BEFD92B-145C-42D2-B2A8-C3232FA10709}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2BEFD92B-145C-42D2-B2A8-C3232FA10709}.Release|Any CPU.Build.0 = Release|Any CPU
+ {2BEFD92B-145C-42D2-B2A8-C3232FA10709}.Release|x64.ActiveCfg = Release|Any CPU
+ {2BEFD92B-145C-42D2-B2A8-C3232FA10709}.Release|x64.Build.0 = Release|Any CPU
+ {2BEFD92B-145C-42D2-B2A8-C3232FA10709}.Release|x86.ActiveCfg = Release|Any CPU
+ {2BEFD92B-145C-42D2-B2A8-C3232FA10709}.Release|x86.Build.0 = Release|Any CPU
+ {2BEFD92B-145C-42D2-B2A8-C3232FA10709}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {2BEFD92B-145C-42D2-B2A8-C3232FA10709}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {2BEFD92B-145C-42D2-B2A8-C3232FA10709}.Checked|x86.ActiveCfg = Debug|Any CPU
{1E0C4DD8-3A04-4B4C-9699-DB5844F2CFB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1E0C4DD8-3A04-4B4C-9699-DB5844F2CFB2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1E0C4DD8-3A04-4B4C-9699-DB5844F2CFB2}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -119,11 +130,8 @@ Global
{1E0C4DD8-3A04-4B4C-9699-DB5844F2CFB2}.Release|x86.ActiveCfg = Release|Any CPU
{1E0C4DD8-3A04-4B4C-9699-DB5844F2CFB2}.Release|x86.Build.0 = Release|Any CPU
{1E0C4DD8-3A04-4B4C-9699-DB5844F2CFB2}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {1E0C4DD8-3A04-4B4C-9699-DB5844F2CFB2}.Checked|Any CPU.Build.0 = Debug|Any CPU
{1E0C4DD8-3A04-4B4C-9699-DB5844F2CFB2}.Checked|x64.ActiveCfg = Debug|Any CPU
- {1E0C4DD8-3A04-4B4C-9699-DB5844F2CFB2}.Checked|x64.Build.0 = Debug|Any CPU
{1E0C4DD8-3A04-4B4C-9699-DB5844F2CFB2}.Checked|x86.ActiveCfg = Debug|Any CPU
- {1E0C4DD8-3A04-4B4C-9699-DB5844F2CFB2}.Checked|x86.Build.0 = Debug|Any CPU
{959EAFBC-9394-4E25-9A84-0B85152A7FCD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{959EAFBC-9394-4E25-9A84-0B85152A7FCD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{959EAFBC-9394-4E25-9A84-0B85152A7FCD}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -137,11 +145,8 @@ Global
{959EAFBC-9394-4E25-9A84-0B85152A7FCD}.Release|x86.ActiveCfg = Release|Any CPU
{959EAFBC-9394-4E25-9A84-0B85152A7FCD}.Release|x86.Build.0 = Release|Any CPU
{959EAFBC-9394-4E25-9A84-0B85152A7FCD}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {959EAFBC-9394-4E25-9A84-0B85152A7FCD}.Checked|Any CPU.Build.0 = Debug|Any CPU
{959EAFBC-9394-4E25-9A84-0B85152A7FCD}.Checked|x64.ActiveCfg = Debug|Any CPU
- {959EAFBC-9394-4E25-9A84-0B85152A7FCD}.Checked|x64.Build.0 = Debug|Any CPU
{959EAFBC-9394-4E25-9A84-0B85152A7FCD}.Checked|x86.ActiveCfg = Debug|Any CPU
- {959EAFBC-9394-4E25-9A84-0B85152A7FCD}.Checked|x86.Build.0 = Debug|Any CPU
{FF0EFAEE-3E1A-4C7B-8B4A-AAC8E0988A0A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FF0EFAEE-3E1A-4C7B-8B4A-AAC8E0988A0A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FF0EFAEE-3E1A-4C7B-8B4A-AAC8E0988A0A}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -155,11 +160,8 @@ Global
{FF0EFAEE-3E1A-4C7B-8B4A-AAC8E0988A0A}.Release|x86.ActiveCfg = Release|Any CPU
{FF0EFAEE-3E1A-4C7B-8B4A-AAC8E0988A0A}.Release|x86.Build.0 = Release|Any CPU
{FF0EFAEE-3E1A-4C7B-8B4A-AAC8E0988A0A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {FF0EFAEE-3E1A-4C7B-8B4A-AAC8E0988A0A}.Checked|Any CPU.Build.0 = Debug|Any CPU
{FF0EFAEE-3E1A-4C7B-8B4A-AAC8E0988A0A}.Checked|x64.ActiveCfg = Debug|Any CPU
- {FF0EFAEE-3E1A-4C7B-8B4A-AAC8E0988A0A}.Checked|x64.Build.0 = Debug|Any CPU
{FF0EFAEE-3E1A-4C7B-8B4A-AAC8E0988A0A}.Checked|x86.ActiveCfg = Debug|Any CPU
- {FF0EFAEE-3E1A-4C7B-8B4A-AAC8E0988A0A}.Checked|x86.Build.0 = Debug|Any CPU
{01EC2059-605F-472C-A255-ED76197F62CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{01EC2059-605F-472C-A255-ED76197F62CD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{01EC2059-605F-472C-A255-ED76197F62CD}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -173,11 +175,8 @@ Global
{01EC2059-605F-472C-A255-ED76197F62CD}.Release|x86.ActiveCfg = Release|Any CPU
{01EC2059-605F-472C-A255-ED76197F62CD}.Release|x86.Build.0 = Release|Any CPU
{01EC2059-605F-472C-A255-ED76197F62CD}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {01EC2059-605F-472C-A255-ED76197F62CD}.Checked|Any CPU.Build.0 = Debug|Any CPU
{01EC2059-605F-472C-A255-ED76197F62CD}.Checked|x64.ActiveCfg = Debug|Any CPU
- {01EC2059-605F-472C-A255-ED76197F62CD}.Checked|x64.Build.0 = Debug|Any CPU
{01EC2059-605F-472C-A255-ED76197F62CD}.Checked|x86.ActiveCfg = Debug|Any CPU
- {01EC2059-605F-472C-A255-ED76197F62CD}.Checked|x86.Build.0 = Debug|Any CPU
{AA1BB6A8-7CC0-46BA-B83B-13B1F4CF825E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AA1BB6A8-7CC0-46BA-B83B-13B1F4CF825E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AA1BB6A8-7CC0-46BA-B83B-13B1F4CF825E}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -191,11 +190,8 @@ Global
{AA1BB6A8-7CC0-46BA-B83B-13B1F4CF825E}.Release|x86.ActiveCfg = Release|Any CPU
{AA1BB6A8-7CC0-46BA-B83B-13B1F4CF825E}.Release|x86.Build.0 = Release|Any CPU
{AA1BB6A8-7CC0-46BA-B83B-13B1F4CF825E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {AA1BB6A8-7CC0-46BA-B83B-13B1F4CF825E}.Checked|Any CPU.Build.0 = Debug|Any CPU
{AA1BB6A8-7CC0-46BA-B83B-13B1F4CF825E}.Checked|x64.ActiveCfg = Debug|Any CPU
- {AA1BB6A8-7CC0-46BA-B83B-13B1F4CF825E}.Checked|x64.Build.0 = Debug|Any CPU
{AA1BB6A8-7CC0-46BA-B83B-13B1F4CF825E}.Checked|x86.ActiveCfg = Debug|Any CPU
- {AA1BB6A8-7CC0-46BA-B83B-13B1F4CF825E}.Checked|x86.Build.0 = Debug|Any CPU
{9192FB4F-9A3B-48CA-AB53-322888009601}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9192FB4F-9A3B-48CA-AB53-322888009601}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9192FB4F-9A3B-48CA-AB53-322888009601}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -209,11 +205,8 @@ Global
{9192FB4F-9A3B-48CA-AB53-322888009601}.Release|x86.ActiveCfg = Release|Any CPU
{9192FB4F-9A3B-48CA-AB53-322888009601}.Release|x86.Build.0 = Release|Any CPU
{9192FB4F-9A3B-48CA-AB53-322888009601}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {9192FB4F-9A3B-48CA-AB53-322888009601}.Checked|Any CPU.Build.0 = Debug|Any CPU
{9192FB4F-9A3B-48CA-AB53-322888009601}.Checked|x64.ActiveCfg = Debug|Any CPU
- {9192FB4F-9A3B-48CA-AB53-322888009601}.Checked|x64.Build.0 = Debug|Any CPU
{9192FB4F-9A3B-48CA-AB53-322888009601}.Checked|x86.ActiveCfg = Debug|Any CPU
- {9192FB4F-9A3B-48CA-AB53-322888009601}.Checked|x86.Build.0 = Debug|Any CPU
{1FDA0C56-0687-4F08-B147-E997C026A12D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1FDA0C56-0687-4F08-B147-E997C026A12D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1FDA0C56-0687-4F08-B147-E997C026A12D}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -227,11 +220,8 @@ Global
{1FDA0C56-0687-4F08-B147-E997C026A12D}.Release|x86.ActiveCfg = Release|Any CPU
{1FDA0C56-0687-4F08-B147-E997C026A12D}.Release|x86.Build.0 = Release|Any CPU
{1FDA0C56-0687-4F08-B147-E997C026A12D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {1FDA0C56-0687-4F08-B147-E997C026A12D}.Checked|Any CPU.Build.0 = Debug|Any CPU
{1FDA0C56-0687-4F08-B147-E997C026A12D}.Checked|x64.ActiveCfg = Debug|Any CPU
- {1FDA0C56-0687-4F08-B147-E997C026A12D}.Checked|x64.Build.0 = Debug|Any CPU
{1FDA0C56-0687-4F08-B147-E997C026A12D}.Checked|x86.ActiveCfg = Debug|Any CPU
- {1FDA0C56-0687-4F08-B147-E997C026A12D}.Checked|x86.Build.0 = Debug|Any CPU
{397D1AB1-0A29-462A-9F05-14015B8B5796}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{397D1AB1-0A29-462A-9F05-14015B8B5796}.Debug|Any CPU.Build.0 = Debug|Any CPU
{397D1AB1-0A29-462A-9F05-14015B8B5796}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -245,11 +235,8 @@ Global
{397D1AB1-0A29-462A-9F05-14015B8B5796}.Release|x86.ActiveCfg = Release|Any CPU
{397D1AB1-0A29-462A-9F05-14015B8B5796}.Release|x86.Build.0 = Release|Any CPU
{397D1AB1-0A29-462A-9F05-14015B8B5796}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {397D1AB1-0A29-462A-9F05-14015B8B5796}.Checked|Any CPU.Build.0 = Debug|Any CPU
{397D1AB1-0A29-462A-9F05-14015B8B5796}.Checked|x64.ActiveCfg = Debug|Any CPU
- {397D1AB1-0A29-462A-9F05-14015B8B5796}.Checked|x64.Build.0 = Debug|Any CPU
{397D1AB1-0A29-462A-9F05-14015B8B5796}.Checked|x86.ActiveCfg = Debug|Any CPU
- {397D1AB1-0A29-462A-9F05-14015B8B5796}.Checked|x86.Build.0 = Debug|Any CPU
{F55614A7-859C-4171-844B-46F37EDDD351}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F55614A7-859C-4171-844B-46F37EDDD351}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F55614A7-859C-4171-844B-46F37EDDD351}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -263,11 +250,8 @@ Global
{F55614A7-859C-4171-844B-46F37EDDD351}.Release|x86.ActiveCfg = Release|Any CPU
{F55614A7-859C-4171-844B-46F37EDDD351}.Release|x86.Build.0 = Release|Any CPU
{F55614A7-859C-4171-844B-46F37EDDD351}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {F55614A7-859C-4171-844B-46F37EDDD351}.Checked|Any CPU.Build.0 = Debug|Any CPU
{F55614A7-859C-4171-844B-46F37EDDD351}.Checked|x64.ActiveCfg = Debug|Any CPU
- {F55614A7-859C-4171-844B-46F37EDDD351}.Checked|x64.Build.0 = Debug|Any CPU
{F55614A7-859C-4171-844B-46F37EDDD351}.Checked|x86.ActiveCfg = Debug|Any CPU
- {F55614A7-859C-4171-844B-46F37EDDD351}.Checked|x86.Build.0 = Debug|Any CPU
{599540D0-68C5-4644-85E6-6A266247639E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{599540D0-68C5-4644-85E6-6A266247639E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{599540D0-68C5-4644-85E6-6A266247639E}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -281,11 +265,8 @@ Global
{599540D0-68C5-4644-85E6-6A266247639E}.Release|x86.ActiveCfg = Release|Any CPU
{599540D0-68C5-4644-85E6-6A266247639E}.Release|x86.Build.0 = Release|Any CPU
{599540D0-68C5-4644-85E6-6A266247639E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {599540D0-68C5-4644-85E6-6A266247639E}.Checked|Any CPU.Build.0 = Debug|Any CPU
{599540D0-68C5-4644-85E6-6A266247639E}.Checked|x64.ActiveCfg = Debug|Any CPU
- {599540D0-68C5-4644-85E6-6A266247639E}.Checked|x64.Build.0 = Debug|Any CPU
{599540D0-68C5-4644-85E6-6A266247639E}.Checked|x86.ActiveCfg = Debug|Any CPU
- {599540D0-68C5-4644-85E6-6A266247639E}.Checked|x86.Build.0 = Debug|Any CPU
{A2438CFE-792C-4217-B060-E85A38B37B07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A2438CFE-792C-4217-B060-E85A38B37B07}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A2438CFE-792C-4217-B060-E85A38B37B07}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -299,11 +280,8 @@ Global
{A2438CFE-792C-4217-B060-E85A38B37B07}.Release|x86.ActiveCfg = Release|Any CPU
{A2438CFE-792C-4217-B060-E85A38B37B07}.Release|x86.Build.0 = Release|Any CPU
{A2438CFE-792C-4217-B060-E85A38B37B07}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {A2438CFE-792C-4217-B060-E85A38B37B07}.Checked|Any CPU.Build.0 = Debug|Any CPU
{A2438CFE-792C-4217-B060-E85A38B37B07}.Checked|x64.ActiveCfg = Debug|Any CPU
- {A2438CFE-792C-4217-B060-E85A38B37B07}.Checked|x64.Build.0 = Debug|Any CPU
{A2438CFE-792C-4217-B060-E85A38B37B07}.Checked|x86.ActiveCfg = Debug|Any CPU
- {A2438CFE-792C-4217-B060-E85A38B37B07}.Checked|x86.Build.0 = Debug|Any CPU
{28B9A2A4-F248-4D75-B98B-D5A15661123C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{28B9A2A4-F248-4D75-B98B-D5A15661123C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{28B9A2A4-F248-4D75-B98B-D5A15661123C}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -317,11 +295,8 @@ Global
{28B9A2A4-F248-4D75-B98B-D5A15661123C}.Release|x86.ActiveCfg = Release|Any CPU
{28B9A2A4-F248-4D75-B98B-D5A15661123C}.Release|x86.Build.0 = Release|Any CPU
{28B9A2A4-F248-4D75-B98B-D5A15661123C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {28B9A2A4-F248-4D75-B98B-D5A15661123C}.Checked|Any CPU.Build.0 = Debug|Any CPU
{28B9A2A4-F248-4D75-B98B-D5A15661123C}.Checked|x64.ActiveCfg = Debug|Any CPU
- {28B9A2A4-F248-4D75-B98B-D5A15661123C}.Checked|x64.Build.0 = Debug|Any CPU
{28B9A2A4-F248-4D75-B98B-D5A15661123C}.Checked|x86.ActiveCfg = Debug|Any CPU
- {28B9A2A4-F248-4D75-B98B-D5A15661123C}.Checked|x86.Build.0 = Debug|Any CPU
{2F9303F6-6EF0-4B14-80B9-A4D9BDA10AE8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2F9303F6-6EF0-4B14-80B9-A4D9BDA10AE8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2F9303F6-6EF0-4B14-80B9-A4D9BDA10AE8}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -335,11 +310,8 @@ Global
{2F9303F6-6EF0-4B14-80B9-A4D9BDA10AE8}.Release|x86.ActiveCfg = Release|Any CPU
{2F9303F6-6EF0-4B14-80B9-A4D9BDA10AE8}.Release|x86.Build.0 = Release|Any CPU
{2F9303F6-6EF0-4B14-80B9-A4D9BDA10AE8}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {2F9303F6-6EF0-4B14-80B9-A4D9BDA10AE8}.Checked|Any CPU.Build.0 = Debug|Any CPU
{2F9303F6-6EF0-4B14-80B9-A4D9BDA10AE8}.Checked|x64.ActiveCfg = Debug|Any CPU
- {2F9303F6-6EF0-4B14-80B9-A4D9BDA10AE8}.Checked|x64.Build.0 = Debug|Any CPU
{2F9303F6-6EF0-4B14-80B9-A4D9BDA10AE8}.Checked|x86.ActiveCfg = Debug|Any CPU
- {2F9303F6-6EF0-4B14-80B9-A4D9BDA10AE8}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -359,6 +331,7 @@ Global
{C7112A41-1DC9-421E-88A0-8830D081A7B1} = {4B73FA84-77B3-4A74-94ED-4232D0A80196}
{599540D0-68C5-4644-85E6-6A266247639E} = {4B73FA84-77B3-4A74-94ED-4232D0A80196}
{A2438CFE-792C-4217-B060-E85A38B37B07} = {4B73FA84-77B3-4A74-94ED-4232D0A80196}
+ {2BEFD92B-145C-42D2-B2A8-C3232FA10709} = {E603EA66-B62A-4B5E-93D1-30F8CC0AC497}
{959EAFBC-9394-4E25-9A84-0B85152A7FCD} = {E603EA66-B62A-4B5E-93D1-30F8CC0AC497}
{28B9A2A4-F248-4D75-B98B-D5A15661123C} = {E603EA66-B62A-4B5E-93D1-30F8CC0AC497}
EndGlobalSection
diff --git a/src/libraries/System.Runtime.Extensions/tests/System/EnvironmentTests.cs b/src/libraries/System.Runtime.Extensions/tests/System/EnvironmentTests.cs
index 416c5859001..55c666ba0b8 100644
--- a/src/libraries/System.Runtime.Extensions/tests/System/EnvironmentTests.cs
+++ b/src/libraries/System.Runtime.Extensions/tests/System/EnvironmentTests.cs
@@ -186,9 +186,13 @@ namespace System.Tests
{
Version version = Environment.OSVersion.Version;
- // verify that the Environment.OSVersion.Version matches the current RID
- // As of 12.0, only major version numbers are included in the RID
- Assert.Contains(version.ToString(1), RuntimeInformation.RuntimeIdentifier);
+ // NativeAOT hard-codes the runtime identifier at build time
+ if (!PlatformDetection.IsNativeAot)
+ {
+ // verify that the Environment.OSVersion.Version matches the current RID
+ // As of 12.0, only major version numbers are included in the RID
+ Assert.Contains(version.ToString(1), RuntimeInformation.RuntimeIdentifier);
+ }
Assert.True(version.Minor >= 0, "OSVersion Minor should be non-negative");
Assert.True(version.Build >= 0, "OSVersion Build should be non-negative");
@@ -332,19 +336,21 @@ namespace System.Tests
[Fact]
[PlatformSpecific(TestPlatforms.AnyUnix | TestPlatforms.Browser)]
- public void GetFolderPath_Unix_PersonalExists()
+ public void GetFolderPath_Unix_UserProfileExists()
{
- Assert.True(Directory.Exists(Environment.GetFolderPath(Environment.SpecialFolder.Personal)));
+ Assert.True(Directory.Exists(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)));
}
[Fact]
[PlatformSpecific(TestPlatforms.AnyUnix | TestPlatforms.Browser)] // Tests OS-specific environment
- public void GetFolderPath_Unix_PersonalIsHomeAndUserProfile()
+ public void GetFolderPath_Unix_PersonalIsDocumentsAndUserProfile()
{
if (!PlatformDetection.IsiOS && !PlatformDetection.IstvOS && !PlatformDetection.IsMacCatalyst)
{
- Assert.Equal(Environment.GetEnvironmentVariable("HOME"), Environment.GetFolderPath(Environment.SpecialFolder.Personal));
- Assert.Equal(Environment.GetEnvironmentVariable("HOME"), Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments));
+ Assert.Equal(Path.Combine(Environment.GetEnvironmentVariable("HOME"), "Documents"),
+ Environment.GetFolderPath(Environment.SpecialFolder.Personal, Environment.SpecialFolderOption.DoNotVerify));
+ Assert.Equal(Path.Combine(Environment.GetEnvironmentVariable("HOME"), "Documents"),
+ Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments, Environment.SpecialFolderOption.DoNotVerify));
}
Assert.Equal(Environment.GetEnvironmentVariable("HOME"), Environment.GetFolderPath(Environment.SpecialFolder.UserProfile));
@@ -357,6 +363,7 @@ namespace System.Tests
[InlineData(Environment.SpecialFolder.Desktop)]
[InlineData(Environment.SpecialFolder.DesktopDirectory)]
[InlineData(Environment.SpecialFolder.Fonts)]
+ [InlineData(Environment.SpecialFolder.MyDocuments)]
[InlineData(Environment.SpecialFolder.MyMusic)]
[InlineData(Environment.SpecialFolder.MyPictures)]
[InlineData(Environment.SpecialFolder.MyVideos)]
@@ -391,7 +398,7 @@ namespace System.Tests
[Theory]
[PlatformSpecific(TestPlatforms.AnyUnix)] // Tests OS-specific environment
[InlineData(Environment.SpecialFolder.UserProfile, Environment.SpecialFolderOption.None)]
- [InlineData(Environment.SpecialFolder.MyDocuments, Environment.SpecialFolderOption.None)] // MyDocuments == Personal
+ [InlineData(Environment.SpecialFolder.MyDocuments, Environment.SpecialFolderOption.DoNotVerify)] // MyDocuments == Personal
[InlineData(Environment.SpecialFolder.CommonApplicationData, Environment.SpecialFolderOption.None)]
[InlineData(Environment.SpecialFolder.CommonTemplates, Environment.SpecialFolderOption.DoNotVerify)]
[InlineData(Environment.SpecialFolder.ApplicationData, Environment.SpecialFolderOption.DoNotVerify)]
diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/System.Runtime.InteropServices.JavaScript.sln b/src/libraries/System.Runtime.InteropServices.JavaScript/System.Runtime.InteropServices.JavaScript.sln
index 0dc2fe9e601..42259595f8f 100644
--- a/src/libraries/System.Runtime.InteropServices.JavaScript/System.Runtime.InteropServices.JavaScript.sln
+++ b/src/libraries/System.Runtime.InteropServices.JavaScript/System.Runtime.InteropServices.JavaScript.sln
@@ -11,6 +11,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.InteropServi
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JSImportGenerator.Unit.Tests", "tests\JSImportGenerator.UnitTest\JSImportGenerator.Unit.Tests.csproj", "{BFED925C-18F2-4C98-833E-66F205234598}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.InteropServices.JavaScript.Legacy.UnitTests", "tests\System.Runtime.InteropServices.JavaScript.Legacy.UnitTests\System.Runtime.InteropServices.JavaScript.Legacy.UnitTests.csproj", "{ABA5A92B-CAD8-47E8-A7CE-D28A67FB69C0}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.InteropServices.JavaScript.Tests", "tests\System.Runtime.InteropServices.JavaScript.UnitTests\System.Runtime.InteropServices.JavaScript.Tests.csproj", "{765B4AA5-723A-44FF-BC4E-EB0F03103F6D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{09AA6758-0BD3-4312-9C07-AE9F1D50A3AD}"
@@ -59,6 +61,10 @@ Global
{BFED925C-18F2-4C98-833E-66F205234598}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BFED925C-18F2-4C98-833E-66F205234598}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BFED925C-18F2-4C98-833E-66F205234598}.Release|Any CPU.Build.0 = Release|Any CPU
+ {ABA5A92B-CAD8-47E8-A7CE-D28A67FB69C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {ABA5A92B-CAD8-47E8-A7CE-D28A67FB69C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {ABA5A92B-CAD8-47E8-A7CE-D28A67FB69C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {ABA5A92B-CAD8-47E8-A7CE-D28A67FB69C0}.Release|Any CPU.Build.0 = Release|Any CPU
{765B4AA5-723A-44FF-BC4E-EB0F03103F6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{765B4AA5-723A-44FF-BC4E-EB0F03103F6D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{765B4AA5-723A-44FF-BC4E-EB0F03103F6D}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -86,6 +92,7 @@ Global
GlobalSection(NestedProjects) = preSolution
{ED86AB26-1CFB-457D-BF87-B7A0D8FAF272} = {26A72FFB-871A-4F2F-A513-B2F6E09F358C}
{BFED925C-18F2-4C98-833E-66F205234598} = {26A72FFB-871A-4F2F-A513-B2F6E09F358C}
+ {ABA5A92B-CAD8-47E8-A7CE-D28A67FB69C0} = {26A72FFB-871A-4F2F-A513-B2F6E09F358C}
{765B4AA5-723A-44FF-BC4E-EB0F03103F6D} = {26A72FFB-871A-4F2F-A513-B2F6E09F358C}
{EC3ADEFA-1FF3-482C-8CCB-FE4C77292532} = {26A72FFB-871A-4F2F-A513-B2F6E09F358C}
{8B1D80E9-AE0D-4E3C-9F91-E6862B49AEF3} = {C22C479B-769A-4859-B974-E9B9D65918DE}
diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/ref/System.Runtime.InteropServices.JavaScript.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/ref/System.Runtime.InteropServices.JavaScript.cs
index 54b2c5352f8..c910e7f8228 100644
--- a/src/libraries/System.Runtime.InteropServices.JavaScript/ref/System.Runtime.InteropServices.JavaScript.cs
+++ b/src/libraries/System.Runtime.InteropServices.JavaScript/ref/System.Runtime.InteropServices.JavaScript.cs
@@ -201,7 +201,9 @@ public sealed class JSMarshalerType
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public struct JSMarshalerArgument
{
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public delegate void ArgumentToManagedCallback<T>(ref JSMarshalerArgument arg, out T value);
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public delegate void ArgumentToJSCallback<T>(ref JSMarshalerArgument arg, T value);
public void Initialize() { throw null; }
public void ToManaged(out bool value) { throw null; }
diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System.Runtime.InteropServices.JavaScript.csproj b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System.Runtime.InteropServices.JavaScript.csproj
index 82b95560ab2..7c007bd484a 100644
--- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System.Runtime.InteropServices.JavaScript.csproj
+++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System.Runtime.InteropServices.JavaScript.csproj
@@ -2,17 +2,10 @@
<PropertyGroup>
<TargetFrameworks>$(NetCoreAppCurrent)-Browser;$(NetCoreAppCurrent)</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Nullable>enable</Nullable>
+ <FeatureWasmThreads Condition="'$(TargetOS)' == 'browser' and ('$(WasmEnableThreads)' == 'true' or '$(MonoWasmBuildVariant)' == 'multithread')">true</FeatureWasmThreads>
+ <DefineConstants Condition="'$(FeatureWasmThreads)' == 'true'" >$(DefineConstants);FEATURE_WASM_THREADS</DefineConstants>
</PropertyGroup>
- <PropertyGroup>
- <FeatureWasmThreads Condition="'$(TargetOS)' == 'browser' and ('$(WasmEnableThreads)' == 'true' or '$(MonoWasmBuildVariant)' == 'multithread')">true</FeatureWasmThreads>
- </PropertyGroup>
-
- <PropertyGroup>
- <DefineConstants Condition="'$(FeatureWasmThreads)' == 'true'" >$(DefineConstants);FEATURE_WASM_THREADS</DefineConstants>
- </PropertyGroup>
-
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
<TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
@@ -22,6 +15,7 @@
<ItemGroup>
<Compile Include="System.Runtime.InteropServices.JavaScript.SupportedOSPlatform.cs" />
</ItemGroup>
+
<ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Browser'">
<Compile Include="$(CommonPath)Interop\Browser\Interop.Runtime.cs" Link="System\Runtime\InteropServices\JavaScript\Interop\Interop.Runtime.cs" />
<Compile Include="System\Runtime\InteropServices\JavaScript\Interop\JavaScriptImports.Generated.cs" />
@@ -72,6 +66,7 @@
<Compile Include="System\Runtime\InteropServices\JavaScript\JSSynchronizationContext.cs" />
</ItemGroup>
+
<ItemGroup>
<Reference Include="System.Collections" />
<Reference Include="System.Memory" />
@@ -82,7 +77,10 @@
<Reference Include="System.Threading.Thread" />
<Reference Include="System.Threading.Channels" />
</ItemGroup>
+
<ItemGroup>
- <AnalyzerReference Include="$(LibrariesProjectRoot)System.Runtime.InteropServices.JavaScript\gen\JSImportGenerator\JSImportGenerator.csproj" />
+ <ProjectReference Include="..\gen\JSImportGenerator\JSImportGenerator.csproj"
+ ReferenceOutputAssembly="false"
+ OutputItemType="Analyzer" />
</ItemGroup>
</Project>
diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Interop/JavaScriptExports.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Interop/JavaScriptExports.cs
index 5b932edb796..2fbf3f448f5 100644
--- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Interop/JavaScriptExports.cs
+++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Interop/JavaScriptExports.cs
@@ -124,7 +124,7 @@ namespace System.Runtime.InteropServices.JavaScript
public static void CreateTaskCallback(JSMarshalerArgument* arguments_buffer)
{
ref JSMarshalerArgument arg_exc = ref arguments_buffer[0]; // initialized by caller in alloc_stack_frame()
- ref JSMarshalerArgument arg_return = ref arguments_buffer[1]; // used as return vaule
+ ref JSMarshalerArgument arg_return = ref arguments_buffer[1]; // used as return value
try
{
JSHostImplementation.TaskCallback holder = new JSHostImplementation.TaskCallback();
@@ -195,6 +195,32 @@ namespace System.Runtime.InteropServices.JavaScript
}
}
+ [MethodImpl(MethodImplOptions.NoInlining)] // https://github.com/dotnet/runtime/issues/71425
+ // the marshaled signature is:
+ // string GetManagedStackTrace(GCHandle exception)
+ public static void GetManagedStackTrace(JSMarshalerArgument* arguments_buffer)
+ {
+ ref JSMarshalerArgument arg_exc = ref arguments_buffer[0]; // initialized by caller in alloc_stack_frame()
+ ref JSMarshalerArgument arg_return = ref arguments_buffer[1]; // used as return value
+ ref JSMarshalerArgument arg_1 = ref arguments_buffer[2];// initialized and set by caller
+ try
+ {
+ GCHandle exception_gc_handle = (GCHandle)arg_1.slot.GCHandle;
+ if (exception_gc_handle.Target is Exception exception)
+ {
+ arg_return.ToJS(exception.StackTrace);
+ }
+ else
+ {
+ throw new InvalidOperationException("Exception is null");
+ }
+ }
+ catch (Exception ex)
+ {
+ arg_exc.ToJS(ex);
+ }
+ }
+
#if FEATURE_WASM_THREADS
[MethodImpl(MethodImplOptions.NoInlining)] // https://github.com/dotnet/runtime/issues/71425
diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Task.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Task.cs
index f3101e881fe..13876867c8a 100644
--- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Task.cs
+++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Task.cs
@@ -13,12 +13,14 @@ namespace System.Runtime.InteropServices.JavaScript
/// Helps with marshaling of the Task result or Function arguments.
/// It's used by JSImport code generator and should not be used by developers in source code.
/// </summary>
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public delegate void ArgumentToManagedCallback<T>(ref JSMarshalerArgument arg, out T value);
/// <summary>
/// Helps with marshaling of the Task result or Function arguments.
/// It's used by JSImport code generator and should not be used by developers in source code.
/// </summary>
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public delegate void ArgumentToJSCallback<T>(ref JSMarshalerArgument arg, T value);
/// <summary>
diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System/Runtime/InteropServices/JavaScript/JSImportExportTest.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System/Runtime/InteropServices/JavaScript/JSImportExportTest.cs
index dded93a4059..1d473d16a47 100644
--- a/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System/Runtime/InteropServices/JavaScript/JSImportExportTest.cs
+++ b/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System/Runtime/InteropServices/JavaScript/JSImportExportTest.cs
@@ -19,6 +19,19 @@ namespace System.Runtime.InteropServices.JavaScript.Tests
}
[Fact]
+ public async Task MultipleImportAsync()
+ {
+ var first = await JSHost.ImportAsync("JavaScriptTestHelper", "./JavaScriptTestHelper.mjs");
+ var second = await JSHost.ImportAsync("JavaScriptTestHelper", "./JavaScriptTestHelper.mjs");
+ Assert.NotNull(first);
+ Assert.NotNull(second);
+ Assert.Equal("object", first.GetTypeOfProperty("instance"));
+ var instance1 = first.GetPropertyAsJSObject("instance");
+ var instance2 = second.GetPropertyAsJSObject("instance");
+ Assert.Same(instance1, instance2);
+ }
+
+ [Fact]
public unsafe void GlobalThis()
{
Assert.Null(JSHost.GlobalThis.GetPropertyAsString("dummy"));
@@ -1372,11 +1385,28 @@ namespace System.Runtime.InteropServices.JavaScript.Tests
[Fact]
public void JsExportThrows()
{
- var ex = Assert.Throws<ArgumentException>(() => JavaScriptTestHelper.invoke1_String("-t-e-s-t-", nameof(JavaScriptTestHelper.Throw)));
+ var ex = Assert.Throws<ArgumentException>(() => JavaScriptTestHelper.invoke1_String("-t-e-s-t-", nameof(JavaScriptTestHelper.ThrowFromJSExport)));
Assert.DoesNotContain("Unexpected error", ex.Message);
Assert.Contains("-t-e-s-t-", ex.Message);
}
+ [Fact]
+ public void JsExportCatchToString()
+ {
+ var toString = JavaScriptTestHelper.catch1toString("-t-e-s-t-", nameof(JavaScriptTestHelper.ThrowFromJSExport));
+ Assert.DoesNotContain("Unexpected error", toString);
+ Assert.Contains("-t-e-s-t-", toString);
+ Assert.DoesNotContain(nameof(JavaScriptTestHelper.ThrowFromJSExport), toString);
+ }
+
+ [Fact]
+ public void JsExportCatchStack()
+ {
+ var stack = JavaScriptTestHelper.catch1stack("-t-e-s-t-", nameof(JavaScriptTestHelper.ThrowFromJSExport));
+ Assert.Contains(nameof(JavaScriptTestHelper.ThrowFromJSExport), stack);
+ Assert.Contains("catch1stack", stack);
+ }
+
#endregion Exception
#region JSObject
@@ -1920,12 +1950,12 @@ namespace System.Runtime.InteropServices.JavaScript.Tests
var exThrow0 = Assert.Throws<JSException>(() => JavaScriptTestHelper.throw0());
Assert.Contains("throw-0-msg", exThrow0.Message);
Assert.DoesNotContain(" at ", exThrow0.Message);
- Assert.Contains(" at Module.throw0", exThrow0.StackTrace);
+ Assert.Contains("throw0fn", exThrow0.StackTrace);
var exThrow1 = Assert.Throws<JSException>(() => throw1(value));
Assert.Contains("throw1-msg", exThrow1.Message);
Assert.DoesNotContain(" at ", exThrow1.Message);
- Assert.Contains(" at Module.throw1", exThrow1.StackTrace);
+ Assert.Contains("throw1fn", exThrow1.StackTrace);
// anything is a system.object, sometimes it would be JSObject wrapper
if (typeof(T).IsPrimitive)
diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System/Runtime/InteropServices/JavaScript/JavaScriptTestHelper.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System/Runtime/InteropServices/JavaScript/JavaScriptTestHelper.cs
index cca24202da2..9f00a46a951 100644
--- a/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System/Runtime/InteropServices/JavaScript/JavaScriptTestHelper.cs
+++ b/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System/Runtime/InteropServices/JavaScript/JavaScriptTestHelper.cs
@@ -32,8 +32,14 @@ namespace System.Runtime.InteropServices.JavaScript.Tests
Console.WriteLine(message);
}
+ [JSImport("catch1toString", "JavaScriptTestHelper")]
+ public static partial string catch1toString(string message, string functionName);
+
+ [JSImport("catch1stack", "JavaScriptTestHelper")]
+ public static partial string catch1stack(string message, string functionName);
+
[JSExport]
- public static void Throw(string message)
+ public static void ThrowFromJSExport(string message)
{
throw new ArgumentException(message);
}
@@ -99,7 +105,7 @@ namespace System.Runtime.InteropServices.JavaScript.Tests
[return: JSMarshalAs<JSType.String>]
internal static partial string getClass1();
- [JSImport("throw0", "JavaScriptTestHelper")]
+ [JSImport("throw0fn", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Discard>]
internal static partial void throw0();
@@ -257,7 +263,7 @@ namespace System.Runtime.InteropServices.JavaScript.Tests
[JSImport("identity1", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Boolean>]
internal static partial bool identity1_Int32([JSMarshalAs<JSType.Number>] int value);
- [JSImport("throw1", "JavaScriptTestHelper")]
+ [JSImport("throw1fn", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Number>]
internal static partial int throw1_Int32([JSMarshalAs<JSType.Number>] int value);
[JSImport("invoke1", "JavaScriptTestHelper")]
@@ -283,7 +289,7 @@ namespace System.Runtime.InteropServices.JavaScript.Tests
[JSImport("identity1", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Boolean>]
internal static partial bool identity1_String([JSMarshalAs<JSType.String>] string value);
- [JSImport("throw1", "JavaScriptTestHelper")]
+ [JSImport("throw1fn", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.String>]
internal static partial string throw1_String([JSMarshalAs<JSType.String>] string value);
[JSImport("invoke1", "JavaScriptTestHelper")]
@@ -315,7 +321,7 @@ namespace System.Runtime.InteropServices.JavaScript.Tests
[JSImport("identity1", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Boolean>]
internal static partial bool identity1_Object([JSMarshalAs<JSType.Any>] object value);
- [JSImport("throw1", "JavaScriptTestHelper")]
+ [JSImport("throw1fn", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Any>]
internal static partial object throw1_Object([JSMarshalAs<JSType.Any>] object value);
[JSImport("invoke1", "JavaScriptTestHelper")]
@@ -341,7 +347,7 @@ namespace System.Runtime.InteropServices.JavaScript.Tests
[JSImport("identity1", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Boolean>]
internal static partial bool identity1_Exception([JSMarshalAs<JSType.Error>] Exception value);
- [JSImport("throw1", "JavaScriptTestHelper")]
+ [JSImport("throw1fn", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Error>]
internal static partial Exception throw1_Exception([JSMarshalAs<JSType.Error>] Exception value);
[JSImport("invoke1", "JavaScriptTestHelper")]
@@ -473,7 +479,7 @@ namespace System.Runtime.InteropServices.JavaScript.Tests
[JSImport("identity1", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Boolean>]
internal static partial bool identity1_Boolean([JSMarshalAs<JSType.Boolean>] bool value);
- [JSImport("throw1", "JavaScriptTestHelper")]
+ [JSImport("throw1fn", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Boolean>]
internal static partial bool throw1_Boolean([JSMarshalAs<JSType.Boolean>] bool value);
[JSImport("invoke1", "JavaScriptTestHelper")]
@@ -500,7 +506,7 @@ namespace System.Runtime.InteropServices.JavaScript.Tests
[JSImport("identity1", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Boolean>]
internal static partial bool identity1_Char([JSMarshalAs<JSType.String>] char value);
- [JSImport("throw1", "JavaScriptTestHelper")]
+ [JSImport("throw1fn", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.String>]
internal static partial char throw1_Char([JSMarshalAs<JSType.String>] char value);
[JSImport("invoke1", "JavaScriptTestHelper")]
@@ -526,7 +532,7 @@ namespace System.Runtime.InteropServices.JavaScript.Tests
[JSImport("identity1", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Boolean>]
internal static partial bool identity1_Byte([JSMarshalAs<JSType.Number>] byte value);
- [JSImport("throw1", "JavaScriptTestHelper")]
+ [JSImport("throw1fn", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Number>]
internal static partial byte throw1_Byte([JSMarshalAs<JSType.Number>] byte value);
[JSImport("invoke1", "JavaScriptTestHelper")]
@@ -552,7 +558,7 @@ namespace System.Runtime.InteropServices.JavaScript.Tests
[JSImport("identity1", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Boolean>]
internal static partial bool identity1_Int16([JSMarshalAs<JSType.Number>] short value);
- [JSImport("throw1", "JavaScriptTestHelper")]
+ [JSImport("throw1fn", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Number>]
internal static partial short throw1_Int16([JSMarshalAs<JSType.Number>] short value);
[JSImport("invoke1", "JavaScriptTestHelper")]
@@ -578,7 +584,7 @@ namespace System.Runtime.InteropServices.JavaScript.Tests
[JSImport("identity1", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Boolean>]
internal static partial bool identity1_Int52([JSMarshalAs<JSType.Number>] long value);
- [JSImport("throw1", "JavaScriptTestHelper")]
+ [JSImport("throw1fn", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Number>]
internal static partial long throw1_Int52([JSMarshalAs<JSType.Number>] long value);
[JSImport("invoke1", "JavaScriptTestHelper")]
@@ -604,7 +610,7 @@ namespace System.Runtime.InteropServices.JavaScript.Tests
[JSImport("identity1", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Boolean>]
internal static partial bool identity1_BigInt64([JSMarshalAs<JSType.BigInt>] long value);
- [JSImport("throw1", "JavaScriptTestHelper")]
+ [JSImport("throw1fn", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.BigInt>]
internal static partial long throw1_BigInt64([JSMarshalAs<JSType.BigInt>] long value);
[JSImport("invoke1", "JavaScriptTestHelper")]
@@ -630,7 +636,7 @@ namespace System.Runtime.InteropServices.JavaScript.Tests
[JSImport("identity1", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Boolean>]
internal static partial bool identity1_Double([JSMarshalAs<JSType.Number>] double value);
- [JSImport("throw1", "JavaScriptTestHelper")]
+ [JSImport("throw1fn", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Number>]
internal static partial double throw1_Double([JSMarshalAs<JSType.Number>] double value);
[JSImport("invoke1", "JavaScriptTestHelper")]
@@ -656,7 +662,7 @@ namespace System.Runtime.InteropServices.JavaScript.Tests
[JSImport("identity1", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Boolean>]
internal static partial bool identity1_Single([JSMarshalAs<JSType.Number>] float value);
- [JSImport("throw1", "JavaScriptTestHelper")]
+ [JSImport("throw1fn", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Number>]
internal static partial float throw1_Single([JSMarshalAs<JSType.Number>] float value);
[JSImport("invoke1", "JavaScriptTestHelper")]
@@ -682,7 +688,7 @@ namespace System.Runtime.InteropServices.JavaScript.Tests
[JSImport("identity1", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Boolean>]
internal static partial bool identity1_IntPtr([JSMarshalAs<JSType.Number>] IntPtr value);
- [JSImport("throw1", "JavaScriptTestHelper")]
+ [JSImport("throw1fn", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Number>]
internal static partial IntPtr throw1_IntPtr([JSMarshalAs<JSType.Number>] IntPtr value);
[JSImport("invoke1", "JavaScriptTestHelper")]
@@ -709,7 +715,7 @@ namespace System.Runtime.InteropServices.JavaScript.Tests
[JSImport("identity1", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Boolean>]
internal unsafe static partial bool identity1_VoidPtr([JSMarshalAs<JSType.Number>] void* value);
- [JSImport("throw1", "JavaScriptTestHelper")]
+ [JSImport("throw1fn", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Number>]
internal unsafe static partial void* throw1_VoidPtr([JSMarshalAs<JSType.Number>] void* value);
[JSImport("invoke1", "JavaScriptTestHelper")]
@@ -735,7 +741,7 @@ namespace System.Runtime.InteropServices.JavaScript.Tests
[JSImport("identity1", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Boolean>]
internal static partial bool identity1_DateTime([JSMarshalAs<JSType.Date>] DateTime value);
- [JSImport("throw1", "JavaScriptTestHelper")]
+ [JSImport("throw1fn", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Date>]
internal static partial DateTime throw1_DateTime([JSMarshalAs<JSType.Date>] DateTime value);
[JSImport("invoke1", "JavaScriptTestHelper")]
@@ -761,7 +767,7 @@ namespace System.Runtime.InteropServices.JavaScript.Tests
[JSImport("identity1", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Boolean>]
internal static partial bool identity1_DateTimeOffset([JSMarshalAs<JSType.Date>] DateTimeOffset value);
- [JSImport("throw1", "JavaScriptTestHelper")]
+ [JSImport("throw1fn", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Date>]
internal static partial DateTimeOffset throw1_DateTimeOffset([JSMarshalAs<JSType.Date>] DateTimeOffset value);
[JSImport("invoke1", "JavaScriptTestHelper")]
@@ -788,7 +794,7 @@ namespace System.Runtime.InteropServices.JavaScript.Tests
[JSImport("identity1", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Boolean>]
internal static partial bool identity1_NullableBoolean([JSMarshalAs<JSType.Boolean>] bool? value);
- [JSImport("throw1", "JavaScriptTestHelper")]
+ [JSImport("throw1fn", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Boolean>]
internal static partial bool? throw1_NullableBoolean([JSMarshalAs<JSType.Boolean>] bool? value);
[JSImport("invoke1", "JavaScriptTestHelper")]
@@ -815,7 +821,7 @@ namespace System.Runtime.InteropServices.JavaScript.Tests
[JSImport("identity1", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Boolean>]
internal static partial bool identity1_NullableInt32([JSMarshalAs<JSType.Number>] int? value);
- [JSImport("throw1", "JavaScriptTestHelper")]
+ [JSImport("throw1fn", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Number>]
internal static partial int? throw1_NullableInt32([JSMarshalAs<JSType.Number>] int? value);
[JSImport("invoke1", "JavaScriptTestHelper")]
@@ -842,7 +848,7 @@ namespace System.Runtime.InteropServices.JavaScript.Tests
[JSImport("identity1", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Boolean>]
internal static partial bool identity1_NullableBigInt64([JSMarshalAs<JSType.BigInt>] long? value);
- [JSImport("throw1", "JavaScriptTestHelper")]
+ [JSImport("throw1fn", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.BigInt>]
internal static partial long? throw1_NullableBigInt64([JSMarshalAs<JSType.BigInt>] long? value);
[JSImport("invoke1", "JavaScriptTestHelper")]
@@ -869,7 +875,7 @@ namespace System.Runtime.InteropServices.JavaScript.Tests
[JSImport("identity1", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Boolean>]
internal static partial bool identity1_NullableIntPtr([JSMarshalAs<JSType.Number>] IntPtr? value);
- [JSImport("throw1", "JavaScriptTestHelper")]
+ [JSImport("throw1fn", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Number>]
internal static partial IntPtr? throw1_NullableIntPtr([JSMarshalAs<JSType.Number>] IntPtr? value);
[JSImport("invoke1", "JavaScriptTestHelper")]
@@ -896,7 +902,7 @@ namespace System.Runtime.InteropServices.JavaScript.Tests
[JSImport("identity1", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Boolean>]
internal static partial bool identity1_NullableDouble([JSMarshalAs<JSType.Number>] double? value);
- [JSImport("throw1", "JavaScriptTestHelper")]
+ [JSImport("throw1fn", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Number>]
internal static partial double? throw1_NullableDouble([JSMarshalAs<JSType.Number>] double? value);
[JSImport("invoke1", "JavaScriptTestHelper")]
@@ -923,7 +929,7 @@ namespace System.Runtime.InteropServices.JavaScript.Tests
[JSImport("identity1", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Boolean>]
internal static partial bool identity1_NullableDateTime([JSMarshalAs<JSType.Date>] DateTime? value);
- [JSImport("throw1", "JavaScriptTestHelper")]
+ [JSImport("throw1fn", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Date>]
internal static partial DateTime? throw1_NullableDateTime([JSMarshalAs<JSType.Date>] DateTime? value);
[JSImport("invoke1", "JavaScriptTestHelper")]
@@ -949,7 +955,7 @@ namespace System.Runtime.InteropServices.JavaScript.Tests
[JSImport("identity1", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Boolean>]
internal static partial bool identity1_JSObject([JSMarshalAs<JSType.Object>] JSObject value);
- [JSImport("throw1", "JavaScriptTestHelper")]
+ [JSImport("throw1fn", "JavaScriptTestHelper")]
[return: JSMarshalAs<JSType.Object>]
internal static partial JSObject throw1_JSObject([JSMarshalAs<JSType.Object>] JSObject value);
[JSImport("invoke1", "JavaScriptTestHelper")]
@@ -1278,4 +1284,4 @@ public partial record struct JavaScriptTestHelperRecordStructNoNamespace
[System.Runtime.InteropServices.JavaScript.JSExport]
public static string EchoString(string message) => message + "85";
}
-} \ No newline at end of file
+}
diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System/Runtime/InteropServices/JavaScript/JavaScriptTestHelper.mjs b/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System/Runtime/InteropServices/JavaScript/JavaScriptTestHelper.mjs
index db9d18c5adb..ad5c8eac152 100644
--- a/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System/Runtime/InteropServices/JavaScript/JavaScriptTestHelper.mjs
+++ b/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System/Runtime/InteropServices/JavaScript/JavaScriptTestHelper.mjs
@@ -105,12 +105,34 @@ export function retrieve1() {
return val;
}
-export function throw0() {
+export function throw0fn() {
//console.log(`throw0()`)
throw new Error('throw-0-msg');
}
-export function throw1(arg1) {
+export function catch1toString(message, functionName) {
+ const JavaScriptTestHelper = dllExports.System.Runtime.InteropServices.JavaScript.Tests.JavaScriptTestHelper;
+ const fn = JavaScriptTestHelper[functionName];
+ try {
+ fn(message);
+ return "bad";
+ } catch (err) {
+ return err.toString();
+ }
+}
+
+export function catch1stack(message, functionName) {
+ const JavaScriptTestHelper = dllExports.System.Runtime.InteropServices.JavaScript.Tests.JavaScriptTestHelper;
+ const fn = JavaScriptTestHelper[functionName];
+ try {
+ fn(message);
+ return "bad";
+ } catch (err) {
+ return err.stack;
+ }
+}
+
+export function throw1fn(arg1) {
//console.log(`throw1(arg1:${arg1 !== null ? arg1 : '<null>'})`)
throw new Error('throw1-msg ' + arg1);
}
diff --git a/src/libraries/System.Runtime.InteropServices/System.Runtime.InteropServices.sln b/src/libraries/System.Runtime.InteropServices/System.Runtime.InteropServices.sln
index 0a0c735457a..81682cb4119 100644
--- a/src/libraries/System.Runtime.InteropServices/System.Runtime.InteropServices.sln
+++ b/src/libraries/System.Runtime.InteropServices/System.Runtime.InteropServices.sln
@@ -7,6 +7,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Collections", "..\Sy
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{1B248B4C-7584-4C04-850A-A50EB592052C}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{768B77B0-EA45-469D-B39E-545EB72F5A43}"
@@ -83,11 +85,8 @@ Global
{1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Release|x86.ActiveCfg = Release|Any CPU
{1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Release|x86.Build.0 = Release|Any CPU
{1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|Any CPU.Build.0 = Debug|Any CPU
{1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|x64.ActiveCfg = Debug|Any CPU
- {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|x64.Build.0 = Debug|Any CPU
{1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|x86.ActiveCfg = Debug|Any CPU
- {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|x86.Build.0 = Debug|Any CPU
{4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -101,11 +100,8 @@ Global
{4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Release|x86.ActiveCfg = Release|Any CPU
{4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Release|x86.Build.0 = Release|Any CPU
{4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Checked|Any CPU.Build.0 = Debug|Any CPU
{4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Checked|x64.ActiveCfg = Debug|Any CPU
- {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Checked|x64.Build.0 = Debug|Any CPU
{4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Checked|x86.ActiveCfg = Debug|Any CPU
- {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Checked|x86.Build.0 = Debug|Any CPU
{1B248B4C-7584-4C04-850A-A50EB592052C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1B248B4C-7584-4C04-850A-A50EB592052C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1B248B4C-7584-4C04-850A-A50EB592052C}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -119,11 +115,23 @@ Global
{1B248B4C-7584-4C04-850A-A50EB592052C}.Release|x86.ActiveCfg = Release|Any CPU
{1B248B4C-7584-4C04-850A-A50EB592052C}.Release|x86.Build.0 = Release|Any CPU
{1B248B4C-7584-4C04-850A-A50EB592052C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {1B248B4C-7584-4C04-850A-A50EB592052C}.Checked|Any CPU.Build.0 = Debug|Any CPU
{1B248B4C-7584-4C04-850A-A50EB592052C}.Checked|x64.ActiveCfg = Debug|Any CPU
- {1B248B4C-7584-4C04-850A-A50EB592052C}.Checked|x64.Build.0 = Debug|Any CPU
{1B248B4C-7584-4C04-850A-A50EB592052C}.Checked|x86.ActiveCfg = Debug|Any CPU
- {1B248B4C-7584-4C04-850A-A50EB592052C}.Checked|x86.Build.0 = Debug|Any CPU
+ {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Debug|x64.Build.0 = Debug|Any CPU
+ {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Debug|x86.Build.0 = Debug|Any CPU
+ {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Release|Any CPU.Build.0 = Release|Any CPU
+ {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Release|x64.ActiveCfg = Release|Any CPU
+ {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Release|x64.Build.0 = Release|Any CPU
+ {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Release|x86.ActiveCfg = Release|Any CPU
+ {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Release|x86.Build.0 = Release|Any CPU
+ {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Checked|x86.ActiveCfg = Debug|Any CPU
{90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Debug|Any CPU.Build.0 = Debug|Any CPU
{90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -137,11 +145,8 @@ Global
{90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Release|x86.ActiveCfg = Release|Any CPU
{90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Release|x86.Build.0 = Release|Any CPU
{90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Checked|Any CPU.Build.0 = Debug|Any CPU
{90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Checked|x64.ActiveCfg = Debug|Any CPU
- {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Checked|x64.Build.0 = Debug|Any CPU
{90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Checked|x86.ActiveCfg = Debug|Any CPU
- {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Checked|x86.Build.0 = Debug|Any CPU
{768B77B0-EA45-469D-B39E-545EB72F5A43}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{768B77B0-EA45-469D-B39E-545EB72F5A43}.Debug|Any CPU.Build.0 = Debug|Any CPU
{768B77B0-EA45-469D-B39E-545EB72F5A43}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -155,11 +160,8 @@ Global
{768B77B0-EA45-469D-B39E-545EB72F5A43}.Release|x86.ActiveCfg = Release|Any CPU
{768B77B0-EA45-469D-B39E-545EB72F5A43}.Release|x86.Build.0 = Release|Any CPU
{768B77B0-EA45-469D-B39E-545EB72F5A43}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {768B77B0-EA45-469D-B39E-545EB72F5A43}.Checked|Any CPU.Build.0 = Debug|Any CPU
{768B77B0-EA45-469D-B39E-545EB72F5A43}.Checked|x64.ActiveCfg = Debug|Any CPU
- {768B77B0-EA45-469D-B39E-545EB72F5A43}.Checked|x64.Build.0 = Debug|Any CPU
{768B77B0-EA45-469D-B39E-545EB72F5A43}.Checked|x86.ActiveCfg = Debug|Any CPU
- {768B77B0-EA45-469D-B39E-545EB72F5A43}.Checked|x86.Build.0 = Debug|Any CPU
{8671F164-F78C-44FA-93B7-A310F67890FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8671F164-F78C-44FA-93B7-A310F67890FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8671F164-F78C-44FA-93B7-A310F67890FE}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -173,11 +175,8 @@ Global
{8671F164-F78C-44FA-93B7-A310F67890FE}.Release|x86.ActiveCfg = Release|Any CPU
{8671F164-F78C-44FA-93B7-A310F67890FE}.Release|x86.Build.0 = Release|Any CPU
{8671F164-F78C-44FA-93B7-A310F67890FE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {8671F164-F78C-44FA-93B7-A310F67890FE}.Checked|Any CPU.Build.0 = Debug|Any CPU
{8671F164-F78C-44FA-93B7-A310F67890FE}.Checked|x64.ActiveCfg = Debug|Any CPU
- {8671F164-F78C-44FA-93B7-A310F67890FE}.Checked|x64.Build.0 = Debug|Any CPU
{8671F164-F78C-44FA-93B7-A310F67890FE}.Checked|x86.ActiveCfg = Debug|Any CPU
- {8671F164-F78C-44FA-93B7-A310F67890FE}.Checked|x86.Build.0 = Debug|Any CPU
{4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -191,11 +190,8 @@ Global
{4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Release|x86.ActiveCfg = Release|Any CPU
{4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Release|x86.Build.0 = Release|Any CPU
{4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Checked|Any CPU.Build.0 = Debug|Any CPU
{4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Checked|x64.ActiveCfg = Debug|Any CPU
- {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Checked|x64.Build.0 = Debug|Any CPU
{4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Checked|x86.ActiveCfg = Debug|Any CPU
- {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Checked|x86.Build.0 = Debug|Any CPU
{79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -209,11 +205,8 @@ Global
{79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Release|x86.ActiveCfg = Release|Any CPU
{79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Release|x86.Build.0 = Release|Any CPU
{79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Checked|Any CPU.Build.0 = Debug|Any CPU
{79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Checked|x64.ActiveCfg = Debug|Any CPU
- {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Checked|x64.Build.0 = Debug|Any CPU
{79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Checked|x86.ActiveCfg = Debug|Any CPU
- {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Checked|x86.Build.0 = Debug|Any CPU
{9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -227,11 +220,8 @@ Global
{9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Release|x86.ActiveCfg = Release|Any CPU
{9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Release|x86.Build.0 = Release|Any CPU
{9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Checked|Any CPU.Build.0 = Debug|Any CPU
{9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Checked|x64.ActiveCfg = Debug|Any CPU
- {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Checked|x64.Build.0 = Debug|Any CPU
{9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Checked|x86.ActiveCfg = Debug|Any CPU
- {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Checked|x86.Build.0 = Debug|Any CPU
{EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -245,11 +235,8 @@ Global
{EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Release|x86.ActiveCfg = Release|Any CPU
{EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Release|x86.Build.0 = Release|Any CPU
{EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Checked|Any CPU.Build.0 = Debug|Any CPU
{EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Checked|x64.ActiveCfg = Debug|Any CPU
- {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Checked|x64.Build.0 = Debug|Any CPU
{EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Checked|x86.ActiveCfg = Debug|Any CPU
- {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Checked|x86.Build.0 = Debug|Any CPU
{25D66424-2EAF-464D-8460-10C04EDEF3C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{25D66424-2EAF-464D-8460-10C04EDEF3C3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{25D66424-2EAF-464D-8460-10C04EDEF3C3}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -263,11 +250,8 @@ Global
{25D66424-2EAF-464D-8460-10C04EDEF3C3}.Release|x86.ActiveCfg = Release|Any CPU
{25D66424-2EAF-464D-8460-10C04EDEF3C3}.Release|x86.Build.0 = Release|Any CPU
{25D66424-2EAF-464D-8460-10C04EDEF3C3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Checked|Any CPU.Build.0 = Debug|Any CPU
{25D66424-2EAF-464D-8460-10C04EDEF3C3}.Checked|x64.ActiveCfg = Debug|Any CPU
- {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Checked|x64.Build.0 = Debug|Any CPU
{25D66424-2EAF-464D-8460-10C04EDEF3C3}.Checked|x86.ActiveCfg = Debug|Any CPU
- {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Checked|x86.Build.0 = Debug|Any CPU
{049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -281,11 +265,8 @@ Global
{049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Release|x86.ActiveCfg = Release|Any CPU
{049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Release|x86.Build.0 = Release|Any CPU
{049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Checked|Any CPU.Build.0 = Debug|Any CPU
{049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Checked|x64.ActiveCfg = Debug|Any CPU
- {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Checked|x64.Build.0 = Debug|Any CPU
{049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Checked|x86.ActiveCfg = Debug|Any CPU
- {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Checked|x86.Build.0 = Debug|Any CPU
{866D295E-424A-4747-9417-CD7746936138}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{866D295E-424A-4747-9417-CD7746936138}.Debug|Any CPU.Build.0 = Debug|Any CPU
{866D295E-424A-4747-9417-CD7746936138}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -299,11 +280,8 @@ Global
{866D295E-424A-4747-9417-CD7746936138}.Release|x86.ActiveCfg = Release|Any CPU
{866D295E-424A-4747-9417-CD7746936138}.Release|x86.Build.0 = Release|Any CPU
{866D295E-424A-4747-9417-CD7746936138}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {866D295E-424A-4747-9417-CD7746936138}.Checked|Any CPU.Build.0 = Debug|Any CPU
{866D295E-424A-4747-9417-CD7746936138}.Checked|x64.ActiveCfg = Debug|Any CPU
- {866D295E-424A-4747-9417-CD7746936138}.Checked|x64.Build.0 = Debug|Any CPU
{866D295E-424A-4747-9417-CD7746936138}.Checked|x86.ActiveCfg = Debug|Any CPU
- {866D295E-424A-4747-9417-CD7746936138}.Checked|x86.Build.0 = Debug|Any CPU
{D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -317,11 +295,8 @@ Global
{D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Release|x86.ActiveCfg = Release|Any CPU
{D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Release|x86.Build.0 = Release|Any CPU
{D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Checked|Any CPU.Build.0 = Debug|Any CPU
{D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Checked|x64.ActiveCfg = Debug|Any CPU
- {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Checked|x64.Build.0 = Debug|Any CPU
{D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Checked|x86.ActiveCfg = Debug|Any CPU
- {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Checked|x86.Build.0 = Debug|Any CPU
{0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -335,11 +310,8 @@ Global
{0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Release|x86.ActiveCfg = Release|Any CPU
{0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Release|x86.Build.0 = Release|Any CPU
{0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Checked|Any CPU.Build.0 = Debug|Any CPU
{0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Checked|x64.ActiveCfg = Debug|Any CPU
- {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Checked|x64.Build.0 = Debug|Any CPU
{0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Checked|x86.ActiveCfg = Debug|Any CPU
- {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -356,6 +328,7 @@ Global
{866D295E-424A-4747-9417-CD7746936138} = {FB99AC59-1744-4F12-A4B0-0D54FCA048BF}
{D3A329E3-0FEB-4136-9CB6-B38319B0FFA5} = {FB99AC59-1744-4F12-A4B0-0D54FCA048BF}
{4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A} = {D893B9AA-57C5-49E3-97B1-12CC62D84307}
+ {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886} = {D893B9AA-57C5-49E3-97B1-12CC62D84307}
{8671F164-F78C-44FA-93B7-A310F67890FE} = {D893B9AA-57C5-49E3-97B1-12CC62D84307}
{0B5FD0C2-367D-4AD6-8001-80AD79B2441C} = {D893B9AA-57C5-49E3-97B1-12CC62D84307}
{1B248B4C-7584-4C04-850A-A50EB592052C} = {E1AEBD5D-AE4E-4F61-B9ED-AEF950B0CC33}
diff --git a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/ConvertToLibraryImportFixer.cs b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/ConvertToLibraryImportFixer.cs
index 9ebbb56a339..4fdedd095be 100644
--- a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/ConvertToLibraryImportFixer.cs
+++ b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/ConvertToLibraryImportFixer.cs
@@ -74,7 +74,7 @@ namespace Microsoft.Interop.Analyzers
context.Diagnostics);
if (!bool.Parse(diagnostic.Properties[ConvertToLibraryImportAnalyzer.ExactSpelling]))
{
- CharSet charSet = (CharSet)Enum.Parse(typeof(CharSet), diagnostic.Properties[ConvertToLibraryImportAnalyzer.CharSet]);
+ CharSet charSet = (CharSet)Enum.Parse(typeof(CharSet), diagnostic.Properties[ConvertToLibraryImportAnalyzer.CharSet]!);
// CharSet.Auto traditionally maps to either an A or W suffix
// depending on the default CharSet of the platform.
// We will offer both suffix options when CharSet.Auto is provided
diff --git a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/SyntaxExtensions.cs b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/SyntaxExtensions.cs
index 20400c47213..ac7aded42fa 100644
--- a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/SyntaxExtensions.cs
+++ b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/SyntaxExtensions.cs
@@ -33,7 +33,17 @@ namespace Microsoft.Interop.Analyzers
switch (attributeTarget.Identifier.Kind())
{
case SyntaxKind.ReturnKeyword:
- return ((IMethodSymbol)targetSymbol).GetReturnTypeAttributes().First(attributeSyntaxLocationMatches);
+ if (targetSymbol is IMethodSymbol method)
+ {
+ // Sometimes an attribute is put on a symbol that is nested within the containing symbol.
+ // For example, the ContainingSymbol for an AttributeSyntax on a local function has a ContainingSymbol of the method.
+ // Since this method is internal and the callers don't care about attributes on local functions,
+ // we just allow this method to return null in those cases.
+ return method.GetReturnTypeAttributes().FirstOrDefault(attributeSyntaxLocationMatches);
+ }
+ // An attribute on the return value of a delegate type's Invoke method has a ContainingSymbol of the delegate type.
+ // We don't care about the attributes in this case for the callers, so we'll just return null.
+ return null;
case SyntaxKind.AssemblyKeyword:
return targetSymbol.ContainingAssembly.GetAttributes().First(attributeSyntaxLocationMatches);
case SyntaxKind.ModuleKeyword:
@@ -43,7 +53,8 @@ namespace Microsoft.Interop.Analyzers
}
}
// Sometimes an attribute is put on a symbol that is nested within the containing symbol.
- // For example, the ContainingSymbol for an AttributeSyntax on a parameter have a ContainingSymbol of the method.
+ // For example, the ContainingSymbol for an AttributeSyntax on a parameter has a ContainingSymbol of the method
+ // and an AttributeSyntax on a local function has a ContainingSymbol of the containing method.
// Since this method is internal and the callers don't care about attributes on parameters, we just allow
// this method to return null in those cases.
return targetSymbol.GetAttributes().FirstOrDefault(attributeSyntaxLocationMatches);
diff --git a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/LibraryImportGenerator.cs b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/LibraryImportGenerator.cs
index 221cb329884..70ada65966b 100644
--- a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/LibraryImportGenerator.cs
+++ b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/LibraryImportGenerator.cs
@@ -12,7 +12,6 @@ using System.Threading;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
-using Microsoft.CodeAnalysis.DotnetRuntime.Extensions;
using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory;
[assembly: System.Resources.NeutralResourcesLanguage("en-US")]
@@ -64,7 +63,6 @@ namespace Microsoft.Interop
// Collect all methods adorned with LibraryImportAttribute
var attributedMethods = context.SyntaxProvider
.ForAttributeWithMetadataName(
- context,
TypeNames.LibraryImportAttribute,
static (node, ct) => node is MethodDeclarationSyntax,
static (context, ct) => context.TargetSymbol is IMethodSymbol methodSymbol
diff --git a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/LibraryImportGenerator.csproj b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/LibraryImportGenerator.csproj
index 9a3f5a5d8e2..9077f4cf523 100644
--- a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/LibraryImportGenerator.csproj
+++ b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/LibraryImportGenerator.csproj
@@ -23,14 +23,6 @@
<ItemGroup>
<Compile Include="$(CommonPath)Roslyn\GetBestTypeByMetadataName.cs" Link="Common\Roslyn\GetBestTypeByMetadataName.cs" />
- <Compile Include="$(CommonPath)Roslyn\Hash.cs" Link="Common\Roslyn\Hash.cs" />
- <Compile Include="$(CommonPath)Roslyn\ISyntaxHelper.cs" Link="Common\Roslyn\ISyntaxHelper.cs" />
- <Compile Include="$(CommonPath)Roslyn\CSharpSyntaxHelper.cs" Link="Common\Roslyn\CSharpSyntaxHelper.cs" />
- <Compile Include="$(CommonPath)Roslyn\GlobalAliases.cs" Link="Common\Roslyn\GlobalAliases.cs" />
- <Compile Include="$(CommonPath)Roslyn\SyntaxNodeGrouping.cs" Link="Common\Roslyn\SyntaxNodeGrouping.cs" />
- <Compile Include="$(CommonPath)Roslyn\SyntaxValueProvider.ImmutableArrayValueComparer.cs" Link="Common\Roslyn\SyntaxValueProvider.ImmutableArrayValueComparer.cs" />
- <Compile Include="$(CommonPath)Roslyn\SyntaxValueProvider_ForAttributeWithMetadataName.cs" Link="Common\Roslyn\SyntaxValueProvider_ForAttributeWithMetadataName.cs" />
- <Compile Include="$(CommonPath)Roslyn\SyntaxValueProvider_ForAttributeWithSimpleName.cs" Link="Common\Roslyn\SyntaxValueProvider_ForAttributeWithSimpleName.cs" />
<Compile Include="$(CoreLibSharedDir)System\Collections\Generic\ValueListBuilder.cs" Link="Production\ValueListBuilder.cs" />
<Compile Include="$(CoreLibSharedDir)System\Collections\Generic\ValueListBuilder.Pop.cs" Link="Production\ValueListBuilder.Pop.cs" />
diff --git a/src/libraries/System.Runtime.InteropServices/src/MatchingRefApiCompatBaseline.txt b/src/libraries/System.Runtime.InteropServices/src/MatchingRefApiCompatBaseline.txt
index dd2e06b69c3..adf9d5b07e0 100644
--- a/src/libraries/System.Runtime.InteropServices/src/MatchingRefApiCompatBaseline.txt
+++ b/src/libraries/System.Runtime.InteropServices/src/MatchingRefApiCompatBaseline.txt
@@ -2,8 +2,6 @@ Compat issues with assembly System.Runtime.InteropServices:
TypesMustExist : Type 'System.Runtime.InteropServices.AssemblyRegistrationFlags' does not exist in the reference but it does exist in the implementation.
CannotChangeAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' on 'System.Runtime.InteropServices.ComWrappers' changed from '[UnsupportedOSPlatformAttribute("android")]' in the implementation to '[UnsupportedOSPlatformAttribute("android")]' in the reference.
TypesMustExist : Type 'System.Runtime.InteropServices.ExporterEventKind' does not exist in the reference but it does exist in the implementation.
-TypesMustExist : Type 'System.Runtime.InteropServices.IDispatchImplAttribute' does not exist in the reference but it does exist in the implementation.
-TypesMustExist : Type 'System.Runtime.InteropServices.IDispatchImplType' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Runtime.InteropServices.RegistrationClassContext' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Runtime.InteropServices.RegistrationConnectionType' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Runtime.InteropServices.SetWin32ContextInIDispatchAttribute' does not exist in the reference but it does exist in the implementation.
diff --git a/src/libraries/System.Runtime.InteropServices/src/System.Runtime.InteropServices.csproj b/src/libraries/System.Runtime.InteropServices/src/System.Runtime.InteropServices.csproj
index fc2048c219a..99e288f8de5 100644
--- a/src/libraries/System.Runtime.InteropServices/src/System.Runtime.InteropServices.csproj
+++ b/src/libraries/System.Runtime.InteropServices/src/System.Runtime.InteropServices.csproj
@@ -29,8 +29,6 @@
<Compile Include="System\Runtime\InteropServices\ComUnregisterFunctionAttribute.cs" />
<Compile Include="System\Runtime\InteropServices\ExporterEventKind.cs" />
<Compile Include="System\Runtime\InteropServices\HandleCollector.cs" />
- <Compile Include="System\Runtime\InteropServices\IDispatchImplAttribute.cs" />
- <Compile Include="System\Runtime\InteropServices\IDispatchImplType.cs" />
<Compile Include="System\Runtime\InteropServices\ImportedFromTypeLibAttribute.cs" />
<Compile Include="System\Runtime\InteropServices\ManagedToNativeComInteropStubAttribute.cs" />
<Compile Include="System\Runtime\InteropServices\PrimaryInteropAssemblyAttribute.cs" />
diff --git a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/IDispatchImplAttribute.cs b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/IDispatchImplAttribute.cs
deleted file mode 100644
index dfe2ad08ddb..00000000000
--- a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/IDispatchImplAttribute.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-namespace System.Runtime.InteropServices
-{
- [AttributeUsage(AttributeTargets.Class | AttributeTargets.Assembly, Inherited = false)]
- [Obsolete("IDispatchImplAttribute has been deprecated and is not supported.")]
- public sealed class IDispatchImplAttribute : Attribute
- {
- public IDispatchImplAttribute(short implType) : this((IDispatchImplType)implType)
- {
- }
-
- public IDispatchImplAttribute(IDispatchImplType implType) => Value = implType;
-
- public IDispatchImplType Value { get; }
- }
-}
diff --git a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/IDispatchImplType.cs b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/IDispatchImplType.cs
deleted file mode 100644
index fe674c3954c..00000000000
--- a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/IDispatchImplType.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-namespace System.Runtime.InteropServices
-{
- [Obsolete("IDispatchImplAttribute and IDispatchImplType have been deprecated and are not supported.")]
- public enum IDispatchImplType
- {
- CompatibleImpl = 2,
- InternalImpl = 1,
- SystemDefinedImpl = 0,
- }
-}
diff --git a/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/NativeMarshallingAttributeAnalyzerTests.cs b/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/NativeMarshallingAttributeAnalyzerTests.cs
index 58256871872..5b8769e19c9 100644
--- a/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/NativeMarshallingAttributeAnalyzerTests.cs
+++ b/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/NativeMarshallingAttributeAnalyzerTests.cs
@@ -272,8 +272,18 @@ namespace LibraryImportGenerator.UnitTests
{
void Foo([MarshalAs(UnmanagedType.I4)] int i)
{
+ [return:MarshalAs(UnmanagedType.I4)]
+ [SkipLocalsInit]
+ static int Local()
+ {
+ return 0;
+ }
}
}
+
+ [return:MarshalAs(UnmanagedType.I4)]
+ delegate int Y();
+
""";
await VerifyCS.VerifyAnalyzerAsync(source);
diff --git a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System.Runtime.InteropServices.Tests.csproj b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System.Runtime.InteropServices.Tests.csproj
index 34964fb33f2..867c373eea2 100644
--- a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System.Runtime.InteropServices.Tests.csproj
+++ b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System.Runtime.InteropServices.Tests.csproj
@@ -44,7 +44,6 @@
<Compile Include="System\Runtime\InteropServices\GuidAttributeTests.cs" />
<Compile Include="System\Runtime\InteropServices\HandleCollectorTests.cs" />
<Compile Include="System\Runtime\InteropServices\HandleRefTests.cs" />
- <Compile Include="System\Runtime\InteropServices\IDispatchImplAttributeTests.cs" />
<Compile Include="System\Runtime\InteropServices\InterfaceTypeAttributeTests.cs" />
<Compile Include="System\Runtime\InteropServices\LCIDConversionAttributeTests.cs" />
<Compile Include="System\Runtime\InteropServices\LibraryImportAttributeTests.cs" />
diff --git a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/IDispatchImplAttributeTests.cs b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/IDispatchImplAttributeTests.cs
deleted file mode 100644
index ac192126f64..00000000000
--- a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/IDispatchImplAttributeTests.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.Reflection;
-using Xunit;
-
-namespace System.Runtime.InteropServices.Tests
-{
- public class IDispatchImplAttributeTests
- {
- [Theory]
- [InlineData(-1)]
- [InlineData(0)]
- [InlineData(2)]
- public void Ctor_ImplTypeShort(short implType)
- {
- Type type = Type.GetType("System.Runtime.InteropServices.IDispatchImplAttribute, System.Runtime.InteropServices");
- PropertyInfo valueProperty = type.GetProperty("Value");
- Assert.NotNull(type);
- Assert.NotNull(valueProperty);
-
- ConstructorInfo shortConstructor = type.GetConstructor(new Type[] { typeof(short) });
- object attribute = shortConstructor.Invoke(new object[] { implType });
- Assert.Equal(implType, (int)valueProperty.GetValue(attribute));
- }
- }
-}
diff --git a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/AddRefTests.cs b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/AddRefTests.cs
index ec5ae351bc7..ee1772a78d6 100644
--- a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/AddRefTests.cs
+++ b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/AddRefTests.cs
@@ -10,6 +10,7 @@ namespace System.Runtime.InteropServices.Tests
{
[Fact]
[SkipOnMono("ComWrappers are not supported on Mono")]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/76005", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot), nameof(PlatformDetection.IsNotWindows))]
public void AddRef_ValidPointer_Success()
{
var cw = new ComWrappersImpl();
diff --git a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/DestroyStructureTests.cs b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/DestroyStructureTests.cs
index 17a737da414..66fa0edb4a2 100644
--- a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/DestroyStructureTests.cs
+++ b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/DestroyStructureTests.cs
@@ -94,6 +94,7 @@ namespace System.Runtime.InteropServices.Tests
}
[Theory]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/75666", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot))]
[ActiveIssue("https://github.com/mono/mono/issues/15087", TestRuntimes.Mono)]
[MemberData(nameof(DestroyStructure_InvalidType_TestData))]
public void DestroyStructure_NonRuntimeType_ThrowsArgumentException(Type invalidType)
@@ -102,6 +103,7 @@ namespace System.Runtime.InteropServices.Tests
}
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/75666", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot))]
public void DestroyStructure_AutoLayout_ThrowsArgumentException()
{
AssertExtensions.Throws<ArgumentException>("structureType", () => Marshal.DestroyStructure<AutoLayoutStruct>((IntPtr)1));
diff --git a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/GetExceptionCodeTests.cs b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/GetExceptionCodeTests.cs
index 098a246313f..e5448eee839 100644
--- a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/GetExceptionCodeTests.cs
+++ b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/GetExceptionCodeTests.cs
@@ -7,7 +7,7 @@ using Xunit;
namespace System.Runtime.InteropServices.Tests
{
- [SkipOnMono("Marshal.GetExceptionCode will not be implemented in Mono, see https://github.com/mono/mono/issues/15085.")]
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsMarshalGetExceptionPointersSupported))]
public class GetExceptionCodeTests
{
[Fact]
diff --git a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/GetExceptionForHRTests.cs b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/GetExceptionForHRTests.cs
index 631939e769c..b0928d193c3 100644
--- a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/GetExceptionForHRTests.cs
+++ b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/GetExceptionForHRTests.cs
@@ -6,6 +6,7 @@ using Xunit;
namespace System.Runtime.InteropServices.Tests
{
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNativeAot))]
public class GetExceptionForHRTests
{
[Theory]
diff --git a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/GetExceptionPointersTests.cs b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/GetExceptionPointersTests.cs
index 3ee0eb115d6..dd8d72df0c6 100644
--- a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/GetExceptionPointersTests.cs
+++ b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/GetExceptionPointersTests.cs
@@ -7,8 +7,7 @@ namespace System.Runtime.InteropServices.Tests
{
public class GetExceptionPointersTests
{
- [Fact]
- [SkipOnMono("Marshal.GetExceptionPointers will not be implemented in Mono, see https://github.com/mono/mono/issues/15085.")]
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsMarshalGetExceptionPointersSupported))]
public void GetExceptionPointers_ReturnsExpected()
{
Assert.Equal(IntPtr.Zero, Marshal.GetExceptionPointers());
diff --git a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/GetFunctionPointerForDelegateTests.cs b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/GetFunctionPointerForDelegateTests.cs
index f6ce9be0b8b..79c3adb3c91 100644
--- a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/GetFunctionPointerForDelegateTests.cs
+++ b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/GetFunctionPointerForDelegateTests.cs
@@ -106,6 +106,10 @@ namespace System.Runtime.InteropServices.Tests
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser.")]
public void GetFunctionPointerForDelegate_MarshalledClosedStaticDelegate()
{
+ // Ensure AOT compilers see the delegate being used with interop
+ if (string.Empty.Length > 0)
+ Marshal.GetFunctionPointerForDelegate<NoArgsDelegate>(null);
+
MethodInfo targetMethod = typeof(GetFunctionPointerForDelegateTests).GetMethod(nameof(Method), BindingFlags.NonPublic | BindingFlags.Static);
Delegate original = targetMethod.CreateDelegate(typeof(NoArgsDelegate), "value");
IntPtr ptr = Marshal.GetFunctionPointerForDelegate(original);
diff --git a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/OffsetOfTests.cs b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/OffsetOfTests.cs
index 2221e887354..1f0a416c3d5 100644
--- a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/OffsetOfTests.cs
+++ b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/OffsetOfTests.cs
@@ -213,10 +213,15 @@ namespace System.Runtime.InteropServices.Tests
public static IEnumerable<object[]> OffsetOf_NotMarshallable_TestData()
{
+ // Ensure AOT compilers generate the marshalling data
+ if (string.Empty.Length > 0)
+ Marshal.SizeOf<StructWithFxdLPSTRSAFld>();
+
yield return new object[] { typeof(StructWithFxdLPSTRSAFld), nameof(StructWithFxdLPSTRSAFld.Arr) };
}
[Theory]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/75666", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot))]
[ActiveIssue("https://github.com/mono/mono/issues/15087", TestRuntimes.Mono)]
[MemberData(nameof(OffsetOf_NotMarshallable_TestData))]
public void OffsetOf_NotMarshallable_ThrowsArgumentException(Type t, string fieldName)
@@ -225,6 +230,7 @@ namespace System.Runtime.InteropServices.Tests
}
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/75666", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot))]
public void OffsetOf_NoLayoutPoint_ThrowsArgumentException()
{
AssertExtensions.Throws<ArgumentException>(null, () => Marshal.OffsetOf(typeof(NoLayoutPoint), nameof(NoLayoutPoint.x)));
diff --git a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/PrelinkTests.cs b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/PrelinkTests.cs
index febdeffd0e1..f30d7cd64cb 100644
--- a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/PrelinkTests.cs
+++ b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/PrelinkTests.cs
@@ -31,7 +31,7 @@ namespace System.Runtime.InteropServices.Tests
AssertExtensions.Throws<ArgumentNullException>("m", () => Marshal.Prelink(null));
}
- [Fact]
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNativeAot))]
public void Prelink_NonRuntimeMethod_ThrowsArgumentException()
{
AssertExtensions.Throws<ArgumentException>("m", null, () => Marshal.Prelink(new NonRuntimeMethodInfo()));
diff --git a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/PtrToStructureTests.cs b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/PtrToStructureTests.cs
index 9678dab54f9..97f6a4efb96 100644
--- a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/PtrToStructureTests.cs
+++ b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/PtrToStructureTests.cs
@@ -139,6 +139,7 @@ namespace System.Runtime.InteropServices.Tests
}
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/75666", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot))]
public void PtrToStructure_AutoLayoutClass_ThrowsArgumentException()
{
AssertExtensions.Throws<ArgumentException>("structure", () => Marshal.PtrToStructure((IntPtr)1, (object)new NonGenericClass()));
@@ -186,6 +187,7 @@ namespace System.Runtime.InteropServices.Tests
[Theory]
[MemberData(nameof(PtrToStructure_ObjectNotBlittable_TestData))]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/75666", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot))]
public void PtrToStructure_ObjectNoBlittable_ThrowsArgumentException(object structure)
{
AssertExtensions.Throws<ArgumentException>("structure", () => Marshal.PtrToStructure((IntPtr)1, structure));
@@ -232,6 +234,7 @@ namespace System.Runtime.InteropServices.Tests
}
[Theory]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/75666", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot))]
[MemberData(nameof(PtrToStructure_NonBlittableType_TestData))]
public void PtrToStructure_NonBlittablType_ThrowsArgumentException(Type structureType)
{
diff --git a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/QueryInterfaceTests.cs b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/QueryInterfaceTests.cs
index 7d1db477dd9..41838ed5b95 100644
--- a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/QueryInterfaceTests.cs
+++ b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/QueryInterfaceTests.cs
@@ -22,6 +22,7 @@ namespace System.Runtime.InteropServices.Tests
[Theory]
[MemberData(nameof(QueryInterface_ValidInterface_TestData))]
[SkipOnMono("ComWrappers are not supported on Mono")]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/76005", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot), nameof(PlatformDetection.IsNotWindows))]
public void QueryInterface_ValidInterface_Success(object o, string iidString)
{
var cw = new ComWrappersImpl();
@@ -55,6 +56,7 @@ namespace System.Runtime.InteropServices.Tests
[Theory]
[MemberData(nameof(QueryInterface_NoSuchInterface_TestData))]
[SkipOnMono("ComWrappers are not supported on Mono")]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/76005", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot), nameof(PlatformDetection.IsNotWindows))]
public void QueryInterface_NoSuchInterface_Success(object o, string iidString)
{
var cw = new ComWrappersImpl();
diff --git a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/ReleaseTests.cs b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/ReleaseTests.cs
index 3ef69cfc092..087318aa642 100644
--- a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/ReleaseTests.cs
+++ b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/ReleaseTests.cs
@@ -10,6 +10,7 @@ namespace System.Runtime.InteropServices.Tests
{
[Fact]
[SkipOnMono("ComWrappers are not supported on Mono")]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/76005", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot), nameof(PlatformDetection.IsNotWindows))]
public void Release_ValidPointer_Success()
{
var cw = new ComWrappersImpl();
diff --git a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/SizeOfTests.cs b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/SizeOfTests.cs
index ae7cf0f84da..2d0c0b2b93d 100644
--- a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/SizeOfTests.cs
+++ b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/SizeOfTests.cs
@@ -28,8 +28,7 @@ namespace System.Runtime.InteropServices.Tests
[Fact]
public void SizeOf_Object_ReturnsExpected()
{
- SomeTestStruct someTestStruct = new SomeTestStruct();
- Assert.NotEqual(0, Marshal.SizeOf(someTestStruct.GetType()));
+ Assert.NotEqual(0, Marshal.SizeOf(typeof(SomeTestStruct)));
}
[Fact]
@@ -91,6 +90,7 @@ namespace System.Runtime.InteropServices.Tests
}
[Theory]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/75666", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot))]
[ActiveIssue("https://github.com/mono/mono/issues/15087", TestRuntimes.Mono)]
[MemberData(nameof(SizeOf_InvalidType_TestData))]
public void SizeOf_InvalidType_ThrowsArgumentException(Type type, string paramName)
diff --git a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/StructureToPtrTests.cs b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/StructureToPtrTests.cs
index 61acb05db5e..59cefc137ce 100644
--- a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/StructureToPtrTests.cs
+++ b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/StructureToPtrTests.cs
@@ -150,6 +150,7 @@ namespace System.Runtime.InteropServices.Tests
}
[Theory]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/75666", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot))]
[MemberData(nameof(StructureToPtr_NonBlittableObject_TestData))]
public void StructureToPtr_NonBlittable_ThrowsArgumentException(object o)
{
@@ -158,6 +159,7 @@ namespace System.Runtime.InteropServices.Tests
}
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/75666", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot))]
public void StructureToPtr_AutoLayout_ThrowsArgumentException()
{
var someTs_Auto = new SomeTestStruct_Auto();
@@ -166,6 +168,7 @@ namespace System.Runtime.InteropServices.Tests
}
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/75666", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot))]
[ActiveIssue("https://github.com/mono/mono/issues/15104", TestRuntimes.Mono)]
public void StructureToPtr_InvalidLengthByValArrayInStruct_ThrowsArgumentException()
{
diff --git a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/ThrowExceptionForHRTests.cs b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/ThrowExceptionForHRTests.cs
index 346da6f4250..c364da559b2 100644
--- a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/ThrowExceptionForHRTests.cs
+++ b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/ThrowExceptionForHRTests.cs
@@ -7,6 +7,7 @@ using Xunit;
namespace System.Runtime.InteropServices.Tests
{
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNativeAot))]
public class ThrowExceptionForHRTests
{
[Theory]
diff --git a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/ObjectiveC/MessageSendTests.cs b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/ObjectiveC/MessageSendTests.cs
index 6c45152e8fe..1493fc255bf 100644
--- a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/ObjectiveC/MessageSendTests.cs
+++ b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/ObjectiveC/MessageSendTests.cs
@@ -16,6 +16,7 @@ namespace System.Runtime.InteropServices.Tests
{
[PlatformSpecific(TestPlatforms.OSX)]
[SkipOnMono("Not currently implemented on Mono")]
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNativeAot))] // https://github.com/dotnet/runtimelab/issues/155
public unsafe class MessageSendTests
{
private static int s_count = 1;
diff --git a/src/libraries/System.Runtime.InteropServices/tests/TestAssets/NativeExports/NativeExports.csproj b/src/libraries/System.Runtime.InteropServices/tests/TestAssets/NativeExports/NativeExports.csproj
index d420161d1a6..fcf18ce41ef 100644
--- a/src/libraries/System.Runtime.InteropServices/tests/TestAssets/NativeExports/NativeExports.csproj
+++ b/src/libraries/System.Runtime.InteropServices/tests/TestAssets/NativeExports/NativeExports.csproj
@@ -9,7 +9,7 @@
<DnneGenRollForward>Major</DnneGenRollForward>
<!-- To integrate with DNNE's architecture calculation, we need to set the RID for this project. -->
<RuntimeIdentifier>$(OutputRid)</RuntimeIdentifier>
- <AppHostRuntimeIdentifier>$(OutputRid)</AppHostRuntimeIdentifier>
+ <AppHostRuntimeIdentifier>$(PackageRID)</AppHostRuntimeIdentifier>
<_TargetsAppleOS Condition="'$(TargetOS)' == 'OSX' or '$(TargetOS)' == 'MacCatalyst' or
'$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'iOSSimulator' or
'$(TargetOS)' == 'tvOSSimulator'">true</_TargetsAppleOS>
@@ -35,6 +35,13 @@
StandardOutputImportance="Low">
<Output TaskParameter="ConsoleOutput" PropertyName="DnneCompilerCommand" />
</Exec>
+
+ <Exec Command="bash -c 'source &quot;$(RepositoryEngineeringDir)/common/native/init-compiler.sh&quot; &quot;$(RepositoryEngineeringDir)/common/native&quot; $(TargetArchitecture) $(NativeCompiler) &amp;&amp; echo $LDFLAGS' 2>/dev/null"
+ EchoOff="true"
+ ConsoleToMsBuild="true"
+ StandardOutputImportance="Low">
+ <Output TaskParameter="ConsoleOutput" PropertyName="DnneLinkerCommand" />
+ </Exec>
</Target>
<Target Name="GetUnixCrossBuildArgumentsForDNNE"
@@ -61,7 +68,7 @@
<PropertyGroup>
<CommonToolchainArgs>--target=$(TargetTriple) --gcc-toolchain=$(ROOTFS_DIR)/usr --sysroot=$(ROOTFS_DIR)</CommonToolchainArgs>
- <DnneLinkerUserFlags>$(CommonToolchainArgs) $(DnneLinkerUserFlags.Replace(';',' '))</DnneLinkerUserFlags>
+ <DnneLinkerUserFlags>$(CommonToolchainArgs) $(DnneLinkerCommand) $(DnneLinkerUserFlags.Replace(';',' '))</DnneLinkerUserFlags>
<DnneCompilerUserFlags>$(CommonToolchainArgs) $(DnneCompilerUserFlags.Replace(';',' '))</DnneCompilerUserFlags>
</PropertyGroup>
</Target>
diff --git a/src/libraries/System.Runtime.Intrinsics/System.Runtime.Intrinsics.sln b/src/libraries/System.Runtime.Intrinsics/System.Runtime.Intrinsics.sln
index 2cd0533e90f..670e1c3d232 100644
--- a/src/libraries/System.Runtime.Intrinsics/System.Runtime.Intrinsics.sln
+++ b/src/libraries/System.Runtime.Intrinsics/System.Runtime.Intrinsics.sln
@@ -9,6 +9,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Numerics.Vectors", "
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{A4058388-97C1-492A-86A4-5240C4166BFF}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{9D4B472B-6C86-4CEC-998D-800937DBD399}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{FE8C7C64-1759-4175-BA6E-03F8D6B7C6EF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{9A0BF7EC-AD07-44C8-9B70-9DACB2C894C7}"
@@ -73,11 +75,8 @@ Global
{2644B828-C37C-45C1-933D-27E82DA0A098}.Release|x86.ActiveCfg = Release|Any CPU
{2644B828-C37C-45C1-933D-27E82DA0A098}.Release|x86.Build.0 = Release|Any CPU
{2644B828-C37C-45C1-933D-27E82DA0A098}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {2644B828-C37C-45C1-933D-27E82DA0A098}.Checked|Any CPU.Build.0 = Debug|Any CPU
{2644B828-C37C-45C1-933D-27E82DA0A098}.Checked|x64.ActiveCfg = Debug|Any CPU
- {2644B828-C37C-45C1-933D-27E82DA0A098}.Checked|x64.Build.0 = Debug|Any CPU
{2644B828-C37C-45C1-933D-27E82DA0A098}.Checked|x86.ActiveCfg = Debug|Any CPU
- {2644B828-C37C-45C1-933D-27E82DA0A098}.Checked|x86.Build.0 = Debug|Any CPU
{EFF55B56-D92B-4573-94EA-AF5B3B001C34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EFF55B56-D92B-4573-94EA-AF5B3B001C34}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EFF55B56-D92B-4573-94EA-AF5B3B001C34}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -91,11 +90,8 @@ Global
{EFF55B56-D92B-4573-94EA-AF5B3B001C34}.Release|x86.ActiveCfg = Release|Any CPU
{EFF55B56-D92B-4573-94EA-AF5B3B001C34}.Release|x86.Build.0 = Release|Any CPU
{EFF55B56-D92B-4573-94EA-AF5B3B001C34}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {EFF55B56-D92B-4573-94EA-AF5B3B001C34}.Checked|Any CPU.Build.0 = Debug|Any CPU
{EFF55B56-D92B-4573-94EA-AF5B3B001C34}.Checked|x64.ActiveCfg = Debug|Any CPU
- {EFF55B56-D92B-4573-94EA-AF5B3B001C34}.Checked|x64.Build.0 = Debug|Any CPU
{EFF55B56-D92B-4573-94EA-AF5B3B001C34}.Checked|x86.ActiveCfg = Debug|Any CPU
- {EFF55B56-D92B-4573-94EA-AF5B3B001C34}.Checked|x86.Build.0 = Debug|Any CPU
{A296D1D4-71D3-47CF-A572-DD7C3CFE472F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A296D1D4-71D3-47CF-A572-DD7C3CFE472F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A296D1D4-71D3-47CF-A572-DD7C3CFE472F}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -109,11 +105,8 @@ Global
{A296D1D4-71D3-47CF-A572-DD7C3CFE472F}.Release|x86.ActiveCfg = Release|Any CPU
{A296D1D4-71D3-47CF-A572-DD7C3CFE472F}.Release|x86.Build.0 = Release|Any CPU
{A296D1D4-71D3-47CF-A572-DD7C3CFE472F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {A296D1D4-71D3-47CF-A572-DD7C3CFE472F}.Checked|Any CPU.Build.0 = Debug|Any CPU
{A296D1D4-71D3-47CF-A572-DD7C3CFE472F}.Checked|x64.ActiveCfg = Debug|Any CPU
- {A296D1D4-71D3-47CF-A572-DD7C3CFE472F}.Checked|x64.Build.0 = Debug|Any CPU
{A296D1D4-71D3-47CF-A572-DD7C3CFE472F}.Checked|x86.ActiveCfg = Debug|Any CPU
- {A296D1D4-71D3-47CF-A572-DD7C3CFE472F}.Checked|x86.Build.0 = Debug|Any CPU
{A4058388-97C1-492A-86A4-5240C4166BFF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A4058388-97C1-492A-86A4-5240C4166BFF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A4058388-97C1-492A-86A4-5240C4166BFF}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -127,11 +120,23 @@ Global
{A4058388-97C1-492A-86A4-5240C4166BFF}.Release|x86.ActiveCfg = Release|Any CPU
{A4058388-97C1-492A-86A4-5240C4166BFF}.Release|x86.Build.0 = Release|Any CPU
{A4058388-97C1-492A-86A4-5240C4166BFF}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {A4058388-97C1-492A-86A4-5240C4166BFF}.Checked|Any CPU.Build.0 = Debug|Any CPU
{A4058388-97C1-492A-86A4-5240C4166BFF}.Checked|x64.ActiveCfg = Debug|Any CPU
- {A4058388-97C1-492A-86A4-5240C4166BFF}.Checked|x64.Build.0 = Debug|Any CPU
{A4058388-97C1-492A-86A4-5240C4166BFF}.Checked|x86.ActiveCfg = Debug|Any CPU
- {A4058388-97C1-492A-86A4-5240C4166BFF}.Checked|x86.Build.0 = Debug|Any CPU
+ {9D4B472B-6C86-4CEC-998D-800937DBD399}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9D4B472B-6C86-4CEC-998D-800937DBD399}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9D4B472B-6C86-4CEC-998D-800937DBD399}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {9D4B472B-6C86-4CEC-998D-800937DBD399}.Debug|x64.Build.0 = Debug|Any CPU
+ {9D4B472B-6C86-4CEC-998D-800937DBD399}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {9D4B472B-6C86-4CEC-998D-800937DBD399}.Debug|x86.Build.0 = Debug|Any CPU
+ {9D4B472B-6C86-4CEC-998D-800937DBD399}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9D4B472B-6C86-4CEC-998D-800937DBD399}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9D4B472B-6C86-4CEC-998D-800937DBD399}.Release|x64.ActiveCfg = Release|Any CPU
+ {9D4B472B-6C86-4CEC-998D-800937DBD399}.Release|x64.Build.0 = Release|Any CPU
+ {9D4B472B-6C86-4CEC-998D-800937DBD399}.Release|x86.ActiveCfg = Release|Any CPU
+ {9D4B472B-6C86-4CEC-998D-800937DBD399}.Release|x86.Build.0 = Release|Any CPU
+ {9D4B472B-6C86-4CEC-998D-800937DBD399}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {9D4B472B-6C86-4CEC-998D-800937DBD399}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {9D4B472B-6C86-4CEC-998D-800937DBD399}.Checked|x86.ActiveCfg = Debug|Any CPU
{FE8C7C64-1759-4175-BA6E-03F8D6B7C6EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FE8C7C64-1759-4175-BA6E-03F8D6B7C6EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FE8C7C64-1759-4175-BA6E-03F8D6B7C6EF}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -145,11 +150,8 @@ Global
{FE8C7C64-1759-4175-BA6E-03F8D6B7C6EF}.Release|x86.ActiveCfg = Release|Any CPU
{FE8C7C64-1759-4175-BA6E-03F8D6B7C6EF}.Release|x86.Build.0 = Release|Any CPU
{FE8C7C64-1759-4175-BA6E-03F8D6B7C6EF}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {FE8C7C64-1759-4175-BA6E-03F8D6B7C6EF}.Checked|Any CPU.Build.0 = Debug|Any CPU
{FE8C7C64-1759-4175-BA6E-03F8D6B7C6EF}.Checked|x64.ActiveCfg = Debug|Any CPU
- {FE8C7C64-1759-4175-BA6E-03F8D6B7C6EF}.Checked|x64.Build.0 = Debug|Any CPU
{FE8C7C64-1759-4175-BA6E-03F8D6B7C6EF}.Checked|x86.ActiveCfg = Debug|Any CPU
- {FE8C7C64-1759-4175-BA6E-03F8D6B7C6EF}.Checked|x86.Build.0 = Debug|Any CPU
{9A0BF7EC-AD07-44C8-9B70-9DACB2C894C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9A0BF7EC-AD07-44C8-9B70-9DACB2C894C7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9A0BF7EC-AD07-44C8-9B70-9DACB2C894C7}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -163,11 +165,8 @@ Global
{9A0BF7EC-AD07-44C8-9B70-9DACB2C894C7}.Release|x86.ActiveCfg = Release|Any CPU
{9A0BF7EC-AD07-44C8-9B70-9DACB2C894C7}.Release|x86.Build.0 = Release|Any CPU
{9A0BF7EC-AD07-44C8-9B70-9DACB2C894C7}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {9A0BF7EC-AD07-44C8-9B70-9DACB2C894C7}.Checked|Any CPU.Build.0 = Debug|Any CPU
{9A0BF7EC-AD07-44C8-9B70-9DACB2C894C7}.Checked|x64.ActiveCfg = Debug|Any CPU
- {9A0BF7EC-AD07-44C8-9B70-9DACB2C894C7}.Checked|x64.Build.0 = Debug|Any CPU
{9A0BF7EC-AD07-44C8-9B70-9DACB2C894C7}.Checked|x86.ActiveCfg = Debug|Any CPU
- {9A0BF7EC-AD07-44C8-9B70-9DACB2C894C7}.Checked|x86.Build.0 = Debug|Any CPU
{28B808CE-B1F8-4B05-9ADA-8884525BD87F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{28B808CE-B1F8-4B05-9ADA-8884525BD87F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{28B808CE-B1F8-4B05-9ADA-8884525BD87F}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -181,11 +180,8 @@ Global
{28B808CE-B1F8-4B05-9ADA-8884525BD87F}.Release|x86.ActiveCfg = Release|Any CPU
{28B808CE-B1F8-4B05-9ADA-8884525BD87F}.Release|x86.Build.0 = Release|Any CPU
{28B808CE-B1F8-4B05-9ADA-8884525BD87F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {28B808CE-B1F8-4B05-9ADA-8884525BD87F}.Checked|Any CPU.Build.0 = Debug|Any CPU
{28B808CE-B1F8-4B05-9ADA-8884525BD87F}.Checked|x64.ActiveCfg = Debug|Any CPU
- {28B808CE-B1F8-4B05-9ADA-8884525BD87F}.Checked|x64.Build.0 = Debug|Any CPU
{28B808CE-B1F8-4B05-9ADA-8884525BD87F}.Checked|x86.ActiveCfg = Debug|Any CPU
- {28B808CE-B1F8-4B05-9ADA-8884525BD87F}.Checked|x86.Build.0 = Debug|Any CPU
{5AD79501-BEA5-48C7-B466-021A9DCB9D5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5AD79501-BEA5-48C7-B466-021A9DCB9D5C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5AD79501-BEA5-48C7-B466-021A9DCB9D5C}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -199,11 +195,8 @@ Global
{5AD79501-BEA5-48C7-B466-021A9DCB9D5C}.Release|x86.ActiveCfg = Release|Any CPU
{5AD79501-BEA5-48C7-B466-021A9DCB9D5C}.Release|x86.Build.0 = Release|Any CPU
{5AD79501-BEA5-48C7-B466-021A9DCB9D5C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {5AD79501-BEA5-48C7-B466-021A9DCB9D5C}.Checked|Any CPU.Build.0 = Debug|Any CPU
{5AD79501-BEA5-48C7-B466-021A9DCB9D5C}.Checked|x64.ActiveCfg = Debug|Any CPU
- {5AD79501-BEA5-48C7-B466-021A9DCB9D5C}.Checked|x64.Build.0 = Debug|Any CPU
{5AD79501-BEA5-48C7-B466-021A9DCB9D5C}.Checked|x86.ActiveCfg = Debug|Any CPU
- {5AD79501-BEA5-48C7-B466-021A9DCB9D5C}.Checked|x86.Build.0 = Debug|Any CPU
{80AFB6EB-AB23-48A1-951C-76E6FEA29D19}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{80AFB6EB-AB23-48A1-951C-76E6FEA29D19}.Debug|Any CPU.Build.0 = Debug|Any CPU
{80AFB6EB-AB23-48A1-951C-76E6FEA29D19}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -217,11 +210,8 @@ Global
{80AFB6EB-AB23-48A1-951C-76E6FEA29D19}.Release|x86.ActiveCfg = Release|Any CPU
{80AFB6EB-AB23-48A1-951C-76E6FEA29D19}.Release|x86.Build.0 = Release|Any CPU
{80AFB6EB-AB23-48A1-951C-76E6FEA29D19}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {80AFB6EB-AB23-48A1-951C-76E6FEA29D19}.Checked|Any CPU.Build.0 = Debug|Any CPU
{80AFB6EB-AB23-48A1-951C-76E6FEA29D19}.Checked|x64.ActiveCfg = Debug|Any CPU
- {80AFB6EB-AB23-48A1-951C-76E6FEA29D19}.Checked|x64.Build.0 = Debug|Any CPU
{80AFB6EB-AB23-48A1-951C-76E6FEA29D19}.Checked|x86.ActiveCfg = Debug|Any CPU
- {80AFB6EB-AB23-48A1-951C-76E6FEA29D19}.Checked|x86.Build.0 = Debug|Any CPU
{2A6ED99F-FFEC-4FA7-BEF7-E5339C9D99BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2A6ED99F-FFEC-4FA7-BEF7-E5339C9D99BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2A6ED99F-FFEC-4FA7-BEF7-E5339C9D99BB}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -235,11 +225,8 @@ Global
{2A6ED99F-FFEC-4FA7-BEF7-E5339C9D99BB}.Release|x86.ActiveCfg = Release|Any CPU
{2A6ED99F-FFEC-4FA7-BEF7-E5339C9D99BB}.Release|x86.Build.0 = Release|Any CPU
{2A6ED99F-FFEC-4FA7-BEF7-E5339C9D99BB}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {2A6ED99F-FFEC-4FA7-BEF7-E5339C9D99BB}.Checked|Any CPU.Build.0 = Debug|Any CPU
{2A6ED99F-FFEC-4FA7-BEF7-E5339C9D99BB}.Checked|x64.ActiveCfg = Debug|Any CPU
- {2A6ED99F-FFEC-4FA7-BEF7-E5339C9D99BB}.Checked|x64.Build.0 = Debug|Any CPU
{2A6ED99F-FFEC-4FA7-BEF7-E5339C9D99BB}.Checked|x86.ActiveCfg = Debug|Any CPU
- {2A6ED99F-FFEC-4FA7-BEF7-E5339C9D99BB}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -251,6 +238,7 @@ Global
{EFF55B56-D92B-4573-94EA-AF5B3B001C34} = {C5014AA7-5C35-45D5-B7C6-48A5E93A758E}
{80AFB6EB-AB23-48A1-951C-76E6FEA29D19} = {C5014AA7-5C35-45D5-B7C6-48A5E93A758E}
{A296D1D4-71D3-47CF-A572-DD7C3CFE472F} = {E7A9B89D-A9F5-40FD-93CA-CAF4522A80E0}
+ {9D4B472B-6C86-4CEC-998D-800937DBD399} = {E7A9B89D-A9F5-40FD-93CA-CAF4522A80E0}
{28B808CE-B1F8-4B05-9ADA-8884525BD87F} = {E7A9B89D-A9F5-40FD-93CA-CAF4522A80E0}
{2A6ED99F-FFEC-4FA7-BEF7-E5339C9D99BB} = {E7A9B89D-A9F5-40FD-93CA-CAF4522A80E0}
{A4058388-97C1-492A-86A4-5240C4166BFF} = {A499E9EC-3C82-4B0A-AC49-111C706B1835}
diff --git a/src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs b/src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs
index 94060474c73..6912377d37a 100644
--- a/src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs
+++ b/src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector128Tests.cs
@@ -10,6 +10,13 @@ namespace System.Runtime.Intrinsics.Tests.Vectors
public sealed class Vector128Tests
{
[Fact]
+ public unsafe void Vector128IsHardwareAcceleratedTest()
+ {
+ MethodInfo methodInfo = typeof(Vector128).GetMethod("get_IsHardwareAccelerated");
+ Assert.Equal(Vector128.IsHardwareAccelerated, methodInfo.Invoke(null, null));
+ }
+
+ [Fact]
public unsafe void Vector128ByteExtractMostSignificantBitsTest()
{
Vector128<byte> vector = Vector128.Create(
diff --git a/src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs b/src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs
index 219c581ce02..6844cf70289 100644
--- a/src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs
+++ b/src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector256Tests.cs
@@ -10,6 +10,13 @@ namespace System.Runtime.Intrinsics.Tests.Vectors
public sealed class Vector256Tests
{
[Fact]
+ public unsafe void Vector256IsHardwareAcceleratedTest()
+ {
+ MethodInfo methodInfo = typeof(Vector256).GetMethod("get_IsHardwareAccelerated");
+ Assert.Equal(Vector256.IsHardwareAccelerated, methodInfo.Invoke(null, null));
+ }
+
+ [Fact]
public unsafe void Vector256ByteExtractMostSignificantBitsTest()
{
Vector256<byte> vector = Vector256.Create(
diff --git a/src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector64Tests.cs b/src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector64Tests.cs
index 176e9ec13a9..0190e6a1ade 100644
--- a/src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector64Tests.cs
+++ b/src/libraries/System.Runtime.Intrinsics/tests/Vectors/Vector64Tests.cs
@@ -11,6 +11,13 @@ namespace System.Runtime.Intrinsics.Tests.Vectors
public sealed class Vector64Tests
{
[Fact]
+ public unsafe void Vector64IsHardwareAcceleratedTest()
+ {
+ MethodInfo methodInfo = typeof(Vector64).GetMethod("get_IsHardwareAccelerated");
+ Assert.Equal(Vector64.IsHardwareAccelerated, methodInfo.Invoke(null, null));
+ }
+
+ [Fact]
public unsafe void Vector64ByteExtractMostSignificantBitsTest()
{
Vector64<byte> vector = Vector64.Create(
diff --git a/src/libraries/System.Runtime.Loader/System.Runtime.Loader.sln b/src/libraries/System.Runtime.Loader/System.Runtime.Loader.sln
index 698542932db..d2dfa4a66b1 100644
--- a/src/libraries/System.Runtime.Loader/System.Runtime.Loader.sln
+++ b/src/libraries/System.Runtime.Loader/System.Runtime.Loader.sln
@@ -5,6 +5,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{BFED65C3-5AF6-4C81-8AE8-7CAC7E4867AE}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{D7654D83-1D00-4121-BA8B-187EDD1E9EC1}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{47FCBB78-4009-4B88-BC18-9DBCD4714152}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{1FC1A751-C2A7-4CA8-B939-6F01B8AECBA8}"
@@ -119,11 +121,8 @@ Global
{D6D16FFD-FD76-4700-B456-1DC4D093D1B5}.Release|x86.ActiveCfg = Release|Any CPU
{D6D16FFD-FD76-4700-B456-1DC4D093D1B5}.Release|x86.Build.0 = Release|Any CPU
{D6D16FFD-FD76-4700-B456-1DC4D093D1B5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {D6D16FFD-FD76-4700-B456-1DC4D093D1B5}.Checked|Any CPU.Build.0 = Debug|Any CPU
{D6D16FFD-FD76-4700-B456-1DC4D093D1B5}.Checked|x64.ActiveCfg = Debug|Any CPU
- {D6D16FFD-FD76-4700-B456-1DC4D093D1B5}.Checked|x64.Build.0 = Debug|Any CPU
{D6D16FFD-FD76-4700-B456-1DC4D093D1B5}.Checked|x86.ActiveCfg = Debug|Any CPU
- {D6D16FFD-FD76-4700-B456-1DC4D093D1B5}.Checked|x86.Build.0 = Debug|Any CPU
{BFED65C3-5AF6-4C81-8AE8-7CAC7E4867AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BFED65C3-5AF6-4C81-8AE8-7CAC7E4867AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BFED65C3-5AF6-4C81-8AE8-7CAC7E4867AE}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -137,11 +136,23 @@ Global
{BFED65C3-5AF6-4C81-8AE8-7CAC7E4867AE}.Release|x86.ActiveCfg = Release|Any CPU
{BFED65C3-5AF6-4C81-8AE8-7CAC7E4867AE}.Release|x86.Build.0 = Release|Any CPU
{BFED65C3-5AF6-4C81-8AE8-7CAC7E4867AE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {BFED65C3-5AF6-4C81-8AE8-7CAC7E4867AE}.Checked|Any CPU.Build.0 = Debug|Any CPU
{BFED65C3-5AF6-4C81-8AE8-7CAC7E4867AE}.Checked|x64.ActiveCfg = Debug|Any CPU
- {BFED65C3-5AF6-4C81-8AE8-7CAC7E4867AE}.Checked|x64.Build.0 = Debug|Any CPU
{BFED65C3-5AF6-4C81-8AE8-7CAC7E4867AE}.Checked|x86.ActiveCfg = Debug|Any CPU
- {BFED65C3-5AF6-4C81-8AE8-7CAC7E4867AE}.Checked|x86.Build.0 = Debug|Any CPU
+ {D7654D83-1D00-4121-BA8B-187EDD1E9EC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D7654D83-1D00-4121-BA8B-187EDD1E9EC1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D7654D83-1D00-4121-BA8B-187EDD1E9EC1}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {D7654D83-1D00-4121-BA8B-187EDD1E9EC1}.Debug|x64.Build.0 = Debug|Any CPU
+ {D7654D83-1D00-4121-BA8B-187EDD1E9EC1}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {D7654D83-1D00-4121-BA8B-187EDD1E9EC1}.Debug|x86.Build.0 = Debug|Any CPU
+ {D7654D83-1D00-4121-BA8B-187EDD1E9EC1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D7654D83-1D00-4121-BA8B-187EDD1E9EC1}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D7654D83-1D00-4121-BA8B-187EDD1E9EC1}.Release|x64.ActiveCfg = Release|Any CPU
+ {D7654D83-1D00-4121-BA8B-187EDD1E9EC1}.Release|x64.Build.0 = Release|Any CPU
+ {D7654D83-1D00-4121-BA8B-187EDD1E9EC1}.Release|x86.ActiveCfg = Release|Any CPU
+ {D7654D83-1D00-4121-BA8B-187EDD1E9EC1}.Release|x86.Build.0 = Release|Any CPU
+ {D7654D83-1D00-4121-BA8B-187EDD1E9EC1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {D7654D83-1D00-4121-BA8B-187EDD1E9EC1}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {D7654D83-1D00-4121-BA8B-187EDD1E9EC1}.Checked|x86.ActiveCfg = Debug|Any CPU
{47FCBB78-4009-4B88-BC18-9DBCD4714152}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{47FCBB78-4009-4B88-BC18-9DBCD4714152}.Debug|Any CPU.Build.0 = Debug|Any CPU
{47FCBB78-4009-4B88-BC18-9DBCD4714152}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -155,11 +166,8 @@ Global
{47FCBB78-4009-4B88-BC18-9DBCD4714152}.Release|x86.ActiveCfg = Release|Any CPU
{47FCBB78-4009-4B88-BC18-9DBCD4714152}.Release|x86.Build.0 = Release|Any CPU
{47FCBB78-4009-4B88-BC18-9DBCD4714152}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {47FCBB78-4009-4B88-BC18-9DBCD4714152}.Checked|Any CPU.Build.0 = Debug|Any CPU
{47FCBB78-4009-4B88-BC18-9DBCD4714152}.Checked|x64.ActiveCfg = Debug|Any CPU
- {47FCBB78-4009-4B88-BC18-9DBCD4714152}.Checked|x64.Build.0 = Debug|Any CPU
{47FCBB78-4009-4B88-BC18-9DBCD4714152}.Checked|x86.ActiveCfg = Debug|Any CPU
- {47FCBB78-4009-4B88-BC18-9DBCD4714152}.Checked|x86.Build.0 = Debug|Any CPU
{1FC1A751-C2A7-4CA8-B939-6F01B8AECBA8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1FC1A751-C2A7-4CA8-B939-6F01B8AECBA8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1FC1A751-C2A7-4CA8-B939-6F01B8AECBA8}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -173,11 +181,8 @@ Global
{1FC1A751-C2A7-4CA8-B939-6F01B8AECBA8}.Release|x86.ActiveCfg = Release|Any CPU
{1FC1A751-C2A7-4CA8-B939-6F01B8AECBA8}.Release|x86.Build.0 = Release|Any CPU
{1FC1A751-C2A7-4CA8-B939-6F01B8AECBA8}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {1FC1A751-C2A7-4CA8-B939-6F01B8AECBA8}.Checked|Any CPU.Build.0 = Debug|Any CPU
{1FC1A751-C2A7-4CA8-B939-6F01B8AECBA8}.Checked|x64.ActiveCfg = Debug|Any CPU
- {1FC1A751-C2A7-4CA8-B939-6F01B8AECBA8}.Checked|x64.Build.0 = Debug|Any CPU
{1FC1A751-C2A7-4CA8-B939-6F01B8AECBA8}.Checked|x86.ActiveCfg = Debug|Any CPU
- {1FC1A751-C2A7-4CA8-B939-6F01B8AECBA8}.Checked|x86.Build.0 = Debug|Any CPU
{95B66B14-BCC7-407A-930C-4B34D4F7EC98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{95B66B14-BCC7-407A-930C-4B34D4F7EC98}.Debug|Any CPU.Build.0 = Debug|Any CPU
{95B66B14-BCC7-407A-930C-4B34D4F7EC98}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -191,11 +196,8 @@ Global
{95B66B14-BCC7-407A-930C-4B34D4F7EC98}.Release|x86.ActiveCfg = Release|Any CPU
{95B66B14-BCC7-407A-930C-4B34D4F7EC98}.Release|x86.Build.0 = Release|Any CPU
{95B66B14-BCC7-407A-930C-4B34D4F7EC98}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {95B66B14-BCC7-407A-930C-4B34D4F7EC98}.Checked|Any CPU.Build.0 = Debug|Any CPU
{95B66B14-BCC7-407A-930C-4B34D4F7EC98}.Checked|x64.ActiveCfg = Debug|Any CPU
- {95B66B14-BCC7-407A-930C-4B34D4F7EC98}.Checked|x64.Build.0 = Debug|Any CPU
{95B66B14-BCC7-407A-930C-4B34D4F7EC98}.Checked|x86.ActiveCfg = Debug|Any CPU
- {95B66B14-BCC7-407A-930C-4B34D4F7EC98}.Checked|x86.Build.0 = Debug|Any CPU
{B8F22D73-B183-4F17-9D5E-04B80699E56A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B8F22D73-B183-4F17-9D5E-04B80699E56A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B8F22D73-B183-4F17-9D5E-04B80699E56A}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -209,11 +211,8 @@ Global
{B8F22D73-B183-4F17-9D5E-04B80699E56A}.Release|x86.ActiveCfg = Release|Any CPU
{B8F22D73-B183-4F17-9D5E-04B80699E56A}.Release|x86.Build.0 = Release|Any CPU
{B8F22D73-B183-4F17-9D5E-04B80699E56A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {B8F22D73-B183-4F17-9D5E-04B80699E56A}.Checked|Any CPU.Build.0 = Debug|Any CPU
{B8F22D73-B183-4F17-9D5E-04B80699E56A}.Checked|x64.ActiveCfg = Debug|Any CPU
- {B8F22D73-B183-4F17-9D5E-04B80699E56A}.Checked|x64.Build.0 = Debug|Any CPU
{B8F22D73-B183-4F17-9D5E-04B80699E56A}.Checked|x86.ActiveCfg = Debug|Any CPU
- {B8F22D73-B183-4F17-9D5E-04B80699E56A}.Checked|x86.Build.0 = Debug|Any CPU
{C0B73BCE-3D60-4737-B958-C4AA39C7056A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C0B73BCE-3D60-4737-B958-C4AA39C7056A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C0B73BCE-3D60-4737-B958-C4AA39C7056A}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -227,11 +226,8 @@ Global
{C0B73BCE-3D60-4737-B958-C4AA39C7056A}.Release|x86.ActiveCfg = Release|Any CPU
{C0B73BCE-3D60-4737-B958-C4AA39C7056A}.Release|x86.Build.0 = Release|Any CPU
{C0B73BCE-3D60-4737-B958-C4AA39C7056A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {C0B73BCE-3D60-4737-B958-C4AA39C7056A}.Checked|Any CPU.Build.0 = Debug|Any CPU
{C0B73BCE-3D60-4737-B958-C4AA39C7056A}.Checked|x64.ActiveCfg = Debug|Any CPU
- {C0B73BCE-3D60-4737-B958-C4AA39C7056A}.Checked|x64.Build.0 = Debug|Any CPU
{C0B73BCE-3D60-4737-B958-C4AA39C7056A}.Checked|x86.ActiveCfg = Debug|Any CPU
- {C0B73BCE-3D60-4737-B958-C4AA39C7056A}.Checked|x86.Build.0 = Debug|Any CPU
{E08DA42E-4DF5-45C1-ABE7-6CFCCE425602}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E08DA42E-4DF5-45C1-ABE7-6CFCCE425602}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E08DA42E-4DF5-45C1-ABE7-6CFCCE425602}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -245,11 +241,8 @@ Global
{E08DA42E-4DF5-45C1-ABE7-6CFCCE425602}.Release|x86.ActiveCfg = Release|Any CPU
{E08DA42E-4DF5-45C1-ABE7-6CFCCE425602}.Release|x86.Build.0 = Release|Any CPU
{E08DA42E-4DF5-45C1-ABE7-6CFCCE425602}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {E08DA42E-4DF5-45C1-ABE7-6CFCCE425602}.Checked|Any CPU.Build.0 = Debug|Any CPU
{E08DA42E-4DF5-45C1-ABE7-6CFCCE425602}.Checked|x64.ActiveCfg = Debug|Any CPU
- {E08DA42E-4DF5-45C1-ABE7-6CFCCE425602}.Checked|x64.Build.0 = Debug|Any CPU
{E08DA42E-4DF5-45C1-ABE7-6CFCCE425602}.Checked|x86.ActiveCfg = Debug|Any CPU
- {E08DA42E-4DF5-45C1-ABE7-6CFCCE425602}.Checked|x86.Build.0 = Debug|Any CPU
{9DD53549-08F1-48C9-B8AE-95103AEC793B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9DD53549-08F1-48C9-B8AE-95103AEC793B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9DD53549-08F1-48C9-B8AE-95103AEC793B}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -263,11 +256,8 @@ Global
{9DD53549-08F1-48C9-B8AE-95103AEC793B}.Release|x86.ActiveCfg = Release|Any CPU
{9DD53549-08F1-48C9-B8AE-95103AEC793B}.Release|x86.Build.0 = Release|Any CPU
{9DD53549-08F1-48C9-B8AE-95103AEC793B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {9DD53549-08F1-48C9-B8AE-95103AEC793B}.Checked|Any CPU.Build.0 = Debug|Any CPU
{9DD53549-08F1-48C9-B8AE-95103AEC793B}.Checked|x64.ActiveCfg = Debug|Any CPU
- {9DD53549-08F1-48C9-B8AE-95103AEC793B}.Checked|x64.Build.0 = Debug|Any CPU
{9DD53549-08F1-48C9-B8AE-95103AEC793B}.Checked|x86.ActiveCfg = Debug|Any CPU
- {9DD53549-08F1-48C9-B8AE-95103AEC793B}.Checked|x86.Build.0 = Debug|Any CPU
{2A8066E3-D9CC-472F-BFDC-D98C4A4D4CD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2A8066E3-D9CC-472F-BFDC-D98C4A4D4CD8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2A8066E3-D9CC-472F-BFDC-D98C4A4D4CD8}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -281,11 +271,8 @@ Global
{2A8066E3-D9CC-472F-BFDC-D98C4A4D4CD8}.Release|x86.ActiveCfg = Release|Any CPU
{2A8066E3-D9CC-472F-BFDC-D98C4A4D4CD8}.Release|x86.Build.0 = Release|Any CPU
{2A8066E3-D9CC-472F-BFDC-D98C4A4D4CD8}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {2A8066E3-D9CC-472F-BFDC-D98C4A4D4CD8}.Checked|Any CPU.Build.0 = Debug|Any CPU
{2A8066E3-D9CC-472F-BFDC-D98C4A4D4CD8}.Checked|x64.ActiveCfg = Debug|Any CPU
- {2A8066E3-D9CC-472F-BFDC-D98C4A4D4CD8}.Checked|x64.Build.0 = Debug|Any CPU
{2A8066E3-D9CC-472F-BFDC-D98C4A4D4CD8}.Checked|x86.ActiveCfg = Debug|Any CPU
- {2A8066E3-D9CC-472F-BFDC-D98C4A4D4CD8}.Checked|x86.Build.0 = Debug|Any CPU
{582AA5E5-051B-4774-B02D-747E197A5C56}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{582AA5E5-051B-4774-B02D-747E197A5C56}.Debug|Any CPU.Build.0 = Debug|Any CPU
{582AA5E5-051B-4774-B02D-747E197A5C56}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -299,11 +286,8 @@ Global
{582AA5E5-051B-4774-B02D-747E197A5C56}.Release|x86.ActiveCfg = Release|Any CPU
{582AA5E5-051B-4774-B02D-747E197A5C56}.Release|x86.Build.0 = Release|Any CPU
{582AA5E5-051B-4774-B02D-747E197A5C56}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {582AA5E5-051B-4774-B02D-747E197A5C56}.Checked|Any CPU.Build.0 = Debug|Any CPU
{582AA5E5-051B-4774-B02D-747E197A5C56}.Checked|x64.ActiveCfg = Debug|Any CPU
- {582AA5E5-051B-4774-B02D-747E197A5C56}.Checked|x64.Build.0 = Debug|Any CPU
{582AA5E5-051B-4774-B02D-747E197A5C56}.Checked|x86.ActiveCfg = Debug|Any CPU
- {582AA5E5-051B-4774-B02D-747E197A5C56}.Checked|x86.Build.0 = Debug|Any CPU
{BCE10255-8B2B-4F66-914D-7B685BC98198}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BCE10255-8B2B-4F66-914D-7B685BC98198}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BCE10255-8B2B-4F66-914D-7B685BC98198}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -317,11 +301,8 @@ Global
{BCE10255-8B2B-4F66-914D-7B685BC98198}.Release|x86.ActiveCfg = Release|Any CPU
{BCE10255-8B2B-4F66-914D-7B685BC98198}.Release|x86.Build.0 = Release|Any CPU
{BCE10255-8B2B-4F66-914D-7B685BC98198}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {BCE10255-8B2B-4F66-914D-7B685BC98198}.Checked|Any CPU.Build.0 = Debug|Any CPU
{BCE10255-8B2B-4F66-914D-7B685BC98198}.Checked|x64.ActiveCfg = Debug|Any CPU
- {BCE10255-8B2B-4F66-914D-7B685BC98198}.Checked|x64.Build.0 = Debug|Any CPU
{BCE10255-8B2B-4F66-914D-7B685BC98198}.Checked|x86.ActiveCfg = Debug|Any CPU
- {BCE10255-8B2B-4F66-914D-7B685BC98198}.Checked|x86.Build.0 = Debug|Any CPU
{EEAE2A15-E2AE-4421-8D30-AAB17AC805F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EEAE2A15-E2AE-4421-8D30-AAB17AC805F8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EEAE2A15-E2AE-4421-8D30-AAB17AC805F8}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -335,11 +316,8 @@ Global
{EEAE2A15-E2AE-4421-8D30-AAB17AC805F8}.Release|x86.ActiveCfg = Release|Any CPU
{EEAE2A15-E2AE-4421-8D30-AAB17AC805F8}.Release|x86.Build.0 = Release|Any CPU
{EEAE2A15-E2AE-4421-8D30-AAB17AC805F8}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {EEAE2A15-E2AE-4421-8D30-AAB17AC805F8}.Checked|Any CPU.Build.0 = Debug|Any CPU
{EEAE2A15-E2AE-4421-8D30-AAB17AC805F8}.Checked|x64.ActiveCfg = Debug|Any CPU
- {EEAE2A15-E2AE-4421-8D30-AAB17AC805F8}.Checked|x64.Build.0 = Debug|Any CPU
{EEAE2A15-E2AE-4421-8D30-AAB17AC805F8}.Checked|x86.ActiveCfg = Debug|Any CPU
- {EEAE2A15-E2AE-4421-8D30-AAB17AC805F8}.Checked|x86.Build.0 = Debug|Any CPU
{78C4F407-C2E0-46BA-A4A0-EE04D89A2EB5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{78C4F407-C2E0-46BA-A4A0-EE04D89A2EB5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{78C4F407-C2E0-46BA-A4A0-EE04D89A2EB5}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -353,11 +331,8 @@ Global
{78C4F407-C2E0-46BA-A4A0-EE04D89A2EB5}.Release|x86.ActiveCfg = Release|Any CPU
{78C4F407-C2E0-46BA-A4A0-EE04D89A2EB5}.Release|x86.Build.0 = Release|Any CPU
{78C4F407-C2E0-46BA-A4A0-EE04D89A2EB5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {78C4F407-C2E0-46BA-A4A0-EE04D89A2EB5}.Checked|Any CPU.Build.0 = Debug|Any CPU
{78C4F407-C2E0-46BA-A4A0-EE04D89A2EB5}.Checked|x64.ActiveCfg = Debug|Any CPU
- {78C4F407-C2E0-46BA-A4A0-EE04D89A2EB5}.Checked|x64.Build.0 = Debug|Any CPU
{78C4F407-C2E0-46BA-A4A0-EE04D89A2EB5}.Checked|x86.ActiveCfg = Debug|Any CPU
- {78C4F407-C2E0-46BA-A4A0-EE04D89A2EB5}.Checked|x86.Build.0 = Debug|Any CPU
{3E342557-A99F-4A52-826E-6854A1D8D65C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3E342557-A99F-4A52-826E-6854A1D8D65C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3E342557-A99F-4A52-826E-6854A1D8D65C}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -371,11 +346,8 @@ Global
{3E342557-A99F-4A52-826E-6854A1D8D65C}.Release|x86.ActiveCfg = Release|Any CPU
{3E342557-A99F-4A52-826E-6854A1D8D65C}.Release|x86.Build.0 = Release|Any CPU
{3E342557-A99F-4A52-826E-6854A1D8D65C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {3E342557-A99F-4A52-826E-6854A1D8D65C}.Checked|Any CPU.Build.0 = Debug|Any CPU
{3E342557-A99F-4A52-826E-6854A1D8D65C}.Checked|x64.ActiveCfg = Debug|Any CPU
- {3E342557-A99F-4A52-826E-6854A1D8D65C}.Checked|x64.Build.0 = Debug|Any CPU
{3E342557-A99F-4A52-826E-6854A1D8D65C}.Checked|x86.ActiveCfg = Debug|Any CPU
- {3E342557-A99F-4A52-826E-6854A1D8D65C}.Checked|x86.Build.0 = Debug|Any CPU
{9D747A8D-A9DE-4470-9CF6-F73DF60FC5F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9D747A8D-A9DE-4470-9CF6-F73DF60FC5F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9D747A8D-A9DE-4470-9CF6-F73DF60FC5F6}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -389,11 +361,8 @@ Global
{9D747A8D-A9DE-4470-9CF6-F73DF60FC5F6}.Release|x86.ActiveCfg = Release|Any CPU
{9D747A8D-A9DE-4470-9CF6-F73DF60FC5F6}.Release|x86.Build.0 = Release|Any CPU
{9D747A8D-A9DE-4470-9CF6-F73DF60FC5F6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {9D747A8D-A9DE-4470-9CF6-F73DF60FC5F6}.Checked|Any CPU.Build.0 = Debug|Any CPU
{9D747A8D-A9DE-4470-9CF6-F73DF60FC5F6}.Checked|x64.ActiveCfg = Debug|Any CPU
- {9D747A8D-A9DE-4470-9CF6-F73DF60FC5F6}.Checked|x64.Build.0 = Debug|Any CPU
{9D747A8D-A9DE-4470-9CF6-F73DF60FC5F6}.Checked|x86.ActiveCfg = Debug|Any CPU
- {9D747A8D-A9DE-4470-9CF6-F73DF60FC5F6}.Checked|x86.Build.0 = Debug|Any CPU
{D80CE4B6-896E-4243-B2BA-443E821AC8FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D80CE4B6-896E-4243-B2BA-443E821AC8FF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D80CE4B6-896E-4243-B2BA-443E821AC8FF}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -407,11 +376,8 @@ Global
{D80CE4B6-896E-4243-B2BA-443E821AC8FF}.Release|x86.ActiveCfg = Release|Any CPU
{D80CE4B6-896E-4243-B2BA-443E821AC8FF}.Release|x86.Build.0 = Release|Any CPU
{D80CE4B6-896E-4243-B2BA-443E821AC8FF}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {D80CE4B6-896E-4243-B2BA-443E821AC8FF}.Checked|Any CPU.Build.0 = Debug|Any CPU
{D80CE4B6-896E-4243-B2BA-443E821AC8FF}.Checked|x64.ActiveCfg = Debug|Any CPU
- {D80CE4B6-896E-4243-B2BA-443E821AC8FF}.Checked|x64.Build.0 = Debug|Any CPU
{D80CE4B6-896E-4243-B2BA-443E821AC8FF}.Checked|x86.ActiveCfg = Debug|Any CPU
- {D80CE4B6-896E-4243-B2BA-443E821AC8FF}.Checked|x86.Build.0 = Debug|Any CPU
{71B8CD61-839D-445C-8E7D-F0F67CE00527}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{71B8CD61-839D-445C-8E7D-F0F67CE00527}.Debug|Any CPU.Build.0 = Debug|Any CPU
{71B8CD61-839D-445C-8E7D-F0F67CE00527}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -425,11 +391,8 @@ Global
{71B8CD61-839D-445C-8E7D-F0F67CE00527}.Release|x86.ActiveCfg = Release|Any CPU
{71B8CD61-839D-445C-8E7D-F0F67CE00527}.Release|x86.Build.0 = Release|Any CPU
{71B8CD61-839D-445C-8E7D-F0F67CE00527}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {71B8CD61-839D-445C-8E7D-F0F67CE00527}.Checked|Any CPU.Build.0 = Debug|Any CPU
{71B8CD61-839D-445C-8E7D-F0F67CE00527}.Checked|x64.ActiveCfg = Debug|Any CPU
- {71B8CD61-839D-445C-8E7D-F0F67CE00527}.Checked|x64.Build.0 = Debug|Any CPU
{71B8CD61-839D-445C-8E7D-F0F67CE00527}.Checked|x86.ActiveCfg = Debug|Any CPU
- {71B8CD61-839D-445C-8E7D-F0F67CE00527}.Checked|x86.Build.0 = Debug|Any CPU
{3BE510B3-9A9F-4348-9E47-FB397F1FE2DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3BE510B3-9A9F-4348-9E47-FB397F1FE2DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3BE510B3-9A9F-4348-9E47-FB397F1FE2DC}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -443,11 +406,8 @@ Global
{3BE510B3-9A9F-4348-9E47-FB397F1FE2DC}.Release|x86.ActiveCfg = Release|Any CPU
{3BE510B3-9A9F-4348-9E47-FB397F1FE2DC}.Release|x86.Build.0 = Release|Any CPU
{3BE510B3-9A9F-4348-9E47-FB397F1FE2DC}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {3BE510B3-9A9F-4348-9E47-FB397F1FE2DC}.Checked|Any CPU.Build.0 = Debug|Any CPU
{3BE510B3-9A9F-4348-9E47-FB397F1FE2DC}.Checked|x64.ActiveCfg = Debug|Any CPU
- {3BE510B3-9A9F-4348-9E47-FB397F1FE2DC}.Checked|x64.Build.0 = Debug|Any CPU
{3BE510B3-9A9F-4348-9E47-FB397F1FE2DC}.Checked|x86.ActiveCfg = Debug|Any CPU
- {3BE510B3-9A9F-4348-9E47-FB397F1FE2DC}.Checked|x86.Build.0 = Debug|Any CPU
{FFEB0A53-0624-4F88-A810-B345560EA734}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FFEB0A53-0624-4F88-A810-B345560EA734}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FFEB0A53-0624-4F88-A810-B345560EA734}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -461,11 +421,8 @@ Global
{FFEB0A53-0624-4F88-A810-B345560EA734}.Release|x86.ActiveCfg = Release|Any CPU
{FFEB0A53-0624-4F88-A810-B345560EA734}.Release|x86.Build.0 = Release|Any CPU
{FFEB0A53-0624-4F88-A810-B345560EA734}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {FFEB0A53-0624-4F88-A810-B345560EA734}.Checked|Any CPU.Build.0 = Debug|Any CPU
{FFEB0A53-0624-4F88-A810-B345560EA734}.Checked|x64.ActiveCfg = Debug|Any CPU
- {FFEB0A53-0624-4F88-A810-B345560EA734}.Checked|x64.Build.0 = Debug|Any CPU
{FFEB0A53-0624-4F88-A810-B345560EA734}.Checked|x86.ActiveCfg = Debug|Any CPU
- {FFEB0A53-0624-4F88-A810-B345560EA734}.Checked|x86.Build.0 = Debug|Any CPU
{76BE0621-CDAD-4808-8537-ADC9F028286B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{76BE0621-CDAD-4808-8537-ADC9F028286B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{76BE0621-CDAD-4808-8537-ADC9F028286B}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -479,11 +436,8 @@ Global
{76BE0621-CDAD-4808-8537-ADC9F028286B}.Release|x86.ActiveCfg = Release|Any CPU
{76BE0621-CDAD-4808-8537-ADC9F028286B}.Release|x86.Build.0 = Release|Any CPU
{76BE0621-CDAD-4808-8537-ADC9F028286B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {76BE0621-CDAD-4808-8537-ADC9F028286B}.Checked|Any CPU.Build.0 = Debug|Any CPU
{76BE0621-CDAD-4808-8537-ADC9F028286B}.Checked|x64.ActiveCfg = Debug|Any CPU
- {76BE0621-CDAD-4808-8537-ADC9F028286B}.Checked|x64.Build.0 = Debug|Any CPU
{76BE0621-CDAD-4808-8537-ADC9F028286B}.Checked|x86.ActiveCfg = Debug|Any CPU
- {76BE0621-CDAD-4808-8537-ADC9F028286B}.Checked|x86.Build.0 = Debug|Any CPU
{8EB6F6F0-FD8C-44C8-A9D8-18854C3C2159}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8EB6F6F0-FD8C-44C8-A9D8-18854C3C2159}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8EB6F6F0-FD8C-44C8-A9D8-18854C3C2159}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -497,11 +451,8 @@ Global
{8EB6F6F0-FD8C-44C8-A9D8-18854C3C2159}.Release|x86.ActiveCfg = Release|Any CPU
{8EB6F6F0-FD8C-44C8-A9D8-18854C3C2159}.Release|x86.Build.0 = Release|Any CPU
{8EB6F6F0-FD8C-44C8-A9D8-18854C3C2159}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {8EB6F6F0-FD8C-44C8-A9D8-18854C3C2159}.Checked|Any CPU.Build.0 = Debug|Any CPU
{8EB6F6F0-FD8C-44C8-A9D8-18854C3C2159}.Checked|x64.ActiveCfg = Debug|Any CPU
- {8EB6F6F0-FD8C-44C8-A9D8-18854C3C2159}.Checked|x64.Build.0 = Debug|Any CPU
{8EB6F6F0-FD8C-44C8-A9D8-18854C3C2159}.Checked|x86.ActiveCfg = Debug|Any CPU
- {8EB6F6F0-FD8C-44C8-A9D8-18854C3C2159}.Checked|x86.Build.0 = Debug|Any CPU
{78BC94E5-2E23-40EF-863E-52AFCE838C96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{78BC94E5-2E23-40EF-863E-52AFCE838C96}.Debug|Any CPU.Build.0 = Debug|Any CPU
{78BC94E5-2E23-40EF-863E-52AFCE838C96}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -515,11 +466,8 @@ Global
{78BC94E5-2E23-40EF-863E-52AFCE838C96}.Release|x86.ActiveCfg = Release|Any CPU
{78BC94E5-2E23-40EF-863E-52AFCE838C96}.Release|x86.Build.0 = Release|Any CPU
{78BC94E5-2E23-40EF-863E-52AFCE838C96}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {78BC94E5-2E23-40EF-863E-52AFCE838C96}.Checked|Any CPU.Build.0 = Debug|Any CPU
{78BC94E5-2E23-40EF-863E-52AFCE838C96}.Checked|x64.ActiveCfg = Debug|Any CPU
- {78BC94E5-2E23-40EF-863E-52AFCE838C96}.Checked|x64.Build.0 = Debug|Any CPU
{78BC94E5-2E23-40EF-863E-52AFCE838C96}.Checked|x86.ActiveCfg = Debug|Any CPU
- {78BC94E5-2E23-40EF-863E-52AFCE838C96}.Checked|x86.Build.0 = Debug|Any CPU
{7E785A7B-6ED6-4459-A07D-28DE1830C186}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7E785A7B-6ED6-4459-A07D-28DE1830C186}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7E785A7B-6ED6-4459-A07D-28DE1830C186}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -533,11 +481,8 @@ Global
{7E785A7B-6ED6-4459-A07D-28DE1830C186}.Release|x86.ActiveCfg = Release|Any CPU
{7E785A7B-6ED6-4459-A07D-28DE1830C186}.Release|x86.Build.0 = Release|Any CPU
{7E785A7B-6ED6-4459-A07D-28DE1830C186}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {7E785A7B-6ED6-4459-A07D-28DE1830C186}.Checked|Any CPU.Build.0 = Debug|Any CPU
{7E785A7B-6ED6-4459-A07D-28DE1830C186}.Checked|x64.ActiveCfg = Debug|Any CPU
- {7E785A7B-6ED6-4459-A07D-28DE1830C186}.Checked|x64.Build.0 = Debug|Any CPU
{7E785A7B-6ED6-4459-A07D-28DE1830C186}.Checked|x86.ActiveCfg = Debug|Any CPU
- {7E785A7B-6ED6-4459-A07D-28DE1830C186}.Checked|x86.Build.0 = Debug|Any CPU
{F0CEA7EB-E8B5-482A-AB6C-3E12992F2902}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F0CEA7EB-E8B5-482A-AB6C-3E12992F2902}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F0CEA7EB-E8B5-482A-AB6C-3E12992F2902}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -551,11 +496,8 @@ Global
{F0CEA7EB-E8B5-482A-AB6C-3E12992F2902}.Release|x86.ActiveCfg = Release|Any CPU
{F0CEA7EB-E8B5-482A-AB6C-3E12992F2902}.Release|x86.Build.0 = Release|Any CPU
{F0CEA7EB-E8B5-482A-AB6C-3E12992F2902}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {F0CEA7EB-E8B5-482A-AB6C-3E12992F2902}.Checked|Any CPU.Build.0 = Debug|Any CPU
{F0CEA7EB-E8B5-482A-AB6C-3E12992F2902}.Checked|x64.ActiveCfg = Debug|Any CPU
- {F0CEA7EB-E8B5-482A-AB6C-3E12992F2902}.Checked|x64.Build.0 = Debug|Any CPU
{F0CEA7EB-E8B5-482A-AB6C-3E12992F2902}.Checked|x86.ActiveCfg = Debug|Any CPU
- {F0CEA7EB-E8B5-482A-AB6C-3E12992F2902}.Checked|x86.Build.0 = Debug|Any CPU
{CA8B6E49-5EAF-4B7C-A141-6D83DD8D8AFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CA8B6E49-5EAF-4B7C-A141-6D83DD8D8AFD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CA8B6E49-5EAF-4B7C-A141-6D83DD8D8AFD}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -569,11 +511,8 @@ Global
{CA8B6E49-5EAF-4B7C-A141-6D83DD8D8AFD}.Release|x86.ActiveCfg = Release|Any CPU
{CA8B6E49-5EAF-4B7C-A141-6D83DD8D8AFD}.Release|x86.Build.0 = Release|Any CPU
{CA8B6E49-5EAF-4B7C-A141-6D83DD8D8AFD}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {CA8B6E49-5EAF-4B7C-A141-6D83DD8D8AFD}.Checked|Any CPU.Build.0 = Debug|Any CPU
{CA8B6E49-5EAF-4B7C-A141-6D83DD8D8AFD}.Checked|x64.ActiveCfg = Debug|Any CPU
- {CA8B6E49-5EAF-4B7C-A141-6D83DD8D8AFD}.Checked|x64.Build.0 = Debug|Any CPU
{CA8B6E49-5EAF-4B7C-A141-6D83DD8D8AFD}.Checked|x86.ActiveCfg = Debug|Any CPU
- {CA8B6E49-5EAF-4B7C-A141-6D83DD8D8AFD}.Checked|x86.Build.0 = Debug|Any CPU
{10699CE6-A1B3-4C14-93E0-CB5CF3292BDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{10699CE6-A1B3-4C14-93E0-CB5CF3292BDD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{10699CE6-A1B3-4C14-93E0-CB5CF3292BDD}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -587,11 +526,8 @@ Global
{10699CE6-A1B3-4C14-93E0-CB5CF3292BDD}.Release|x86.ActiveCfg = Release|Any CPU
{10699CE6-A1B3-4C14-93E0-CB5CF3292BDD}.Release|x86.Build.0 = Release|Any CPU
{10699CE6-A1B3-4C14-93E0-CB5CF3292BDD}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {10699CE6-A1B3-4C14-93E0-CB5CF3292BDD}.Checked|Any CPU.Build.0 = Debug|Any CPU
{10699CE6-A1B3-4C14-93E0-CB5CF3292BDD}.Checked|x64.ActiveCfg = Debug|Any CPU
- {10699CE6-A1B3-4C14-93E0-CB5CF3292BDD}.Checked|x64.Build.0 = Debug|Any CPU
{10699CE6-A1B3-4C14-93E0-CB5CF3292BDD}.Checked|x86.ActiveCfg = Debug|Any CPU
- {10699CE6-A1B3-4C14-93E0-CB5CF3292BDD}.Checked|x86.Build.0 = Debug|Any CPU
{44B22827-B9F0-4ADC-969C-7EC647D0B82A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{44B22827-B9F0-4ADC-969C-7EC647D0B82A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{44B22827-B9F0-4ADC-969C-7EC647D0B82A}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -605,11 +541,8 @@ Global
{44B22827-B9F0-4ADC-969C-7EC647D0B82A}.Release|x86.ActiveCfg = Release|Any CPU
{44B22827-B9F0-4ADC-969C-7EC647D0B82A}.Release|x86.Build.0 = Release|Any CPU
{44B22827-B9F0-4ADC-969C-7EC647D0B82A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {44B22827-B9F0-4ADC-969C-7EC647D0B82A}.Checked|Any CPU.Build.0 = Debug|Any CPU
{44B22827-B9F0-4ADC-969C-7EC647D0B82A}.Checked|x64.ActiveCfg = Debug|Any CPU
- {44B22827-B9F0-4ADC-969C-7EC647D0B82A}.Checked|x64.Build.0 = Debug|Any CPU
{44B22827-B9F0-4ADC-969C-7EC647D0B82A}.Checked|x86.ActiveCfg = Debug|Any CPU
- {44B22827-B9F0-4ADC-969C-7EC647D0B82A}.Checked|x86.Build.0 = Debug|Any CPU
{49B0A873-5834-45A4-9495-E1063005CB82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{49B0A873-5834-45A4-9495-E1063005CB82}.Debug|Any CPU.Build.0 = Debug|Any CPU
{49B0A873-5834-45A4-9495-E1063005CB82}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -623,11 +556,8 @@ Global
{49B0A873-5834-45A4-9495-E1063005CB82}.Release|x86.ActiveCfg = Release|Any CPU
{49B0A873-5834-45A4-9495-E1063005CB82}.Release|x86.Build.0 = Release|Any CPU
{49B0A873-5834-45A4-9495-E1063005CB82}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {49B0A873-5834-45A4-9495-E1063005CB82}.Checked|Any CPU.Build.0 = Debug|Any CPU
{49B0A873-5834-45A4-9495-E1063005CB82}.Checked|x64.ActiveCfg = Debug|Any CPU
- {49B0A873-5834-45A4-9495-E1063005CB82}.Checked|x64.Build.0 = Debug|Any CPU
{49B0A873-5834-45A4-9495-E1063005CB82}.Checked|x86.ActiveCfg = Debug|Any CPU
- {49B0A873-5834-45A4-9495-E1063005CB82}.Checked|x86.Build.0 = Debug|Any CPU
{E60DD367-D1D7-4F6C-919B-DC68E8445E97}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E60DD367-D1D7-4F6C-919B-DC68E8445E97}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E60DD367-D1D7-4F6C-919B-DC68E8445E97}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -641,11 +571,8 @@ Global
{E60DD367-D1D7-4F6C-919B-DC68E8445E97}.Release|x86.ActiveCfg = Release|Any CPU
{E60DD367-D1D7-4F6C-919B-DC68E8445E97}.Release|x86.Build.0 = Release|Any CPU
{E60DD367-D1D7-4F6C-919B-DC68E8445E97}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {E60DD367-D1D7-4F6C-919B-DC68E8445E97}.Checked|Any CPU.Build.0 = Debug|Any CPU
{E60DD367-D1D7-4F6C-919B-DC68E8445E97}.Checked|x64.ActiveCfg = Debug|Any CPU
- {E60DD367-D1D7-4F6C-919B-DC68E8445E97}.Checked|x64.Build.0 = Debug|Any CPU
{E60DD367-D1D7-4F6C-919B-DC68E8445E97}.Checked|x86.ActiveCfg = Debug|Any CPU
- {E60DD367-D1D7-4F6C-919B-DC68E8445E97}.Checked|x86.Build.0 = Debug|Any CPU
{9AD657ED-396B-4BE7-BCB6-BCA130825418}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9AD657ED-396B-4BE7-BCB6-BCA130825418}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9AD657ED-396B-4BE7-BCB6-BCA130825418}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -659,11 +586,8 @@ Global
{9AD657ED-396B-4BE7-BCB6-BCA130825418}.Release|x86.ActiveCfg = Release|Any CPU
{9AD657ED-396B-4BE7-BCB6-BCA130825418}.Release|x86.Build.0 = Release|Any CPU
{9AD657ED-396B-4BE7-BCB6-BCA130825418}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {9AD657ED-396B-4BE7-BCB6-BCA130825418}.Checked|Any CPU.Build.0 = Debug|Any CPU
{9AD657ED-396B-4BE7-BCB6-BCA130825418}.Checked|x64.ActiveCfg = Debug|Any CPU
- {9AD657ED-396B-4BE7-BCB6-BCA130825418}.Checked|x64.Build.0 = Debug|Any CPU
{9AD657ED-396B-4BE7-BCB6-BCA130825418}.Checked|x86.ActiveCfg = Debug|Any CPU
- {9AD657ED-396B-4BE7-BCB6-BCA130825418}.Checked|x86.Build.0 = Debug|Any CPU
{29E02AA9-E3D5-400C-B2C5-970B6E6D8562}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{29E02AA9-E3D5-400C-B2C5-970B6E6D8562}.Debug|Any CPU.Build.0 = Debug|Any CPU
{29E02AA9-E3D5-400C-B2C5-970B6E6D8562}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -677,11 +601,8 @@ Global
{29E02AA9-E3D5-400C-B2C5-970B6E6D8562}.Release|x86.ActiveCfg = Release|Any CPU
{29E02AA9-E3D5-400C-B2C5-970B6E6D8562}.Release|x86.Build.0 = Release|Any CPU
{29E02AA9-E3D5-400C-B2C5-970B6E6D8562}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {29E02AA9-E3D5-400C-B2C5-970B6E6D8562}.Checked|Any CPU.Build.0 = Debug|Any CPU
{29E02AA9-E3D5-400C-B2C5-970B6E6D8562}.Checked|x64.ActiveCfg = Debug|Any CPU
- {29E02AA9-E3D5-400C-B2C5-970B6E6D8562}.Checked|x64.Build.0 = Debug|Any CPU
{29E02AA9-E3D5-400C-B2C5-970B6E6D8562}.Checked|x86.ActiveCfg = Debug|Any CPU
- {29E02AA9-E3D5-400C-B2C5-970B6E6D8562}.Checked|x86.Build.0 = Debug|Any CPU
{06E15C97-C87D-473E-9E44-DCE169B1CE4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{06E15C97-C87D-473E-9E44-DCE169B1CE4E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{06E15C97-C87D-473E-9E44-DCE169B1CE4E}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -695,11 +616,8 @@ Global
{06E15C97-C87D-473E-9E44-DCE169B1CE4E}.Release|x86.ActiveCfg = Release|Any CPU
{06E15C97-C87D-473E-9E44-DCE169B1CE4E}.Release|x86.Build.0 = Release|Any CPU
{06E15C97-C87D-473E-9E44-DCE169B1CE4E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {06E15C97-C87D-473E-9E44-DCE169B1CE4E}.Checked|Any CPU.Build.0 = Debug|Any CPU
{06E15C97-C87D-473E-9E44-DCE169B1CE4E}.Checked|x64.ActiveCfg = Debug|Any CPU
- {06E15C97-C87D-473E-9E44-DCE169B1CE4E}.Checked|x64.Build.0 = Debug|Any CPU
{06E15C97-C87D-473E-9E44-DCE169B1CE4E}.Checked|x86.ActiveCfg = Debug|Any CPU
- {06E15C97-C87D-473E-9E44-DCE169B1CE4E}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -737,6 +655,7 @@ Global
{BFED65C3-5AF6-4C81-8AE8-7CAC7E4867AE} = {153EEF5A-58CF-4A61-B712-B14F270BD32E}
{47FCBB78-4009-4B88-BC18-9DBCD4714152} = {153EEF5A-58CF-4A61-B712-B14F270BD32E}
{1FC1A751-C2A7-4CA8-B939-6F01B8AECBA8} = {153EEF5A-58CF-4A61-B712-B14F270BD32E}
+ {D7654D83-1D00-4121-BA8B-187EDD1E9EC1} = {C75ECE17-3CF5-409D-B26F-E2F5053DD5B9}
{95B66B14-BCC7-407A-930C-4B34D4F7EC98} = {C75ECE17-3CF5-409D-B26F-E2F5053DD5B9}
{06E15C97-C87D-473E-9E44-DCE169B1CE4E} = {C75ECE17-3CF5-409D-B26F-E2F5053DD5B9}
EndGlobalSection
diff --git a/src/libraries/System.Runtime.Serialization.Formatters/System.Runtime.Serialization.Formatters.sln b/src/libraries/System.Runtime.Serialization.Formatters/System.Runtime.Serialization.Formatters.sln
index 9cbc128bf04..810a33bb202 100644
--- a/src/libraries/System.Runtime.Serialization.Formatters/System.Runtime.Serialization.Formatters.sln
+++ b/src/libraries/System.Runtime.Serialization.Formatters/System.Runtime.Serialization.Formatters.sln
@@ -71,6 +71,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.IO.Packaging", "..\S
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{30C04925-08A1-4AFC-AE30-D7FA39945A5B}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{68895687-F073-44CB-8006-FCEFB79A6FC4}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.Uri", "..\System.Private.Uri\src\System.Private.Uri.csproj", "{1E395137-871B-4D6F-A7DB-C92850FAB0D3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reflection.Metadata", "..\System.Reflection.Metadata\ref\System.Reflection.Metadata.csproj", "{F6D6DAC8-9F74-4A68-9B74-FCC655492B4F}"
@@ -167,11 +169,8 @@ Global
{25F48B11-0D57-47B7-88EE-7D407AFBA7B6}.Release|x86.ActiveCfg = Release|Any CPU
{25F48B11-0D57-47B7-88EE-7D407AFBA7B6}.Release|x86.Build.0 = Release|Any CPU
{25F48B11-0D57-47B7-88EE-7D407AFBA7B6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {25F48B11-0D57-47B7-88EE-7D407AFBA7B6}.Checked|Any CPU.Build.0 = Debug|Any CPU
{25F48B11-0D57-47B7-88EE-7D407AFBA7B6}.Checked|x64.ActiveCfg = Debug|Any CPU
- {25F48B11-0D57-47B7-88EE-7D407AFBA7B6}.Checked|x64.Build.0 = Debug|Any CPU
{25F48B11-0D57-47B7-88EE-7D407AFBA7B6}.Checked|x86.ActiveCfg = Debug|Any CPU
- {25F48B11-0D57-47B7-88EE-7D407AFBA7B6}.Checked|x86.Build.0 = Debug|Any CPU
{D0E065A2-7569-4F40-8D3C-7889BA1A3006}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D0E065A2-7569-4F40-8D3C-7889BA1A3006}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D0E065A2-7569-4F40-8D3C-7889BA1A3006}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -185,11 +184,8 @@ Global
{D0E065A2-7569-4F40-8D3C-7889BA1A3006}.Release|x86.ActiveCfg = Release|Any CPU
{D0E065A2-7569-4F40-8D3C-7889BA1A3006}.Release|x86.Build.0 = Release|Any CPU
{D0E065A2-7569-4F40-8D3C-7889BA1A3006}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {D0E065A2-7569-4F40-8D3C-7889BA1A3006}.Checked|Any CPU.Build.0 = Debug|Any CPU
{D0E065A2-7569-4F40-8D3C-7889BA1A3006}.Checked|x64.ActiveCfg = Debug|Any CPU
- {D0E065A2-7569-4F40-8D3C-7889BA1A3006}.Checked|x64.Build.0 = Debug|Any CPU
{D0E065A2-7569-4F40-8D3C-7889BA1A3006}.Checked|x86.ActiveCfg = Debug|Any CPU
- {D0E065A2-7569-4F40-8D3C-7889BA1A3006}.Checked|x86.Build.0 = Debug|Any CPU
{6B34282C-D54D-44F2-B40F-04E6E0F054CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6B34282C-D54D-44F2-B40F-04E6E0F054CB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6B34282C-D54D-44F2-B40F-04E6E0F054CB}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -203,11 +199,8 @@ Global
{6B34282C-D54D-44F2-B40F-04E6E0F054CB}.Release|x86.ActiveCfg = Release|Any CPU
{6B34282C-D54D-44F2-B40F-04E6E0F054CB}.Release|x86.Build.0 = Release|Any CPU
{6B34282C-D54D-44F2-B40F-04E6E0F054CB}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {6B34282C-D54D-44F2-B40F-04E6E0F054CB}.Checked|Any CPU.Build.0 = Debug|Any CPU
{6B34282C-D54D-44F2-B40F-04E6E0F054CB}.Checked|x64.ActiveCfg = Debug|Any CPU
- {6B34282C-D54D-44F2-B40F-04E6E0F054CB}.Checked|x64.Build.0 = Debug|Any CPU
{6B34282C-D54D-44F2-B40F-04E6E0F054CB}.Checked|x86.ActiveCfg = Debug|Any CPU
- {6B34282C-D54D-44F2-B40F-04E6E0F054CB}.Checked|x86.Build.0 = Debug|Any CPU
{A1BEF14B-0C13-4854-8299-DADF0D1181D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A1BEF14B-0C13-4854-8299-DADF0D1181D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A1BEF14B-0C13-4854-8299-DADF0D1181D9}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -221,11 +214,8 @@ Global
{A1BEF14B-0C13-4854-8299-DADF0D1181D9}.Release|x86.ActiveCfg = Release|Any CPU
{A1BEF14B-0C13-4854-8299-DADF0D1181D9}.Release|x86.Build.0 = Release|Any CPU
{A1BEF14B-0C13-4854-8299-DADF0D1181D9}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {A1BEF14B-0C13-4854-8299-DADF0D1181D9}.Checked|Any CPU.Build.0 = Debug|Any CPU
{A1BEF14B-0C13-4854-8299-DADF0D1181D9}.Checked|x64.ActiveCfg = Debug|Any CPU
- {A1BEF14B-0C13-4854-8299-DADF0D1181D9}.Checked|x64.Build.0 = Debug|Any CPU
{A1BEF14B-0C13-4854-8299-DADF0D1181D9}.Checked|x86.ActiveCfg = Debug|Any CPU
- {A1BEF14B-0C13-4854-8299-DADF0D1181D9}.Checked|x86.Build.0 = Debug|Any CPU
{FA9FDA97-57C2-421C-A578-EEB0B600A412}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FA9FDA97-57C2-421C-A578-EEB0B600A412}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FA9FDA97-57C2-421C-A578-EEB0B600A412}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -239,11 +229,8 @@ Global
{FA9FDA97-57C2-421C-A578-EEB0B600A412}.Release|x86.ActiveCfg = Release|Any CPU
{FA9FDA97-57C2-421C-A578-EEB0B600A412}.Release|x86.Build.0 = Release|Any CPU
{FA9FDA97-57C2-421C-A578-EEB0B600A412}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {FA9FDA97-57C2-421C-A578-EEB0B600A412}.Checked|Any CPU.Build.0 = Debug|Any CPU
{FA9FDA97-57C2-421C-A578-EEB0B600A412}.Checked|x64.ActiveCfg = Debug|Any CPU
- {FA9FDA97-57C2-421C-A578-EEB0B600A412}.Checked|x64.Build.0 = Debug|Any CPU
{FA9FDA97-57C2-421C-A578-EEB0B600A412}.Checked|x86.ActiveCfg = Debug|Any CPU
- {FA9FDA97-57C2-421C-A578-EEB0B600A412}.Checked|x86.Build.0 = Debug|Any CPU
{A71C8379-F67C-42A1-B6CD-8C0942757B93}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A71C8379-F67C-42A1-B6CD-8C0942757B93}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A71C8379-F67C-42A1-B6CD-8C0942757B93}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -257,11 +244,8 @@ Global
{A71C8379-F67C-42A1-B6CD-8C0942757B93}.Release|x86.ActiveCfg = Release|Any CPU
{A71C8379-F67C-42A1-B6CD-8C0942757B93}.Release|x86.Build.0 = Release|Any CPU
{A71C8379-F67C-42A1-B6CD-8C0942757B93}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {A71C8379-F67C-42A1-B6CD-8C0942757B93}.Checked|Any CPU.Build.0 = Debug|Any CPU
{A71C8379-F67C-42A1-B6CD-8C0942757B93}.Checked|x64.ActiveCfg = Debug|Any CPU
- {A71C8379-F67C-42A1-B6CD-8C0942757B93}.Checked|x64.Build.0 = Debug|Any CPU
{A71C8379-F67C-42A1-B6CD-8C0942757B93}.Checked|x86.ActiveCfg = Debug|Any CPU
- {A71C8379-F67C-42A1-B6CD-8C0942757B93}.Checked|x86.Build.0 = Debug|Any CPU
{82E81182-3C80-40A9-978A-4152461F4FE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{82E81182-3C80-40A9-978A-4152461F4FE4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{82E81182-3C80-40A9-978A-4152461F4FE4}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -275,11 +259,8 @@ Global
{82E81182-3C80-40A9-978A-4152461F4FE4}.Release|x86.ActiveCfg = Release|Any CPU
{82E81182-3C80-40A9-978A-4152461F4FE4}.Release|x86.Build.0 = Release|Any CPU
{82E81182-3C80-40A9-978A-4152461F4FE4}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {82E81182-3C80-40A9-978A-4152461F4FE4}.Checked|Any CPU.Build.0 = Debug|Any CPU
{82E81182-3C80-40A9-978A-4152461F4FE4}.Checked|x64.ActiveCfg = Debug|Any CPU
- {82E81182-3C80-40A9-978A-4152461F4FE4}.Checked|x64.Build.0 = Debug|Any CPU
{82E81182-3C80-40A9-978A-4152461F4FE4}.Checked|x86.ActiveCfg = Debug|Any CPU
- {82E81182-3C80-40A9-978A-4152461F4FE4}.Checked|x86.Build.0 = Debug|Any CPU
{348D0950-A458-487D-9A30-FF60BCB715D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{348D0950-A458-487D-9A30-FF60BCB715D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{348D0950-A458-487D-9A30-FF60BCB715D9}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -293,11 +274,8 @@ Global
{348D0950-A458-487D-9A30-FF60BCB715D9}.Release|x86.ActiveCfg = Release|Any CPU
{348D0950-A458-487D-9A30-FF60BCB715D9}.Release|x86.Build.0 = Release|Any CPU
{348D0950-A458-487D-9A30-FF60BCB715D9}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {348D0950-A458-487D-9A30-FF60BCB715D9}.Checked|Any CPU.Build.0 = Debug|Any CPU
{348D0950-A458-487D-9A30-FF60BCB715D9}.Checked|x64.ActiveCfg = Debug|Any CPU
- {348D0950-A458-487D-9A30-FF60BCB715D9}.Checked|x64.Build.0 = Debug|Any CPU
{348D0950-A458-487D-9A30-FF60BCB715D9}.Checked|x86.ActiveCfg = Debug|Any CPU
- {348D0950-A458-487D-9A30-FF60BCB715D9}.Checked|x86.Build.0 = Debug|Any CPU
{81F58927-6022-4DD7-9E78-BDD3DA309285}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{81F58927-6022-4DD7-9E78-BDD3DA309285}.Debug|Any CPU.Build.0 = Debug|Any CPU
{81F58927-6022-4DD7-9E78-BDD3DA309285}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -311,11 +289,8 @@ Global
{81F58927-6022-4DD7-9E78-BDD3DA309285}.Release|x86.ActiveCfg = Release|Any CPU
{81F58927-6022-4DD7-9E78-BDD3DA309285}.Release|x86.Build.0 = Release|Any CPU
{81F58927-6022-4DD7-9E78-BDD3DA309285}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {81F58927-6022-4DD7-9E78-BDD3DA309285}.Checked|Any CPU.Build.0 = Debug|Any CPU
{81F58927-6022-4DD7-9E78-BDD3DA309285}.Checked|x64.ActiveCfg = Debug|Any CPU
- {81F58927-6022-4DD7-9E78-BDD3DA309285}.Checked|x64.Build.0 = Debug|Any CPU
{81F58927-6022-4DD7-9E78-BDD3DA309285}.Checked|x86.ActiveCfg = Debug|Any CPU
- {81F58927-6022-4DD7-9E78-BDD3DA309285}.Checked|x86.Build.0 = Debug|Any CPU
{89448227-E362-4A55-BC2C-ADA761AC4E45}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{89448227-E362-4A55-BC2C-ADA761AC4E45}.Debug|Any CPU.Build.0 = Debug|Any CPU
{89448227-E362-4A55-BC2C-ADA761AC4E45}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -329,11 +304,8 @@ Global
{89448227-E362-4A55-BC2C-ADA761AC4E45}.Release|x86.ActiveCfg = Release|Any CPU
{89448227-E362-4A55-BC2C-ADA761AC4E45}.Release|x86.Build.0 = Release|Any CPU
{89448227-E362-4A55-BC2C-ADA761AC4E45}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {89448227-E362-4A55-BC2C-ADA761AC4E45}.Checked|Any CPU.Build.0 = Debug|Any CPU
{89448227-E362-4A55-BC2C-ADA761AC4E45}.Checked|x64.ActiveCfg = Debug|Any CPU
- {89448227-E362-4A55-BC2C-ADA761AC4E45}.Checked|x64.Build.0 = Debug|Any CPU
{89448227-E362-4A55-BC2C-ADA761AC4E45}.Checked|x86.ActiveCfg = Debug|Any CPU
- {89448227-E362-4A55-BC2C-ADA761AC4E45}.Checked|x86.Build.0 = Debug|Any CPU
{86557424-C2F0-4554-808F-4429FCEE1E9A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{86557424-C2F0-4554-808F-4429FCEE1E9A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{86557424-C2F0-4554-808F-4429FCEE1E9A}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -347,11 +319,8 @@ Global
{86557424-C2F0-4554-808F-4429FCEE1E9A}.Release|x86.ActiveCfg = Release|Any CPU
{86557424-C2F0-4554-808F-4429FCEE1E9A}.Release|x86.Build.0 = Release|Any CPU
{86557424-C2F0-4554-808F-4429FCEE1E9A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {86557424-C2F0-4554-808F-4429FCEE1E9A}.Checked|Any CPU.Build.0 = Debug|Any CPU
{86557424-C2F0-4554-808F-4429FCEE1E9A}.Checked|x64.ActiveCfg = Debug|Any CPU
- {86557424-C2F0-4554-808F-4429FCEE1E9A}.Checked|x64.Build.0 = Debug|Any CPU
{86557424-C2F0-4554-808F-4429FCEE1E9A}.Checked|x86.ActiveCfg = Debug|Any CPU
- {86557424-C2F0-4554-808F-4429FCEE1E9A}.Checked|x86.Build.0 = Debug|Any CPU
{8ADDFBA7-7AF9-4819-BD68-7354D7F5F0EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8ADDFBA7-7AF9-4819-BD68-7354D7F5F0EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8ADDFBA7-7AF9-4819-BD68-7354D7F5F0EB}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -365,11 +334,8 @@ Global
{8ADDFBA7-7AF9-4819-BD68-7354D7F5F0EB}.Release|x86.ActiveCfg = Release|Any CPU
{8ADDFBA7-7AF9-4819-BD68-7354D7F5F0EB}.Release|x86.Build.0 = Release|Any CPU
{8ADDFBA7-7AF9-4819-BD68-7354D7F5F0EB}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {8ADDFBA7-7AF9-4819-BD68-7354D7F5F0EB}.Checked|Any CPU.Build.0 = Debug|Any CPU
{8ADDFBA7-7AF9-4819-BD68-7354D7F5F0EB}.Checked|x64.ActiveCfg = Debug|Any CPU
- {8ADDFBA7-7AF9-4819-BD68-7354D7F5F0EB}.Checked|x64.Build.0 = Debug|Any CPU
{8ADDFBA7-7AF9-4819-BD68-7354D7F5F0EB}.Checked|x86.ActiveCfg = Debug|Any CPU
- {8ADDFBA7-7AF9-4819-BD68-7354D7F5F0EB}.Checked|x86.Build.0 = Debug|Any CPU
{2605A8EE-CFEF-4A57-8A94-2C2B95E770E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2605A8EE-CFEF-4A57-8A94-2C2B95E770E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2605A8EE-CFEF-4A57-8A94-2C2B95E770E3}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -383,11 +349,8 @@ Global
{2605A8EE-CFEF-4A57-8A94-2C2B95E770E3}.Release|x86.ActiveCfg = Release|Any CPU
{2605A8EE-CFEF-4A57-8A94-2C2B95E770E3}.Release|x86.Build.0 = Release|Any CPU
{2605A8EE-CFEF-4A57-8A94-2C2B95E770E3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {2605A8EE-CFEF-4A57-8A94-2C2B95E770E3}.Checked|Any CPU.Build.0 = Debug|Any CPU
{2605A8EE-CFEF-4A57-8A94-2C2B95E770E3}.Checked|x64.ActiveCfg = Debug|Any CPU
- {2605A8EE-CFEF-4A57-8A94-2C2B95E770E3}.Checked|x64.Build.0 = Debug|Any CPU
{2605A8EE-CFEF-4A57-8A94-2C2B95E770E3}.Checked|x86.ActiveCfg = Debug|Any CPU
- {2605A8EE-CFEF-4A57-8A94-2C2B95E770E3}.Checked|x86.Build.0 = Debug|Any CPU
{C9142466-56E3-412F-AD42-FF5CF05D8DB1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C9142466-56E3-412F-AD42-FF5CF05D8DB1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C9142466-56E3-412F-AD42-FF5CF05D8DB1}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -401,11 +364,8 @@ Global
{C9142466-56E3-412F-AD42-FF5CF05D8DB1}.Release|x86.ActiveCfg = Release|Any CPU
{C9142466-56E3-412F-AD42-FF5CF05D8DB1}.Release|x86.Build.0 = Release|Any CPU
{C9142466-56E3-412F-AD42-FF5CF05D8DB1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {C9142466-56E3-412F-AD42-FF5CF05D8DB1}.Checked|Any CPU.Build.0 = Debug|Any CPU
{C9142466-56E3-412F-AD42-FF5CF05D8DB1}.Checked|x64.ActiveCfg = Debug|Any CPU
- {C9142466-56E3-412F-AD42-FF5CF05D8DB1}.Checked|x64.Build.0 = Debug|Any CPU
{C9142466-56E3-412F-AD42-FF5CF05D8DB1}.Checked|x86.ActiveCfg = Debug|Any CPU
- {C9142466-56E3-412F-AD42-FF5CF05D8DB1}.Checked|x86.Build.0 = Debug|Any CPU
{14C1E145-621A-496F-AC3D-DCDF116C8AD9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{14C1E145-621A-496F-AC3D-DCDF116C8AD9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{14C1E145-621A-496F-AC3D-DCDF116C8AD9}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -419,11 +379,8 @@ Global
{14C1E145-621A-496F-AC3D-DCDF116C8AD9}.Release|x86.ActiveCfg = Release|Any CPU
{14C1E145-621A-496F-AC3D-DCDF116C8AD9}.Release|x86.Build.0 = Release|Any CPU
{14C1E145-621A-496F-AC3D-DCDF116C8AD9}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {14C1E145-621A-496F-AC3D-DCDF116C8AD9}.Checked|Any CPU.Build.0 = Debug|Any CPU
{14C1E145-621A-496F-AC3D-DCDF116C8AD9}.Checked|x64.ActiveCfg = Debug|Any CPU
- {14C1E145-621A-496F-AC3D-DCDF116C8AD9}.Checked|x64.Build.0 = Debug|Any CPU
{14C1E145-621A-496F-AC3D-DCDF116C8AD9}.Checked|x86.ActiveCfg = Debug|Any CPU
- {14C1E145-621A-496F-AC3D-DCDF116C8AD9}.Checked|x86.Build.0 = Debug|Any CPU
{35B1EF33-126D-4769-B593-14DDDD630AB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{35B1EF33-126D-4769-B593-14DDDD630AB2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{35B1EF33-126D-4769-B593-14DDDD630AB2}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -437,11 +394,8 @@ Global
{35B1EF33-126D-4769-B593-14DDDD630AB2}.Release|x86.ActiveCfg = Release|Any CPU
{35B1EF33-126D-4769-B593-14DDDD630AB2}.Release|x86.Build.0 = Release|Any CPU
{35B1EF33-126D-4769-B593-14DDDD630AB2}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {35B1EF33-126D-4769-B593-14DDDD630AB2}.Checked|Any CPU.Build.0 = Debug|Any CPU
{35B1EF33-126D-4769-B593-14DDDD630AB2}.Checked|x64.ActiveCfg = Debug|Any CPU
- {35B1EF33-126D-4769-B593-14DDDD630AB2}.Checked|x64.Build.0 = Debug|Any CPU
{35B1EF33-126D-4769-B593-14DDDD630AB2}.Checked|x86.ActiveCfg = Debug|Any CPU
- {35B1EF33-126D-4769-B593-14DDDD630AB2}.Checked|x86.Build.0 = Debug|Any CPU
{EADF56B3-6BC6-4B67-BA47-DD22630AFD53}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EADF56B3-6BC6-4B67-BA47-DD22630AFD53}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EADF56B3-6BC6-4B67-BA47-DD22630AFD53}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -455,11 +409,8 @@ Global
{EADF56B3-6BC6-4B67-BA47-DD22630AFD53}.Release|x86.ActiveCfg = Release|Any CPU
{EADF56B3-6BC6-4B67-BA47-DD22630AFD53}.Release|x86.Build.0 = Release|Any CPU
{EADF56B3-6BC6-4B67-BA47-DD22630AFD53}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {EADF56B3-6BC6-4B67-BA47-DD22630AFD53}.Checked|Any CPU.Build.0 = Debug|Any CPU
{EADF56B3-6BC6-4B67-BA47-DD22630AFD53}.Checked|x64.ActiveCfg = Debug|Any CPU
- {EADF56B3-6BC6-4B67-BA47-DD22630AFD53}.Checked|x64.Build.0 = Debug|Any CPU
{EADF56B3-6BC6-4B67-BA47-DD22630AFD53}.Checked|x86.ActiveCfg = Debug|Any CPU
- {EADF56B3-6BC6-4B67-BA47-DD22630AFD53}.Checked|x86.Build.0 = Debug|Any CPU
{80DC7480-77B6-4D7D-AE6A-AA31366D2055}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{80DC7480-77B6-4D7D-AE6A-AA31366D2055}.Debug|Any CPU.Build.0 = Debug|Any CPU
{80DC7480-77B6-4D7D-AE6A-AA31366D2055}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -473,11 +424,8 @@ Global
{80DC7480-77B6-4D7D-AE6A-AA31366D2055}.Release|x86.ActiveCfg = Release|Any CPU
{80DC7480-77B6-4D7D-AE6A-AA31366D2055}.Release|x86.Build.0 = Release|Any CPU
{80DC7480-77B6-4D7D-AE6A-AA31366D2055}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {80DC7480-77B6-4D7D-AE6A-AA31366D2055}.Checked|Any CPU.Build.0 = Debug|Any CPU
{80DC7480-77B6-4D7D-AE6A-AA31366D2055}.Checked|x64.ActiveCfg = Debug|Any CPU
- {80DC7480-77B6-4D7D-AE6A-AA31366D2055}.Checked|x64.Build.0 = Debug|Any CPU
{80DC7480-77B6-4D7D-AE6A-AA31366D2055}.Checked|x86.ActiveCfg = Debug|Any CPU
- {80DC7480-77B6-4D7D-AE6A-AA31366D2055}.Checked|x86.Build.0 = Debug|Any CPU
{5F31A880-2571-46BC-AD68-D0896F613570}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5F31A880-2571-46BC-AD68-D0896F613570}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5F31A880-2571-46BC-AD68-D0896F613570}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -491,11 +439,8 @@ Global
{5F31A880-2571-46BC-AD68-D0896F613570}.Release|x86.ActiveCfg = Release|Any CPU
{5F31A880-2571-46BC-AD68-D0896F613570}.Release|x86.Build.0 = Release|Any CPU
{5F31A880-2571-46BC-AD68-D0896F613570}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {5F31A880-2571-46BC-AD68-D0896F613570}.Checked|Any CPU.Build.0 = Debug|Any CPU
{5F31A880-2571-46BC-AD68-D0896F613570}.Checked|x64.ActiveCfg = Debug|Any CPU
- {5F31A880-2571-46BC-AD68-D0896F613570}.Checked|x64.Build.0 = Debug|Any CPU
{5F31A880-2571-46BC-AD68-D0896F613570}.Checked|x86.ActiveCfg = Debug|Any CPU
- {5F31A880-2571-46BC-AD68-D0896F613570}.Checked|x86.Build.0 = Debug|Any CPU
{28BA346E-BF18-45AF-B0D2-15A5969F7975}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{28BA346E-BF18-45AF-B0D2-15A5969F7975}.Debug|Any CPU.Build.0 = Debug|Any CPU
{28BA346E-BF18-45AF-B0D2-15A5969F7975}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -509,11 +454,8 @@ Global
{28BA346E-BF18-45AF-B0D2-15A5969F7975}.Release|x86.ActiveCfg = Release|Any CPU
{28BA346E-BF18-45AF-B0D2-15A5969F7975}.Release|x86.Build.0 = Release|Any CPU
{28BA346E-BF18-45AF-B0D2-15A5969F7975}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {28BA346E-BF18-45AF-B0D2-15A5969F7975}.Checked|Any CPU.Build.0 = Debug|Any CPU
{28BA346E-BF18-45AF-B0D2-15A5969F7975}.Checked|x64.ActiveCfg = Debug|Any CPU
- {28BA346E-BF18-45AF-B0D2-15A5969F7975}.Checked|x64.Build.0 = Debug|Any CPU
{28BA346E-BF18-45AF-B0D2-15A5969F7975}.Checked|x86.ActiveCfg = Debug|Any CPU
- {28BA346E-BF18-45AF-B0D2-15A5969F7975}.Checked|x86.Build.0 = Debug|Any CPU
{D5D66E77-D7E7-4DCC-964D-C899AFE29076}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D5D66E77-D7E7-4DCC-964D-C899AFE29076}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D5D66E77-D7E7-4DCC-964D-C899AFE29076}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -527,11 +469,8 @@ Global
{D5D66E77-D7E7-4DCC-964D-C899AFE29076}.Release|x86.ActiveCfg = Release|Any CPU
{D5D66E77-D7E7-4DCC-964D-C899AFE29076}.Release|x86.Build.0 = Release|Any CPU
{D5D66E77-D7E7-4DCC-964D-C899AFE29076}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {D5D66E77-D7E7-4DCC-964D-C899AFE29076}.Checked|Any CPU.Build.0 = Debug|Any CPU
{D5D66E77-D7E7-4DCC-964D-C899AFE29076}.Checked|x64.ActiveCfg = Debug|Any CPU
- {D5D66E77-D7E7-4DCC-964D-C899AFE29076}.Checked|x64.Build.0 = Debug|Any CPU
{D5D66E77-D7E7-4DCC-964D-C899AFE29076}.Checked|x86.ActiveCfg = Debug|Any CPU
- {D5D66E77-D7E7-4DCC-964D-C899AFE29076}.Checked|x86.Build.0 = Debug|Any CPU
{A472E78C-3184-480F-97F2-6B89A10E1A87}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A472E78C-3184-480F-97F2-6B89A10E1A87}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A472E78C-3184-480F-97F2-6B89A10E1A87}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -545,11 +484,8 @@ Global
{A472E78C-3184-480F-97F2-6B89A10E1A87}.Release|x86.ActiveCfg = Release|Any CPU
{A472E78C-3184-480F-97F2-6B89A10E1A87}.Release|x86.Build.0 = Release|Any CPU
{A472E78C-3184-480F-97F2-6B89A10E1A87}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {A472E78C-3184-480F-97F2-6B89A10E1A87}.Checked|Any CPU.Build.0 = Debug|Any CPU
{A472E78C-3184-480F-97F2-6B89A10E1A87}.Checked|x64.ActiveCfg = Debug|Any CPU
- {A472E78C-3184-480F-97F2-6B89A10E1A87}.Checked|x64.Build.0 = Debug|Any CPU
{A472E78C-3184-480F-97F2-6B89A10E1A87}.Checked|x86.ActiveCfg = Debug|Any CPU
- {A472E78C-3184-480F-97F2-6B89A10E1A87}.Checked|x86.Build.0 = Debug|Any CPU
{C573C629-D81B-407A-907E-3A4F8BC23E13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C573C629-D81B-407A-907E-3A4F8BC23E13}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C573C629-D81B-407A-907E-3A4F8BC23E13}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -563,11 +499,8 @@ Global
{C573C629-D81B-407A-907E-3A4F8BC23E13}.Release|x86.ActiveCfg = Release|Any CPU
{C573C629-D81B-407A-907E-3A4F8BC23E13}.Release|x86.Build.0 = Release|Any CPU
{C573C629-D81B-407A-907E-3A4F8BC23E13}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {C573C629-D81B-407A-907E-3A4F8BC23E13}.Checked|Any CPU.Build.0 = Debug|Any CPU
{C573C629-D81B-407A-907E-3A4F8BC23E13}.Checked|x64.ActiveCfg = Debug|Any CPU
- {C573C629-D81B-407A-907E-3A4F8BC23E13}.Checked|x64.Build.0 = Debug|Any CPU
{C573C629-D81B-407A-907E-3A4F8BC23E13}.Checked|x86.ActiveCfg = Debug|Any CPU
- {C573C629-D81B-407A-907E-3A4F8BC23E13}.Checked|x86.Build.0 = Debug|Any CPU
{C0E8A6B4-DC57-434B-ABB0-500F6DE352A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C0E8A6B4-DC57-434B-ABB0-500F6DE352A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C0E8A6B4-DC57-434B-ABB0-500F6DE352A8}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -581,11 +514,8 @@ Global
{C0E8A6B4-DC57-434B-ABB0-500F6DE352A8}.Release|x86.ActiveCfg = Release|Any CPU
{C0E8A6B4-DC57-434B-ABB0-500F6DE352A8}.Release|x86.Build.0 = Release|Any CPU
{C0E8A6B4-DC57-434B-ABB0-500F6DE352A8}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {C0E8A6B4-DC57-434B-ABB0-500F6DE352A8}.Checked|Any CPU.Build.0 = Debug|Any CPU
{C0E8A6B4-DC57-434B-ABB0-500F6DE352A8}.Checked|x64.ActiveCfg = Debug|Any CPU
- {C0E8A6B4-DC57-434B-ABB0-500F6DE352A8}.Checked|x64.Build.0 = Debug|Any CPU
{C0E8A6B4-DC57-434B-ABB0-500F6DE352A8}.Checked|x86.ActiveCfg = Debug|Any CPU
- {C0E8A6B4-DC57-434B-ABB0-500F6DE352A8}.Checked|x86.Build.0 = Debug|Any CPU
{8307AA11-40DC-44AD-8F0E-567923BDC752}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8307AA11-40DC-44AD-8F0E-567923BDC752}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8307AA11-40DC-44AD-8F0E-567923BDC752}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -599,11 +529,8 @@ Global
{8307AA11-40DC-44AD-8F0E-567923BDC752}.Release|x86.ActiveCfg = Release|Any CPU
{8307AA11-40DC-44AD-8F0E-567923BDC752}.Release|x86.Build.0 = Release|Any CPU
{8307AA11-40DC-44AD-8F0E-567923BDC752}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {8307AA11-40DC-44AD-8F0E-567923BDC752}.Checked|Any CPU.Build.0 = Debug|Any CPU
{8307AA11-40DC-44AD-8F0E-567923BDC752}.Checked|x64.ActiveCfg = Debug|Any CPU
- {8307AA11-40DC-44AD-8F0E-567923BDC752}.Checked|x64.Build.0 = Debug|Any CPU
{8307AA11-40DC-44AD-8F0E-567923BDC752}.Checked|x86.ActiveCfg = Debug|Any CPU
- {8307AA11-40DC-44AD-8F0E-567923BDC752}.Checked|x86.Build.0 = Debug|Any CPU
{6332FDA4-65E5-484D-B1D5-D9B23EDDAEB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6332FDA4-65E5-484D-B1D5-D9B23EDDAEB3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6332FDA4-65E5-484D-B1D5-D9B23EDDAEB3}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -617,11 +544,8 @@ Global
{6332FDA4-65E5-484D-B1D5-D9B23EDDAEB3}.Release|x86.ActiveCfg = Release|Any CPU
{6332FDA4-65E5-484D-B1D5-D9B23EDDAEB3}.Release|x86.Build.0 = Release|Any CPU
{6332FDA4-65E5-484D-B1D5-D9B23EDDAEB3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {6332FDA4-65E5-484D-B1D5-D9B23EDDAEB3}.Checked|Any CPU.Build.0 = Debug|Any CPU
{6332FDA4-65E5-484D-B1D5-D9B23EDDAEB3}.Checked|x64.ActiveCfg = Debug|Any CPU
- {6332FDA4-65E5-484D-B1D5-D9B23EDDAEB3}.Checked|x64.Build.0 = Debug|Any CPU
{6332FDA4-65E5-484D-B1D5-D9B23EDDAEB3}.Checked|x86.ActiveCfg = Debug|Any CPU
- {6332FDA4-65E5-484D-B1D5-D9B23EDDAEB3}.Checked|x86.Build.0 = Debug|Any CPU
{1A591DF1-D797-4820-BC9A-6060B1444213}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1A591DF1-D797-4820-BC9A-6060B1444213}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1A591DF1-D797-4820-BC9A-6060B1444213}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -635,11 +559,8 @@ Global
{1A591DF1-D797-4820-BC9A-6060B1444213}.Release|x86.ActiveCfg = Release|Any CPU
{1A591DF1-D797-4820-BC9A-6060B1444213}.Release|x86.Build.0 = Release|Any CPU
{1A591DF1-D797-4820-BC9A-6060B1444213}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {1A591DF1-D797-4820-BC9A-6060B1444213}.Checked|Any CPU.Build.0 = Debug|Any CPU
{1A591DF1-D797-4820-BC9A-6060B1444213}.Checked|x64.ActiveCfg = Debug|Any CPU
- {1A591DF1-D797-4820-BC9A-6060B1444213}.Checked|x64.Build.0 = Debug|Any CPU
{1A591DF1-D797-4820-BC9A-6060B1444213}.Checked|x86.ActiveCfg = Debug|Any CPU
- {1A591DF1-D797-4820-BC9A-6060B1444213}.Checked|x86.Build.0 = Debug|Any CPU
{DB2FF5FA-16B3-4A4B-9207-3D4622CD23E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DB2FF5FA-16B3-4A4B-9207-3D4622CD23E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DB2FF5FA-16B3-4A4B-9207-3D4622CD23E0}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -653,11 +574,8 @@ Global
{DB2FF5FA-16B3-4A4B-9207-3D4622CD23E0}.Release|x86.ActiveCfg = Release|Any CPU
{DB2FF5FA-16B3-4A4B-9207-3D4622CD23E0}.Release|x86.Build.0 = Release|Any CPU
{DB2FF5FA-16B3-4A4B-9207-3D4622CD23E0}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {DB2FF5FA-16B3-4A4B-9207-3D4622CD23E0}.Checked|Any CPU.Build.0 = Debug|Any CPU
{DB2FF5FA-16B3-4A4B-9207-3D4622CD23E0}.Checked|x64.ActiveCfg = Debug|Any CPU
- {DB2FF5FA-16B3-4A4B-9207-3D4622CD23E0}.Checked|x64.Build.0 = Debug|Any CPU
{DB2FF5FA-16B3-4A4B-9207-3D4622CD23E0}.Checked|x86.ActiveCfg = Debug|Any CPU
- {DB2FF5FA-16B3-4A4B-9207-3D4622CD23E0}.Checked|x86.Build.0 = Debug|Any CPU
{61914172-8197-4E04-9CE7-82C25D0AC8F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{61914172-8197-4E04-9CE7-82C25D0AC8F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{61914172-8197-4E04-9CE7-82C25D0AC8F2}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -671,11 +589,8 @@ Global
{61914172-8197-4E04-9CE7-82C25D0AC8F2}.Release|x86.ActiveCfg = Release|Any CPU
{61914172-8197-4E04-9CE7-82C25D0AC8F2}.Release|x86.Build.0 = Release|Any CPU
{61914172-8197-4E04-9CE7-82C25D0AC8F2}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {61914172-8197-4E04-9CE7-82C25D0AC8F2}.Checked|Any CPU.Build.0 = Debug|Any CPU
{61914172-8197-4E04-9CE7-82C25D0AC8F2}.Checked|x64.ActiveCfg = Debug|Any CPU
- {61914172-8197-4E04-9CE7-82C25D0AC8F2}.Checked|x64.Build.0 = Debug|Any CPU
{61914172-8197-4E04-9CE7-82C25D0AC8F2}.Checked|x86.ActiveCfg = Debug|Any CPU
- {61914172-8197-4E04-9CE7-82C25D0AC8F2}.Checked|x86.Build.0 = Debug|Any CPU
{9E471AE8-A165-4B32-8603-2BABD02A0664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9E471AE8-A165-4B32-8603-2BABD02A0664}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9E471AE8-A165-4B32-8603-2BABD02A0664}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -689,11 +604,8 @@ Global
{9E471AE8-A165-4B32-8603-2BABD02A0664}.Release|x86.ActiveCfg = Release|Any CPU
{9E471AE8-A165-4B32-8603-2BABD02A0664}.Release|x86.Build.0 = Release|Any CPU
{9E471AE8-A165-4B32-8603-2BABD02A0664}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {9E471AE8-A165-4B32-8603-2BABD02A0664}.Checked|Any CPU.Build.0 = Debug|Any CPU
{9E471AE8-A165-4B32-8603-2BABD02A0664}.Checked|x64.ActiveCfg = Debug|Any CPU
- {9E471AE8-A165-4B32-8603-2BABD02A0664}.Checked|x64.Build.0 = Debug|Any CPU
{9E471AE8-A165-4B32-8603-2BABD02A0664}.Checked|x86.ActiveCfg = Debug|Any CPU
- {9E471AE8-A165-4B32-8603-2BABD02A0664}.Checked|x86.Build.0 = Debug|Any CPU
{4E423476-3653-402A-AD55-0E5111A96ACC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4E423476-3653-402A-AD55-0E5111A96ACC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4E423476-3653-402A-AD55-0E5111A96ACC}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -707,11 +619,8 @@ Global
{4E423476-3653-402A-AD55-0E5111A96ACC}.Release|x86.ActiveCfg = Release|Any CPU
{4E423476-3653-402A-AD55-0E5111A96ACC}.Release|x86.Build.0 = Release|Any CPU
{4E423476-3653-402A-AD55-0E5111A96ACC}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {4E423476-3653-402A-AD55-0E5111A96ACC}.Checked|Any CPU.Build.0 = Debug|Any CPU
{4E423476-3653-402A-AD55-0E5111A96ACC}.Checked|x64.ActiveCfg = Debug|Any CPU
- {4E423476-3653-402A-AD55-0E5111A96ACC}.Checked|x64.Build.0 = Debug|Any CPU
{4E423476-3653-402A-AD55-0E5111A96ACC}.Checked|x86.ActiveCfg = Debug|Any CPU
- {4E423476-3653-402A-AD55-0E5111A96ACC}.Checked|x86.Build.0 = Debug|Any CPU
{D3535D48-5700-4DB1-AEED-494650BAB175}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D3535D48-5700-4DB1-AEED-494650BAB175}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D3535D48-5700-4DB1-AEED-494650BAB175}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -725,11 +634,8 @@ Global
{D3535D48-5700-4DB1-AEED-494650BAB175}.Release|x86.ActiveCfg = Release|Any CPU
{D3535D48-5700-4DB1-AEED-494650BAB175}.Release|x86.Build.0 = Release|Any CPU
{D3535D48-5700-4DB1-AEED-494650BAB175}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {D3535D48-5700-4DB1-AEED-494650BAB175}.Checked|Any CPU.Build.0 = Debug|Any CPU
{D3535D48-5700-4DB1-AEED-494650BAB175}.Checked|x64.ActiveCfg = Debug|Any CPU
- {D3535D48-5700-4DB1-AEED-494650BAB175}.Checked|x64.Build.0 = Debug|Any CPU
{D3535D48-5700-4DB1-AEED-494650BAB175}.Checked|x86.ActiveCfg = Debug|Any CPU
- {D3535D48-5700-4DB1-AEED-494650BAB175}.Checked|x86.Build.0 = Debug|Any CPU
{6F5E7FFC-8709-4072-B0B3-404BEB517394}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6F5E7FFC-8709-4072-B0B3-404BEB517394}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6F5E7FFC-8709-4072-B0B3-404BEB517394}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -743,11 +649,8 @@ Global
{6F5E7FFC-8709-4072-B0B3-404BEB517394}.Release|x86.ActiveCfg = Release|Any CPU
{6F5E7FFC-8709-4072-B0B3-404BEB517394}.Release|x86.Build.0 = Release|Any CPU
{6F5E7FFC-8709-4072-B0B3-404BEB517394}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {6F5E7FFC-8709-4072-B0B3-404BEB517394}.Checked|Any CPU.Build.0 = Debug|Any CPU
{6F5E7FFC-8709-4072-B0B3-404BEB517394}.Checked|x64.ActiveCfg = Debug|Any CPU
- {6F5E7FFC-8709-4072-B0B3-404BEB517394}.Checked|x64.Build.0 = Debug|Any CPU
{6F5E7FFC-8709-4072-B0B3-404BEB517394}.Checked|x86.ActiveCfg = Debug|Any CPU
- {6F5E7FFC-8709-4072-B0B3-404BEB517394}.Checked|x86.Build.0 = Debug|Any CPU
{AE592E1E-C5DB-4F81-AD45-31F2F1A6A75B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AE592E1E-C5DB-4F81-AD45-31F2F1A6A75B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AE592E1E-C5DB-4F81-AD45-31F2F1A6A75B}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -761,11 +664,8 @@ Global
{AE592E1E-C5DB-4F81-AD45-31F2F1A6A75B}.Release|x86.ActiveCfg = Release|Any CPU
{AE592E1E-C5DB-4F81-AD45-31F2F1A6A75B}.Release|x86.Build.0 = Release|Any CPU
{AE592E1E-C5DB-4F81-AD45-31F2F1A6A75B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {AE592E1E-C5DB-4F81-AD45-31F2F1A6A75B}.Checked|Any CPU.Build.0 = Debug|Any CPU
{AE592E1E-C5DB-4F81-AD45-31F2F1A6A75B}.Checked|x64.ActiveCfg = Debug|Any CPU
- {AE592E1E-C5DB-4F81-AD45-31F2F1A6A75B}.Checked|x64.Build.0 = Debug|Any CPU
{AE592E1E-C5DB-4F81-AD45-31F2F1A6A75B}.Checked|x86.ActiveCfg = Debug|Any CPU
- {AE592E1E-C5DB-4F81-AD45-31F2F1A6A75B}.Checked|x86.Build.0 = Debug|Any CPU
{30C04925-08A1-4AFC-AE30-D7FA39945A5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{30C04925-08A1-4AFC-AE30-D7FA39945A5B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{30C04925-08A1-4AFC-AE30-D7FA39945A5B}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -779,11 +679,23 @@ Global
{30C04925-08A1-4AFC-AE30-D7FA39945A5B}.Release|x86.ActiveCfg = Release|Any CPU
{30C04925-08A1-4AFC-AE30-D7FA39945A5B}.Release|x86.Build.0 = Release|Any CPU
{30C04925-08A1-4AFC-AE30-D7FA39945A5B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {30C04925-08A1-4AFC-AE30-D7FA39945A5B}.Checked|Any CPU.Build.0 = Debug|Any CPU
{30C04925-08A1-4AFC-AE30-D7FA39945A5B}.Checked|x64.ActiveCfg = Debug|Any CPU
- {30C04925-08A1-4AFC-AE30-D7FA39945A5B}.Checked|x64.Build.0 = Debug|Any CPU
{30C04925-08A1-4AFC-AE30-D7FA39945A5B}.Checked|x86.ActiveCfg = Debug|Any CPU
- {30C04925-08A1-4AFC-AE30-D7FA39945A5B}.Checked|x86.Build.0 = Debug|Any CPU
+ {68895687-F073-44CB-8006-FCEFB79A6FC4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {68895687-F073-44CB-8006-FCEFB79A6FC4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {68895687-F073-44CB-8006-FCEFB79A6FC4}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {68895687-F073-44CB-8006-FCEFB79A6FC4}.Debug|x64.Build.0 = Debug|Any CPU
+ {68895687-F073-44CB-8006-FCEFB79A6FC4}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {68895687-F073-44CB-8006-FCEFB79A6FC4}.Debug|x86.Build.0 = Debug|Any CPU
+ {68895687-F073-44CB-8006-FCEFB79A6FC4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {68895687-F073-44CB-8006-FCEFB79A6FC4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {68895687-F073-44CB-8006-FCEFB79A6FC4}.Release|x64.ActiveCfg = Release|Any CPU
+ {68895687-F073-44CB-8006-FCEFB79A6FC4}.Release|x64.Build.0 = Release|Any CPU
+ {68895687-F073-44CB-8006-FCEFB79A6FC4}.Release|x86.ActiveCfg = Release|Any CPU
+ {68895687-F073-44CB-8006-FCEFB79A6FC4}.Release|x86.Build.0 = Release|Any CPU
+ {68895687-F073-44CB-8006-FCEFB79A6FC4}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {68895687-F073-44CB-8006-FCEFB79A6FC4}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {68895687-F073-44CB-8006-FCEFB79A6FC4}.Checked|x86.ActiveCfg = Debug|Any CPU
{1E395137-871B-4D6F-A7DB-C92850FAB0D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1E395137-871B-4D6F-A7DB-C92850FAB0D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1E395137-871B-4D6F-A7DB-C92850FAB0D3}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -797,11 +709,8 @@ Global
{1E395137-871B-4D6F-A7DB-C92850FAB0D3}.Release|x86.ActiveCfg = Release|Any CPU
{1E395137-871B-4D6F-A7DB-C92850FAB0D3}.Release|x86.Build.0 = Release|Any CPU
{1E395137-871B-4D6F-A7DB-C92850FAB0D3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {1E395137-871B-4D6F-A7DB-C92850FAB0D3}.Checked|Any CPU.Build.0 = Debug|Any CPU
{1E395137-871B-4D6F-A7DB-C92850FAB0D3}.Checked|x64.ActiveCfg = Debug|Any CPU
- {1E395137-871B-4D6F-A7DB-C92850FAB0D3}.Checked|x64.Build.0 = Debug|Any CPU
{1E395137-871B-4D6F-A7DB-C92850FAB0D3}.Checked|x86.ActiveCfg = Debug|Any CPU
- {1E395137-871B-4D6F-A7DB-C92850FAB0D3}.Checked|x86.Build.0 = Debug|Any CPU
{F6D6DAC8-9F74-4A68-9B74-FCC655492B4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F6D6DAC8-9F74-4A68-9B74-FCC655492B4F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F6D6DAC8-9F74-4A68-9B74-FCC655492B4F}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -815,11 +724,8 @@ Global
{F6D6DAC8-9F74-4A68-9B74-FCC655492B4F}.Release|x86.ActiveCfg = Release|Any CPU
{F6D6DAC8-9F74-4A68-9B74-FCC655492B4F}.Release|x86.Build.0 = Release|Any CPU
{F6D6DAC8-9F74-4A68-9B74-FCC655492B4F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {F6D6DAC8-9F74-4A68-9B74-FCC655492B4F}.Checked|Any CPU.Build.0 = Debug|Any CPU
{F6D6DAC8-9F74-4A68-9B74-FCC655492B4F}.Checked|x64.ActiveCfg = Debug|Any CPU
- {F6D6DAC8-9F74-4A68-9B74-FCC655492B4F}.Checked|x64.Build.0 = Debug|Any CPU
{F6D6DAC8-9F74-4A68-9B74-FCC655492B4F}.Checked|x86.ActiveCfg = Debug|Any CPU
- {F6D6DAC8-9F74-4A68-9B74-FCC655492B4F}.Checked|x86.Build.0 = Debug|Any CPU
{79F35586-A12D-4831-9D9D-5134FF07CC41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{79F35586-A12D-4831-9D9D-5134FF07CC41}.Debug|Any CPU.Build.0 = Debug|Any CPU
{79F35586-A12D-4831-9D9D-5134FF07CC41}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -833,11 +739,8 @@ Global
{79F35586-A12D-4831-9D9D-5134FF07CC41}.Release|x86.ActiveCfg = Release|Any CPU
{79F35586-A12D-4831-9D9D-5134FF07CC41}.Release|x86.Build.0 = Release|Any CPU
{79F35586-A12D-4831-9D9D-5134FF07CC41}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {79F35586-A12D-4831-9D9D-5134FF07CC41}.Checked|Any CPU.Build.0 = Debug|Any CPU
{79F35586-A12D-4831-9D9D-5134FF07CC41}.Checked|x64.ActiveCfg = Debug|Any CPU
- {79F35586-A12D-4831-9D9D-5134FF07CC41}.Checked|x64.Build.0 = Debug|Any CPU
{79F35586-A12D-4831-9D9D-5134FF07CC41}.Checked|x86.ActiveCfg = Debug|Any CPU
- {79F35586-A12D-4831-9D9D-5134FF07CC41}.Checked|x86.Build.0 = Debug|Any CPU
{4695E11B-4AB8-4376-832D-54344DD42316}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4695E11B-4AB8-4376-832D-54344DD42316}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4695E11B-4AB8-4376-832D-54344DD42316}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -851,11 +754,8 @@ Global
{4695E11B-4AB8-4376-832D-54344DD42316}.Release|x86.ActiveCfg = Release|Any CPU
{4695E11B-4AB8-4376-832D-54344DD42316}.Release|x86.Build.0 = Release|Any CPU
{4695E11B-4AB8-4376-832D-54344DD42316}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {4695E11B-4AB8-4376-832D-54344DD42316}.Checked|Any CPU.Build.0 = Debug|Any CPU
{4695E11B-4AB8-4376-832D-54344DD42316}.Checked|x64.ActiveCfg = Debug|Any CPU
- {4695E11B-4AB8-4376-832D-54344DD42316}.Checked|x64.Build.0 = Debug|Any CPU
{4695E11B-4AB8-4376-832D-54344DD42316}.Checked|x86.ActiveCfg = Debug|Any CPU
- {4695E11B-4AB8-4376-832D-54344DD42316}.Checked|x86.Build.0 = Debug|Any CPU
{B6796238-B6F5-488E-97A9-50EC2966B633}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B6796238-B6F5-488E-97A9-50EC2966B633}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B6796238-B6F5-488E-97A9-50EC2966B633}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -869,11 +769,8 @@ Global
{B6796238-B6F5-488E-97A9-50EC2966B633}.Release|x86.ActiveCfg = Release|Any CPU
{B6796238-B6F5-488E-97A9-50EC2966B633}.Release|x86.Build.0 = Release|Any CPU
{B6796238-B6F5-488E-97A9-50EC2966B633}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {B6796238-B6F5-488E-97A9-50EC2966B633}.Checked|Any CPU.Build.0 = Debug|Any CPU
{B6796238-B6F5-488E-97A9-50EC2966B633}.Checked|x64.ActiveCfg = Debug|Any CPU
- {B6796238-B6F5-488E-97A9-50EC2966B633}.Checked|x64.Build.0 = Debug|Any CPU
{B6796238-B6F5-488E-97A9-50EC2966B633}.Checked|x86.ActiveCfg = Debug|Any CPU
- {B6796238-B6F5-488E-97A9-50EC2966B633}.Checked|x86.Build.0 = Debug|Any CPU
{C1D7364E-C24B-460E-B0A0-E49BA6D9FFEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C1D7364E-C24B-460E-B0A0-E49BA6D9FFEC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C1D7364E-C24B-460E-B0A0-E49BA6D9FFEC}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -887,11 +784,8 @@ Global
{C1D7364E-C24B-460E-B0A0-E49BA6D9FFEC}.Release|x86.ActiveCfg = Release|Any CPU
{C1D7364E-C24B-460E-B0A0-E49BA6D9FFEC}.Release|x86.Build.0 = Release|Any CPU
{C1D7364E-C24B-460E-B0A0-E49BA6D9FFEC}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {C1D7364E-C24B-460E-B0A0-E49BA6D9FFEC}.Checked|Any CPU.Build.0 = Debug|Any CPU
{C1D7364E-C24B-460E-B0A0-E49BA6D9FFEC}.Checked|x64.ActiveCfg = Debug|Any CPU
- {C1D7364E-C24B-460E-B0A0-E49BA6D9FFEC}.Checked|x64.Build.0 = Debug|Any CPU
{C1D7364E-C24B-460E-B0A0-E49BA6D9FFEC}.Checked|x86.ActiveCfg = Debug|Any CPU
- {C1D7364E-C24B-460E-B0A0-E49BA6D9FFEC}.Checked|x86.Build.0 = Debug|Any CPU
{5944056C-E7A1-4A10-BAC4-E3AF91C12C5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5944056C-E7A1-4A10-BAC4-E3AF91C12C5C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5944056C-E7A1-4A10-BAC4-E3AF91C12C5C}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -905,11 +799,8 @@ Global
{5944056C-E7A1-4A10-BAC4-E3AF91C12C5C}.Release|x86.ActiveCfg = Release|Any CPU
{5944056C-E7A1-4A10-BAC4-E3AF91C12C5C}.Release|x86.Build.0 = Release|Any CPU
{5944056C-E7A1-4A10-BAC4-E3AF91C12C5C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {5944056C-E7A1-4A10-BAC4-E3AF91C12C5C}.Checked|Any CPU.Build.0 = Debug|Any CPU
{5944056C-E7A1-4A10-BAC4-E3AF91C12C5C}.Checked|x64.ActiveCfg = Debug|Any CPU
- {5944056C-E7A1-4A10-BAC4-E3AF91C12C5C}.Checked|x64.Build.0 = Debug|Any CPU
{5944056C-E7A1-4A10-BAC4-E3AF91C12C5C}.Checked|x86.ActiveCfg = Debug|Any CPU
- {5944056C-E7A1-4A10-BAC4-E3AF91C12C5C}.Checked|x86.Build.0 = Debug|Any CPU
{3D4DD468-10FE-4606-BA10-F848447AF157}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3D4DD468-10FE-4606-BA10-F848447AF157}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3D4DD468-10FE-4606-BA10-F848447AF157}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -923,11 +814,8 @@ Global
{3D4DD468-10FE-4606-BA10-F848447AF157}.Release|x86.ActiveCfg = Release|Any CPU
{3D4DD468-10FE-4606-BA10-F848447AF157}.Release|x86.Build.0 = Release|Any CPU
{3D4DD468-10FE-4606-BA10-F848447AF157}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {3D4DD468-10FE-4606-BA10-F848447AF157}.Checked|Any CPU.Build.0 = Debug|Any CPU
{3D4DD468-10FE-4606-BA10-F848447AF157}.Checked|x64.ActiveCfg = Debug|Any CPU
- {3D4DD468-10FE-4606-BA10-F848447AF157}.Checked|x64.Build.0 = Debug|Any CPU
{3D4DD468-10FE-4606-BA10-F848447AF157}.Checked|x86.ActiveCfg = Debug|Any CPU
- {3D4DD468-10FE-4606-BA10-F848447AF157}.Checked|x86.Build.0 = Debug|Any CPU
{B4B34CC2-EE3B-406A-9A55-74B219BDCD0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B4B34CC2-EE3B-406A-9A55-74B219BDCD0F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B4B34CC2-EE3B-406A-9A55-74B219BDCD0F}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -941,11 +829,8 @@ Global
{B4B34CC2-EE3B-406A-9A55-74B219BDCD0F}.Release|x86.ActiveCfg = Release|Any CPU
{B4B34CC2-EE3B-406A-9A55-74B219BDCD0F}.Release|x86.Build.0 = Release|Any CPU
{B4B34CC2-EE3B-406A-9A55-74B219BDCD0F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {B4B34CC2-EE3B-406A-9A55-74B219BDCD0F}.Checked|Any CPU.Build.0 = Debug|Any CPU
{B4B34CC2-EE3B-406A-9A55-74B219BDCD0F}.Checked|x64.ActiveCfg = Debug|Any CPU
- {B4B34CC2-EE3B-406A-9A55-74B219BDCD0F}.Checked|x64.Build.0 = Debug|Any CPU
{B4B34CC2-EE3B-406A-9A55-74B219BDCD0F}.Checked|x86.ActiveCfg = Debug|Any CPU
- {B4B34CC2-EE3B-406A-9A55-74B219BDCD0F}.Checked|x86.Build.0 = Debug|Any CPU
{711CBCE0-C21C-45DA-B0D2-D2298941058E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{711CBCE0-C21C-45DA-B0D2-D2298941058E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{711CBCE0-C21C-45DA-B0D2-D2298941058E}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -959,11 +844,8 @@ Global
{711CBCE0-C21C-45DA-B0D2-D2298941058E}.Release|x86.ActiveCfg = Release|Any CPU
{711CBCE0-C21C-45DA-B0D2-D2298941058E}.Release|x86.Build.0 = Release|Any CPU
{711CBCE0-C21C-45DA-B0D2-D2298941058E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {711CBCE0-C21C-45DA-B0D2-D2298941058E}.Checked|Any CPU.Build.0 = Debug|Any CPU
{711CBCE0-C21C-45DA-B0D2-D2298941058E}.Checked|x64.ActiveCfg = Debug|Any CPU
- {711CBCE0-C21C-45DA-B0D2-D2298941058E}.Checked|x64.Build.0 = Debug|Any CPU
{711CBCE0-C21C-45DA-B0D2-D2298941058E}.Checked|x86.ActiveCfg = Debug|Any CPU
- {711CBCE0-C21C-45DA-B0D2-D2298941058E}.Checked|x86.Build.0 = Debug|Any CPU
{CBE6BB10-0C9C-4620-8F49-A5BF4476B3D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CBE6BB10-0C9C-4620-8F49-A5BF4476B3D7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CBE6BB10-0C9C-4620-8F49-A5BF4476B3D7}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -977,11 +859,8 @@ Global
{CBE6BB10-0C9C-4620-8F49-A5BF4476B3D7}.Release|x86.ActiveCfg = Release|Any CPU
{CBE6BB10-0C9C-4620-8F49-A5BF4476B3D7}.Release|x86.Build.0 = Release|Any CPU
{CBE6BB10-0C9C-4620-8F49-A5BF4476B3D7}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {CBE6BB10-0C9C-4620-8F49-A5BF4476B3D7}.Checked|Any CPU.Build.0 = Debug|Any CPU
{CBE6BB10-0C9C-4620-8F49-A5BF4476B3D7}.Checked|x64.ActiveCfg = Debug|Any CPU
- {CBE6BB10-0C9C-4620-8F49-A5BF4476B3D7}.Checked|x64.Build.0 = Debug|Any CPU
{CBE6BB10-0C9C-4620-8F49-A5BF4476B3D7}.Checked|x86.ActiveCfg = Debug|Any CPU
- {CBE6BB10-0C9C-4620-8F49-A5BF4476B3D7}.Checked|x86.Build.0 = Debug|Any CPU
{DF679A1A-1797-40EB-A8AA-E3AEA66C80E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DF679A1A-1797-40EB-A8AA-E3AEA66C80E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DF679A1A-1797-40EB-A8AA-E3AEA66C80E5}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -995,11 +874,8 @@ Global
{DF679A1A-1797-40EB-A8AA-E3AEA66C80E5}.Release|x86.ActiveCfg = Release|Any CPU
{DF679A1A-1797-40EB-A8AA-E3AEA66C80E5}.Release|x86.Build.0 = Release|Any CPU
{DF679A1A-1797-40EB-A8AA-E3AEA66C80E5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {DF679A1A-1797-40EB-A8AA-E3AEA66C80E5}.Checked|Any CPU.Build.0 = Debug|Any CPU
{DF679A1A-1797-40EB-A8AA-E3AEA66C80E5}.Checked|x64.ActiveCfg = Debug|Any CPU
- {DF679A1A-1797-40EB-A8AA-E3AEA66C80E5}.Checked|x64.Build.0 = Debug|Any CPU
{DF679A1A-1797-40EB-A8AA-E3AEA66C80E5}.Checked|x86.ActiveCfg = Debug|Any CPU
- {DF679A1A-1797-40EB-A8AA-E3AEA66C80E5}.Checked|x86.Build.0 = Debug|Any CPU
{143DCF72-7DD7-4365-8B47-D67010F662A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{143DCF72-7DD7-4365-8B47-D67010F662A1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{143DCF72-7DD7-4365-8B47-D67010F662A1}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -1013,11 +889,8 @@ Global
{143DCF72-7DD7-4365-8B47-D67010F662A1}.Release|x86.ActiveCfg = Release|Any CPU
{143DCF72-7DD7-4365-8B47-D67010F662A1}.Release|x86.Build.0 = Release|Any CPU
{143DCF72-7DD7-4365-8B47-D67010F662A1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {143DCF72-7DD7-4365-8B47-D67010F662A1}.Checked|Any CPU.Build.0 = Debug|Any CPU
{143DCF72-7DD7-4365-8B47-D67010F662A1}.Checked|x64.ActiveCfg = Debug|Any CPU
- {143DCF72-7DD7-4365-8B47-D67010F662A1}.Checked|x64.Build.0 = Debug|Any CPU
{143DCF72-7DD7-4365-8B47-D67010F662A1}.Checked|x86.ActiveCfg = Debug|Any CPU
- {143DCF72-7DD7-4365-8B47-D67010F662A1}.Checked|x86.Build.0 = Debug|Any CPU
{3EA84883-E564-483D-A44E-FF1CC947B7A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3EA84883-E564-483D-A44E-FF1CC947B7A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3EA84883-E564-483D-A44E-FF1CC947B7A0}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -1031,11 +904,8 @@ Global
{3EA84883-E564-483D-A44E-FF1CC947B7A0}.Release|x86.ActiveCfg = Release|Any CPU
{3EA84883-E564-483D-A44E-FF1CC947B7A0}.Release|x86.Build.0 = Release|Any CPU
{3EA84883-E564-483D-A44E-FF1CC947B7A0}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {3EA84883-E564-483D-A44E-FF1CC947B7A0}.Checked|Any CPU.Build.0 = Debug|Any CPU
{3EA84883-E564-483D-A44E-FF1CC947B7A0}.Checked|x64.ActiveCfg = Debug|Any CPU
- {3EA84883-E564-483D-A44E-FF1CC947B7A0}.Checked|x64.Build.0 = Debug|Any CPU
{3EA84883-E564-483D-A44E-FF1CC947B7A0}.Checked|x86.ActiveCfg = Debug|Any CPU
- {3EA84883-E564-483D-A44E-FF1CC947B7A0}.Checked|x86.Build.0 = Debug|Any CPU
{DAE71710-C0BC-46CA-BC72-627C96B79494}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DAE71710-C0BC-46CA-BC72-627C96B79494}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DAE71710-C0BC-46CA-BC72-627C96B79494}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -1049,11 +919,8 @@ Global
{DAE71710-C0BC-46CA-BC72-627C96B79494}.Release|x86.ActiveCfg = Release|Any CPU
{DAE71710-C0BC-46CA-BC72-627C96B79494}.Release|x86.Build.0 = Release|Any CPU
{DAE71710-C0BC-46CA-BC72-627C96B79494}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {DAE71710-C0BC-46CA-BC72-627C96B79494}.Checked|Any CPU.Build.0 = Debug|Any CPU
{DAE71710-C0BC-46CA-BC72-627C96B79494}.Checked|x64.ActiveCfg = Debug|Any CPU
- {DAE71710-C0BC-46CA-BC72-627C96B79494}.Checked|x64.Build.0 = Debug|Any CPU
{DAE71710-C0BC-46CA-BC72-627C96B79494}.Checked|x86.ActiveCfg = Debug|Any CPU
- {DAE71710-C0BC-46CA-BC72-627C96B79494}.Checked|x86.Build.0 = Debug|Any CPU
{7913F002-64DC-43C6-9D74-B0B9BA297F00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7913F002-64DC-43C6-9D74-B0B9BA297F00}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7913F002-64DC-43C6-9D74-B0B9BA297F00}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -1067,11 +934,8 @@ Global
{7913F002-64DC-43C6-9D74-B0B9BA297F00}.Release|x86.ActiveCfg = Release|Any CPU
{7913F002-64DC-43C6-9D74-B0B9BA297F00}.Release|x86.Build.0 = Release|Any CPU
{7913F002-64DC-43C6-9D74-B0B9BA297F00}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {7913F002-64DC-43C6-9D74-B0B9BA297F00}.Checked|Any CPU.Build.0 = Debug|Any CPU
{7913F002-64DC-43C6-9D74-B0B9BA297F00}.Checked|x64.ActiveCfg = Debug|Any CPU
- {7913F002-64DC-43C6-9D74-B0B9BA297F00}.Checked|x64.Build.0 = Debug|Any CPU
{7913F002-64DC-43C6-9D74-B0B9BA297F00}.Checked|x86.ActiveCfg = Debug|Any CPU
- {7913F002-64DC-43C6-9D74-B0B9BA297F00}.Checked|x86.Build.0 = Debug|Any CPU
{E72B45B0-D05E-4F86-86E4-45B65FBB6617}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E72B45B0-D05E-4F86-86E4-45B65FBB6617}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E72B45B0-D05E-4F86-86E4-45B65FBB6617}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -1085,11 +949,8 @@ Global
{E72B45B0-D05E-4F86-86E4-45B65FBB6617}.Release|x86.ActiveCfg = Release|Any CPU
{E72B45B0-D05E-4F86-86E4-45B65FBB6617}.Release|x86.Build.0 = Release|Any CPU
{E72B45B0-D05E-4F86-86E4-45B65FBB6617}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {E72B45B0-D05E-4F86-86E4-45B65FBB6617}.Checked|Any CPU.Build.0 = Debug|Any CPU
{E72B45B0-D05E-4F86-86E4-45B65FBB6617}.Checked|x64.ActiveCfg = Debug|Any CPU
- {E72B45B0-D05E-4F86-86E4-45B65FBB6617}.Checked|x64.Build.0 = Debug|Any CPU
{E72B45B0-D05E-4F86-86E4-45B65FBB6617}.Checked|x86.ActiveCfg = Debug|Any CPU
- {E72B45B0-D05E-4F86-86E4-45B65FBB6617}.Checked|x86.Build.0 = Debug|Any CPU
{B6953324-8866-4D94-B352-20EF38EA6774}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B6953324-8866-4D94-B352-20EF38EA6774}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B6953324-8866-4D94-B352-20EF38EA6774}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -1103,11 +964,8 @@ Global
{B6953324-8866-4D94-B352-20EF38EA6774}.Release|x86.ActiveCfg = Release|Any CPU
{B6953324-8866-4D94-B352-20EF38EA6774}.Release|x86.Build.0 = Release|Any CPU
{B6953324-8866-4D94-B352-20EF38EA6774}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {B6953324-8866-4D94-B352-20EF38EA6774}.Checked|Any CPU.Build.0 = Debug|Any CPU
{B6953324-8866-4D94-B352-20EF38EA6774}.Checked|x64.ActiveCfg = Debug|Any CPU
- {B6953324-8866-4D94-B352-20EF38EA6774}.Checked|x64.Build.0 = Debug|Any CPU
{B6953324-8866-4D94-B352-20EF38EA6774}.Checked|x86.ActiveCfg = Debug|Any CPU
- {B6953324-8866-4D94-B352-20EF38EA6774}.Checked|x86.Build.0 = Debug|Any CPU
{F04E0408-978A-40D3-BB5A-C63893B11FBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F04E0408-978A-40D3-BB5A-C63893B11FBC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F04E0408-978A-40D3-BB5A-C63893B11FBC}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -1121,11 +979,8 @@ Global
{F04E0408-978A-40D3-BB5A-C63893B11FBC}.Release|x86.ActiveCfg = Release|Any CPU
{F04E0408-978A-40D3-BB5A-C63893B11FBC}.Release|x86.Build.0 = Release|Any CPU
{F04E0408-978A-40D3-BB5A-C63893B11FBC}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {F04E0408-978A-40D3-BB5A-C63893B11FBC}.Checked|Any CPU.Build.0 = Debug|Any CPU
{F04E0408-978A-40D3-BB5A-C63893B11FBC}.Checked|x64.ActiveCfg = Debug|Any CPU
- {F04E0408-978A-40D3-BB5A-C63893B11FBC}.Checked|x64.Build.0 = Debug|Any CPU
{F04E0408-978A-40D3-BB5A-C63893B11FBC}.Checked|x86.ActiveCfg = Debug|Any CPU
- {F04E0408-978A-40D3-BB5A-C63893B11FBC}.Checked|x86.Build.0 = Debug|Any CPU
{0A103F2A-2FF6-4291-AB51-203E5CA00B2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0A103F2A-2FF6-4291-AB51-203E5CA00B2D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0A103F2A-2FF6-4291-AB51-203E5CA00B2D}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -1139,11 +994,8 @@ Global
{0A103F2A-2FF6-4291-AB51-203E5CA00B2D}.Release|x86.ActiveCfg = Release|Any CPU
{0A103F2A-2FF6-4291-AB51-203E5CA00B2D}.Release|x86.Build.0 = Release|Any CPU
{0A103F2A-2FF6-4291-AB51-203E5CA00B2D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {0A103F2A-2FF6-4291-AB51-203E5CA00B2D}.Checked|Any CPU.Build.0 = Debug|Any CPU
{0A103F2A-2FF6-4291-AB51-203E5CA00B2D}.Checked|x64.ActiveCfg = Debug|Any CPU
- {0A103F2A-2FF6-4291-AB51-203E5CA00B2D}.Checked|x64.Build.0 = Debug|Any CPU
{0A103F2A-2FF6-4291-AB51-203E5CA00B2D}.Checked|x86.ActiveCfg = Debug|Any CPU
- {0A103F2A-2FF6-4291-AB51-203E5CA00B2D}.Checked|x86.Build.0 = Debug|Any CPU
{E92F7B7A-D34D-49B8-8857-09936624E038}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E92F7B7A-D34D-49B8-8857-09936624E038}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E92F7B7A-D34D-49B8-8857-09936624E038}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -1157,11 +1009,8 @@ Global
{E92F7B7A-D34D-49B8-8857-09936624E038}.Release|x86.ActiveCfg = Release|Any CPU
{E92F7B7A-D34D-49B8-8857-09936624E038}.Release|x86.Build.0 = Release|Any CPU
{E92F7B7A-D34D-49B8-8857-09936624E038}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {E92F7B7A-D34D-49B8-8857-09936624E038}.Checked|Any CPU.Build.0 = Debug|Any CPU
{E92F7B7A-D34D-49B8-8857-09936624E038}.Checked|x64.ActiveCfg = Debug|Any CPU
- {E92F7B7A-D34D-49B8-8857-09936624E038}.Checked|x64.Build.0 = Debug|Any CPU
{E92F7B7A-D34D-49B8-8857-09936624E038}.Checked|x86.ActiveCfg = Debug|Any CPU
- {E92F7B7A-D34D-49B8-8857-09936624E038}.Checked|x86.Build.0 = Debug|Any CPU
{78994C91-3A4F-4825-86C2-21FB4F082CA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{78994C91-3A4F-4825-86C2-21FB4F082CA7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{78994C91-3A4F-4825-86C2-21FB4F082CA7}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -1175,11 +1024,8 @@ Global
{78994C91-3A4F-4825-86C2-21FB4F082CA7}.Release|x86.ActiveCfg = Release|Any CPU
{78994C91-3A4F-4825-86C2-21FB4F082CA7}.Release|x86.Build.0 = Release|Any CPU
{78994C91-3A4F-4825-86C2-21FB4F082CA7}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {78994C91-3A4F-4825-86C2-21FB4F082CA7}.Checked|Any CPU.Build.0 = Debug|Any CPU
{78994C91-3A4F-4825-86C2-21FB4F082CA7}.Checked|x64.ActiveCfg = Debug|Any CPU
- {78994C91-3A4F-4825-86C2-21FB4F082CA7}.Checked|x64.Build.0 = Debug|Any CPU
{78994C91-3A4F-4825-86C2-21FB4F082CA7}.Checked|x86.ActiveCfg = Debug|Any CPU
- {78994C91-3A4F-4825-86C2-21FB4F082CA7}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -1231,6 +1077,7 @@ Global
{61914172-8197-4E04-9CE7-82C25D0AC8F2} = {56502718-F82A-46E2-9AD0-532C437EC51E}
{4E423476-3653-402A-AD55-0E5111A96ACC} = {56502718-F82A-46E2-9AD0-532C437EC51E}
{6F5E7FFC-8709-4072-B0B3-404BEB517394} = {56502718-F82A-46E2-9AD0-532C437EC51E}
+ {68895687-F073-44CB-8006-FCEFB79A6FC4} = {56502718-F82A-46E2-9AD0-532C437EC51E}
{F6D6DAC8-9F74-4A68-9B74-FCC655492B4F} = {56502718-F82A-46E2-9AD0-532C437EC51E}
{C1D7364E-C24B-460E-B0A0-E49BA6D9FFEC} = {56502718-F82A-46E2-9AD0-532C437EC51E}
{B4B34CC2-EE3B-406A-9A55-74B219BDCD0F} = {56502718-F82A-46E2-9AD0-532C437EC51E}
diff --git a/src/libraries/System.Runtime.Serialization.Schema/Directory.Build.props b/src/libraries/System.Runtime.Serialization.Schema/Directory.Build.props
index 4a2bc78c16e..e7d357018da 100644
--- a/src/libraries/System.Runtime.Serialization.Schema/Directory.Build.props
+++ b/src/libraries/System.Runtime.Serialization.Schema/Directory.Build.props
@@ -1,8 +1,9 @@
-<Project>
+<Project>
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
+ <StrongNameKeyId>Microsoft</StrongNameKeyId>
<IncludePlatformAttributes>true</IncludePlatformAttributes>
<!-- This exclusion list matches System.CodeDom. -->
<UnsupportedOSPlatforms>browser;ios;tvos;maccatalyst</UnsupportedOSPlatforms>
</PropertyGroup>
-</Project> \ No newline at end of file
+</Project>
diff --git a/src/libraries/System.Runtime.Serialization.Schema/System.Runtime.Serialization.Schema.sln b/src/libraries/System.Runtime.Serialization.Schema/System.Runtime.Serialization.Schema.sln
index b273f4e5bf6..24aea427d5e 100644
--- a/src/libraries/System.Runtime.Serialization.Schema/System.Runtime.Serialization.Schema.sln
+++ b/src/libraries/System.Runtime.Serialization.Schema/System.Runtime.Serialization.Schema.sln
@@ -1,6 +1,14 @@
Microsoft Visual Studio Solution File, Format Version 12.00
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{A83DE19F-4E19-4FEE-A3D7-FBA9E065B186}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.CodeDom", "..\System.CodeDom\ref\System.CodeDom.csproj", "{0DC058CC-9C51-42D4-A4DC-DB97130075C1}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.CodeDom", "..\System.CodeDom\src\System.CodeDom.csproj", "{D9B2FAA2-5A60-4650-B40F-780BC25CB603}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{222716D5-754B-4C1D-A5F9-1BD0692E843C}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{F73066DB-FD20-4C3B-B837-0FB18BDBF0B5}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Serialization.Schema", "ref\System.Runtime.Serialization.Schema.csproj", "{74AE27CF-E940-4EEB-9A19-0968689B627E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Serialization.Schema", "src\System.Runtime.Serialization.Schema.csproj", "{14D5A803-D5BF-44E5-B2B5-0B0BC297748E}"
@@ -13,6 +21,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{54321C0F-132
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{6591788E-0894-4655-AE2F-602407C4F766}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{366E690D-4016-43C9-9E9C-1B989A1E78A2}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -23,6 +33,22 @@ Global
{A83DE19F-4E19-4FEE-A3D7-FBA9E065B186}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A83DE19F-4E19-4FEE-A3D7-FBA9E065B186}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A83DE19F-4E19-4FEE-A3D7-FBA9E065B186}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0DC058CC-9C51-42D4-A4DC-DB97130075C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0DC058CC-9C51-42D4-A4DC-DB97130075C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0DC058CC-9C51-42D4-A4DC-DB97130075C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0DC058CC-9C51-42D4-A4DC-DB97130075C1}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D9B2FAA2-5A60-4650-B40F-780BC25CB603}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D9B2FAA2-5A60-4650-B40F-780BC25CB603}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D9B2FAA2-5A60-4650-B40F-780BC25CB603}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D9B2FAA2-5A60-4650-B40F-780BC25CB603}.Release|Any CPU.Build.0 = Release|Any CPU
+ {222716D5-754B-4C1D-A5F9-1BD0692E843C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {222716D5-754B-4C1D-A5F9-1BD0692E843C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {222716D5-754B-4C1D-A5F9-1BD0692E843C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {222716D5-754B-4C1D-A5F9-1BD0692E843C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F73066DB-FD20-4C3B-B837-0FB18BDBF0B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F73066DB-FD20-4C3B-B837-0FB18BDBF0B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F73066DB-FD20-4C3B-B837-0FB18BDBF0B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F73066DB-FD20-4C3B-B837-0FB18BDBF0B5}.Release|Any CPU.Build.0 = Release|Any CPU
{74AE27CF-E940-4EEB-9A19-0968689B627E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{74AE27CF-E940-4EEB-9A19-0968689B627E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{74AE27CF-E940-4EEB-9A19-0968689B627E}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -42,8 +68,12 @@ Global
GlobalSection(NestedProjects) = preSolution
{A83DE19F-4E19-4FEE-A3D7-FBA9E065B186} = {2D7D470B-B092-45BC-900A-CDB20CA94BE7}
{627FFEFC-A317-4AD1-809F-B26CA7F475BD} = {2D7D470B-B092-45BC-900A-CDB20CA94BE7}
+ {0DC058CC-9C51-42D4-A4DC-DB97130075C1} = {54321C0F-1323-4962-A01C-AC07028C3FA8}
{74AE27CF-E940-4EEB-9A19-0968689B627E} = {54321C0F-1323-4962-A01C-AC07028C3FA8}
+ {D9B2FAA2-5A60-4650-B40F-780BC25CB603} = {6591788E-0894-4655-AE2F-602407C4F766}
{14D5A803-D5BF-44E5-B2B5-0B0BC297748E} = {6591788E-0894-4655-AE2F-602407C4F766}
+ {222716D5-754B-4C1D-A5F9-1BD0692E843C} = {366E690D-4016-43C9-9E9C-1B989A1E78A2}
+ {F73066DB-FD20-4C3B-B837-0FB18BDBF0B5} = {366E690D-4016-43C9-9E9C-1B989A1E78A2}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {70EC5780-3C80-4D52-93B0-7FBF64E29572}
diff --git a/src/libraries/System.Runtime.Serialization.Schema/src/System.Runtime.Serialization.Schema.csproj b/src/libraries/System.Runtime.Serialization.Schema/src/System.Runtime.Serialization.Schema.csproj
index 68e20f52baa..b193422d135 100644
--- a/src/libraries/System.Runtime.Serialization.Schema/src/System.Runtime.Serialization.Schema.csproj
+++ b/src/libraries/System.Runtime.Serialization.Schema/src/System.Runtime.Serialization.Schema.csproj
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
- <StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsPackable>true</IsPackable>
<!-- TODO: Remove this setting when the package shipped with .NET 7. -->
<DisablePackageBaselineValidation>true</DisablePackageBaselineValidation>
diff --git a/src/libraries/System.Runtime.Serialization.Xml/System.Runtime.Serialization.Xml.sln b/src/libraries/System.Runtime.Serialization.Xml/System.Runtime.Serialization.Xml.sln
index a31621359a3..1175b6a261e 100644
--- a/src/libraries/System.Runtime.Serialization.Xml/System.Runtime.Serialization.Xml.sln
+++ b/src/libraries/System.Runtime.Serialization.Xml/System.Runtime.Serialization.Xml.sln
@@ -31,6 +31,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Serializatio
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Serialization.Xml.Tests", "tests\System.Runtime.Serialization.Xml.Tests.csproj", "{8FF5E841-29F6-4DB7-A4F8-9281FBDA0B9C}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SerializationTypes", "tests\XsdDataContractExporterTests\SerializationTypes\SerializationTypes.csproj", "{45263D7D-249E-4810-8F7D-1DEF25515210}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{9759BE1C-98A0-4319-AC82-D432002BD66B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.RegularExpressions.Generator", "..\System.Text.RegularExpressions\gen\System.Text.RegularExpressions.Generator.csproj", "{6E942A4A-405E-4AAD-89A7-006358A8A004}"
@@ -115,6 +117,10 @@ Global
{8FF5E841-29F6-4DB7-A4F8-9281FBDA0B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8FF5E841-29F6-4DB7-A4F8-9281FBDA0B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8FF5E841-29F6-4DB7-A4F8-9281FBDA0B9C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {45263D7D-249E-4810-8F7D-1DEF25515210}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {45263D7D-249E-4810-8F7D-1DEF25515210}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {45263D7D-249E-4810-8F7D-1DEF25515210}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {45263D7D-249E-4810-8F7D-1DEF25515210}.Release|Any CPU.Build.0 = Release|Any CPU
{9759BE1C-98A0-4319-AC82-D432002BD66B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9759BE1C-98A0-4319-AC82-D432002BD66B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9759BE1C-98A0-4319-AC82-D432002BD66B}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -135,6 +141,7 @@ Global
{CBA80130-6773-4DF9-995C-DC6CBED89CB5} = {41101B02-36C9-476B-98D5-1A6E105BBF4A}
{8B069551-9B95-464E-BB40-C56817506FEC} = {41101B02-36C9-476B-98D5-1A6E105BBF4A}
{8FF5E841-29F6-4DB7-A4F8-9281FBDA0B9C} = {41101B02-36C9-476B-98D5-1A6E105BBF4A}
+ {45263D7D-249E-4810-8F7D-1DEF25515210} = {41101B02-36C9-476B-98D5-1A6E105BBF4A}
{E5DB95E1-94AA-405C-9FFE-09B1E2498EE2} = {18E62E91-73A2-48AE-BEFF-CE7C64DF759D}
{7DF41C40-FE5D-41DF-B106-3DD77BE4D4B5} = {18E62E91-73A2-48AE-BEFF-CE7C64DF759D}
{E3347E75-EAE8-4E6B-98D1-7230B1EE5450} = {18E62E91-73A2-48AE-BEFF-CE7C64DF759D}
diff --git a/src/libraries/System.Runtime/System.Runtime.sln b/src/libraries/System.Runtime/System.Runtime.sln
index 1e9a8ace8b1..728d9bfa0e1 100644
--- a/src/libraries/System.Runtime/System.Runtime.sln
+++ b/src/libraries/System.Runtime/System.Runtime.sln
@@ -1,8 +1,4 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.3.32721.290
-MinimumVisualStudioVersion = 10.0.40219.1
+Microsoft Visual Studio Solution File, Format Version 12.00
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\..\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj", "{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities.Unicode", "..\Common\tests\TestUtilities.Unicode\TestUtilities.Unicode.csproj", "{9DF0247E-5B81-4EF3-82CA-3E70B3A56742}"
@@ -19,6 +15,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Drawing.Common", "..
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{CF79B5AE-38CB-4B80-BF92-CF634C0B7EC3}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{E64D31D0-8F38-4FDF-B60D-F955D2475566}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.Uri", "..\System.Private.Uri\src\System.Private.Uri.csproj", "{E7A05515-DABE-4C09-83CB-CE84EFDCD4CC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{4FA4A9A6-1D38-414B-96F0-3CFB63C687C9}"
@@ -69,23 +67,17 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{F362E63A-2B1
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Checked|Any CPU = Checked|Any CPU
- Checked|x64 = Checked|x64
- Checked|x86 = Checked|x86
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
+ Checked|Any CPU = Checked|Any CPU
+ Checked|x64 = Checked|x64
+ Checked|x86 = Checked|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|Any CPU.ActiveCfg = Checked|x64
- {71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|Any CPU.Build.0 = Checked|x64
- {71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|x64.ActiveCfg = Checked|x64
- {71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|x64.Build.0 = Checked|x64
- {71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|x86.ActiveCfg = Checked|x86
- {71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|x86.Build.0 = Checked|x86
{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Debug|Any CPU.ActiveCfg = Debug|x64
{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Debug|Any CPU.Build.0 = Debug|x64
{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Debug|x64.ActiveCfg = Debug|x64
@@ -98,12 +90,12 @@ Global
{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Release|x64.Build.0 = Release|x64
{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Release|x86.ActiveCfg = Release|x86
{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Release|x86.Build.0 = Release|x86
- {9DF0247E-5B81-4EF3-82CA-3E70B3A56742}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {9DF0247E-5B81-4EF3-82CA-3E70B3A56742}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {9DF0247E-5B81-4EF3-82CA-3E70B3A56742}.Checked|x64.ActiveCfg = Debug|Any CPU
- {9DF0247E-5B81-4EF3-82CA-3E70B3A56742}.Checked|x64.Build.0 = Debug|Any CPU
- {9DF0247E-5B81-4EF3-82CA-3E70B3A56742}.Checked|x86.ActiveCfg = Debug|Any CPU
- {9DF0247E-5B81-4EF3-82CA-3E70B3A56742}.Checked|x86.Build.0 = Debug|Any CPU
+ {71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|Any CPU.ActiveCfg = Checked|x64
+ {71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|Any CPU.Build.0 = Checked|x64
+ {71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|x64.ActiveCfg = Checked|x64
+ {71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|x64.Build.0 = Checked|x64
+ {71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|x86.ActiveCfg = Checked|x86
+ {71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|x86.Build.0 = Checked|x86
{9DF0247E-5B81-4EF3-82CA-3E70B3A56742}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9DF0247E-5B81-4EF3-82CA-3E70B3A56742}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9DF0247E-5B81-4EF3-82CA-3E70B3A56742}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -116,12 +108,9 @@ Global
{9DF0247E-5B81-4EF3-82CA-3E70B3A56742}.Release|x64.Build.0 = Release|Any CPU
{9DF0247E-5B81-4EF3-82CA-3E70B3A56742}.Release|x86.ActiveCfg = Release|Any CPU
{9DF0247E-5B81-4EF3-82CA-3E70B3A56742}.Release|x86.Build.0 = Release|Any CPU
- {FB17AC52-1633-4845-932B-9218DF895957}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {FB17AC52-1633-4845-932B-9218DF895957}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {FB17AC52-1633-4845-932B-9218DF895957}.Checked|x64.ActiveCfg = Debug|Any CPU
- {FB17AC52-1633-4845-932B-9218DF895957}.Checked|x64.Build.0 = Debug|Any CPU
- {FB17AC52-1633-4845-932B-9218DF895957}.Checked|x86.ActiveCfg = Debug|Any CPU
- {FB17AC52-1633-4845-932B-9218DF895957}.Checked|x86.Build.0 = Debug|Any CPU
+ {9DF0247E-5B81-4EF3-82CA-3E70B3A56742}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {9DF0247E-5B81-4EF3-82CA-3E70B3A56742}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {9DF0247E-5B81-4EF3-82CA-3E70B3A56742}.Checked|x86.ActiveCfg = Debug|Any CPU
{FB17AC52-1633-4845-932B-9218DF895957}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FB17AC52-1633-4845-932B-9218DF895957}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FB17AC52-1633-4845-932B-9218DF895957}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -134,12 +123,9 @@ Global
{FB17AC52-1633-4845-932B-9218DF895957}.Release|x64.Build.0 = Release|Any CPU
{FB17AC52-1633-4845-932B-9218DF895957}.Release|x86.ActiveCfg = Release|Any CPU
{FB17AC52-1633-4845-932B-9218DF895957}.Release|x86.Build.0 = Release|Any CPU
- {62C2AC8A-7410-4E06-B94E-43BF2DCFBDE9}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {62C2AC8A-7410-4E06-B94E-43BF2DCFBDE9}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {62C2AC8A-7410-4E06-B94E-43BF2DCFBDE9}.Checked|x64.ActiveCfg = Debug|Any CPU
- {62C2AC8A-7410-4E06-B94E-43BF2DCFBDE9}.Checked|x64.Build.0 = Debug|Any CPU
- {62C2AC8A-7410-4E06-B94E-43BF2DCFBDE9}.Checked|x86.ActiveCfg = Debug|Any CPU
- {62C2AC8A-7410-4E06-B94E-43BF2DCFBDE9}.Checked|x86.Build.0 = Debug|Any CPU
+ {FB17AC52-1633-4845-932B-9218DF895957}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {FB17AC52-1633-4845-932B-9218DF895957}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {FB17AC52-1633-4845-932B-9218DF895957}.Checked|x86.ActiveCfg = Debug|Any CPU
{62C2AC8A-7410-4E06-B94E-43BF2DCFBDE9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{62C2AC8A-7410-4E06-B94E-43BF2DCFBDE9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{62C2AC8A-7410-4E06-B94E-43BF2DCFBDE9}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -152,12 +138,9 @@ Global
{62C2AC8A-7410-4E06-B94E-43BF2DCFBDE9}.Release|x64.Build.0 = Release|Any CPU
{62C2AC8A-7410-4E06-B94E-43BF2DCFBDE9}.Release|x86.ActiveCfg = Release|Any CPU
{62C2AC8A-7410-4E06-B94E-43BF2DCFBDE9}.Release|x86.Build.0 = Release|Any CPU
- {B41CB4AB-CDF6-4BB0-B826-D4BAE41411BD}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {B41CB4AB-CDF6-4BB0-B826-D4BAE41411BD}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {B41CB4AB-CDF6-4BB0-B826-D4BAE41411BD}.Checked|x64.ActiveCfg = Debug|Any CPU
- {B41CB4AB-CDF6-4BB0-B826-D4BAE41411BD}.Checked|x64.Build.0 = Debug|Any CPU
- {B41CB4AB-CDF6-4BB0-B826-D4BAE41411BD}.Checked|x86.ActiveCfg = Debug|Any CPU
- {B41CB4AB-CDF6-4BB0-B826-D4BAE41411BD}.Checked|x86.Build.0 = Debug|Any CPU
+ {62C2AC8A-7410-4E06-B94E-43BF2DCFBDE9}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {62C2AC8A-7410-4E06-B94E-43BF2DCFBDE9}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {62C2AC8A-7410-4E06-B94E-43BF2DCFBDE9}.Checked|x86.ActiveCfg = Debug|Any CPU
{B41CB4AB-CDF6-4BB0-B826-D4BAE41411BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B41CB4AB-CDF6-4BB0-B826-D4BAE41411BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B41CB4AB-CDF6-4BB0-B826-D4BAE41411BD}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -170,12 +153,9 @@ Global
{B41CB4AB-CDF6-4BB0-B826-D4BAE41411BD}.Release|x64.Build.0 = Release|Any CPU
{B41CB4AB-CDF6-4BB0-B826-D4BAE41411BD}.Release|x86.ActiveCfg = Release|Any CPU
{B41CB4AB-CDF6-4BB0-B826-D4BAE41411BD}.Release|x86.Build.0 = Release|Any CPU
- {9C41B325-1225-43CA-9436-549AFF6D90A1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {9C41B325-1225-43CA-9436-549AFF6D90A1}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {9C41B325-1225-43CA-9436-549AFF6D90A1}.Checked|x64.ActiveCfg = Debug|Any CPU
- {9C41B325-1225-43CA-9436-549AFF6D90A1}.Checked|x64.Build.0 = Debug|Any CPU
- {9C41B325-1225-43CA-9436-549AFF6D90A1}.Checked|x86.ActiveCfg = Debug|Any CPU
- {9C41B325-1225-43CA-9436-549AFF6D90A1}.Checked|x86.Build.0 = Debug|Any CPU
+ {B41CB4AB-CDF6-4BB0-B826-D4BAE41411BD}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {B41CB4AB-CDF6-4BB0-B826-D4BAE41411BD}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {B41CB4AB-CDF6-4BB0-B826-D4BAE41411BD}.Checked|x86.ActiveCfg = Debug|Any CPU
{9C41B325-1225-43CA-9436-549AFF6D90A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9C41B325-1225-43CA-9436-549AFF6D90A1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9C41B325-1225-43CA-9436-549AFF6D90A1}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -188,12 +168,9 @@ Global
{9C41B325-1225-43CA-9436-549AFF6D90A1}.Release|x64.Build.0 = Release|Any CPU
{9C41B325-1225-43CA-9436-549AFF6D90A1}.Release|x86.ActiveCfg = Release|Any CPU
{9C41B325-1225-43CA-9436-549AFF6D90A1}.Release|x86.Build.0 = Release|Any CPU
- {F27DC16B-64F4-4BD7-AF9C-1C76F7ACC88B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {F27DC16B-64F4-4BD7-AF9C-1C76F7ACC88B}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {F27DC16B-64F4-4BD7-AF9C-1C76F7ACC88B}.Checked|x64.ActiveCfg = Debug|Any CPU
- {F27DC16B-64F4-4BD7-AF9C-1C76F7ACC88B}.Checked|x64.Build.0 = Debug|Any CPU
- {F27DC16B-64F4-4BD7-AF9C-1C76F7ACC88B}.Checked|x86.ActiveCfg = Debug|Any CPU
- {F27DC16B-64F4-4BD7-AF9C-1C76F7ACC88B}.Checked|x86.Build.0 = Debug|Any CPU
+ {9C41B325-1225-43CA-9436-549AFF6D90A1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {9C41B325-1225-43CA-9436-549AFF6D90A1}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {9C41B325-1225-43CA-9436-549AFF6D90A1}.Checked|x86.ActiveCfg = Debug|Any CPU
{F27DC16B-64F4-4BD7-AF9C-1C76F7ACC88B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F27DC16B-64F4-4BD7-AF9C-1C76F7ACC88B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F27DC16B-64F4-4BD7-AF9C-1C76F7ACC88B}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -206,12 +183,9 @@ Global
{F27DC16B-64F4-4BD7-AF9C-1C76F7ACC88B}.Release|x64.Build.0 = Release|Any CPU
{F27DC16B-64F4-4BD7-AF9C-1C76F7ACC88B}.Release|x86.ActiveCfg = Release|Any CPU
{F27DC16B-64F4-4BD7-AF9C-1C76F7ACC88B}.Release|x86.Build.0 = Release|Any CPU
- {CF79B5AE-38CB-4B80-BF92-CF634C0B7EC3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {CF79B5AE-38CB-4B80-BF92-CF634C0B7EC3}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {CF79B5AE-38CB-4B80-BF92-CF634C0B7EC3}.Checked|x64.ActiveCfg = Debug|Any CPU
- {CF79B5AE-38CB-4B80-BF92-CF634C0B7EC3}.Checked|x64.Build.0 = Debug|Any CPU
- {CF79B5AE-38CB-4B80-BF92-CF634C0B7EC3}.Checked|x86.ActiveCfg = Debug|Any CPU
- {CF79B5AE-38CB-4B80-BF92-CF634C0B7EC3}.Checked|x86.Build.0 = Debug|Any CPU
+ {F27DC16B-64F4-4BD7-AF9C-1C76F7ACC88B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {F27DC16B-64F4-4BD7-AF9C-1C76F7ACC88B}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {F27DC16B-64F4-4BD7-AF9C-1C76F7ACC88B}.Checked|x86.ActiveCfg = Debug|Any CPU
{CF79B5AE-38CB-4B80-BF92-CF634C0B7EC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CF79B5AE-38CB-4B80-BF92-CF634C0B7EC3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CF79B5AE-38CB-4B80-BF92-CF634C0B7EC3}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -224,12 +198,24 @@ Global
{CF79B5AE-38CB-4B80-BF92-CF634C0B7EC3}.Release|x64.Build.0 = Release|Any CPU
{CF79B5AE-38CB-4B80-BF92-CF634C0B7EC3}.Release|x86.ActiveCfg = Release|Any CPU
{CF79B5AE-38CB-4B80-BF92-CF634C0B7EC3}.Release|x86.Build.0 = Release|Any CPU
- {E7A05515-DABE-4C09-83CB-CE84EFDCD4CC}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {E7A05515-DABE-4C09-83CB-CE84EFDCD4CC}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {E7A05515-DABE-4C09-83CB-CE84EFDCD4CC}.Checked|x64.ActiveCfg = Debug|Any CPU
- {E7A05515-DABE-4C09-83CB-CE84EFDCD4CC}.Checked|x64.Build.0 = Debug|Any CPU
- {E7A05515-DABE-4C09-83CB-CE84EFDCD4CC}.Checked|x86.ActiveCfg = Debug|Any CPU
- {E7A05515-DABE-4C09-83CB-CE84EFDCD4CC}.Checked|x86.Build.0 = Debug|Any CPU
+ {CF79B5AE-38CB-4B80-BF92-CF634C0B7EC3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {CF79B5AE-38CB-4B80-BF92-CF634C0B7EC3}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {CF79B5AE-38CB-4B80-BF92-CF634C0B7EC3}.Checked|x86.ActiveCfg = Debug|Any CPU
+ {E64D31D0-8F38-4FDF-B60D-F955D2475566}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E64D31D0-8F38-4FDF-B60D-F955D2475566}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E64D31D0-8F38-4FDF-B60D-F955D2475566}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {E64D31D0-8F38-4FDF-B60D-F955D2475566}.Debug|x64.Build.0 = Debug|Any CPU
+ {E64D31D0-8F38-4FDF-B60D-F955D2475566}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {E64D31D0-8F38-4FDF-B60D-F955D2475566}.Debug|x86.Build.0 = Debug|Any CPU
+ {E64D31D0-8F38-4FDF-B60D-F955D2475566}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E64D31D0-8F38-4FDF-B60D-F955D2475566}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E64D31D0-8F38-4FDF-B60D-F955D2475566}.Release|x64.ActiveCfg = Release|Any CPU
+ {E64D31D0-8F38-4FDF-B60D-F955D2475566}.Release|x64.Build.0 = Release|Any CPU
+ {E64D31D0-8F38-4FDF-B60D-F955D2475566}.Release|x86.ActiveCfg = Release|Any CPU
+ {E64D31D0-8F38-4FDF-B60D-F955D2475566}.Release|x86.Build.0 = Release|Any CPU
+ {E64D31D0-8F38-4FDF-B60D-F955D2475566}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {E64D31D0-8F38-4FDF-B60D-F955D2475566}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {E64D31D0-8F38-4FDF-B60D-F955D2475566}.Checked|x86.ActiveCfg = Debug|Any CPU
{E7A05515-DABE-4C09-83CB-CE84EFDCD4CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E7A05515-DABE-4C09-83CB-CE84EFDCD4CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E7A05515-DABE-4C09-83CB-CE84EFDCD4CC}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -242,12 +228,9 @@ Global
{E7A05515-DABE-4C09-83CB-CE84EFDCD4CC}.Release|x64.Build.0 = Release|Any CPU
{E7A05515-DABE-4C09-83CB-CE84EFDCD4CC}.Release|x86.ActiveCfg = Release|Any CPU
{E7A05515-DABE-4C09-83CB-CE84EFDCD4CC}.Release|x86.Build.0 = Release|Any CPU
- {4FA4A9A6-1D38-414B-96F0-3CFB63C687C9}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {4FA4A9A6-1D38-414B-96F0-3CFB63C687C9}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {4FA4A9A6-1D38-414B-96F0-3CFB63C687C9}.Checked|x64.ActiveCfg = Debug|Any CPU
- {4FA4A9A6-1D38-414B-96F0-3CFB63C687C9}.Checked|x64.Build.0 = Debug|Any CPU
- {4FA4A9A6-1D38-414B-96F0-3CFB63C687C9}.Checked|x86.ActiveCfg = Debug|Any CPU
- {4FA4A9A6-1D38-414B-96F0-3CFB63C687C9}.Checked|x86.Build.0 = Debug|Any CPU
+ {E7A05515-DABE-4C09-83CB-CE84EFDCD4CC}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {E7A05515-DABE-4C09-83CB-CE84EFDCD4CC}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {E7A05515-DABE-4C09-83CB-CE84EFDCD4CC}.Checked|x86.ActiveCfg = Debug|Any CPU
{4FA4A9A6-1D38-414B-96F0-3CFB63C687C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4FA4A9A6-1D38-414B-96F0-3CFB63C687C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4FA4A9A6-1D38-414B-96F0-3CFB63C687C9}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -260,12 +243,9 @@ Global
{4FA4A9A6-1D38-414B-96F0-3CFB63C687C9}.Release|x64.Build.0 = Release|Any CPU
{4FA4A9A6-1D38-414B-96F0-3CFB63C687C9}.Release|x86.ActiveCfg = Release|Any CPU
{4FA4A9A6-1D38-414B-96F0-3CFB63C687C9}.Release|x86.Build.0 = Release|Any CPU
- {A7B7DE04-7261-4D4C-AA78-9F2D9B5A1C37}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {A7B7DE04-7261-4D4C-AA78-9F2D9B5A1C37}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {A7B7DE04-7261-4D4C-AA78-9F2D9B5A1C37}.Checked|x64.ActiveCfg = Debug|Any CPU
- {A7B7DE04-7261-4D4C-AA78-9F2D9B5A1C37}.Checked|x64.Build.0 = Debug|Any CPU
- {A7B7DE04-7261-4D4C-AA78-9F2D9B5A1C37}.Checked|x86.ActiveCfg = Debug|Any CPU
- {A7B7DE04-7261-4D4C-AA78-9F2D9B5A1C37}.Checked|x86.Build.0 = Debug|Any CPU
+ {4FA4A9A6-1D38-414B-96F0-3CFB63C687C9}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {4FA4A9A6-1D38-414B-96F0-3CFB63C687C9}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {4FA4A9A6-1D38-414B-96F0-3CFB63C687C9}.Checked|x86.ActiveCfg = Debug|Any CPU
{A7B7DE04-7261-4D4C-AA78-9F2D9B5A1C37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A7B7DE04-7261-4D4C-AA78-9F2D9B5A1C37}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A7B7DE04-7261-4D4C-AA78-9F2D9B5A1C37}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -278,12 +258,9 @@ Global
{A7B7DE04-7261-4D4C-AA78-9F2D9B5A1C37}.Release|x64.Build.0 = Release|Any CPU
{A7B7DE04-7261-4D4C-AA78-9F2D9B5A1C37}.Release|x86.ActiveCfg = Release|Any CPU
{A7B7DE04-7261-4D4C-AA78-9F2D9B5A1C37}.Release|x86.Build.0 = Release|Any CPU
- {F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Checked|x64.ActiveCfg = Debug|Any CPU
- {F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Checked|x64.Build.0 = Debug|Any CPU
- {F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Checked|x86.ActiveCfg = Debug|Any CPU
- {F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Checked|x86.Build.0 = Debug|Any CPU
+ {A7B7DE04-7261-4D4C-AA78-9F2D9B5A1C37}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {A7B7DE04-7261-4D4C-AA78-9F2D9B5A1C37}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {A7B7DE04-7261-4D4C-AA78-9F2D9B5A1C37}.Checked|x86.ActiveCfg = Debug|Any CPU
{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -296,12 +273,9 @@ Global
{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Release|x64.Build.0 = Release|Any CPU
{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Release|x86.ActiveCfg = Release|Any CPU
{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Release|x86.Build.0 = Release|Any CPU
- {A83A8520-F5E2-49B4-83BC-0F82A412951D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {A83A8520-F5E2-49B4-83BC-0F82A412951D}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {A83A8520-F5E2-49B4-83BC-0F82A412951D}.Checked|x64.ActiveCfg = Debug|Any CPU
- {A83A8520-F5E2-49B4-83BC-0F82A412951D}.Checked|x64.Build.0 = Debug|Any CPU
- {A83A8520-F5E2-49B4-83BC-0F82A412951D}.Checked|x86.ActiveCfg = Debug|Any CPU
- {A83A8520-F5E2-49B4-83BC-0F82A412951D}.Checked|x86.Build.0 = Debug|Any CPU
+ {F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Checked|x86.ActiveCfg = Debug|Any CPU
{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -314,12 +288,9 @@ Global
{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Release|x64.Build.0 = Release|Any CPU
{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Release|x86.ActiveCfg = Release|Any CPU
{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Release|x86.Build.0 = Release|Any CPU
- {3B79DD71-8C2F-41BC-A1A7-86A490D6C726}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {3B79DD71-8C2F-41BC-A1A7-86A490D6C726}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {3B79DD71-8C2F-41BC-A1A7-86A490D6C726}.Checked|x64.ActiveCfg = Debug|Any CPU
- {3B79DD71-8C2F-41BC-A1A7-86A490D6C726}.Checked|x64.Build.0 = Debug|Any CPU
- {3B79DD71-8C2F-41BC-A1A7-86A490D6C726}.Checked|x86.ActiveCfg = Debug|Any CPU
- {3B79DD71-8C2F-41BC-A1A7-86A490D6C726}.Checked|x86.Build.0 = Debug|Any CPU
+ {A83A8520-F5E2-49B4-83BC-0F82A412951D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {A83A8520-F5E2-49B4-83BC-0F82A412951D}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {A83A8520-F5E2-49B4-83BC-0F82A412951D}.Checked|x86.ActiveCfg = Debug|Any CPU
{3B79DD71-8C2F-41BC-A1A7-86A490D6C726}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3B79DD71-8C2F-41BC-A1A7-86A490D6C726}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3B79DD71-8C2F-41BC-A1A7-86A490D6C726}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -332,12 +303,9 @@ Global
{3B79DD71-8C2F-41BC-A1A7-86A490D6C726}.Release|x64.Build.0 = Release|Any CPU
{3B79DD71-8C2F-41BC-A1A7-86A490D6C726}.Release|x86.ActiveCfg = Release|Any CPU
{3B79DD71-8C2F-41BC-A1A7-86A490D6C726}.Release|x86.Build.0 = Release|Any CPU
- {4EE36055-AD7C-4779-B3F6-08687960DCC3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {4EE36055-AD7C-4779-B3F6-08687960DCC3}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {4EE36055-AD7C-4779-B3F6-08687960DCC3}.Checked|x64.ActiveCfg = Debug|Any CPU
- {4EE36055-AD7C-4779-B3F6-08687960DCC3}.Checked|x64.Build.0 = Debug|Any CPU
- {4EE36055-AD7C-4779-B3F6-08687960DCC3}.Checked|x86.ActiveCfg = Debug|Any CPU
- {4EE36055-AD7C-4779-B3F6-08687960DCC3}.Checked|x86.Build.0 = Debug|Any CPU
+ {3B79DD71-8C2F-41BC-A1A7-86A490D6C726}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {3B79DD71-8C2F-41BC-A1A7-86A490D6C726}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {3B79DD71-8C2F-41BC-A1A7-86A490D6C726}.Checked|x86.ActiveCfg = Debug|Any CPU
{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -350,12 +318,9 @@ Global
{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Release|x64.Build.0 = Release|Any CPU
{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Release|x86.ActiveCfg = Release|Any CPU
{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Release|x86.Build.0 = Release|Any CPU
- {C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Checked|x64.ActiveCfg = Debug|Any CPU
- {C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Checked|x64.Build.0 = Debug|Any CPU
- {C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Checked|x86.ActiveCfg = Debug|Any CPU
- {C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Checked|x86.Build.0 = Debug|Any CPU
+ {4EE36055-AD7C-4779-B3F6-08687960DCC3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {4EE36055-AD7C-4779-B3F6-08687960DCC3}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {4EE36055-AD7C-4779-B3F6-08687960DCC3}.Checked|x86.ActiveCfg = Debug|Any CPU
{C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -368,12 +333,9 @@ Global
{C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Release|x64.Build.0 = Release|Any CPU
{C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Release|x86.ActiveCfg = Release|Any CPU
{C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Release|x86.Build.0 = Release|Any CPU
- {47E26787-7C27-4572-AD8B-868DE44E2C48}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {47E26787-7C27-4572-AD8B-868DE44E2C48}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {47E26787-7C27-4572-AD8B-868DE44E2C48}.Checked|x64.ActiveCfg = Debug|Any CPU
- {47E26787-7C27-4572-AD8B-868DE44E2C48}.Checked|x64.Build.0 = Debug|Any CPU
- {47E26787-7C27-4572-AD8B-868DE44E2C48}.Checked|x86.ActiveCfg = Debug|Any CPU
- {47E26787-7C27-4572-AD8B-868DE44E2C48}.Checked|x86.Build.0 = Debug|Any CPU
+ {C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Checked|x86.ActiveCfg = Debug|Any CPU
{47E26787-7C27-4572-AD8B-868DE44E2C48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{47E26787-7C27-4572-AD8B-868DE44E2C48}.Debug|Any CPU.Build.0 = Debug|Any CPU
{47E26787-7C27-4572-AD8B-868DE44E2C48}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -386,12 +348,9 @@ Global
{47E26787-7C27-4572-AD8B-868DE44E2C48}.Release|x64.Build.0 = Release|Any CPU
{47E26787-7C27-4572-AD8B-868DE44E2C48}.Release|x86.ActiveCfg = Release|Any CPU
{47E26787-7C27-4572-AD8B-868DE44E2C48}.Release|x86.Build.0 = Release|Any CPU
- {C230AC88-A377-4BEB-824F-AB174C14DC86}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {C230AC88-A377-4BEB-824F-AB174C14DC86}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {C230AC88-A377-4BEB-824F-AB174C14DC86}.Checked|x64.ActiveCfg = Debug|Any CPU
- {C230AC88-A377-4BEB-824F-AB174C14DC86}.Checked|x64.Build.0 = Debug|Any CPU
- {C230AC88-A377-4BEB-824F-AB174C14DC86}.Checked|x86.ActiveCfg = Debug|Any CPU
- {C230AC88-A377-4BEB-824F-AB174C14DC86}.Checked|x86.Build.0 = Debug|Any CPU
+ {47E26787-7C27-4572-AD8B-868DE44E2C48}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {47E26787-7C27-4572-AD8B-868DE44E2C48}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {47E26787-7C27-4572-AD8B-868DE44E2C48}.Checked|x86.ActiveCfg = Debug|Any CPU
{C230AC88-A377-4BEB-824F-AB174C14DC86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C230AC88-A377-4BEB-824F-AB174C14DC86}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C230AC88-A377-4BEB-824F-AB174C14DC86}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -404,12 +363,9 @@ Global
{C230AC88-A377-4BEB-824F-AB174C14DC86}.Release|x64.Build.0 = Release|Any CPU
{C230AC88-A377-4BEB-824F-AB174C14DC86}.Release|x86.ActiveCfg = Release|Any CPU
{C230AC88-A377-4BEB-824F-AB174C14DC86}.Release|x86.Build.0 = Release|Any CPU
- {1BCCD2F5-A561-4641-8A0B-51F3EDCA35DC}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {1BCCD2F5-A561-4641-8A0B-51F3EDCA35DC}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {1BCCD2F5-A561-4641-8A0B-51F3EDCA35DC}.Checked|x64.ActiveCfg = Debug|Any CPU
- {1BCCD2F5-A561-4641-8A0B-51F3EDCA35DC}.Checked|x64.Build.0 = Debug|Any CPU
- {1BCCD2F5-A561-4641-8A0B-51F3EDCA35DC}.Checked|x86.ActiveCfg = Debug|Any CPU
- {1BCCD2F5-A561-4641-8A0B-51F3EDCA35DC}.Checked|x86.Build.0 = Debug|Any CPU
+ {C230AC88-A377-4BEB-824F-AB174C14DC86}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {C230AC88-A377-4BEB-824F-AB174C14DC86}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {C230AC88-A377-4BEB-824F-AB174C14DC86}.Checked|x86.ActiveCfg = Debug|Any CPU
{1BCCD2F5-A561-4641-8A0B-51F3EDCA35DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1BCCD2F5-A561-4641-8A0B-51F3EDCA35DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1BCCD2F5-A561-4641-8A0B-51F3EDCA35DC}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -422,12 +378,9 @@ Global
{1BCCD2F5-A561-4641-8A0B-51F3EDCA35DC}.Release|x64.Build.0 = Release|Any CPU
{1BCCD2F5-A561-4641-8A0B-51F3EDCA35DC}.Release|x86.ActiveCfg = Release|Any CPU
{1BCCD2F5-A561-4641-8A0B-51F3EDCA35DC}.Release|x86.Build.0 = Release|Any CPU
- {0F83B07B-2E3F-4708-BE6D-7A8DA8168803}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {0F83B07B-2E3F-4708-BE6D-7A8DA8168803}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {0F83B07B-2E3F-4708-BE6D-7A8DA8168803}.Checked|x64.ActiveCfg = Debug|Any CPU
- {0F83B07B-2E3F-4708-BE6D-7A8DA8168803}.Checked|x64.Build.0 = Debug|Any CPU
- {0F83B07B-2E3F-4708-BE6D-7A8DA8168803}.Checked|x86.ActiveCfg = Debug|Any CPU
- {0F83B07B-2E3F-4708-BE6D-7A8DA8168803}.Checked|x86.Build.0 = Debug|Any CPU
+ {1BCCD2F5-A561-4641-8A0B-51F3EDCA35DC}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {1BCCD2F5-A561-4641-8A0B-51F3EDCA35DC}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {1BCCD2F5-A561-4641-8A0B-51F3EDCA35DC}.Checked|x86.ActiveCfg = Debug|Any CPU
{0F83B07B-2E3F-4708-BE6D-7A8DA8168803}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0F83B07B-2E3F-4708-BE6D-7A8DA8168803}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0F83B07B-2E3F-4708-BE6D-7A8DA8168803}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -440,12 +393,9 @@ Global
{0F83B07B-2E3F-4708-BE6D-7A8DA8168803}.Release|x64.Build.0 = Release|Any CPU
{0F83B07B-2E3F-4708-BE6D-7A8DA8168803}.Release|x86.ActiveCfg = Release|Any CPU
{0F83B07B-2E3F-4708-BE6D-7A8DA8168803}.Release|x86.Build.0 = Release|Any CPU
- {833C1D45-9BBB-4A92-93B7-4EFFD9E945AD}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {833C1D45-9BBB-4A92-93B7-4EFFD9E945AD}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {833C1D45-9BBB-4A92-93B7-4EFFD9E945AD}.Checked|x64.ActiveCfg = Debug|Any CPU
- {833C1D45-9BBB-4A92-93B7-4EFFD9E945AD}.Checked|x64.Build.0 = Debug|Any CPU
- {833C1D45-9BBB-4A92-93B7-4EFFD9E945AD}.Checked|x86.ActiveCfg = Debug|Any CPU
- {833C1D45-9BBB-4A92-93B7-4EFFD9E945AD}.Checked|x86.Build.0 = Debug|Any CPU
+ {0F83B07B-2E3F-4708-BE6D-7A8DA8168803}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {0F83B07B-2E3F-4708-BE6D-7A8DA8168803}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {0F83B07B-2E3F-4708-BE6D-7A8DA8168803}.Checked|x86.ActiveCfg = Debug|Any CPU
{833C1D45-9BBB-4A92-93B7-4EFFD9E945AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{833C1D45-9BBB-4A92-93B7-4EFFD9E945AD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{833C1D45-9BBB-4A92-93B7-4EFFD9E945AD}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -458,12 +408,9 @@ Global
{833C1D45-9BBB-4A92-93B7-4EFFD9E945AD}.Release|x64.Build.0 = Release|Any CPU
{833C1D45-9BBB-4A92-93B7-4EFFD9E945AD}.Release|x86.ActiveCfg = Release|Any CPU
{833C1D45-9BBB-4A92-93B7-4EFFD9E945AD}.Release|x86.Build.0 = Release|Any CPU
- {1B4552A4-91FD-4C6F-9EB4-3454C4BE428F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {1B4552A4-91FD-4C6F-9EB4-3454C4BE428F}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {1B4552A4-91FD-4C6F-9EB4-3454C4BE428F}.Checked|x64.ActiveCfg = Debug|Any CPU
- {1B4552A4-91FD-4C6F-9EB4-3454C4BE428F}.Checked|x64.Build.0 = Debug|Any CPU
- {1B4552A4-91FD-4C6F-9EB4-3454C4BE428F}.Checked|x86.ActiveCfg = Debug|Any CPU
- {1B4552A4-91FD-4C6F-9EB4-3454C4BE428F}.Checked|x86.Build.0 = Debug|Any CPU
+ {833C1D45-9BBB-4A92-93B7-4EFFD9E945AD}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {833C1D45-9BBB-4A92-93B7-4EFFD9E945AD}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {833C1D45-9BBB-4A92-93B7-4EFFD9E945AD}.Checked|x86.ActiveCfg = Debug|Any CPU
{1B4552A4-91FD-4C6F-9EB4-3454C4BE428F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1B4552A4-91FD-4C6F-9EB4-3454C4BE428F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1B4552A4-91FD-4C6F-9EB4-3454C4BE428F}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -476,12 +423,9 @@ Global
{1B4552A4-91FD-4C6F-9EB4-3454C4BE428F}.Release|x64.Build.0 = Release|Any CPU
{1B4552A4-91FD-4C6F-9EB4-3454C4BE428F}.Release|x86.ActiveCfg = Release|Any CPU
{1B4552A4-91FD-4C6F-9EB4-3454C4BE428F}.Release|x86.Build.0 = Release|Any CPU
- {F6A8185B-07C6-401D-9B40-3C560239E05F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {F6A8185B-07C6-401D-9B40-3C560239E05F}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {F6A8185B-07C6-401D-9B40-3C560239E05F}.Checked|x64.ActiveCfg = Debug|Any CPU
- {F6A8185B-07C6-401D-9B40-3C560239E05F}.Checked|x64.Build.0 = Debug|Any CPU
- {F6A8185B-07C6-401D-9B40-3C560239E05F}.Checked|x86.ActiveCfg = Debug|Any CPU
- {F6A8185B-07C6-401D-9B40-3C560239E05F}.Checked|x86.Build.0 = Debug|Any CPU
+ {1B4552A4-91FD-4C6F-9EB4-3454C4BE428F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {1B4552A4-91FD-4C6F-9EB4-3454C4BE428F}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {1B4552A4-91FD-4C6F-9EB4-3454C4BE428F}.Checked|x86.ActiveCfg = Debug|Any CPU
{F6A8185B-07C6-401D-9B40-3C560239E05F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F6A8185B-07C6-401D-9B40-3C560239E05F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F6A8185B-07C6-401D-9B40-3C560239E05F}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -494,12 +438,9 @@ Global
{F6A8185B-07C6-401D-9B40-3C560239E05F}.Release|x64.Build.0 = Release|Any CPU
{F6A8185B-07C6-401D-9B40-3C560239E05F}.Release|x86.ActiveCfg = Release|Any CPU
{F6A8185B-07C6-401D-9B40-3C560239E05F}.Release|x86.Build.0 = Release|Any CPU
- {EC777939-BE30-4ED9-9FE1-451DD7472467}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {EC777939-BE30-4ED9-9FE1-451DD7472467}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {EC777939-BE30-4ED9-9FE1-451DD7472467}.Checked|x64.ActiveCfg = Debug|Any CPU
- {EC777939-BE30-4ED9-9FE1-451DD7472467}.Checked|x64.Build.0 = Debug|Any CPU
- {EC777939-BE30-4ED9-9FE1-451DD7472467}.Checked|x86.ActiveCfg = Debug|Any CPU
- {EC777939-BE30-4ED9-9FE1-451DD7472467}.Checked|x86.Build.0 = Debug|Any CPU
+ {F6A8185B-07C6-401D-9B40-3C560239E05F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {F6A8185B-07C6-401D-9B40-3C560239E05F}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {F6A8185B-07C6-401D-9B40-3C560239E05F}.Checked|x86.ActiveCfg = Debug|Any CPU
{EC777939-BE30-4ED9-9FE1-451DD7472467}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EC777939-BE30-4ED9-9FE1-451DD7472467}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EC777939-BE30-4ED9-9FE1-451DD7472467}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -512,12 +453,9 @@ Global
{EC777939-BE30-4ED9-9FE1-451DD7472467}.Release|x64.Build.0 = Release|Any CPU
{EC777939-BE30-4ED9-9FE1-451DD7472467}.Release|x86.ActiveCfg = Release|Any CPU
{EC777939-BE30-4ED9-9FE1-451DD7472467}.Release|x86.Build.0 = Release|Any CPU
- {25E8AB9D-2D10-44F5-9F83-5A5134526771}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {25E8AB9D-2D10-44F5-9F83-5A5134526771}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {25E8AB9D-2D10-44F5-9F83-5A5134526771}.Checked|x64.ActiveCfg = Debug|Any CPU
- {25E8AB9D-2D10-44F5-9F83-5A5134526771}.Checked|x64.Build.0 = Debug|Any CPU
- {25E8AB9D-2D10-44F5-9F83-5A5134526771}.Checked|x86.ActiveCfg = Debug|Any CPU
- {25E8AB9D-2D10-44F5-9F83-5A5134526771}.Checked|x86.Build.0 = Debug|Any CPU
+ {EC777939-BE30-4ED9-9FE1-451DD7472467}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {EC777939-BE30-4ED9-9FE1-451DD7472467}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {EC777939-BE30-4ED9-9FE1-451DD7472467}.Checked|x86.ActiveCfg = Debug|Any CPU
{25E8AB9D-2D10-44F5-9F83-5A5134526771}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{25E8AB9D-2D10-44F5-9F83-5A5134526771}.Debug|Any CPU.Build.0 = Debug|Any CPU
{25E8AB9D-2D10-44F5-9F83-5A5134526771}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -530,12 +468,9 @@ Global
{25E8AB9D-2D10-44F5-9F83-5A5134526771}.Release|x64.Build.0 = Release|Any CPU
{25E8AB9D-2D10-44F5-9F83-5A5134526771}.Release|x86.ActiveCfg = Release|Any CPU
{25E8AB9D-2D10-44F5-9F83-5A5134526771}.Release|x86.Build.0 = Release|Any CPU
- {9CF6C6E6-0E9F-4A95-84B5-6083EAB6FA13}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {9CF6C6E6-0E9F-4A95-84B5-6083EAB6FA13}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {9CF6C6E6-0E9F-4A95-84B5-6083EAB6FA13}.Checked|x64.ActiveCfg = Debug|Any CPU
- {9CF6C6E6-0E9F-4A95-84B5-6083EAB6FA13}.Checked|x64.Build.0 = Debug|Any CPU
- {9CF6C6E6-0E9F-4A95-84B5-6083EAB6FA13}.Checked|x86.ActiveCfg = Debug|Any CPU
- {9CF6C6E6-0E9F-4A95-84B5-6083EAB6FA13}.Checked|x86.Build.0 = Debug|Any CPU
+ {25E8AB9D-2D10-44F5-9F83-5A5134526771}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {25E8AB9D-2D10-44F5-9F83-5A5134526771}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {25E8AB9D-2D10-44F5-9F83-5A5134526771}.Checked|x86.ActiveCfg = Debug|Any CPU
{9CF6C6E6-0E9F-4A95-84B5-6083EAB6FA13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9CF6C6E6-0E9F-4A95-84B5-6083EAB6FA13}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9CF6C6E6-0E9F-4A95-84B5-6083EAB6FA13}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -548,12 +483,9 @@ Global
{9CF6C6E6-0E9F-4A95-84B5-6083EAB6FA13}.Release|x64.Build.0 = Release|Any CPU
{9CF6C6E6-0E9F-4A95-84B5-6083EAB6FA13}.Release|x86.ActiveCfg = Release|Any CPU
{9CF6C6E6-0E9F-4A95-84B5-6083EAB6FA13}.Release|x86.Build.0 = Release|Any CPU
- {82728202-1098-4E16-B598-5762EAF67D08}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {82728202-1098-4E16-B598-5762EAF67D08}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {82728202-1098-4E16-B598-5762EAF67D08}.Checked|x64.ActiveCfg = Debug|Any CPU
- {82728202-1098-4E16-B598-5762EAF67D08}.Checked|x64.Build.0 = Debug|Any CPU
- {82728202-1098-4E16-B598-5762EAF67D08}.Checked|x86.ActiveCfg = Debug|Any CPU
- {82728202-1098-4E16-B598-5762EAF67D08}.Checked|x86.Build.0 = Debug|Any CPU
+ {9CF6C6E6-0E9F-4A95-84B5-6083EAB6FA13}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {9CF6C6E6-0E9F-4A95-84B5-6083EAB6FA13}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {9CF6C6E6-0E9F-4A95-84B5-6083EAB6FA13}.Checked|x86.ActiveCfg = Debug|Any CPU
{82728202-1098-4E16-B598-5762EAF67D08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{82728202-1098-4E16-B598-5762EAF67D08}.Debug|Any CPU.Build.0 = Debug|Any CPU
{82728202-1098-4E16-B598-5762EAF67D08}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -566,12 +498,9 @@ Global
{82728202-1098-4E16-B598-5762EAF67D08}.Release|x64.Build.0 = Release|Any CPU
{82728202-1098-4E16-B598-5762EAF67D08}.Release|x86.ActiveCfg = Release|Any CPU
{82728202-1098-4E16-B598-5762EAF67D08}.Release|x86.Build.0 = Release|Any CPU
- {069C2B51-069A-4FBB-BFE9-42D573F1CEEA}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {069C2B51-069A-4FBB-BFE9-42D573F1CEEA}.Checked|Any CPU.Build.0 = Debug|Any CPU
- {069C2B51-069A-4FBB-BFE9-42D573F1CEEA}.Checked|x64.ActiveCfg = Debug|Any CPU
- {069C2B51-069A-4FBB-BFE9-42D573F1CEEA}.Checked|x64.Build.0 = Debug|Any CPU
- {069C2B51-069A-4FBB-BFE9-42D573F1CEEA}.Checked|x86.ActiveCfg = Debug|Any CPU
- {069C2B51-069A-4FBB-BFE9-42D573F1CEEA}.Checked|x86.Build.0 = Debug|Any CPU
+ {82728202-1098-4E16-B598-5762EAF67D08}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {82728202-1098-4E16-B598-5762EAF67D08}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {82728202-1098-4E16-B598-5762EAF67D08}.Checked|x86.ActiveCfg = Debug|Any CPU
{069C2B51-069A-4FBB-BFE9-42D573F1CEEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{069C2B51-069A-4FBB-BFE9-42D573F1CEEA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{069C2B51-069A-4FBB-BFE9-42D573F1CEEA}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -584,24 +513,24 @@ Global
{069C2B51-069A-4FBB-BFE9-42D573F1CEEA}.Release|x64.Build.0 = Release|Any CPU
{069C2B51-069A-4FBB-BFE9-42D573F1CEEA}.Release|x86.ActiveCfg = Release|Any CPU
{069C2B51-069A-4FBB-BFE9-42D573F1CEEA}.Release|x86.Build.0 = Release|Any CPU
+ {069C2B51-069A-4FBB-BFE9-42D573F1CEEA}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {069C2B51-069A-4FBB-BFE9-42D573F1CEEA}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {069C2B51-069A-4FBB-BFE9-42D573F1CEEA}.Checked|x86.ActiveCfg = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{71AB8240-F179-4B21-A8BE-8BE6CD774ED9} = {28140562-A65A-48E9-ABAB-53BA939084F0}
- {9DF0247E-5B81-4EF3-82CA-3E70B3A56742} = {FD72C125-C10D-457B-8AFC-6B4E5237AF6A}
- {FB17AC52-1633-4845-932B-9218DF895957} = {FD72C125-C10D-457B-8AFC-6B4E5237AF6A}
- {62C2AC8A-7410-4E06-B94E-43BF2DCFBDE9} = {5B2B5E7E-A2FB-4095-9E79-404BF53E0133}
{B41CB4AB-CDF6-4BB0-B826-D4BAE41411BD} = {28140562-A65A-48E9-ABAB-53BA939084F0}
- {9C41B325-1225-43CA-9436-549AFF6D90A1} = {5B2B5E7E-A2FB-4095-9E79-404BF53E0133}
{F27DC16B-64F4-4BD7-AF9C-1C76F7ACC88B} = {28140562-A65A-48E9-ABAB-53BA939084F0}
- {CF79B5AE-38CB-4B80-BF92-CF634C0B7EC3} = {F362E63A-2B1A-445B-B198-3071D7DDE8CF}
{E7A05515-DABE-4C09-83CB-CE84EFDCD4CC} = {28140562-A65A-48E9-ABAB-53BA939084F0}
- {4FA4A9A6-1D38-414B-96F0-3CFB63C687C9} = {F362E63A-2B1A-445B-B198-3071D7DDE8CF}
- {A7B7DE04-7261-4D4C-AA78-9F2D9B5A1C37} = {F362E63A-2B1A-445B-B198-3071D7DDE8CF}
- {F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C} = {5B2B5E7E-A2FB-4095-9E79-404BF53E0133}
{A83A8520-F5E2-49B4-83BC-0F82A412951D} = {28140562-A65A-48E9-ABAB-53BA939084F0}
+ {F6A8185B-07C6-401D-9B40-3C560239E05F} = {28140562-A65A-48E9-ABAB-53BA939084F0}
+ {9CF6C6E6-0E9F-4A95-84B5-6083EAB6FA13} = {28140562-A65A-48E9-ABAB-53BA939084F0}
+ {069C2B51-069A-4FBB-BFE9-42D573F1CEEA} = {28140562-A65A-48E9-ABAB-53BA939084F0}
+ {9DF0247E-5B81-4EF3-82CA-3E70B3A56742} = {FD72C125-C10D-457B-8AFC-6B4E5237AF6A}
+ {FB17AC52-1633-4845-932B-9218DF895957} = {FD72C125-C10D-457B-8AFC-6B4E5237AF6A}
{3B79DD71-8C2F-41BC-A1A7-86A490D6C726} = {FD72C125-C10D-457B-8AFC-6B4E5237AF6A}
{4EE36055-AD7C-4779-B3F6-08687960DCC3} = {FD72C125-C10D-457B-8AFC-6B4E5237AF6A}
{C3F25EEF-04B4-407A-960B-0C1CE9C04430} = {FD72C125-C10D-457B-8AFC-6B4E5237AF6A}
@@ -610,18 +539,19 @@ Global
{1BCCD2F5-A561-4641-8A0B-51F3EDCA35DC} = {FD72C125-C10D-457B-8AFC-6B4E5237AF6A}
{0F83B07B-2E3F-4708-BE6D-7A8DA8168803} = {FD72C125-C10D-457B-8AFC-6B4E5237AF6A}
{833C1D45-9BBB-4A92-93B7-4EFFD9E945AD} = {FD72C125-C10D-457B-8AFC-6B4E5237AF6A}
+ {62C2AC8A-7410-4E06-B94E-43BF2DCFBDE9} = {5B2B5E7E-A2FB-4095-9E79-404BF53E0133}
+ {9C41B325-1225-43CA-9436-549AFF6D90A1} = {5B2B5E7E-A2FB-4095-9E79-404BF53E0133}
+ {E64D31D0-8F38-4FDF-B60D-F955D2475566} = {5B2B5E7E-A2FB-4095-9E79-404BF53E0133}
+ {F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C} = {5B2B5E7E-A2FB-4095-9E79-404BF53E0133}
{1B4552A4-91FD-4C6F-9EB4-3454C4BE428F} = {5B2B5E7E-A2FB-4095-9E79-404BF53E0133}
- {F6A8185B-07C6-401D-9B40-3C560239E05F} = {28140562-A65A-48E9-ABAB-53BA939084F0}
- {EC777939-BE30-4ED9-9FE1-451DD7472467} = {F362E63A-2B1A-445B-B198-3071D7DDE8CF}
{25E8AB9D-2D10-44F5-9F83-5A5134526771} = {5B2B5E7E-A2FB-4095-9E79-404BF53E0133}
- {9CF6C6E6-0E9F-4A95-84B5-6083EAB6FA13} = {28140562-A65A-48E9-ABAB-53BA939084F0}
{82728202-1098-4E16-B598-5762EAF67D08} = {5B2B5E7E-A2FB-4095-9E79-404BF53E0133}
- {069C2B51-069A-4FBB-BFE9-42D573F1CEEA} = {28140562-A65A-48E9-ABAB-53BA939084F0}
+ {CF79B5AE-38CB-4B80-BF92-CF634C0B7EC3} = {F362E63A-2B1A-445B-B198-3071D7DDE8CF}
+ {4FA4A9A6-1D38-414B-96F0-3CFB63C687C9} = {F362E63A-2B1A-445B-B198-3071D7DDE8CF}
+ {A7B7DE04-7261-4D4C-AA78-9F2D9B5A1C37} = {F362E63A-2B1A-445B-B198-3071D7DDE8CF}
+ {EC777939-BE30-4ED9-9FE1-451DD7472467} = {F362E63A-2B1A-445B-B198-3071D7DDE8CF}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {19706846-1F47-42ED-B649-B0982EE96E6B}
EndGlobalSection
- GlobalSection(SharedMSBuildProjectFiles) = preSolution
- ..\System.Private.CoreLib\src\System.Private.CoreLib.Shared.projitems*{71ab8240-f179-4b21-a8be-8be6cd774ed9}*SharedItemsImports = 5
- EndGlobalSection
EndGlobal
diff --git a/src/libraries/System.Runtime/ref/System.Runtime.cs b/src/libraries/System.Runtime/ref/System.Runtime.cs
index 6ad2debb088..8ec969852d1 100644
--- a/src/libraries/System.Runtime/ref/System.Runtime.cs
+++ b/src/libraries/System.Runtime/ref/System.Runtime.cs
@@ -7608,7 +7608,7 @@ namespace System.Collections.ObjectModel
public System.Collections.Generic.IEnumerator<TKey> GetEnumerator() { throw null; }
void System.Collections.Generic.ICollection<TKey>.Add(TKey item) { }
void System.Collections.Generic.ICollection<TKey>.Clear() { }
- bool System.Collections.Generic.ICollection<TKey>.Contains(TKey item) { throw null; }
+ public bool Contains(TKey item) { throw null; }
bool System.Collections.Generic.ICollection<TKey>.Remove(TKey item) { throw null; }
void System.Collections.ICollection.CopyTo(System.Array array, int index) { }
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
@@ -10462,8 +10462,8 @@ namespace System.Numerics
#nullable disable
where TOther : System.Numerics.INumberBase<TOther>;
#nullable restore
- static abstract bool TryParse(System.ReadOnlySpan<char> s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out TSelf result);
- static abstract bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out TSelf result);
+ static abstract bool TryParse(System.ReadOnlySpan<char> s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, [System.Diagnostics.CodeAnalysis.MaybeNullWhen(false)] out TSelf result);
+ static abstract bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, [System.Diagnostics.CodeAnalysis.MaybeNullWhen(false)] out TSelf result);
}
public partial interface INumber<TSelf> : System.IComparable, System.IComparable<TSelf>, System.IEquatable<TSelf>, System.IFormattable, System.IParsable<TSelf>, System.ISpanFormattable, System.ISpanParsable<TSelf>, System.Numerics.IAdditionOperators<TSelf, TSelf, TSelf>, System.Numerics.IAdditiveIdentity<TSelf, TSelf>, System.Numerics.IComparisonOperators<TSelf, TSelf, bool>, System.Numerics.IDecrementOperators<TSelf>, System.Numerics.IDivisionOperators<TSelf, TSelf, TSelf>, System.Numerics.IEqualityOperators<TSelf, TSelf, bool>, System.Numerics.IIncrementOperators<TSelf>, System.Numerics.IModulusOperators<TSelf, TSelf, TSelf>, System.Numerics.IMultiplicativeIdentity<TSelf, TSelf>, System.Numerics.IMultiplyOperators<TSelf, TSelf, TSelf>, System.Numerics.INumberBase<TSelf>, System.Numerics.ISubtractionOperators<TSelf, TSelf, TSelf>, System.Numerics.IUnaryNegationOperators<TSelf, TSelf>, System.Numerics.IUnaryPlusOperators<TSelf, TSelf> where TSelf : System.Numerics.INumber<TSelf>?
{
@@ -10530,6 +10530,15 @@ namespace System.Numerics
public partial interface IUnsignedNumber<TSelf> : System.Numerics.INumberBase<TSelf> where TSelf : System.Numerics.IUnsignedNumber<TSelf>?
{
}
+ public readonly partial struct TotalOrderIeee754Comparer<T> : System.Collections.Generic.IComparer<T>, System.Collections.Generic.IEqualityComparer<T>, System.IEquatable<System.Numerics.TotalOrderIeee754Comparer<T>> where T : System.Numerics.IFloatingPointIeee754<T>?
+ {
+ public int Compare(T? x, T? y) { throw null; }
+ public bool Equals(System.Numerics.TotalOrderIeee754Comparer<T> other) { throw null; }
+ public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; }
+ public bool Equals(T? x, T? y) { throw null; }
+ public override int GetHashCode() { throw null; }
+ public int GetHashCode([System.Diagnostics.CodeAnalysis.DisallowNullAttribute] T obj) { throw null; }
+ }
}
namespace System.Reflection
{
diff --git a/src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj b/src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj
index fc6859854dc..340550dd759 100644
--- a/src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj
+++ b/src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj
@@ -16,6 +16,12 @@
<WithoutCategories Condition="'$(EnableAdditionalTimezoneChecks)' != 'true'">$(WithoutCategories);AdditionalTimezoneChecks</WithoutCategories>
</PropertyGroup>
+ <PropertyGroup Condition="'$(TargetOS)' == 'Browser'">
+ <!-- Workaround for https://github.com/dotnet/runtime/issues/74302 -->
+ <XUnitUseRandomizedTestOrderer>true</XUnitUseRandomizedTestOrderer>
+ <WasmXHarnessMonoArgs>--setenv=XUNIT_RANDOM_ORDER_SEED=1</WasmXHarnessMonoArgs>
+ </PropertyGroup>
+
<ItemGroup>
<RdXmlFile Include="default.rd.xml" />
</ItemGroup>
@@ -113,6 +119,7 @@
<Compile Include="System\NullReferenceExceptionTests.cs" />
<Compile Include="System\Numerics\IExponentialFunctionsTests.cs" />
<Compile Include="System\Numerics\IFloatingPointTests.cs" />
+ <Compile Include="System\Numerics\TotalOrderIeee754ComparerTests.cs" />
<Compile Include="System\ObjectTests.cs" />
<Compile Include="System\ObjectDisposedExceptionTests.cs" />
<Compile Include="System\ObsoleteAttributeTests.cs" />
diff --git a/src/libraries/System.Runtime/tests/System/DoubleTests.cs b/src/libraries/System.Runtime/tests/System/DoubleTests.cs
index 7b61b6cfdc2..22f7a181204 100644
--- a/src/libraries/System.Runtime/tests/System/DoubleTests.cs
+++ b/src/libraries/System.Runtime/tests/System/DoubleTests.cs
@@ -171,6 +171,8 @@ namespace System.Tests
[InlineData(0.0, 3.0, 3.0, 0.0)]
[InlineData(0.0, 10.0, 10.0, 0.0)]
[InlineData(1.0, 1.0, 1.4142135623730950, CrossPlatformMachineEpsilon * 10)]
+ [InlineData(1.0, 1e+10, 1e+10, 0.0)] // dotnet/runtime#75651
+ [InlineData(1.0, 1e+20, 1e+20, 0.0)] // dotnet/runtime#75651
[InlineData(2.7182818284590452, 0.31830988618379067, 2.7368553638387594, CrossPlatformMachineEpsilon * 10)] // x: (e) y: (1 / pi)
[InlineData(2.7182818284590452, 0.43429448190325183, 2.7527563996732919, CrossPlatformMachineEpsilon * 10)] // x: (e) y: (log10(e))
[InlineData(2.7182818284590452, 0.63661977236758134, 2.7918346715914253, CrossPlatformMachineEpsilon * 10)] // x: (e) y: (2 / pi)
@@ -191,7 +193,7 @@ namespace System.Tests
[InlineData(10.0, 0.69314718055994531, 10.023993865417028, CrossPlatformMachineEpsilon * 100)] // y: (ln(2))
[InlineData(10.0, 0.70710678118654752, 10.024968827881711, CrossPlatformMachineEpsilon * 100)] // y: (1 / sqrt(2))
[InlineData(10.0, 0.78539816339744831, 10.030795096853892, CrossPlatformMachineEpsilon * 100)] // y: (pi / 4)
- [InlineData(10.0, 1.0, 10.049875621120890, CrossPlatformMachineEpsilon * 100)] //
+ [InlineData(10.0, 1.0, 10.049875621120890, CrossPlatformMachineEpsilon * 100)] //
[InlineData(10.0, 1.1283791670955126, 10.063460614755501, CrossPlatformMachineEpsilon * 100)] // y: (2 / sqrt(pi))
[InlineData(10.0, 1.4142135623730950, 10.099504938362078, CrossPlatformMachineEpsilon * 100)] // y: (sqrt(2))
[InlineData(10.0, 1.4426950408889634, 10.103532500121213, CrossPlatformMachineEpsilon * 100)] // y: (log2(e))
@@ -664,7 +666,7 @@ namespace System.Tests
[InlineData(-0.0, 2, 0.0, 0.0)]
[InlineData(-0.0, 3, -0.0, 0.0)]
[InlineData(-0.0, 4, 0.0, 0.0)]
- [InlineData(-0.0, 5, -0.0, 0.0)]
+ [InlineData(-0.0, 5, -0.0, 0.0)]
[InlineData( double.NaN, -5, double.NaN, 0.0)]
[InlineData( double.NaN, -4, double.NaN, 0.0)]
[InlineData( double.NaN, -3, double.NaN, 0.0)]
@@ -1470,7 +1472,7 @@ namespace System.Tests
AssertExtensions.Equal(+expectedResult, double.AsinPi(+value), allowedVariance);
}
- [Theory]
+ [Theory]
[InlineData( double.NaN, double.NaN, double.NaN, 0.0)]
[InlineData( 0.0, -1.0, 1.0, CrossPlatformMachineEpsilon)] // y: sinpi(0) x: cospi(1) ; This should be exact, but has an issue on WASM/Unix
[InlineData( 0.0, -0.0, 1.0, CrossPlatformMachineEpsilon)] // y: sinpi(0) x: -cospi(0.5) ; This should be exact, but has an issue on WASM/Unix
@@ -1512,8 +1514,8 @@ namespace System.Tests
[InlineData(-2.1850398632615190, -0.36338022763241866, CrossPlatformMachineEpsilon)]
[InlineData(-1.4406084404920341, -0.30685281944005469, CrossPlatformMachineEpsilon)]
[InlineData(-1.3136757077477542, -0.29289321881345248, CrossPlatformMachineEpsilon)]
- [InlineData(-0.79909939792801821, -0.21460183660255169, CrossPlatformMachineEpsilon)]
- [InlineData( 0.42670634433261806, 0.12837916709551257, CrossPlatformMachineEpsilon)]
+ [InlineData(-0.79909939792801821, -0.21460183660255169, CrossPlatformMachineEpsilon)]
+ [InlineData( 0.42670634433261806, 0.12837916709551257, CrossPlatformMachineEpsilon)]
[InlineData( 3.6202185671074506, 0.41421356237309505, CrossPlatformMachineEpsilon)]
[InlineData( 5.4945259425167300, 0.44269504088896341, CrossPlatformMachineEpsilon)]
[InlineData(-4.4217522209161288, -0.42920367320510338, CrossPlatformMachineEpsilon)]
diff --git a/src/libraries/System.Runtime/tests/System/Numerics/TotalOrderIeee754ComparerTests.cs b/src/libraries/System.Runtime/tests/System/Numerics/TotalOrderIeee754ComparerTests.cs
new file mode 100644
index 00000000000..454a60dff8e
--- /dev/null
+++ b/src/libraries/System.Runtime/tests/System/Numerics/TotalOrderIeee754ComparerTests.cs
@@ -0,0 +1,104 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Collections.Generic;
+using System.Numerics;
+using System.Runtime.InteropServices;
+using Xunit;
+
+namespace System.Runtime.Tests
+{
+ public sealed class TotalOrderIeee754ComparerTests
+ {
+ public static IEnumerable<object[]> SingleTestData
+ {
+ get
+ {
+ yield return new object[] { 0.0f, 0.0f, 0 };
+ yield return new object[] { -0.0f, -0.0f, 0 };
+ yield return new object[] { 0.0f, -0.0f, 1 };
+ yield return new object[] { -0.0f, 0.0f, -1 };
+ yield return new object[] { 0.0f, 1.0f, -1 };
+ yield return new object[] { float.PositiveInfinity, 1.0f, 1 };
+ yield return new object[] { BitConverter.UInt32BitsToSingle(0xFFC00000), float.NegativeInfinity, -1 };
+ yield return new object[] { BitConverter.UInt32BitsToSingle(0xFFC00000), -1.0f, -1 };
+ yield return new object[] { BitConverter.UInt32BitsToSingle(0x7FC00000), 1.0f, 1 };
+ yield return new object[] { BitConverter.UInt32BitsToSingle(0x7FC00000), float.PositiveInfinity, 1 };
+ yield return new object[] { float.NaN, float.NaN, 0 };
+ yield return new object[] { BitConverter.UInt32BitsToSingle(0xFFC00000), BitConverter.UInt32BitsToSingle(0x7FC00000), -1 };
+ yield return new object[] { BitConverter.UInt32BitsToSingle(0x7FC00000), BitConverter.UInt32BitsToSingle(0x7FC00001), -1 }; // implementation defined, not part of IEEE 754 totalOrder
+ }
+ }
+
+ [Theory]
+ [MemberData(nameof(SingleTestData))]
+ public void TotalOrderTestSingle(float x, float y, int result)
+ {
+ var comparer = new TotalOrderIeee754Comparer<float>();
+ Assert.Equal(result, Math.Sign(comparer.Compare(x, y)));
+ }
+
+ public static IEnumerable<object[]> DoubleTestData
+ {
+ get
+ {
+ yield return new object[] { 0.0, 0.0, 0 };
+ yield return new object[] { -0.0, -0.0, 0 };
+ yield return new object[] { 0.0, -0.0, 1 };
+ yield return new object[] { -0.0, 0.0, -1 };
+ yield return new object[] { 0.0, 1.0, -1 };
+ yield return new object[] { double.PositiveInfinity, 1.0, 1 };
+ yield return new object[] { BitConverter.UInt64BitsToDouble(0xFFF80000_00000000), double.NegativeInfinity, -1 };
+ yield return new object[] { BitConverter.UInt64BitsToDouble(0xFFF80000_00000000), -1.0, -1 };
+ yield return new object[] { BitConverter.UInt64BitsToDouble(0x7FF80000_00000000), 1.0, 1 };
+ yield return new object[] { BitConverter.UInt64BitsToDouble(0x7FF80000_00000000), double.PositiveInfinity, 1 };
+ yield return new object[] { double.NaN, double.NaN, 0 };
+ yield return new object[] { BitConverter.UInt64BitsToDouble(0xFFF80000_00000000), BitConverter.UInt64BitsToDouble(0x7FF80000_00000000), -1 };
+ yield return new object[] { BitConverter.UInt64BitsToDouble(0x7FF80000_00000000), BitConverter.UInt64BitsToDouble(0x7FF80000_00000001), -1 }; // implementation defined, not part of IEEE 754 totalOrder
+ }
+ }
+
+ [Theory]
+ [MemberData(nameof(DoubleTestData))]
+ public void TotalOrderTestDouble(double x, double y, int result)
+ {
+ var comparer = new TotalOrderIeee754Comparer<double>();
+ Assert.Equal(result, Math.Sign(comparer.Compare(x, y)));
+ }
+ public static IEnumerable<object[]> HalfTestData
+ {
+ get
+ {
+ yield return new object[] { (Half)0.0, (Half)0.0, 0 };
+ yield return new object[] { (Half)(-0.0), (Half)(-0.0), 0 };
+ yield return new object[] { (Half)0.0, (Half)(-0.0), 1 };
+ yield return new object[] { (Half)(-0.0), (Half)0.0, -1 };
+ yield return new object[] { (Half)0.0, (Half)1.0, -1 };
+ yield return new object[] { Half.PositiveInfinity, (Half)1.0, 1 };
+ yield return new object[] { BitConverter.UInt16BitsToHalf(0xFE00), Half.NegativeInfinity, -1 };
+ yield return new object[] { BitConverter.UInt16BitsToHalf(0xFE00), (Half)(-1.0), -1 };
+ yield return new object[] { BitConverter.UInt16BitsToHalf(0x7E00), (Half)1.0, 1 };
+ yield return new object[] { BitConverter.UInt16BitsToHalf(0x7E00), Half.PositiveInfinity, 1 };
+ yield return new object[] { Half.NaN, Half.NaN, 0 };
+ yield return new object[] { BitConverter.UInt16BitsToHalf(0xFE00), BitConverter.UInt16BitsToHalf(0x7E00), -1 };
+ yield return new object[] { BitConverter.UInt16BitsToHalf(0x7E00), BitConverter.UInt16BitsToHalf(0x7E01), -1 }; // implementation defined, not part of IEEE 754 totalOrder
+ }
+ }
+
+ [Theory]
+ [MemberData(nameof(HalfTestData))]
+ public void TotalOrderTestHalf(Half x, Half y, int result)
+ {
+ var comparer = new TotalOrderIeee754Comparer<Half>();
+ Assert.Equal(result, Math.Sign(comparer.Compare(x, y)));
+ }
+
+ [Theory]
+ [MemberData(nameof(SingleTestData))]
+ public void TotalOrderTestNFloat(float x, float y, int result)
+ {
+ var comparer = new TotalOrderIeee754Comparer<NFloat>();
+ Assert.Equal(result, Math.Sign(comparer.Compare(x, y)));
+ }
+ }
+}
diff --git a/src/libraries/System.Runtime/tests/System/Reflection/ModuleTests.cs b/src/libraries/System.Runtime/tests/System/Reflection/ModuleTests.cs
index f5b715978da..0a7ee75440f 100644
--- a/src/libraries/System.Runtime/tests/System/Reflection/ModuleTests.cs
+++ b/src/libraries/System.Runtime/tests/System/Reflection/ModuleTests.cs
@@ -164,8 +164,6 @@ namespace System.Reflection.Tests
}
[Fact]
- [ActiveIssue("https://github.com/dotnet/runtime/issues/60558", TestPlatforms.Android)]
- [ActiveIssue("https://github.com/dotnet/runtime/issues/64675", typeof(PlatformDetection), nameof(PlatformDetection.IsArmv6Process))]
public void GetField()
{
FieldInfo testInt = TestModule.GetField("TestInt", BindingFlags.Public | BindingFlags.Static);
diff --git a/src/libraries/System.Runtime/tests/System/SingleTests.cs b/src/libraries/System.Runtime/tests/System/SingleTests.cs
index 72ac8fa1063..4f1811aa68f 100644
--- a/src/libraries/System.Runtime/tests/System/SingleTests.cs
+++ b/src/libraries/System.Runtime/tests/System/SingleTests.cs
@@ -168,6 +168,8 @@ namespace System.Tests
[InlineData(0.0f, 3.0f, 3.0f, 0.0f)]
[InlineData(0.0f, 10.0f, 10.0f, 0.0f)]
[InlineData(1.0f, 1.0f, 1.41421356f, CrossPlatformMachineEpsilon * 10)]
+ [InlineData(1.0f, 1e+10f, 1e+10f, 0.0)] // dotnet/runtime#75651
+ [InlineData(1.0f, 1e+20f, 1e+20f, 0.0)] // dotnet/runtime#75651
[InlineData(2.71828183f, 0.318309886f, 2.73685536f, CrossPlatformMachineEpsilon * 10)] // x: (e) y: (1 / pi)
[InlineData(2.71828183f, 0.434294482f, 2.75275640f, CrossPlatformMachineEpsilon * 10)] // x: (e) y: (log10(e))
[InlineData(2.71828183f, 0.636619772f, 2.79183467f, CrossPlatformMachineEpsilon * 10)] // x: (e) y: (2 / pi)
@@ -188,7 +190,7 @@ namespace System.Tests
[InlineData(10.0f, 0.693147181f, 10.0239939f, CrossPlatformMachineEpsilon * 100)] // y: (ln(2))
[InlineData(10.0f, 0.707106781f, 10.0249688f, CrossPlatformMachineEpsilon * 100)] // y: (1 / sqrt(2))
[InlineData(10.0f, 0.785398163f, 10.0307951f, CrossPlatformMachineEpsilon * 100)] // y: (pi / 4)
- [InlineData(10.0f, 1.0f, 10.0498756f, CrossPlatformMachineEpsilon * 100)] //
+ [InlineData(10.0f, 1.0f, 10.0498756f, CrossPlatformMachineEpsilon * 100)] //
[InlineData(10.0f, 1.12837917f, 10.0634606f, CrossPlatformMachineEpsilon * 100)] // y: (2 / sqrt(pi))
[InlineData(10.0f, 1.41421356f, 10.0995049f, CrossPlatformMachineEpsilon * 100)] // y: (sqrt(2))
[InlineData(10.0f, 1.44269504f, 10.1035325f, CrossPlatformMachineEpsilon * 100)] // y: (log2(e))
@@ -603,7 +605,7 @@ namespace System.Tests
[InlineData(-0.0f, 2, 0.0f, 0.0f)]
[InlineData(-0.0f, 3, -0.0f, 0.0f)]
[InlineData(-0.0f, 4, 0.0f, 0.0f)]
- [InlineData(-0.0f, 5, -0.0f, 0.0f)]
+ [InlineData(-0.0f, 5, -0.0f, 0.0f)]
[InlineData( float.NaN, -5, float.NaN, 0.0f)]
[InlineData( float.NaN, -4, float.NaN, 0.0f)]
[InlineData( float.NaN, -3, float.NaN, 0.0f)]
@@ -1383,7 +1385,7 @@ namespace System.Tests
AssertExtensions.Equal(+expectedResult, float.AsinPi(+value), allowedVariance);
}
- [Theory]
+ [Theory]
[InlineData( float.NaN, float.NaN, float.NaN, 0.0f)]
[InlineData( 0.0f, -1.0f, 1.0f, CrossPlatformMachineEpsilon)] // y: sinpi(0) x: cospi(1) ; This should be exact, but has an issue on WASM/Unix
[InlineData( 0.0f, -0.0f, 1.0f, CrossPlatformMachineEpsilon)] // y: sinpi(0) x: -cospi(0.5) ; This should be exact, but has an issue on WASM/Unix
@@ -1425,8 +1427,8 @@ namespace System.Tests
[InlineData(-2.18503986f, -0.363380228f, CrossPlatformMachineEpsilon)]
[InlineData(-1.44060844f, -0.306852819f, CrossPlatformMachineEpsilon)]
[InlineData(-1.31367571f, -0.292893219f, CrossPlatformMachineEpsilon)]
- [InlineData(-0.79909940f, -0.214601837f, CrossPlatformMachineEpsilon)]
- [InlineData( 0.42670634f, 0.128379167f, CrossPlatformMachineEpsilon)]
+ [InlineData(-0.79909940f, -0.214601837f, CrossPlatformMachineEpsilon)]
+ [InlineData( 0.42670634f, 0.128379167f, CrossPlatformMachineEpsilon)]
[InlineData( 3.62021857f, 0.414213562f, CrossPlatformMachineEpsilon)]
[InlineData( 5.49452594f, 0.442695041f, CrossPlatformMachineEpsilon)]
[InlineData(-4.42175222f, -0.429203673f, CrossPlatformMachineEpsilon)]
diff --git a/src/libraries/System.Runtime/tests/TestModule/System.Reflection.TestModule.il b/src/libraries/System.Runtime/tests/TestModule/System.Reflection.TestModule.il
index b2d99fc7a8c..3df2bf787c8 100644
--- a/src/libraries/System.Runtime/tests/TestModule/System.Reflection.TestModule.il
+++ b/src/libraries/System.Runtime/tests/TestModule/System.Reflection.TestModule.il
@@ -22,7 +22,7 @@
{
ldc.i4.1
stsfld int32 TestInt
- ldc.i4.2
+ ldc.i8 2
stsfld int64 TestLong
ret
}
diff --git a/src/libraries/System.Security.Cryptography.Pkcs/src/System.Security.Cryptography.Pkcs.csproj b/src/libraries/System.Security.Cryptography.Pkcs/src/System.Security.Cryptography.Pkcs.csproj
index be33237e616..32918039a8a 100644
--- a/src/libraries/System.Security.Cryptography.Pkcs/src/System.Security.Cryptography.Pkcs.csproj
+++ b/src/libraries/System.Security.Cryptography.Pkcs/src/System.Security.Cryptography.Pkcs.csproj
@@ -189,8 +189,6 @@ System.Security.Cryptography.Pkcs.EnvelopedCms</PackageDescription>
Link="Common\Interop\Windows\Crypt32\Interop.CERT_PUBLIC_KEY_INFO.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Crypt32\Interop.CertContextPropId.cs"
Link="Common\Interop\Windows\Crypt32\Interop.CertContextPropId.cs" />
- <Compile Include="$(CommonPath)Interop\Windows\Crypt32\Interop.CertCreateCertificateContext.cs"
- Link="Common\Interop\Windows\Crypt32\Interop.CertCreateCertificateContext.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Crypt32\Interop.CertDuplicateCertificateContext_IntPtr.cs"
Link="Common\Interop\Windows\Crypt32\Interop.CertDuplicateCertificateContext_IntPtr.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Crypt32\Interop.CertFreeCertificateContext.cs"
diff --git a/src/libraries/System.Security.Cryptography.X509Certificates/System.Security.Cryptography.X509Certificates.sln b/src/libraries/System.Security.Cryptography.X509Certificates/System.Security.Cryptography.X509Certificates.sln
index 9de7c6d84b0..97585d8d9d6 100644
--- a/src/libraries/System.Security.Cryptography.X509Certificates/System.Security.Cryptography.X509Certificates.sln
+++ b/src/libraries/System.Security.Cryptography.X509Certificates/System.Security.Cryptography.X509Certificates.sln
@@ -7,24 +7,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Collections", "..\Sy
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Formats.Asn1", "..\System.Formats.Asn1\ref\System.Formats.Asn1.csproj", "{C3DE7458-876F-498F-8731-0458F0E34B9D}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Formats.Asn1", "..\System.Formats.Asn1\src\System.Formats.Asn1.csproj", "{C2D74126-653E-41C9-9CF8-E58F1FD110B8}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Net.Primitives", "..\System.Net.Primitives\ref\System.Net.Primitives.csproj", "{62F930A9-0CCF-4474-A64A-0E2BD9115B31}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{7AD6D18A-FEF8-4E9D-B256-A4B9FD82DFE8}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{8A203663-E5D7-494B-93F9-F1205E9164BD}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.InteropServices", "..\System.Runtime.InteropServices\ref\System.Runtime.InteropServices.csproj", "{0F2EDD4D-E136-4688-B0E2-F379058F4A5A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Numerics", "..\System.Runtime.Numerics\ref\System.Runtime.Numerics.csproj", "{3DD1C7CF-5E6B-42C8-89C8-9F6AE60F3944}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{95871762-4C0B-466C-BD4B-ACECD1855D93}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptography.Pkcs", "..\System.Security.Cryptography.Pkcs\ref\System.Security.Cryptography.Pkcs.csproj", "{9E04AD65-21BC-4FF4-B38C-9B17488AACA5}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptography.Pkcs", "..\System.Security.Cryptography.Pkcs\src\System.Security.Cryptography.Pkcs.csproj", "{76812DB0-A6A2-4F0C-B560-18FC7A97E419}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptography.X509Certificates", "ref\System.Security.Cryptography.X509Certificates.csproj", "{4EC57148-D181-49B9-BDAF-1735D4687C79}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptography.X509Certificates", "src\System.Security.Cryptography.X509Certificates.csproj", "{2A203F48-05D2-4E45-8A98-98F02EE639A8}"
@@ -35,8 +25,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{C79093E1-DEC
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D171D0CF-B04B-4D8A-A678-7BB41E4A96FD}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{A00A0A16-D202-49A0-B2C0-C3BB53FA858D}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -59,22 +47,10 @@ Global
{C3DE7458-876F-498F-8731-0458F0E34B9D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C3DE7458-876F-498F-8731-0458F0E34B9D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C3DE7458-876F-498F-8731-0458F0E34B9D}.Release|Any CPU.Build.0 = Release|Any CPU
- {C2D74126-653E-41C9-9CF8-E58F1FD110B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C2D74126-653E-41C9-9CF8-E58F1FD110B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C2D74126-653E-41C9-9CF8-E58F1FD110B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C2D74126-653E-41C9-9CF8-E58F1FD110B8}.Release|Any CPU.Build.0 = Release|Any CPU
{62F930A9-0CCF-4474-A64A-0E2BD9115B31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{62F930A9-0CCF-4474-A64A-0E2BD9115B31}.Debug|Any CPU.Build.0 = Debug|Any CPU
{62F930A9-0CCF-4474-A64A-0E2BD9115B31}.Release|Any CPU.ActiveCfg = Release|Any CPU
{62F930A9-0CCF-4474-A64A-0E2BD9115B31}.Release|Any CPU.Build.0 = Release|Any CPU
- {7AD6D18A-FEF8-4E9D-B256-A4B9FD82DFE8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7AD6D18A-FEF8-4E9D-B256-A4B9FD82DFE8}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7AD6D18A-FEF8-4E9D-B256-A4B9FD82DFE8}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7AD6D18A-FEF8-4E9D-B256-A4B9FD82DFE8}.Release|Any CPU.Build.0 = Release|Any CPU
- {8A203663-E5D7-494B-93F9-F1205E9164BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {8A203663-E5D7-494B-93F9-F1205E9164BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {8A203663-E5D7-494B-93F9-F1205E9164BD}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {8A203663-E5D7-494B-93F9-F1205E9164BD}.Release|Any CPU.Build.0 = Release|Any CPU
{0F2EDD4D-E136-4688-B0E2-F379058F4A5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0F2EDD4D-E136-4688-B0E2-F379058F4A5A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0F2EDD4D-E136-4688-B0E2-F379058F4A5A}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -87,14 +63,6 @@ Global
{95871762-4C0B-466C-BD4B-ACECD1855D93}.Debug|Any CPU.Build.0 = Debug|Any CPU
{95871762-4C0B-466C-BD4B-ACECD1855D93}.Release|Any CPU.ActiveCfg = Release|Any CPU
{95871762-4C0B-466C-BD4B-ACECD1855D93}.Release|Any CPU.Build.0 = Release|Any CPU
- {9E04AD65-21BC-4FF4-B38C-9B17488AACA5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {9E04AD65-21BC-4FF4-B38C-9B17488AACA5}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {9E04AD65-21BC-4FF4-B38C-9B17488AACA5}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {9E04AD65-21BC-4FF4-B38C-9B17488AACA5}.Release|Any CPU.Build.0 = Release|Any CPU
- {76812DB0-A6A2-4F0C-B560-18FC7A97E419}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {76812DB0-A6A2-4F0C-B560-18FC7A97E419}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {76812DB0-A6A2-4F0C-B560-18FC7A97E419}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {76812DB0-A6A2-4F0C-B560-18FC7A97E419}.Release|Any CPU.Build.0 = Release|Any CPU
{4EC57148-D181-49B9-BDAF-1735D4687C79}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4EC57148-D181-49B9-BDAF-1735D4687C79}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4EC57148-D181-49B9-BDAF-1735D4687C79}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -120,14 +88,9 @@ Global
{0F2EDD4D-E136-4688-B0E2-F379058F4A5A} = {C79093E1-DEC3-4A35-93CB-216D1E87ACDD}
{3DD1C7CF-5E6B-42C8-89C8-9F6AE60F3944} = {C79093E1-DEC3-4A35-93CB-216D1E87ACDD}
{95871762-4C0B-466C-BD4B-ACECD1855D93} = {C79093E1-DEC3-4A35-93CB-216D1E87ACDD}
- {9E04AD65-21BC-4FF4-B38C-9B17488AACA5} = {C79093E1-DEC3-4A35-93CB-216D1E87ACDD}
{4EC57148-D181-49B9-BDAF-1735D4687C79} = {C79093E1-DEC3-4A35-93CB-216D1E87ACDD}
{2BD68AE2-342C-4CA2-ABDC-288E47F876A3} = {C79093E1-DEC3-4A35-93CB-216D1E87ACDD}
- {C2D74126-653E-41C9-9CF8-E58F1FD110B8} = {D171D0CF-B04B-4D8A-A678-7BB41E4A96FD}
- {76812DB0-A6A2-4F0C-B560-18FC7A97E419} = {D171D0CF-B04B-4D8A-A678-7BB41E4A96FD}
{2A203F48-05D2-4E45-8A98-98F02EE639A8} = {D171D0CF-B04B-4D8A-A678-7BB41E4A96FD}
- {7AD6D18A-FEF8-4E9D-B256-A4B9FD82DFE8} = {A00A0A16-D202-49A0-B2C0-C3BB53FA858D}
- {8A203663-E5D7-494B-93F9-F1205E9164BD} = {A00A0A16-D202-49A0-B2C0-C3BB53FA858D}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5ED3739E-C629-4900-BC1B-DF714AB4BB45}
diff --git a/src/libraries/System.Security.Cryptography.Xml/ref/System.Security.Cryptography.Xml.cs b/src/libraries/System.Security.Cryptography.Xml/ref/System.Security.Cryptography.Xml.cs
index 2ee83409beb..d53d23b1c55 100644
--- a/src/libraries/System.Security.Cryptography.Xml/ref/System.Security.Cryptography.Xml.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/ref/System.Security.Cryptography.Xml.cs
@@ -11,8 +11,10 @@ namespace System.Security.Cryptography.Xml
public CipherData() { }
public CipherData(byte[] cipherValue) { }
public CipherData(System.Security.Cryptography.Xml.CipherReference cipherReference) { }
- public System.Security.Cryptography.Xml.CipherReference CipherReference { get { throw null; } set { } }
- public byte[] CipherValue { get { throw null; } set { } }
+ [System.Diagnostics.CodeAnalysis.DisallowNullAttribute]
+ public System.Security.Cryptography.Xml.CipherReference? CipherReference { get { throw null; } set { } }
+ [System.Diagnostics.CodeAnalysis.DisallowNullAttribute]
+ public byte[]? CipherValue { get { throw null; } set { } }
public System.Xml.XmlElement GetXml() { throw null; }
public void LoadXml(System.Xml.XmlElement value) { }
}
@@ -29,9 +31,9 @@ namespace System.Security.Cryptography.Xml
public DataObject() { }
public DataObject(string id, string mimeType, string encoding, System.Xml.XmlElement data) { }
public System.Xml.XmlNodeList Data { get { throw null; } set { } }
- public string Encoding { get { throw null; } set { } }
- public string Id { get { throw null; } set { } }
- public string MimeType { get { throw null; } set { } }
+ public string? Encoding { get { throw null; } set { } }
+ public string? Id { get { throw null; } set { } }
+ public string? MimeType { get { throw null; } set { } }
public System.Xml.XmlElement GetXml() { throw null; }
public void LoadXml(System.Xml.XmlElement value) { }
}
@@ -60,7 +62,8 @@ namespace System.Security.Cryptography.Xml
public sealed partial class EncryptedKey : System.Security.Cryptography.Xml.EncryptedType
{
public EncryptedKey() { }
- public string CarriedKeyName { get { throw null; } set { } }
+ public string? CarriedKeyName { get { throw null; } set { } }
+ [System.Diagnostics.CodeAnalysis.AllowNullAttribute]
public string Recipient { get { throw null; } set { } }
public System.Security.Cryptography.Xml.ReferenceList ReferenceList { get { throw null; } }
public void AddReference(System.Security.Cryptography.Xml.DataReference dataReference) { }
@@ -74,7 +77,7 @@ namespace System.Security.Cryptography.Xml
protected EncryptedReference(string uri) { }
protected EncryptedReference(string uri, System.Security.Cryptography.Xml.TransformChain transformChain) { }
protected internal bool CacheValid { get { throw null; } }
- protected string ReferenceType { get { throw null; } set { } }
+ protected string? ReferenceType { get { throw null; } set { } }
public System.Security.Cryptography.Xml.TransformChain TransformChain { get { throw null; } set { } }
public string Uri { get { throw null; } set { } }
public void AddTransform(System.Security.Cryptography.Xml.Transform transform) { }
@@ -85,13 +88,14 @@ namespace System.Security.Cryptography.Xml
{
protected EncryptedType() { }
public virtual System.Security.Cryptography.Xml.CipherData CipherData { get { throw null; } set { } }
- public virtual string Encoding { get { throw null; } set { } }
- public virtual System.Security.Cryptography.Xml.EncryptionMethod EncryptionMethod { get { throw null; } set { } }
+ public virtual string? Encoding { get { throw null; } set { } }
+ public virtual System.Security.Cryptography.Xml.EncryptionMethod? EncryptionMethod { get { throw null; } set { } }
public virtual System.Security.Cryptography.Xml.EncryptionPropertyCollection EncryptionProperties { get { throw null; } }
- public virtual string Id { get { throw null; } set { } }
+ public virtual string? Id { get { throw null; } set { } }
+ [System.Diagnostics.CodeAnalysis.AllowNullAttribute]
public System.Security.Cryptography.Xml.KeyInfo KeyInfo { get { throw null; } set { } }
- public virtual string MimeType { get { throw null; } set { } }
- public virtual string Type { get { throw null; } set { } }
+ public virtual string? MimeType { get { throw null; } set { } }
+ public virtual string? Type { get { throw null; } set { } }
public void AddProperty(System.Security.Cryptography.Xml.EncryptionProperty ep) { }
public abstract System.Xml.XmlElement GetXml();
public abstract void LoadXml(System.Xml.XmlElement value);
@@ -117,19 +121,20 @@ namespace System.Security.Cryptography.Xml
public const string XmlEncTripleDESUrl = "http://www.w3.org/2001/04/xmlenc#tripledes-cbc";
public EncryptedXml() { }
public EncryptedXml(System.Xml.XmlDocument document) { }
- public EncryptedXml(System.Xml.XmlDocument document, System.Security.Policy.Evidence evidence) { }
- public System.Security.Policy.Evidence DocumentEvidence { get { throw null; } set { } }
+ public EncryptedXml(System.Xml.XmlDocument document, System.Security.Policy.Evidence? evidence) { }
+ public System.Security.Policy.Evidence? DocumentEvidence { get { throw null; } set { } }
public System.Text.Encoding Encoding { get { throw null; } set { } }
public System.Security.Cryptography.CipherMode Mode { get { throw null; } set { } }
public System.Security.Cryptography.PaddingMode Padding { get { throw null; } set { } }
+ [System.Diagnostics.CodeAnalysis.AllowNullAttribute]
public string Recipient { get { throw null; } set { } }
- public System.Xml.XmlResolver Resolver { get { throw null; } set { } }
+ public System.Xml.XmlResolver? Resolver { get { throw null; } set { } }
public int XmlDSigSearchDepth { get { throw null; } set { } }
public void AddKeyNameMapping(string keyName, object keyObject) { }
public void ClearKeyNameMappings() { }
public byte[] DecryptData(System.Security.Cryptography.Xml.EncryptedData encryptedData, System.Security.Cryptography.SymmetricAlgorithm symmetricAlgorithm) { throw null; }
public void DecryptDocument() { }
- public virtual byte[] DecryptEncryptedKey(System.Security.Cryptography.Xml.EncryptedKey encryptedKey) { throw null; }
+ public virtual byte[]? DecryptEncryptedKey(System.Security.Cryptography.Xml.EncryptedKey encryptedKey) { throw null; }
public static byte[] DecryptKey(byte[] keyData, System.Security.Cryptography.RSA rsa, bool useOAEP) { throw null; }
public static byte[] DecryptKey(byte[] keyData, System.Security.Cryptography.SymmetricAlgorithm symmetricAlgorithm) { throw null; }
public System.Security.Cryptography.Xml.EncryptedData Encrypt(System.Xml.XmlElement inputElement, System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) { throw null; }
@@ -138,17 +143,17 @@ namespace System.Security.Cryptography.Xml
public byte[] EncryptData(System.Xml.XmlElement inputElement, System.Security.Cryptography.SymmetricAlgorithm symmetricAlgorithm, bool content) { throw null; }
public static byte[] EncryptKey(byte[] keyData, System.Security.Cryptography.RSA rsa, bool useOAEP) { throw null; }
public static byte[] EncryptKey(byte[] keyData, System.Security.Cryptography.SymmetricAlgorithm symmetricAlgorithm) { throw null; }
- public virtual byte[] GetDecryptionIV(System.Security.Cryptography.Xml.EncryptedData encryptedData, string symmetricAlgorithmUri) { throw null; }
- public virtual System.Security.Cryptography.SymmetricAlgorithm GetDecryptionKey(System.Security.Cryptography.Xml.EncryptedData encryptedData, string symmetricAlgorithmUri) { throw null; }
- public virtual System.Xml.XmlElement GetIdElement(System.Xml.XmlDocument document, string idValue) { throw null; }
+ public virtual byte[] GetDecryptionIV(System.Security.Cryptography.Xml.EncryptedData encryptedData, string? symmetricAlgorithmUri) { throw null; }
+ public virtual System.Security.Cryptography.SymmetricAlgorithm? GetDecryptionKey(System.Security.Cryptography.Xml.EncryptedData encryptedData, string? symmetricAlgorithmUri) { throw null; }
+ public virtual System.Xml.XmlElement? GetIdElement(System.Xml.XmlDocument document, string idValue) { throw null; }
public void ReplaceData(System.Xml.XmlElement inputElement, byte[] decryptedData) { }
public static void ReplaceElement(System.Xml.XmlElement inputElement, System.Security.Cryptography.Xml.EncryptedData encryptedData, bool content) { }
}
public partial class EncryptionMethod
{
public EncryptionMethod() { }
- public EncryptionMethod(string algorithm) { }
- public string KeyAlgorithm { get { throw null; } set { } }
+ public EncryptionMethod(string? algorithm) { }
+ public string? KeyAlgorithm { get { throw null; } set { } }
public int KeySize { get { throw null; } set { } }
public System.Xml.XmlElement GetXml() { throw null; }
public void LoadXml(System.Xml.XmlElement value) { }
@@ -157,9 +162,10 @@ namespace System.Security.Cryptography.Xml
{
public EncryptionProperty() { }
public EncryptionProperty(System.Xml.XmlElement elementProperty) { }
- public string Id { get { throw null; } }
- public System.Xml.XmlElement PropertyElement { get { throw null; } set { } }
- public string Target { get { throw null; } }
+ public string? Id { get { throw null; } }
+ [System.Diagnostics.CodeAnalysis.DisallowNullAttribute]
+ public System.Xml.XmlElement? PropertyElement { get { throw null; } set { } }
+ public string? Target { get { throw null; } }
public System.Xml.XmlElement GetXml() { throw null; }
public void LoadXml(System.Xml.XmlElement value) { }
}
@@ -173,7 +179,7 @@ namespace System.Security.Cryptography.Xml
[System.Runtime.CompilerServices.IndexerName("ItemOf")]
public System.Security.Cryptography.Xml.EncryptionProperty this[int index] { get { throw null; } set { } }
public object SyncRoot { get { throw null; } }
- object System.Collections.IList.this[int index] { get { throw null; } set { } }
+ object? System.Collections.IList.this[int index] { get { throw null; } set { } }
public int Add(System.Security.Cryptography.Xml.EncryptionProperty value) { throw null; }
public void Clear() { }
public bool Contains(System.Security.Cryptography.Xml.EncryptionProperty value) { throw null; }
@@ -185,11 +191,11 @@ namespace System.Security.Cryptography.Xml
public System.Security.Cryptography.Xml.EncryptionProperty Item(int index) { throw null; }
public void Remove(System.Security.Cryptography.Xml.EncryptionProperty value) { }
public void RemoveAt(int index) { }
- int System.Collections.IList.Add(object value) { throw null; }
- bool System.Collections.IList.Contains(object value) { throw null; }
- int System.Collections.IList.IndexOf(object value) { throw null; }
- void System.Collections.IList.Insert(int index, object value) { }
- void System.Collections.IList.Remove(object value) { }
+ int System.Collections.IList.Add(object? value) { throw null; }
+ bool System.Collections.IList.Contains(object? value) { throw null; }
+ int System.Collections.IList.IndexOf(object? value) { throw null; }
+ void System.Collections.IList.Insert(int index, object? value) { }
+ void System.Collections.IList.Remove(object? value) { }
}
public partial interface IRelDecryptor
{
@@ -199,7 +205,7 @@ namespace System.Security.Cryptography.Xml
{
public KeyInfo() { }
public int Count { get { throw null; } }
- public string Id { get { throw null; } set { } }
+ public string? Id { get { throw null; } set { } }
public void AddClause(System.Security.Cryptography.Xml.KeyInfoClause clause) { }
public System.Collections.IEnumerator GetEnumerator() { throw null; }
public System.Collections.IEnumerator GetEnumerator(System.Type requestedObjectType) { throw null; }
@@ -216,15 +222,15 @@ namespace System.Security.Cryptography.Xml
{
public KeyInfoEncryptedKey() { }
public KeyInfoEncryptedKey(System.Security.Cryptography.Xml.EncryptedKey encryptedKey) { }
- public System.Security.Cryptography.Xml.EncryptedKey EncryptedKey { get { throw null; } set { } }
+ public System.Security.Cryptography.Xml.EncryptedKey? EncryptedKey { get { throw null; } set { } }
public override System.Xml.XmlElement GetXml() { throw null; }
public override void LoadXml(System.Xml.XmlElement value) { }
}
public partial class KeyInfoName : System.Security.Cryptography.Xml.KeyInfoClause
{
public KeyInfoName() { }
- public KeyInfoName(string keyName) { }
- public string Value { get { throw null; } set { } }
+ public KeyInfoName(string? keyName) { }
+ public string? Value { get { throw null; } set { } }
public override System.Xml.XmlElement GetXml() { throw null; }
public override void LoadXml(System.Xml.XmlElement value) { }
}
@@ -232,17 +238,17 @@ namespace System.Security.Cryptography.Xml
{
public KeyInfoNode() { }
public KeyInfoNode(System.Xml.XmlElement node) { }
- public System.Xml.XmlElement Value { get { throw null; } set { } }
+ public System.Xml.XmlElement? Value { get { throw null; } set { } }
public override System.Xml.XmlElement GetXml() { throw null; }
public override void LoadXml(System.Xml.XmlElement value) { }
}
public partial class KeyInfoRetrievalMethod : System.Security.Cryptography.Xml.KeyInfoClause
{
public KeyInfoRetrievalMethod() { }
- public KeyInfoRetrievalMethod(string strUri) { }
+ public KeyInfoRetrievalMethod(string? strUri) { }
public KeyInfoRetrievalMethod(string strUri, string typeName) { }
- public string Type { get { throw null; } set { } }
- public string Uri { get { throw null; } set { } }
+ public string? Type { get { throw null; } set { } }
+ public string? Uri { get { throw null; } set { } }
public override System.Xml.XmlElement GetXml() { throw null; }
public override void LoadXml(System.Xml.XmlElement value) { }
}
@@ -252,11 +258,11 @@ namespace System.Security.Cryptography.Xml
public KeyInfoX509Data(byte[] rgbCert) { }
public KeyInfoX509Data(System.Security.Cryptography.X509Certificates.X509Certificate cert) { }
public KeyInfoX509Data(System.Security.Cryptography.X509Certificates.X509Certificate cert, System.Security.Cryptography.X509Certificates.X509IncludeOption includeOption) { }
- public System.Collections.ArrayList Certificates { get { throw null; } }
- public byte[] CRL { get { throw null; } set { } }
- public System.Collections.ArrayList IssuerSerials { get { throw null; } }
- public System.Collections.ArrayList SubjectKeyIds { get { throw null; } }
- public System.Collections.ArrayList SubjectNames { get { throw null; } }
+ public System.Collections.ArrayList? Certificates { get { throw null; } }
+ public byte[]? CRL { get { throw null; } set { } }
+ public System.Collections.ArrayList? IssuerSerials { get { throw null; } }
+ public System.Collections.ArrayList? SubjectKeyIds { get { throw null; } }
+ public System.Collections.ArrayList? SubjectNames { get { throw null; } }
public void AddCertificate(System.Security.Cryptography.X509Certificates.X509Certificate certificate) { }
public void AddIssuerSerial(string issuerName, string serialNumber) { }
public void AddSubjectKeyId(byte[] subjectKeyId) { }
@@ -275,13 +281,13 @@ namespace System.Security.Cryptography.Xml
{
public Reference() { }
public Reference(System.IO.Stream stream) { }
- public Reference(string uri) { }
+ public Reference(string? uri) { }
public string DigestMethod { get { throw null; } set { } }
- public byte[] DigestValue { get { throw null; } set { } }
- public string Id { get { throw null; } set { } }
+ public byte[]? DigestValue { get { throw null; } set { } }
+ public string? Id { get { throw null; } set { } }
public System.Security.Cryptography.Xml.TransformChain TransformChain { get { throw null; } set { } }
- public string Type { get { throw null; } set { } }
- public string Uri { get { throw null; } set { } }
+ public string? Type { get { throw null; } set { } }
+ public string? Uri { get { throw null; } set { } }
public void AddTransform(System.Security.Cryptography.Xml.Transform transform) { }
public System.Xml.XmlElement GetXml() { throw null; }
public void LoadXml(System.Xml.XmlElement value) { }
@@ -296,16 +302,16 @@ namespace System.Security.Cryptography.Xml
public object SyncRoot { get { throw null; } }
bool System.Collections.IList.IsFixedSize { get { throw null; } }
bool System.Collections.IList.IsReadOnly { get { throw null; } }
- object System.Collections.IList.this[int index] { get { throw null; } set { } }
- public int Add(object value) { throw null; }
+ object? System.Collections.IList.this[int index] { get { throw null; } set { } }
+ public int Add(object? value) { throw null; }
public void Clear() { }
- public bool Contains(object value) { throw null; }
+ public bool Contains(object? value) { throw null; }
public void CopyTo(System.Array array, int index) { }
public System.Collections.IEnumerator GetEnumerator() { throw null; }
- public int IndexOf(object value) { throw null; }
- public void Insert(int index, object value) { }
- public System.Security.Cryptography.Xml.EncryptedReference Item(int index) { throw null; }
- public void Remove(object value) { }
+ public int IndexOf(object? value) { throw null; }
+ public void Insert(int index, object? value) { }
+ public System.Security.Cryptography.Xml.EncryptedReference? Item(int index) { throw null; }
+ public void Remove(object? value) { }
public void RemoveAt(int index) { }
}
public partial class RSAKeyValue : System.Security.Cryptography.Xml.KeyInfoClause
@@ -319,11 +325,11 @@ namespace System.Security.Cryptography.Xml
public partial class Signature
{
public Signature() { }
- public string Id { get { throw null; } set { } }
+ public string? Id { get { throw null; } set { } }
public System.Security.Cryptography.Xml.KeyInfo KeyInfo { get { throw null; } set { } }
public System.Collections.IList ObjectList { get { throw null; } set { } }
- public byte[] SignatureValue { get { throw null; } set { } }
- public System.Security.Cryptography.Xml.SignedInfo SignedInfo { get { throw null; } set { } }
+ public byte[]? SignatureValue { get { throw null; } set { } }
+ public System.Security.Cryptography.Xml.SignedInfo? SignedInfo { get { throw null; } set { } }
public void AddObject(System.Security.Cryptography.Xml.DataObject dataObject) { }
public System.Xml.XmlElement GetXml() { throw null; }
public void LoadXml(System.Xml.XmlElement value) { }
@@ -331,15 +337,16 @@ namespace System.Security.Cryptography.Xml
public partial class SignedInfo : System.Collections.ICollection, System.Collections.IEnumerable
{
public SignedInfo() { }
+ [System.Diagnostics.CodeAnalysis.AllowNullAttribute]
public string CanonicalizationMethod { get { throw null; } set { } }
public System.Security.Cryptography.Xml.Transform CanonicalizationMethodObject { get { throw null; } }
public int Count { get { throw null; } }
- public string Id { get { throw null; } set { } }
+ public string? Id { get { throw null; } set { } }
public bool IsReadOnly { get { throw null; } }
public bool IsSynchronized { get { throw null; } }
public System.Collections.ArrayList References { get { throw null; } }
- public string SignatureLength { get { throw null; } set { } }
- public string SignatureMethod { get { throw null; } set { } }
+ public string? SignatureLength { get { throw null; } set { } }
+ public string? SignatureMethod { get { throw null; } set { } }
public object SyncRoot { get { throw null; } }
public void AddReference(System.Security.Cryptography.Xml.Reference reference) { }
public void CopyTo(System.Array array, int index) { }
@@ -350,7 +357,7 @@ namespace System.Security.Cryptography.Xml
public partial class SignedXml
{
protected System.Security.Cryptography.Xml.Signature m_signature;
- protected string m_strSigningKeyName;
+ protected string? m_strSigningKeyName;
public const string XmlDecryptionTransformUrl = "http://www.w3.org/2002/07/decrypt#XML";
public const string XmlDsigBase64TransformUrl = "http://www.w3.org/2000/09/xmldsig#base64";
public const string XmlDsigC14NTransformUrl = "http://www.w3.org/TR/2001/REC-xml-c14n-20010315";
@@ -378,43 +385,44 @@ namespace System.Security.Cryptography.Xml
public SignedXml() { }
public SignedXml(System.Xml.XmlDocument document) { }
public SignedXml(System.Xml.XmlElement elem) { }
+ [System.Diagnostics.CodeAnalysis.AllowNullAttribute]
public System.Security.Cryptography.Xml.EncryptedXml EncryptedXml { get { throw null; } set { } }
public System.Security.Cryptography.Xml.KeyInfo KeyInfo { get { throw null; } set { } }
public System.Xml.XmlResolver Resolver { set { } }
public System.Collections.ObjectModel.Collection<string> SafeCanonicalizationMethods { get { throw null; } }
public System.Security.Cryptography.Xml.Signature Signature { get { throw null; } }
public System.Func<System.Security.Cryptography.Xml.SignedXml, bool> SignatureFormatValidator { get { throw null; } set { } }
- public string SignatureLength { get { throw null; } }
- public string SignatureMethod { get { throw null; } }
- public byte[] SignatureValue { get { throw null; } }
- public System.Security.Cryptography.Xml.SignedInfo SignedInfo { get { throw null; } }
- public System.Security.Cryptography.AsymmetricAlgorithm SigningKey { get { throw null; } set { } }
- public string SigningKeyName { get { throw null; } set { } }
+ public string? SignatureLength { get { throw null; } }
+ public string? SignatureMethod { get { throw null; } }
+ public byte[]? SignatureValue { get { throw null; } }
+ public System.Security.Cryptography.Xml.SignedInfo? SignedInfo { get { throw null; } }
+ public System.Security.Cryptography.AsymmetricAlgorithm? SigningKey { get { throw null; } set { } }
+ public string? SigningKeyName { get { throw null; } set { } }
public void AddObject(System.Security.Cryptography.Xml.DataObject dataObject) { }
public void AddReference(System.Security.Cryptography.Xml.Reference reference) { }
public bool CheckSignature() { throw null; }
public bool CheckSignature(System.Security.Cryptography.AsymmetricAlgorithm key) { throw null; }
public bool CheckSignature(System.Security.Cryptography.KeyedHashAlgorithm macAlg) { throw null; }
public bool CheckSignature(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, bool verifySignatureOnly) { throw null; }
- public bool CheckSignatureReturningKey(out System.Security.Cryptography.AsymmetricAlgorithm signingKey) { throw null; }
+ public bool CheckSignatureReturningKey(out System.Security.Cryptography.AsymmetricAlgorithm? signingKey) { throw null; }
public void ComputeSignature() { }
public void ComputeSignature(System.Security.Cryptography.KeyedHashAlgorithm macAlg) { }
- public virtual System.Xml.XmlElement GetIdElement(System.Xml.XmlDocument document, string idValue) { throw null; }
- protected virtual System.Security.Cryptography.AsymmetricAlgorithm GetPublicKey() { throw null; }
+ public virtual System.Xml.XmlElement? GetIdElement(System.Xml.XmlDocument? document, string idValue) { throw null; }
+ protected virtual System.Security.Cryptography.AsymmetricAlgorithm? GetPublicKey() { throw null; }
public System.Xml.XmlElement GetXml() { throw null; }
public void LoadXml(System.Xml.XmlElement value) { }
}
public abstract partial class Transform
{
protected Transform() { }
- public string Algorithm { get { throw null; } set { } }
- public System.Xml.XmlElement Context { get { throw null; } set { } }
+ public string? Algorithm { get { throw null; } set { } }
+ public System.Xml.XmlElement? Context { get { throw null; } set { } }
public abstract System.Type[] InputTypes { get; }
public abstract System.Type[] OutputTypes { get; }
public System.Collections.Hashtable PropagatedNamespaces { get { throw null; } }
- public System.Xml.XmlResolver Resolver { set { } }
+ public System.Xml.XmlResolver? Resolver { set { } }
public virtual byte[] GetDigestedOutput(System.Security.Cryptography.HashAlgorithm hash) { throw null; }
- protected abstract System.Xml.XmlNodeList GetInnerXml();
+ protected abstract System.Xml.XmlNodeList? GetInnerXml();
public abstract object GetOutput();
public abstract object GetOutput(System.Type type);
public System.Xml.XmlElement GetXml() { throw null; }
@@ -436,10 +444,10 @@ namespace System.Security.Cryptography.Xml
public override System.Type[] InputTypes { get { throw null; } }
public override System.Type[] OutputTypes { get { throw null; } }
public void AddExceptUri(string uri) { }
- protected override System.Xml.XmlNodeList GetInnerXml() { throw null; }
+ protected override System.Xml.XmlNodeList? GetInnerXml() { throw null; }
public override object GetOutput() { throw null; }
public override object GetOutput(System.Type type) { throw null; }
- protected virtual bool IsTargetElement(System.Xml.XmlElement inputElement, string idValue) { throw null; }
+ protected virtual bool IsTargetElement(System.Xml.XmlElement? inputElement, string idValue) { throw null; }
public override void LoadInnerXml(System.Xml.XmlNodeList nodeList) { }
public override void LoadInput(object obj) { }
}
@@ -448,7 +456,7 @@ namespace System.Security.Cryptography.Xml
public XmlDsigBase64Transform() { }
public override System.Type[] InputTypes { get { throw null; } }
public override System.Type[] OutputTypes { get { throw null; } }
- protected override System.Xml.XmlNodeList GetInnerXml() { throw null; }
+ protected override System.Xml.XmlNodeList? GetInnerXml() { throw null; }
public override object GetOutput() { throw null; }
public override object GetOutput(System.Type type) { throw null; }
public override void LoadInnerXml(System.Xml.XmlNodeList nodeList) { }
@@ -461,7 +469,7 @@ namespace System.Security.Cryptography.Xml
public override System.Type[] InputTypes { get { throw null; } }
public override System.Type[] OutputTypes { get { throw null; } }
public override byte[] GetDigestedOutput(System.Security.Cryptography.HashAlgorithm hash) { throw null; }
- protected override System.Xml.XmlNodeList GetInnerXml() { throw null; }
+ protected override System.Xml.XmlNodeList? GetInnerXml() { throw null; }
public override object GetOutput() { throw null; }
public override object GetOutput(System.Type type) { throw null; }
public override void LoadInnerXml(System.Xml.XmlNodeList nodeList) { }
@@ -477,7 +485,7 @@ namespace System.Security.Cryptography.Xml
public XmlDsigEnvelopedSignatureTransform(bool includeComments) { }
public override System.Type[] InputTypes { get { throw null; } }
public override System.Type[] OutputTypes { get { throw null; } }
- protected override System.Xml.XmlNodeList GetInnerXml() { throw null; }
+ protected override System.Xml.XmlNodeList? GetInnerXml() { throw null; }
public override object GetOutput() { throw null; }
public override object GetOutput(System.Type type) { throw null; }
public override void LoadInnerXml(System.Xml.XmlNodeList nodeList) { }
@@ -487,13 +495,13 @@ namespace System.Security.Cryptography.Xml
{
public XmlDsigExcC14NTransform() { }
public XmlDsigExcC14NTransform(bool includeComments) { }
- public XmlDsigExcC14NTransform(bool includeComments, string inclusiveNamespacesPrefixList) { }
+ public XmlDsigExcC14NTransform(bool includeComments, string? inclusiveNamespacesPrefixList) { }
public XmlDsigExcC14NTransform(string inclusiveNamespacesPrefixList) { }
- public string InclusiveNamespacesPrefixList { get { throw null; } set { } }
+ public string? InclusiveNamespacesPrefixList { get { throw null; } set { } }
public override System.Type[] InputTypes { get { throw null; } }
public override System.Type[] OutputTypes { get { throw null; } }
public override byte[] GetDigestedOutput(System.Security.Cryptography.HashAlgorithm hash) { throw null; }
- protected override System.Xml.XmlNodeList GetInnerXml() { throw null; }
+ protected override System.Xml.XmlNodeList? GetInnerXml() { throw null; }
public override object GetOutput() { throw null; }
public override object GetOutput(System.Type type) { throw null; }
public override void LoadInnerXml(System.Xml.XmlNodeList nodeList) { }
@@ -509,7 +517,7 @@ namespace System.Security.Cryptography.Xml
public XmlDsigXPathTransform() { }
public override System.Type[] InputTypes { get { throw null; } }
public override System.Type[] OutputTypes { get { throw null; } }
- protected override System.Xml.XmlNodeList GetInnerXml() { throw null; }
+ protected override System.Xml.XmlNodeList? GetInnerXml() { throw null; }
public override object GetOutput() { throw null; }
public override object GetOutput(System.Type type) { throw null; }
public override void LoadInnerXml(System.Xml.XmlNodeList nodeList) { }
@@ -521,7 +529,7 @@ namespace System.Security.Cryptography.Xml
public XmlDsigXsltTransform(bool includeComments) { }
public override System.Type[] InputTypes { get { throw null; } }
public override System.Type[] OutputTypes { get { throw null; } }
- protected override System.Xml.XmlNodeList GetInnerXml() { throw null; }
+ protected override System.Xml.XmlNodeList? GetInnerXml() { throw null; }
public override object GetOutput() { throw null; }
public override object GetOutput(System.Type type) { throw null; }
public override void LoadInnerXml(System.Xml.XmlNodeList nodeList) { }
@@ -530,10 +538,10 @@ namespace System.Security.Cryptography.Xml
public partial class XmlLicenseTransform : System.Security.Cryptography.Xml.Transform
{
public XmlLicenseTransform() { }
- public System.Security.Cryptography.Xml.IRelDecryptor Decryptor { get { throw null; } set { } }
+ public System.Security.Cryptography.Xml.IRelDecryptor? Decryptor { get { throw null; } set { } }
public override System.Type[] InputTypes { get { throw null; } }
public override System.Type[] OutputTypes { get { throw null; } }
- protected override System.Xml.XmlNodeList GetInnerXml() { throw null; }
+ protected override System.Xml.XmlNodeList? GetInnerXml() { throw null; }
public override object GetOutput() { throw null; }
public override object GetOutput(System.Type type) { throw null; }
public override void LoadInnerXml(System.Xml.XmlNodeList nodeList) { }
diff --git a/src/libraries/System.Security.Cryptography.Xml/ref/System.Security.Cryptography.Xml.csproj b/src/libraries/System.Security.Cryptography.Xml/ref/System.Security.Cryptography.Xml.csproj
index 9f5143a0efa..8e8a1142412 100644
--- a/src/libraries/System.Security.Cryptography.Xml/ref/System.Security.Cryptography.Xml.csproj
+++ b/src/libraries/System.Security.Cryptography.Xml/ref/System.Security.Cryptography.Xml.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
- <Nullable>disable</Nullable>
+ <Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System.Security.Cryptography.Xml.csproj b/src/libraries/System.Security.Cryptography.Xml/src/System.Security.Cryptography.Xml.csproj
index 20a3d77a464..8694a0575e8 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System.Security.Cryptography.Xml.csproj
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System.Security.Cryptography.Xml.csproj
@@ -2,8 +2,6 @@
<PropertyGroup>
<TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Nullable>disable</Nullable>
- <NoWarn>$(NoWarn);nullable</NoWarn>
<NoWarn>$(NoWarn);CA1850</NoWarn> <!-- CA1850 suppressed due to multitargeting -->
<IsPackable>true</IsPackable>
<PackageDescription>Provides classes to support the creation and validation of XML digital signatures. The classes in this namespace implement the World Wide Web Consortium Recommendation, "XML-Signature Syntax and Processing", described at http://www.w3.org/TR/xmldsig-core/.
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/AncestralNamespaceContextManager.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/AncestralNamespaceContextManager.cs
index 0bbafb6db14..54341e375e0 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/AncestralNamespaceContextManager.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/AncestralNamespaceContextManager.cs
@@ -12,7 +12,7 @@ namespace System.Security.Cryptography.Xml
internal NamespaceFrame GetScopeAt(int i)
{
- return (NamespaceFrame)_ancestorStack[i];
+ return (NamespaceFrame)_ancestorStack[i]!;
}
internal NamespaceFrame GetCurrentScope()
@@ -20,9 +20,9 @@ namespace System.Security.Cryptography.Xml
return GetScopeAt(_ancestorStack.Count - 1);
}
- protected XmlAttribute GetNearestRenderedNamespaceWithMatchingPrefix(string nsPrefix, out int depth)
+ protected XmlAttribute? GetNearestRenderedNamespaceWithMatchingPrefix(string nsPrefix, out int depth)
{
- XmlAttribute attr;
+ XmlAttribute? attr;
depth = -1;
for (int i = _ancestorStack.Count - 1; i >= 0; i--)
{
@@ -35,9 +35,9 @@ namespace System.Security.Cryptography.Xml
return null;
}
- protected XmlAttribute GetNearestUnrenderedNamespaceWithMatchingPrefix(string nsPrefix, out int depth)
+ protected XmlAttribute? GetNearestUnrenderedNamespaceWithMatchingPrefix(string nsPrefix, out int depth)
{
- XmlAttribute attr;
+ XmlAttribute? attr;
depth = -1;
for (int i = _ancestorStack.Count - 1; i >= 0; i--)
{
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/AttributeSortOrder.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/AttributeSortOrder.cs
index c0ff1120f8b..ece8cfb89fa 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/AttributeSortOrder.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/AttributeSortOrder.cs
@@ -11,10 +11,10 @@ namespace System.Security.Cryptography.Xml
{
internal AttributeSortOrder() { }
- public int Compare(object a, object b)
+ public int Compare(object? a, object? b)
{
- XmlNode nodeA = a as XmlNode;
- XmlNode nodeB = b as XmlNode;
+ XmlNode? nodeA = a as XmlNode;
+ XmlNode? nodeB = b as XmlNode;
if ((nodeA == null) || (nodeB == null))
throw new ArgumentException();
int namespaceCompare = string.CompareOrdinal(nodeA.NamespaceURI, nodeB.NamespaceURI);
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/C14NAncestralNamespaceContextManager.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/C14NAncestralNamespaceContextManager.cs
index 8dcde4c2298..5365bae76f5 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/C14NAncestralNamespaceContextManager.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/C14NAncestralNamespaceContextManager.cs
@@ -26,8 +26,8 @@ namespace System.Security.Cryptography.Xml
}
int rDepth;
- XmlAttribute local = (XmlAttribute)nsLocallyDeclared[nsPrefix];
- XmlAttribute rAncestral = GetNearestRenderedNamespaceWithMatchingPrefix(nsPrefix, out rDepth);
+ XmlAttribute? local = (XmlAttribute?)nsLocallyDeclared[nsPrefix];
+ XmlAttribute? rAncestral = GetNearestRenderedNamespaceWithMatchingPrefix(nsPrefix, out rDepth);
if (local != null)
{
if (Utils.IsNonRedundantNamespaceDecl(local, rAncestral))
@@ -42,7 +42,7 @@ namespace System.Security.Cryptography.Xml
else
{
int uDepth;
- XmlAttribute uAncestral = GetNearestUnrenderedNamespaceWithMatchingPrefix(nsPrefix, out uDepth);
+ XmlAttribute? uAncestral = GetNearestUnrenderedNamespaceWithMatchingPrefix(nsPrefix, out uDepth);
if (uAncestral != null && uDepth > rDepth && Utils.IsNonRedundantNamespaceDecl(uAncestral, rAncestral))
{
if (Utils.IsXmlNamespaceNode(uAncestral))
@@ -55,14 +55,14 @@ namespace System.Security.Cryptography.Xml
internal override void GetNamespacesToRender(XmlElement element, SortedList attrListToRender, SortedList nsListToRender, Hashtable nsLocallyDeclared)
{
- XmlAttribute attrib;
+ XmlAttribute? attrib;
object[] attrs = new object[nsLocallyDeclared.Count];
nsLocallyDeclared.Values.CopyTo(attrs, 0);
foreach (object a in attrs)
{
attrib = (XmlAttribute)a;
int rDepth;
- XmlAttribute rAncestral = GetNearestRenderedNamespaceWithMatchingPrefix(Utils.GetNamespacePrefix(attrib), out rDepth);
+ XmlAttribute? rAncestral = GetNearestRenderedNamespaceWithMatchingPrefix(Utils.GetNamespacePrefix(attrib), out rDepth);
if (Utils.IsNonRedundantNamespaceDecl(attrib, rAncestral))
{
nsLocallyDeclared.Remove(Utils.GetNamespacePrefix(attrib));
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXml.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXml.cs
index a42e1b17703..2de2731895c 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXml.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXml.cs
@@ -17,7 +17,7 @@ namespace System.Security.Cryptography.Xml
// private static string defaultXPathWithComments = "(//. | //@* | //namespace::*)";
// private static string defaultXPathWithComments = "(//. | //@* | //namespace::*)";
- internal CanonicalXml(Stream inputStream, bool includeComments, XmlResolver resolver, string strBaseUri)
+ internal CanonicalXml(Stream inputStream, bool includeComments, XmlResolver? resolver, string strBaseUri)
{
if (inputStream is null)
{
@@ -30,8 +30,8 @@ namespace System.Security.Cryptography.Xml
_ancMgr = new C14NAncestralNamespaceContextManager();
}
- internal CanonicalXml(XmlDocument document, XmlResolver resolver) : this(document, resolver, false) { }
- internal CanonicalXml(XmlDocument document, XmlResolver resolver, bool includeComments)
+ internal CanonicalXml(XmlDocument document, XmlResolver? resolver) : this(document, resolver, false) { }
+ internal CanonicalXml(XmlDocument document, XmlResolver? resolver, bool includeComments)
{
if (document is null)
{
@@ -44,14 +44,14 @@ namespace System.Security.Cryptography.Xml
_ancMgr = new C14NAncestralNamespaceContextManager();
}
- internal CanonicalXml(XmlNodeList nodeList, XmlResolver resolver, bool includeComments)
+ internal CanonicalXml(XmlNodeList nodeList, XmlResolver? resolver, bool includeComments)
{
if (nodeList is null)
{
throw new ArgumentNullException(nameof(nodeList));
}
- XmlDocument doc = Utils.GetOwnerDocument(nodeList);
+ XmlDocument? doc = Utils.GetOwnerDocument(nodeList);
if (doc == null)
throw new ArgumentException(nameof(nodeList));
@@ -79,8 +79,8 @@ namespace System.Security.Cryptography.Xml
do
{
- XmlNode currentNode = (XmlNode)elementList[index];
- XmlNode currentNodeCanonical = (XmlNode)elementListCanonical[index];
+ XmlNode currentNode = (XmlNode)elementList[index]!;
+ XmlNode currentNodeCanonical = (XmlNode)elementListCanonical[index]!;
XmlNodeList childNodes = currentNode.ChildNodes;
XmlNodeList childNodesCanonical = currentNodeCanonical.ChildNodes;
for (int i = 0; i < childNodes.Count; i++)
@@ -90,17 +90,17 @@ namespace System.Security.Cryptography.Xml
if (Utils.NodeInList(childNodes[i], nodeList))
{
- MarkNodeAsIncluded(childNodesCanonical[i]);
+ MarkNodeAsIncluded(childNodesCanonical[i]!);
}
- XmlAttributeCollection attribNodes = childNodes[i].Attributes;
+ XmlAttributeCollection? attribNodes = childNodes[i]!.Attributes;
if (attribNodes != null)
{
for (int j = 0; j < attribNodes.Count; j++)
{
if (Utils.NodeInList(attribNodes[j], nodeList))
{
- MarkNodeAsIncluded(childNodesCanonical[i].Attributes.Item(j));
+ MarkNodeAsIncluded(childNodesCanonical[i]!.Attributes!.Item(j)!);
}
}
}
@@ -121,7 +121,7 @@ namespace System.Security.Cryptography.Xml
{
_c14nDoc.WriteHash(hash, DocPosition.BeforeRootElement, _ancMgr);
hash.TransformFinalBlock(Array.Empty<byte>(), 0, 0);
- byte[] res = (byte[])hash.Hash.Clone();
+ byte[] res = (byte[])hash.Hash!.Clone();
// reinitialize the hash so it is still usable after the call
hash.Initialize();
return res;
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlAttribute.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlAttribute.cs
index 761fc37439a..c845f1fbd4e 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlAttribute.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlAttribute.cs
@@ -11,7 +11,7 @@ namespace System.Security.Cryptography.Xml
{
private bool _isInNodeSet;
- public CanonicalXmlAttribute(string prefix, string localName, string namespaceURI, XmlDocument doc, bool defaultNodeSetInclusionState)
+ public CanonicalXmlAttribute(string? prefix, string localName, string? namespaceURI, XmlDocument doc, bool defaultNodeSetInclusionState)
: base(prefix, localName, namespaceURI, doc)
{
IsInNodeSet = defaultNodeSetInclusionState;
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlCDataSection.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlCDataSection.cs
index ff5d9d45291..a80a5d7f546 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlCDataSection.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlCDataSection.cs
@@ -10,7 +10,7 @@ namespace System.Security.Cryptography.Xml
internal sealed class CanonicalXmlCDataSection : XmlCDataSection, ICanonicalizableNode
{
private bool _isInNodeSet;
- public CanonicalXmlCDataSection(string data, XmlDocument doc, bool defaultNodeSetInclusionState) : base(data, doc)
+ public CanonicalXmlCDataSection(string? data, XmlDocument doc, bool defaultNodeSetInclusionState) : base(data, doc)
{
_isInNodeSet = defaultNodeSetInclusionState;
}
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlComment.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlComment.cs
index 99c4a2fdbcd..af36db1a1b7 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlComment.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlComment.cs
@@ -12,7 +12,7 @@ namespace System.Security.Cryptography.Xml
private bool _isInNodeSet;
private readonly bool _includeComments;
- public CanonicalXmlComment(string comment, XmlDocument doc, bool defaultNodeSetInclusionState, bool includeComments)
+ public CanonicalXmlComment(string? comment, XmlDocument doc, bool defaultNodeSetInclusionState, bool includeComments)
: base(comment, doc)
{
_isInNodeSet = defaultNodeSetInclusionState;
@@ -55,7 +55,7 @@ namespace System.Security.Cryptography.Xml
hash.TransformBlock(rgbData, 0, rgbData.Length, rgbData, 0);
rgbData = utf8.GetBytes("<!--");
hash.TransformBlock(rgbData, 0, rgbData.Length, rgbData, 0);
- rgbData = utf8.GetBytes(Value);
+ rgbData = utf8.GetBytes(Value!);
hash.TransformBlock(rgbData, 0, rgbData.Length, rgbData, 0);
rgbData = utf8.GetBytes("-->");
hash.TransformBlock(rgbData, 0, rgbData.Length, rgbData, 0);
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlDocument.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlDocument.cs
index 9713d998428..da8481cd759 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlDocument.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlDocument.cs
@@ -61,42 +61,42 @@ namespace System.Security.Cryptography.Xml
}
}
- public override XmlElement CreateElement(string prefix, string localName, string namespaceURI)
+ public override XmlElement CreateElement(string? prefix, string localName, string? namespaceURI)
{
return new CanonicalXmlElement(prefix, localName, namespaceURI, this, _defaultNodeSetInclusionState);
}
- public override XmlAttribute CreateAttribute(string prefix, string localName, string namespaceURI)
+ public override XmlAttribute CreateAttribute(string? prefix, string localName, string? namespaceURI)
{
return new CanonicalXmlAttribute(prefix, localName, namespaceURI, this, _defaultNodeSetInclusionState);
}
- protected override XmlAttribute CreateDefaultAttribute(string prefix, string localName, string namespaceURI)
+ protected override XmlAttribute CreateDefaultAttribute(string? prefix, string localName, string? namespaceURI)
{
return new CanonicalXmlAttribute(prefix, localName, namespaceURI, this, _defaultNodeSetInclusionState);
}
- public override XmlText CreateTextNode(string text)
+ public override XmlText CreateTextNode(string? text)
{
return new CanonicalXmlText(text, this, _defaultNodeSetInclusionState);
}
- public override XmlWhitespace CreateWhitespace(string prefix)
+ public override XmlWhitespace CreateWhitespace(string? prefix)
{
return new CanonicalXmlWhitespace(prefix, this, _defaultNodeSetInclusionState);
}
- public override XmlSignificantWhitespace CreateSignificantWhitespace(string text)
+ public override XmlSignificantWhitespace CreateSignificantWhitespace(string? text)
{
return new CanonicalXmlSignificantWhitespace(text, this, _defaultNodeSetInclusionState);
}
- public override XmlProcessingInstruction CreateProcessingInstruction(string target, string data)
+ public override XmlProcessingInstruction CreateProcessingInstruction(string target, string? data)
{
- return new CanonicalXmlProcessingInstruction(target, data, this, _defaultNodeSetInclusionState);
+ return new CanonicalXmlProcessingInstruction(target, data!, this, _defaultNodeSetInclusionState);
}
- public override XmlComment CreateComment(string data)
+ public override XmlComment CreateComment(string? data)
{
return new CanonicalXmlComment(data, this, _defaultNodeSetInclusionState, _includeComments);
}
@@ -106,7 +106,7 @@ namespace System.Security.Cryptography.Xml
return new CanonicalXmlEntityReference(name, this, _defaultNodeSetInclusionState);
}
- public override XmlCDataSection CreateCDataSection(string data)
+ public override XmlCDataSection CreateCDataSection(string? data)
{
return new CanonicalXmlCDataSection(data, this, _defaultNodeSetInclusionState);
}
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlElement.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlElement.cs
index 7d3174b0780..71cb45868b0 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlElement.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlElement.cs
@@ -12,8 +12,8 @@ namespace System.Security.Cryptography.Xml
{
private bool _isInNodeSet;
- public CanonicalXmlElement(string prefix, string localName, string namespaceURI, XmlDocument doc, bool defaultNodeSetInclusionState)
- : base(prefix, localName, namespaceURI, doc)
+ public CanonicalXmlElement(string? prefix, string localName, string? namespaceURI, XmlDocument doc, bool defaultNodeSetInclusionState)
+ : base(prefix!, localName, namespaceURI, doc)
{
_isInNodeSet = defaultNodeSetInclusionState;
}
@@ -30,7 +30,7 @@ namespace System.Security.Cryptography.Xml
SortedList nsListToRender = new SortedList(new NamespaceSortOrder());
SortedList attrListToRender = new SortedList(new AttributeSortOrder());
- XmlAttributeCollection attrList = Attributes;
+ XmlAttributeCollection? attrList = Attributes;
if (attrList != null)
{
foreach (XmlAttribute attr in attrList)
@@ -68,11 +68,11 @@ namespace System.Security.Cryptography.Xml
strBuilder.Append('<').Append(Name);
foreach (object attr in nsListToRender.GetKeyList())
{
- (attr as CanonicalXmlAttribute).Write(strBuilder, docPos, anc);
+ (attr as CanonicalXmlAttribute)!.Write(strBuilder, docPos, anc);
}
foreach (object attr in attrListToRender.GetKeyList())
{
- (attr as CanonicalXmlAttribute).Write(strBuilder, docPos, anc);
+ (attr as CanonicalXmlAttribute)!.Write(strBuilder, docPos, anc);
}
strBuilder.Append('>');
}
@@ -141,11 +141,11 @@ namespace System.Security.Cryptography.Xml
hash.TransformBlock(rgbData, 0, rgbData.Length, rgbData, 0);
foreach (object attr in nsListToRender.GetKeyList())
{
- (attr as CanonicalXmlAttribute).WriteHash(hash, docPos, anc);
+ (attr as CanonicalXmlAttribute)!.WriteHash(hash, docPos, anc);
}
foreach (object attr in attrListToRender.GetKeyList())
{
- (attr as CanonicalXmlAttribute).WriteHash(hash, docPos, anc);
+ (attr as CanonicalXmlAttribute)!.WriteHash(hash, docPos, anc);
}
rgbData = utf8.GetBytes(">");
hash.TransformBlock(rgbData, 0, rgbData.Length, rgbData, 0);
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlNodeList.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlNodeList.cs
index e1308ea8849..03db7132bf3 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlNodeList.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlNodeList.cs
@@ -17,7 +17,7 @@ namespace System.Security.Cryptography.Xml
public override XmlNode Item(int index)
{
- return (XmlNode)_nodeArray[index];
+ return (XmlNode)_nodeArray[index]!;
}
public override IEnumerator GetEnumerator()
@@ -31,7 +31,7 @@ namespace System.Security.Cryptography.Xml
}
// IList methods
- public int Add(object value)
+ public int Add(object? value)
{
if (!(value is XmlNode))
throw new ArgumentException(SR.Cryptography_Xml_IncorrectObjectType, "node");
@@ -43,24 +43,24 @@ namespace System.Security.Cryptography.Xml
_nodeArray.Clear();
}
- public bool Contains(object value)
+ public bool Contains(object? value)
{
return _nodeArray.Contains(value);
}
- public int IndexOf(object value)
+ public int IndexOf(object? value)
{
return _nodeArray.IndexOf(value);
}
- public void Insert(int index, object value)
+ public void Insert(int index, object? value)
{
if (!(value is XmlNode))
throw new ArgumentException(SR.Cryptography_Xml_IncorrectObjectType, nameof(value));
_nodeArray.Insert(index, value);
}
- public void Remove(object value)
+ public void Remove(object? value)
{
_nodeArray.Remove(value);
}
@@ -80,7 +80,7 @@ namespace System.Security.Cryptography.Xml
get { return _nodeArray.IsReadOnly; }
}
- object IList.this[int index]
+ object? IList.this[int index]
{
get { return _nodeArray[index]; }
set
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlSignificantWhitespace.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlSignificantWhitespace.cs
index cd4ec4820e2..2d3e8066b18 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlSignificantWhitespace.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlSignificantWhitespace.cs
@@ -11,7 +11,7 @@ namespace System.Security.Cryptography.Xml
{
private bool _isInNodeSet;
- public CanonicalXmlSignificantWhitespace(string strData, XmlDocument doc, bool defaultNodeSetInclusionState)
+ public CanonicalXmlSignificantWhitespace(string? strData, XmlDocument doc, bool defaultNodeSetInclusionState)
: base(strData, doc)
{
_isInNodeSet = defaultNodeSetInclusionState;
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlText.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlText.cs
index 90982628d4b..de81dfea23e 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlText.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlText.cs
@@ -11,7 +11,7 @@ namespace System.Security.Cryptography.Xml
{
private bool _isInNodeSet;
- public CanonicalXmlText(string strData, XmlDocument doc, bool defaultNodeSetInclusionState)
+ public CanonicalXmlText(string? strData, XmlDocument doc, bool defaultNodeSetInclusionState)
: base(strData, doc)
{
_isInNodeSet = defaultNodeSetInclusionState;
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlWhitespace.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlWhitespace.cs
index 38fae307ed4..9871fac19b4 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlWhitespace.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlWhitespace.cs
@@ -11,7 +11,7 @@ namespace System.Security.Cryptography.Xml
{
private bool _isInNodeSet;
- public CanonicalXmlWhitespace(string strData, XmlDocument doc, bool defaultNodeSetInclusionState)
+ public CanonicalXmlWhitespace(string? strData, XmlDocument doc, bool defaultNodeSetInclusionState)
: base(strData, doc)
{
_isInNodeSet = defaultNodeSetInclusionState;
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CipherData.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CipherData.cs
index 877c641a4ea..9b1dfb2d6aa 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CipherData.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CipherData.cs
@@ -1,15 +1,16 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+using System.Diagnostics.CodeAnalysis;
using System.Xml;
namespace System.Security.Cryptography.Xml
{
public sealed class CipherData
{
- private XmlElement _cachedXml;
- private CipherReference _cipherReference;
- private byte[] _cipherValue;
+ private XmlElement? _cachedXml;
+ private CipherReference? _cipherReference;
+ private byte[]? _cipherValue;
public CipherData() { }
@@ -23,6 +24,7 @@ namespace System.Security.Cryptography.Xml
CipherReference = cipherReference;
}
+ [MemberNotNullWhen(true, nameof(_cachedXml))]
private bool CacheValid
{
get
@@ -31,7 +33,8 @@ namespace System.Security.Cryptography.Xml
}
}
- public CipherReference CipherReference
+ [DisallowNull]
+ public CipherReference? CipherReference
{
get { return _cipherReference; }
set
@@ -46,7 +49,8 @@ namespace System.Security.Cryptography.Xml
}
}
- public byte[] CipherValue
+ [DisallowNull]
+ public byte[]? CipherValue
{
get { return _cipherValue; }
set
@@ -100,8 +104,8 @@ namespace System.Security.Cryptography.Xml
XmlNamespaceManager nsm = new XmlNamespaceManager(value.OwnerDocument.NameTable);
nsm.AddNamespace("enc", EncryptedXml.XmlEncNamespaceUrl);
- XmlNode cipherValueNode = value.SelectSingleNode("enc:CipherValue", nsm);
- XmlNode cipherReferenceNode = value.SelectSingleNode("enc:CipherReference", nsm);
+ XmlNode? cipherValueNode = value.SelectSingleNode("enc:CipherValue", nsm);
+ XmlNode? cipherReferenceNode = value.SelectSingleNode("enc:CipherReference", nsm);
if (cipherValueNode != null)
{
if (cipherReferenceNode != null)
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CipherReference.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CipherReference.cs
index b87286eb7f1..635d8996e2a 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CipherReference.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CipherReference.cs
@@ -7,7 +7,7 @@ namespace System.Security.Cryptography.Xml
{
public sealed class CipherReference : EncryptedReference
{
- private byte[] _cipherValue;
+ private byte[]? _cipherValue;
public CipherReference() : base()
{
@@ -25,7 +25,7 @@ namespace System.Security.Cryptography.Xml
}
// This method is used to cache results from resolved cipher references.
- internal byte[] CipherValue
+ internal byte[]? CipherValue
{
get
{
@@ -73,15 +73,15 @@ namespace System.Security.Cryptography.Xml
}
ReferenceType = value.LocalName;
- string uri = Utils.GetAttribute(value, "URI", EncryptedXml.XmlEncNamespaceUrl);
+ string? uri = Utils.GetAttribute(value, "URI", EncryptedXml.XmlEncNamespaceUrl);
Uri = uri ?? throw new CryptographicException(SR.Cryptography_Xml_UriRequired);
// Transforms
XmlNamespaceManager nsm = new XmlNamespaceManager(value.OwnerDocument.NameTable);
nsm.AddNamespace("enc", EncryptedXml.XmlEncNamespaceUrl);
- XmlNode transformsNode = value.SelectSingleNode("enc:Transforms", nsm);
+ XmlNode? transformsNode = value.SelectSingleNode("enc:Transforms", nsm);
if (transformsNode != null)
- TransformChain.LoadXml(transformsNode as XmlElement);
+ TransformChain.LoadXml((transformsNode as XmlElement)!);
// cache the Xml
_cachedXml = value;
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CryptoHelpers.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CryptoHelpers.cs
index 0f9365f9e01..1e602141bcf 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CryptoHelpers.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CryptoHelpers.cs
@@ -7,7 +7,7 @@ namespace System.Security.Cryptography.Xml
{
private static readonly char[] _invalidChars = new char[] { ',', '`', '[', '*', '&' };
- public static object CreateFromKnownName(string name) =>
+ public static object? CreateFromKnownName(string name) =>
name switch
{
"http://www.w3.org/TR/2001/REC-xml-c14n-20010315" => new XmlDsigC14NTransform(),
@@ -38,7 +38,7 @@ namespace System.Security.Cryptography.Xml
_ => null,
};
- public static T CreateFromName<T>(string name) where T : class
+ public static T? CreateFromName<T>(string? name) where T : class
{
if (name == null || name.IndexOfAny(_invalidChars) >= 0)
{
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/DSAKeyValue.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/DSAKeyValue.cs
index bf84bfa342f..a9c09663d4f 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/DSAKeyValue.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/DSAKeyValue.cs
@@ -97,19 +97,19 @@ namespace System.Security.Cryptography.Xml
XmlElement dsaKeyValueElement = xmlDocument.CreateElement(DSAKeyValueElementName, SignedXml.XmlDsigNamespaceUrl);
XmlElement pElement = xmlDocument.CreateElement(PElementName, SignedXml.XmlDsigNamespaceUrl);
- pElement.AppendChild(xmlDocument.CreateTextNode(Convert.ToBase64String(dsaParams.P)));
+ pElement.AppendChild(xmlDocument.CreateTextNode(Convert.ToBase64String(dsaParams.P!)));
dsaKeyValueElement.AppendChild(pElement);
XmlElement qElement = xmlDocument.CreateElement(QElementName, SignedXml.XmlDsigNamespaceUrl);
- qElement.AppendChild(xmlDocument.CreateTextNode(Convert.ToBase64String(dsaParams.Q)));
+ qElement.AppendChild(xmlDocument.CreateTextNode(Convert.ToBase64String(dsaParams.Q!)));
dsaKeyValueElement.AppendChild(qElement);
XmlElement gElement = xmlDocument.CreateElement(GElementName, SignedXml.XmlDsigNamespaceUrl);
- gElement.AppendChild(xmlDocument.CreateTextNode(Convert.ToBase64String(dsaParams.G)));
+ gElement.AppendChild(xmlDocument.CreateTextNode(Convert.ToBase64String(dsaParams.G!)));
dsaKeyValueElement.AppendChild(gElement);
XmlElement yElement = xmlDocument.CreateElement(YElementName, SignedXml.XmlDsigNamespaceUrl);
- yElement.AppendChild(xmlDocument.CreateTextNode(Convert.ToBase64String(dsaParams.Y)));
+ yElement.AppendChild(xmlDocument.CreateTextNode(Convert.ToBase64String(dsaParams.Y!)));
dsaKeyValueElement.AppendChild(yElement);
// Add optional components if present
@@ -168,28 +168,28 @@ namespace System.Security.Cryptography.Xml
XmlNamespaceManager xmlNamespaceManager = new XmlNamespaceManager(value.OwnerDocument.NameTable);
xmlNamespaceManager.AddNamespace(xmlDsigNamespacePrefix, SignedXml.XmlDsigNamespaceUrl);
- XmlNode dsaKeyValueElement = value.SelectSingleNode($"{xmlDsigNamespacePrefix}:{DSAKeyValueElementName}", xmlNamespaceManager);
+ XmlNode? dsaKeyValueElement = value.SelectSingleNode($"{xmlDsigNamespacePrefix}:{DSAKeyValueElementName}", xmlNamespaceManager);
if (dsaKeyValueElement == null)
{
throw new CryptographicException(SR.Format(SR.MustContainChildElement, KeyValueElementName, DSAKeyValueElementName));
}
- XmlNode yNode = dsaKeyValueElement.SelectSingleNode($"{xmlDsigNamespacePrefix}:{YElementName}", xmlNamespaceManager);
+ XmlNode? yNode = dsaKeyValueElement.SelectSingleNode($"{xmlDsigNamespacePrefix}:{YElementName}", xmlNamespaceManager);
if (yNode == null)
throw new CryptographicException(SR.Format(SR.ElementMissing, YElementName));
- XmlNode pNode = dsaKeyValueElement.SelectSingleNode($"{xmlDsigNamespacePrefix}:{PElementName}", xmlNamespaceManager);
- XmlNode qNode = dsaKeyValueElement.SelectSingleNode($"{xmlDsigNamespacePrefix}:{QElementName}", xmlNamespaceManager);
+ XmlNode? pNode = dsaKeyValueElement.SelectSingleNode($"{xmlDsigNamespacePrefix}:{PElementName}", xmlNamespaceManager);
+ XmlNode? qNode = dsaKeyValueElement.SelectSingleNode($"{xmlDsigNamespacePrefix}:{QElementName}", xmlNamespaceManager);
if ((pNode == null && qNode != null) || (pNode != null && qNode == null))
throw new CryptographicException(SR.Format(SR.ElementCombinationMissing, PElementName, QElementName));
- XmlNode gNode = dsaKeyValueElement.SelectSingleNode($"{xmlDsigNamespacePrefix}:{GElementName}", xmlNamespaceManager);
- XmlNode jNode = dsaKeyValueElement.SelectSingleNode($"{xmlDsigNamespacePrefix}:{JElementName}", xmlNamespaceManager);
+ XmlNode? gNode = dsaKeyValueElement.SelectSingleNode($"{xmlDsigNamespacePrefix}:{GElementName}", xmlNamespaceManager);
+ XmlNode? jNode = dsaKeyValueElement.SelectSingleNode($"{xmlDsigNamespacePrefix}:{JElementName}", xmlNamespaceManager);
- XmlNode seedNode = dsaKeyValueElement.SelectSingleNode($"{xmlDsigNamespacePrefix}:{SeedElementName}", xmlNamespaceManager);
- XmlNode pgenCounterNode = dsaKeyValueElement.SelectSingleNode($"{xmlDsigNamespacePrefix}:{PgenCounterElementName}", xmlNamespaceManager);
+ XmlNode? seedNode = dsaKeyValueElement.SelectSingleNode($"{xmlDsigNamespacePrefix}:{SeedElementName}", xmlNamespaceManager);
+ XmlNode? pgenCounterNode = dsaKeyValueElement.SelectSingleNode($"{xmlDsigNamespacePrefix}:{PgenCounterElementName}", xmlNamespaceManager);
if ((seedNode == null && pgenCounterNode != null) || (seedNode != null && pgenCounterNode == null))
throw new CryptographicException(SR.Format(SR.ElementCombinationMissing, SeedElementName, PgenCounterElementName));
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/DSASignatureDescription.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/DSASignatureDescription.cs
index 1d3fe08ab8d..2b423e681e0 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/DSASignatureDescription.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/DSASignatureDescription.cs
@@ -19,7 +19,7 @@ namespace System.Security.Cryptography.Xml
public sealed override AsymmetricSignatureDeformatter CreateDeformatter(AsymmetricAlgorithm key)
{
- var item = (AsymmetricSignatureDeformatter)CryptoConfig.CreateFromName(DeformatterAlgorithm);
+ var item = (AsymmetricSignatureDeformatter)CryptoConfig.CreateFromName(DeformatterAlgorithm!)!;
item.SetKey(key);
item.SetHashAlgorithm(HashAlgorithm);
return item;
@@ -27,7 +27,7 @@ namespace System.Security.Cryptography.Xml
public sealed override AsymmetricSignatureFormatter CreateFormatter(AsymmetricAlgorithm key)
{
- var item = (AsymmetricSignatureFormatter)CryptoConfig.CreateFromName(FormatterAlgorithm);
+ var item = (AsymmetricSignatureFormatter)CryptoConfig.CreateFromName(FormatterAlgorithm!)!;
item.SetKey(key);
item.SetHashAlgorithm(HashAlgorithm);
return item;
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/DataObject.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/DataObject.cs
index 83d5929dc68..3242122610a 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/DataObject.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/DataObject.cs
@@ -1,17 +1,18 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+using System.Diagnostics.CodeAnalysis;
using System.Xml;
namespace System.Security.Cryptography.Xml
{
public class DataObject
{
- private string _id;
- private string _mimeType;
- private string _encoding;
+ private string? _id;
+ private string? _mimeType;
+ private string? _encoding;
private CanonicalXmlNodeList _elData;
- private XmlElement _cachedXml;
+ private XmlElement? _cachedXml;
//
// public constructors
@@ -42,7 +43,7 @@ namespace System.Security.Cryptography.Xml
// public properties
//
- public string Id
+ public string? Id
{
get { return _id; }
set
@@ -52,7 +53,7 @@ namespace System.Security.Cryptography.Xml
}
}
- public string MimeType
+ public string? MimeType
{
get { return _mimeType; }
set
@@ -62,7 +63,7 @@ namespace System.Security.Cryptography.Xml
}
}
- public string Encoding
+ public string? Encoding
{
get { return _encoding; }
set
@@ -90,6 +91,7 @@ namespace System.Security.Cryptography.Xml
}
}
+ [MemberNotNullWhen(true, nameof(_cachedXml))]
private bool CacheValid
{
get
@@ -104,7 +106,7 @@ namespace System.Security.Cryptography.Xml
public XmlElement GetXml()
{
- if (CacheValid) return (_cachedXml);
+ if (CacheValid) return _cachedXml;
XmlDocument document = new XmlDocument();
document.PreserveWhitespace = true;
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptedData.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptedData.cs
index 7320dd62811..016018883c4 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptedData.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptedData.cs
@@ -23,39 +23,39 @@ namespace System.Security.Cryptography.Xml
MimeType = Utils.GetAttribute(value, "MimeType", EncryptedXml.XmlEncNamespaceUrl);
Encoding = Utils.GetAttribute(value, "Encoding", EncryptedXml.XmlEncNamespaceUrl);
- XmlNode encryptionMethodNode = value.SelectSingleNode("enc:EncryptionMethod", nsm);
+ XmlNode? encryptionMethodNode = value.SelectSingleNode("enc:EncryptionMethod", nsm);
// EncryptionMethod
EncryptionMethod = new EncryptionMethod();
if (encryptionMethodNode != null)
- EncryptionMethod.LoadXml(encryptionMethodNode as XmlElement);
+ EncryptionMethod.LoadXml((encryptionMethodNode as XmlElement)!);
// Key Info
KeyInfo = new KeyInfo();
- XmlNode keyInfoNode = value.SelectSingleNode("ds:KeyInfo", nsm);
+ XmlNode? keyInfoNode = value.SelectSingleNode("ds:KeyInfo", nsm);
if (keyInfoNode != null)
- KeyInfo.LoadXml(keyInfoNode as XmlElement);
+ KeyInfo.LoadXml((keyInfoNode as XmlElement)!);
// CipherData
- XmlNode cipherDataNode = value.SelectSingleNode("enc:CipherData", nsm);
+ XmlNode? cipherDataNode = value.SelectSingleNode("enc:CipherData", nsm);
if (cipherDataNode == null)
throw new CryptographicException(SR.Cryptography_Xml_MissingCipherData);
CipherData = new CipherData();
- CipherData.LoadXml(cipherDataNode as XmlElement);
+ CipherData.LoadXml((cipherDataNode as XmlElement)!);
// EncryptionProperties
- XmlNode encryptionPropertiesNode = value.SelectSingleNode("enc:EncryptionProperties", nsm);
+ XmlNode? encryptionPropertiesNode = value.SelectSingleNode("enc:EncryptionProperties", nsm);
if (encryptionPropertiesNode != null)
{
// Select the EncryptionProperty elements inside the EncryptionProperties element
- XmlNodeList encryptionPropertyNodes = encryptionPropertiesNode.SelectNodes("enc:EncryptionProperty", nsm);
+ XmlNodeList? encryptionPropertyNodes = encryptionPropertiesNode.SelectNodes("enc:EncryptionProperty", nsm);
if (encryptionPropertyNodes != null)
{
foreach (XmlNode node in encryptionPropertyNodes)
{
EncryptionProperty ep = new EncryptionProperty();
- ep.LoadXml(node as XmlElement);
+ ep.LoadXml((node as XmlElement)!);
EncryptionProperties.Add(ep);
}
}
@@ -67,7 +67,7 @@ namespace System.Security.Cryptography.Xml
public override XmlElement GetXml()
{
- if (CacheValid) return (_cachedXml);
+ if (CacheValid) return _cachedXml;
XmlDocument document = new XmlDocument();
document.PreserveWhitespace = true;
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptedKey.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptedKey.cs
index 47f374e9e02..2b3f9e02ac3 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptedKey.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptedKey.cs
@@ -1,18 +1,20 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+using System.Diagnostics.CodeAnalysis;
using System.Xml;
namespace System.Security.Cryptography.Xml
{
public sealed class EncryptedKey : EncryptedType
{
- private string _recipient;
- private string _carriedKeyName;
- private ReferenceList _referenceList;
+ private string? _recipient;
+ private string? _carriedKeyName;
+ private ReferenceList? _referenceList;
public EncryptedKey() { }
+ [AllowNull]
public string Recipient
{
get => _recipient ??= string.Empty; // an unspecified value for an XmlAttribute is string.Empty
@@ -23,7 +25,7 @@ namespace System.Security.Cryptography.Xml
}
}
- public string CarriedKeyName
+ public string? CarriedKeyName
{
get { return _carriedKeyName; }
set
@@ -62,74 +64,74 @@ namespace System.Security.Cryptography.Xml
Encoding = Utils.GetAttribute(value, "Encoding", EncryptedXml.XmlEncNamespaceUrl);
Recipient = Utils.GetAttribute(value, "Recipient", EncryptedXml.XmlEncNamespaceUrl);
- XmlNode encryptionMethodNode = value.SelectSingleNode("enc:EncryptionMethod", nsm);
+ XmlNode? encryptionMethodNode = value.SelectSingleNode("enc:EncryptionMethod", nsm);
// EncryptionMethod
EncryptionMethod = new EncryptionMethod();
if (encryptionMethodNode != null)
- EncryptionMethod.LoadXml(encryptionMethodNode as XmlElement);
+ EncryptionMethod.LoadXml((encryptionMethodNode as XmlElement)!);
// Key Info
KeyInfo = new KeyInfo();
- XmlNode keyInfoNode = value.SelectSingleNode("ds:KeyInfo", nsm);
+ XmlNode? keyInfoNode = value.SelectSingleNode("ds:KeyInfo", nsm);
if (keyInfoNode != null)
- KeyInfo.LoadXml(keyInfoNode as XmlElement);
+ KeyInfo.LoadXml((keyInfoNode as XmlElement)!);
// CipherData
- XmlNode cipherDataNode = value.SelectSingleNode("enc:CipherData", nsm);
+ XmlNode? cipherDataNode = value.SelectSingleNode("enc:CipherData", nsm);
if (cipherDataNode == null)
throw new CryptographicException(SR.Cryptography_Xml_MissingCipherData);
CipherData = new CipherData();
- CipherData.LoadXml(cipherDataNode as XmlElement);
+ CipherData.LoadXml((cipherDataNode as XmlElement)!);
// EncryptionProperties
- XmlNode encryptionPropertiesNode = value.SelectSingleNode("enc:EncryptionProperties", nsm);
+ XmlNode? encryptionPropertiesNode = value.SelectSingleNode("enc:EncryptionProperties", nsm);
if (encryptionPropertiesNode != null)
{
// Select the EncryptionProperty elements inside the EncryptionProperties element
- XmlNodeList encryptionPropertyNodes = encryptionPropertiesNode.SelectNodes("enc:EncryptionProperty", nsm);
+ XmlNodeList? encryptionPropertyNodes = encryptionPropertiesNode.SelectNodes("enc:EncryptionProperty", nsm);
if (encryptionPropertyNodes != null)
{
foreach (XmlNode node in encryptionPropertyNodes)
{
EncryptionProperty ep = new EncryptionProperty();
- ep.LoadXml(node as XmlElement);
+ ep.LoadXml((node as XmlElement)!);
EncryptionProperties.Add(ep);
}
}
}
// CarriedKeyName
- XmlNode carriedKeyNameNode = value.SelectSingleNode("enc:CarriedKeyName", nsm);
+ XmlNode? carriedKeyNameNode = value.SelectSingleNode("enc:CarriedKeyName", nsm);
if (carriedKeyNameNode != null)
{
CarriedKeyName = carriedKeyNameNode.InnerText;
}
// ReferenceList
- XmlNode referenceListNode = value.SelectSingleNode("enc:ReferenceList", nsm);
+ XmlNode? referenceListNode = value.SelectSingleNode("enc:ReferenceList", nsm);
if (referenceListNode != null)
{
// Select the DataReference elements inside the ReferenceList element
- XmlNodeList dataReferenceNodes = referenceListNode.SelectNodes("enc:DataReference", nsm);
+ XmlNodeList? dataReferenceNodes = referenceListNode.SelectNodes("enc:DataReference", nsm);
if (dataReferenceNodes != null)
{
foreach (XmlNode node in dataReferenceNodes)
{
DataReference dr = new DataReference();
- dr.LoadXml(node as XmlElement);
+ dr.LoadXml((node as XmlElement)!);
ReferenceList.Add(dr);
}
}
// Select the KeyReference elements inside the ReferenceList element
- XmlNodeList keyReferenceNodes = referenceListNode.SelectNodes("enc:KeyReference", nsm);
+ XmlNodeList? keyReferenceNodes = referenceListNode.SelectNodes("enc:KeyReference", nsm);
if (keyReferenceNodes != null)
{
foreach (XmlNode node in keyReferenceNodes)
{
KeyReference kr = new KeyReference();
- kr.LoadXml(node as XmlElement);
+ kr.LoadXml((node as XmlElement)!);
ReferenceList.Add(kr);
}
}
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptedReference.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptedReference.cs
index 315e5ea0cb1..04d6e3a0d14 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptedReference.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptedReference.cs
@@ -1,6 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+using System.Diagnostics.CodeAnalysis;
using System.Xml;
namespace System.Security.Cryptography.Xml
@@ -8,9 +9,9 @@ namespace System.Security.Cryptography.Xml
public abstract class EncryptedReference
{
private string _uri;
- private string _referenceType;
- private TransformChain _transformChain;
- internal XmlElement _cachedXml;
+ private string? _referenceType;
+ private TransformChain? _transformChain;
+ internal XmlElement? _cachedXml;
protected EncryptedReference() : this(string.Empty, new TransformChain())
{
@@ -30,6 +31,8 @@ namespace System.Security.Cryptography.Xml
public string Uri
{
get { return _uri; }
+
+ [MemberNotNull(nameof(_uri))]
set
{
if (value == null)
@@ -54,7 +57,7 @@ namespace System.Security.Cryptography.Xml
TransformChain.Add(transform);
}
- protected string ReferenceType
+ protected string? ReferenceType
{
get { return _referenceType; }
set
@@ -64,6 +67,7 @@ namespace System.Security.Cryptography.Xml
}
}
+ [MemberNotNullWhen(true, nameof(_cachedXml))]
protected internal bool CacheValid
{
get
@@ -107,7 +111,7 @@ namespace System.Security.Cryptography.Xml
ReferenceType = value.LocalName;
- string uri = Utils.GetAttribute(value, "URI", EncryptedXml.XmlEncNamespaceUrl);
+ string? uri = Utils.GetAttribute(value, "URI", EncryptedXml.XmlEncNamespaceUrl);
if (uri == null)
throw new ArgumentNullException(SR.Cryptography_Xml_UriRequired);
Uri = uri;
@@ -115,9 +119,9 @@ namespace System.Security.Cryptography.Xml
// Transforms
XmlNamespaceManager nsm = new XmlNamespaceManager(value.OwnerDocument.NameTable);
nsm.AddNamespace("ds", SignedXml.XmlDsigNamespaceUrl);
- XmlNode transformsNode = value.SelectSingleNode("ds:Transforms", nsm);
+ XmlNode? transformsNode = value.SelectSingleNode("ds:Transforms", nsm);
if (transformsNode != null)
- TransformChain.LoadXml(transformsNode as XmlElement);
+ TransformChain.LoadXml((transformsNode as XmlElement)!);
// cache the Xml
_cachedXml = value;
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptedType.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptedType.cs
index 61c5339f026..e32f63ec067 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptedType.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptedType.cs
@@ -1,22 +1,24 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+using System.Diagnostics.CodeAnalysis;
using System.Xml;
namespace System.Security.Cryptography.Xml
{
public abstract class EncryptedType
{
- private string _id;
- private string _type;
- private string _mimeType;
- private string _encoding;
- private EncryptionMethod _encryptionMethod;
- private CipherData _cipherData;
- private EncryptionPropertyCollection _props;
- private KeyInfo _keyInfo;
- internal XmlElement _cachedXml;
+ private string? _id;
+ private string? _type;
+ private string? _mimeType;
+ private string? _encoding;
+ private EncryptionMethod? _encryptionMethod;
+ private CipherData? _cipherData;
+ private EncryptionPropertyCollection? _props;
+ private KeyInfo? _keyInfo;
+ internal XmlElement? _cachedXml;
+ [MemberNotNullWhen(true, nameof(_cachedXml))]
internal bool CacheValid
{
get
@@ -25,7 +27,7 @@ namespace System.Security.Cryptography.Xml
}
}
- public virtual string Id
+ public virtual string? Id
{
get { return _id; }
set
@@ -35,7 +37,7 @@ namespace System.Security.Cryptography.Xml
}
}
- public virtual string Type
+ public virtual string? Type
{
get { return _type; }
set
@@ -45,7 +47,7 @@ namespace System.Security.Cryptography.Xml
}
}
- public virtual string MimeType
+ public virtual string? MimeType
{
get { return _mimeType; }
set
@@ -55,7 +57,7 @@ namespace System.Security.Cryptography.Xml
}
}
- public virtual string Encoding
+ public virtual string? Encoding
{
get { return _encoding; }
set
@@ -65,13 +67,14 @@ namespace System.Security.Cryptography.Xml
}
}
+ [AllowNull]
public KeyInfo KeyInfo
{
get => _keyInfo ??= new KeyInfo();
set => _keyInfo = value;
}
- public virtual EncryptionMethod EncryptionMethod
+ public virtual EncryptionMethod? EncryptionMethod
{
get { return _encryptionMethod; }
set
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptedXml.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptedXml.cs
index fc860409ec5..1b769ebe3f6 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptedXml.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptedXml.cs
@@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections;
+using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Security.Cryptography.X509Certificates;
using System.Security.Policy;
@@ -59,8 +60,8 @@ namespace System.Security.Cryptography.Xml
//
private readonly XmlDocument _document;
- private Evidence _evidence;
- private XmlResolver _xmlResolver;
+ private Evidence? _evidence;
+ private XmlResolver? _xmlResolver;
// hash table defining the key name mapping
private const int _capacity = 4; // 4 is a reasonable capacity for
// the key name mapping hash table
@@ -68,7 +69,7 @@ namespace System.Security.Cryptography.Xml
private PaddingMode _padding;
private CipherMode _mode;
private Encoding _encoding;
- private string _recipient;
+ private string? _recipient;
private int _xmlDsigSearchDepthCounter;
private int _xmlDsigSearchDepth;
@@ -79,7 +80,7 @@ namespace System.Security.Cryptography.Xml
public EncryptedXml(XmlDocument document) : this(document, null) { }
- public EncryptedXml(XmlDocument document, Evidence evidence)
+ public EncryptedXml(XmlDocument document, Evidence? evidence)
{
_document = document;
_evidence = evidence;
@@ -124,14 +125,14 @@ namespace System.Security.Cryptography.Xml
}
// The evidence of the document being loaded: will be used to resolve external URIs
- public Evidence DocumentEvidence
+ public Evidence? DocumentEvidence
{
get { return _evidence; }
set { _evidence = value; }
}
// The resolver to use for external entities
- public XmlResolver Resolver
+ public XmlResolver? Resolver
{
get { return _xmlResolver; }
set { _xmlResolver = value; }
@@ -162,6 +163,7 @@ namespace System.Security.Cryptography.Xml
// This is used to specify the EncryptedKey elements that should be considered
// when an EncryptedData references an EncryptedKey using a CarriedKeyName and Recipient
+ [AllowNull]
public string Recipient
{
get => _recipient ??= string.Empty; // an unspecified value for an XmlAttribute is string.Empty
@@ -179,7 +181,7 @@ namespace System.Security.Cryptography.Xml
throw new ArgumentNullException(nameof(cipherData));
}
- Stream inputStream = null;
+ Stream? inputStream = null;
if (cipherData.CipherValue != null)
{
@@ -189,7 +191,7 @@ namespace System.Security.Cryptography.Xml
{
if (cipherData.CipherReference.CipherValue != null)
return cipherData.CipherReference.CipherValue;
- Stream decInputStream;
+ Stream? decInputStream;
if (cipherData.CipherReference.Uri == null)
{
throw new CryptographicException(SR.Cryptography_Xml_UriNotSupported);
@@ -198,7 +200,7 @@ namespace System.Security.Cryptography.Xml
if (cipherData.CipherReference.Uri.Length == 0)
{
// self referenced Uri
- string baseUri = _document?.BaseURI;
+ string? baseUri = _document?.BaseURI;
TransformChain tc = cipherData.CipherReference.TransformChain;
if (tc == null)
{
@@ -210,13 +212,13 @@ namespace System.Security.Cryptography.Xml
{
string idref = Utils.ExtractIdFromLocalUri(cipherData.CipherReference.Uri);
// Serialize
- XmlElement idElem = GetIdElement(_document, idref);
+ XmlElement? idElem = GetIdElement(_document, idref);
if (idElem == null || idElem.OuterXml == null)
{
throw new CryptographicException(SR.Cryptography_Xml_UriNotSupported);
}
inputStream = new MemoryStream(_encoding.GetBytes(idElem.OuterXml));
- string baseUri = _document?.BaseURI;
+ string baseUri = _document.BaseURI;
TransformChain tc = cipherData.CipherReference.TransformChain;
if (tc == null)
{
@@ -229,7 +231,7 @@ namespace System.Security.Cryptography.Xml
throw new CryptographicException(SR.Cryptography_Xml_UriNotResolved, cipherData.CipherReference.Uri);
}
// read the output stream into a memory stream
- byte[] cipherValue = null;
+ byte[]? cipherValue = null;
using (MemoryStream ms = new MemoryStream())
{
Utils.Pump(decInputStream, ms);
@@ -253,13 +255,13 @@ namespace System.Security.Cryptography.Xml
//
// This describes how the application wants to associate id references to elements
- public virtual XmlElement GetIdElement(XmlDocument document, string idValue)
+ public virtual XmlElement? GetIdElement(XmlDocument document, string idValue)
{
return SignedXml.DefaultGetIdElement(document, idValue);
}
// default behaviour is to look for the IV in the CipherValue
- public virtual byte[] GetDecryptionIV(EncryptedData encryptedData, string symmetricAlgorithmUri)
+ public virtual byte[] GetDecryptionIV(EncryptedData encryptedData, string? symmetricAlgorithmUri)
{
if (encryptedData is null)
{
@@ -297,7 +299,7 @@ namespace System.Security.Cryptography.Xml
// default behaviour is to look for keys defined by an EncryptedKey clause
// either directly or through a KeyInfoRetrievalMethod, and key names in the key mapping
- public virtual SymmetricAlgorithm GetDecryptionKey(EncryptedData encryptedData, string symmetricAlgorithmUri)
+ public virtual SymmetricAlgorithm? GetDecryptionKey(EncryptedData encryptedData, string? symmetricAlgorithmUri)
{
if (encryptedData is null)
{
@@ -307,10 +309,10 @@ namespace System.Security.Cryptography.Xml
if (encryptedData.KeyInfo == null)
return null;
IEnumerator keyInfoEnum = encryptedData.KeyInfo.GetEnumerator();
- KeyInfoRetrievalMethod kiRetrievalMethod;
- KeyInfoName kiName;
- KeyInfoEncryptedKey kiEncKey;
- EncryptedKey ek = null;
+ KeyInfoRetrievalMethod? kiRetrievalMethod;
+ KeyInfoName? kiName;
+ KeyInfoEncryptedKey? kiEncKey;
+ EncryptedKey? ek = null;
while (keyInfoEnum.MoveNext())
{
@@ -318,18 +320,18 @@ namespace System.Security.Cryptography.Xml
if (kiName != null)
{
// Get the decryption key from the key mapping
- string keyName = kiName.Value;
- if ((SymmetricAlgorithm)_keyNameMapping[keyName] != null)
- return (SymmetricAlgorithm)_keyNameMapping[keyName];
+ string keyName = kiName.Value!;
+ if ((SymmetricAlgorithm?)_keyNameMapping[keyName] != null)
+ return (SymmetricAlgorithm)_keyNameMapping[keyName]!;
// try to get it from a CarriedKeyName
XmlNamespaceManager nsm = new XmlNamespaceManager(_document.NameTable);
nsm.AddNamespace("enc", EncryptedXml.XmlEncNamespaceUrl);
- XmlNodeList encryptedKeyList = _document.SelectNodes("//enc:EncryptedKey", nsm);
+ XmlNodeList? encryptedKeyList = _document.SelectNodes("//enc:EncryptedKey", nsm);
if (encryptedKeyList != null)
{
foreach (XmlNode encryptedKeyNode in encryptedKeyList)
{
- XmlElement encryptedKeyElement = encryptedKeyNode as XmlElement;
+ XmlElement encryptedKeyElement = (encryptedKeyNode as XmlElement)!;
EncryptedKey ek1 = new EncryptedKey();
ek1.LoadXml(encryptedKeyElement);
if (ek1.CarriedKeyName == keyName && ek1.Recipient == Recipient)
@@ -344,9 +346,9 @@ namespace System.Security.Cryptography.Xml
kiRetrievalMethod = keyInfoEnum.Current as KeyInfoRetrievalMethod;
if (kiRetrievalMethod != null)
{
- string idref = Utils.ExtractIdFromLocalUri(kiRetrievalMethod.Uri);
+ string idref = Utils.ExtractIdFromLocalUri(kiRetrievalMethod.Uri!);
ek = new EncryptedKey();
- ek.LoadXml(GetIdElement(_document, idref));
+ ek.LoadXml(GetIdElement(_document, idref)!);
break;
}
kiEncKey = keyInfoEnum.Current as KeyInfoEncryptedKey;
@@ -368,11 +370,11 @@ namespace System.Security.Cryptography.Xml
throw new CryptographicException(SR.Cryptography_Xml_MissingAlgorithm);
symmetricAlgorithmUri = encryptedData.EncryptionMethod.KeyAlgorithm;
}
- byte[] key = DecryptEncryptedKey(ek);
+ byte[]? key = DecryptEncryptedKey(ek);
if (key == null)
throw new CryptographicException(SR.Cryptography_Xml_MissingDecryptionKey);
- SymmetricAlgorithm symAlg = CryptoHelpers.CreateFromName<SymmetricAlgorithm>(symmetricAlgorithmUri);
+ SymmetricAlgorithm? symAlg = CryptoHelpers.CreateFromName<SymmetricAlgorithm>(symmetricAlgorithmUri);
if (symAlg == null)
{
throw new CryptographicException(SR.Cryptography_Xml_MissingAlgorithm);
@@ -384,7 +386,7 @@ namespace System.Security.Cryptography.Xml
}
// Try to decrypt the EncryptedKey given the key mapping
- public virtual byte[] DecryptEncryptedKey(EncryptedKey encryptedKey)
+ public virtual byte[]? DecryptEncryptedKey(EncryptedKey encryptedKey)
{
if (encryptedKey is null)
{
@@ -395,11 +397,11 @@ namespace System.Security.Cryptography.Xml
return null;
IEnumerator keyInfoEnum = encryptedKey.KeyInfo.GetEnumerator();
- KeyInfoName kiName;
- KeyInfoX509Data kiX509Data;
- KeyInfoRetrievalMethod kiRetrievalMethod;
- KeyInfoEncryptedKey kiEncKey;
- EncryptedKey ek;
+ KeyInfoName? kiName;
+ KeyInfoX509Data? kiX509Data;
+ KeyInfoRetrievalMethod? kiRetrievalMethod;
+ KeyInfoEncryptedKey? kiEncKey;
+ EncryptedKey? ek;
bool fOAEP;
while (keyInfoEnum.MoveNext())
@@ -408,8 +410,8 @@ namespace System.Security.Cryptography.Xml
if (kiName != null)
{
// Get the decryption key from the key mapping
- string keyName = kiName.Value;
- object kek = _keyNameMapping[keyName];
+ string keyName = kiName.Value!;
+ object? kek = _keyNameMapping[keyName];
if (kek != null)
{
if (encryptedKey.CipherData == null || encryptedKey.CipherData.CipherValue == null)
@@ -432,7 +434,7 @@ namespace System.Security.Cryptography.Xml
X509Certificate2Collection collection = Utils.BuildBagOfCerts(kiX509Data, CertUsageType.Decryption);
foreach (X509Certificate2 certificate in collection)
{
- using (RSA privateKey = certificate.GetRSAPrivateKey())
+ using (RSA? privateKey = certificate.GetRSAPrivateKey())
{
if (privateKey != null)
{
@@ -450,9 +452,9 @@ namespace System.Security.Cryptography.Xml
kiRetrievalMethod = keyInfoEnum.Current as KeyInfoRetrievalMethod;
if (kiRetrievalMethod != null)
{
- string idref = Utils.ExtractIdFromLocalUri(kiRetrievalMethod.Uri);
+ string idref = Utils.ExtractIdFromLocalUri(kiRetrievalMethod.Uri!);
ek = new EncryptedKey();
- ek.LoadXml(GetIdElement(_document, idref));
+ ek.LoadXml(GetIdElement(_document, idref)!);
try
{
//Following checks if XML dsig processing is in loop and within the limit defined by machine
@@ -478,11 +480,11 @@ namespace System.Security.Cryptography.Xml
{
ek = kiEncKey.EncryptedKey;
// recursively process EncryptedKey elements
- byte[] encryptionKey = DecryptEncryptedKey(ek);
+ byte[]? encryptionKey = DecryptEncryptedKey(ek!);
if (encryptionKey != null)
{
// this is a symmetric algorithm for sure
- SymmetricAlgorithm symAlg = CryptoHelpers.CreateFromName<SymmetricAlgorithm>(encryptedKey.EncryptionMethod.KeyAlgorithm);
+ SymmetricAlgorithm? symAlg = CryptoHelpers.CreateFromName<SymmetricAlgorithm>(encryptedKey.EncryptionMethod!.KeyAlgorithm);
if (symAlg == null)
{
throw new CryptographicException(SR.Cryptography_Xml_MissingAlgorithm);
@@ -540,7 +542,7 @@ namespace System.Security.Cryptography.Xml
throw new ArgumentNullException(nameof(certificate));
}
- using (RSA rsaPublicKey = certificate.GetRSAPublicKey())
+ using (RSA? rsaPublicKey = certificate.GetRSAPublicKey())
{
if (rsaPublicKey == null)
throw new NotSupportedException(SR.NotSupported_KeyAlgorithm);
@@ -584,7 +586,7 @@ namespace System.Security.Cryptography.Xml
throw new ArgumentNullException(nameof(keyName));
}
- object encryptionKey = null;
+ object? encryptionKey = null;
if (_keyNameMapping != null)
encryptionKey = _keyNameMapping[keyName];
@@ -592,8 +594,8 @@ namespace System.Security.Cryptography.Xml
throw new CryptographicException(SR.Cryptography_Xml_MissingEncryptionKey);
// kek is either a SymmetricAlgorithm or an RSA key, otherwise, we wouldn't be able to insert it in the hash table
- SymmetricAlgorithm symKey = encryptionKey as SymmetricAlgorithm;
- RSA rsa = encryptionKey as RSA;
+ SymmetricAlgorithm symKey = (encryptionKey as SymmetricAlgorithm)!;
+ RSA rsa = (encryptionKey as RSA)!;
// Create the EncryptedData object, using an AES-256 session key by default.
EncryptedData ed = new EncryptedData();
@@ -601,7 +603,7 @@ namespace System.Security.Cryptography.Xml
ed.EncryptionMethod = new EncryptionMethod(EncryptedXml.XmlEncAES256Url);
// Include the key name in the EncryptedKey KeyInfo.
- string encryptionMethod = null;
+ string? encryptionMethod = null;
if (symKey == null)
{
encryptionMethod = EncryptedXml.XmlEncRSA15Url;
@@ -660,15 +662,15 @@ namespace System.Security.Cryptography.Xml
// Look for all EncryptedData elements and decrypt them
XmlNamespaceManager nsm = new XmlNamespaceManager(_document.NameTable);
nsm.AddNamespace("enc", EncryptedXml.XmlEncNamespaceUrl);
- XmlNodeList encryptedDataList = _document.SelectNodes("//enc:EncryptedData", nsm);
+ XmlNodeList? encryptedDataList = _document.SelectNodes("//enc:EncryptedData", nsm);
if (encryptedDataList != null)
{
foreach (XmlNode encryptedDataNode in encryptedDataList)
{
- XmlElement encryptedDataElement = encryptedDataNode as XmlElement;
+ XmlElement encryptedDataElement = (encryptedDataNode as XmlElement)!;
EncryptedData ed = new EncryptedData();
ed.LoadXml(encryptedDataElement);
- SymmetricAlgorithm symAlg = GetDecryptionKey(ed, null);
+ SymmetricAlgorithm? symAlg = GetDecryptionKey(ed, null);
if (symAlg == null)
throw new CryptographicException(SR.Cryptography_Xml_MissingDecryptionKey);
byte[] decrypted = DecryptData(ed, symAlg);
@@ -693,7 +695,7 @@ namespace System.Security.Cryptography.Xml
CipherMode origMode = symmetricAlgorithm.Mode;
PaddingMode origPadding = symmetricAlgorithm.Padding;
- byte[] cipher = null;
+ byte[]? cipher = null;
try
{
symmetricAlgorithm.Mode = _mode;
@@ -761,11 +763,11 @@ namespace System.Security.Cryptography.Xml
byte[] origIV = symmetricAlgorithm.IV;
// read the IV from cipherValue
- byte[] decryptionIV = null;
+ byte[]? decryptionIV = null;
if (_mode != CipherMode.ECB)
decryptionIV = GetDecryptionIV(encryptedData, null);
- byte[] output = null;
+ byte[]? output = null;
try
{
int lengthIV = 0;
@@ -803,7 +805,7 @@ namespace System.Security.Cryptography.Xml
throw new ArgumentNullException(nameof(decryptedData));
}
- XmlNode parent = inputElement.ParentNode;
+ XmlNode parent = inputElement.ParentNode!;
if (parent.NodeType == XmlNodeType.Document)
{
// We're replacing the root element, but we can't just wholesale replace the owner
@@ -821,14 +823,14 @@ namespace System.Security.Cryptography.Xml
}
}
- XmlNode importedNode = inputElement.OwnerDocument.ImportNode(importDocument.DocumentElement, true);
+ XmlNode importedNode = inputElement.OwnerDocument.ImportNode(importDocument.DocumentElement!, true);
parent.RemoveChild(inputElement);
parent.AppendChild(importedNode);
}
else
{
- XmlNode dummy = parent.OwnerDocument.CreateElement(parent.Prefix, parent.LocalName, parent.NamespaceURI);
+ XmlNode dummy = parent.OwnerDocument!.CreateElement(parent.Prefix, parent.LocalName, parent.NamespaceURI);
try
{
@@ -839,10 +841,10 @@ namespace System.Security.Cryptography.Xml
dummy.InnerXml = _encoding.GetString(decryptedData);
// Move the children of the dummy node up to the parent.
- XmlNode child = dummy.FirstChild;
- XmlNode sibling = inputElement.NextSibling;
+ XmlNode? child = dummy.FirstChild;
+ XmlNode? sibling = inputElement.NextSibling;
- XmlNode nextChild = null;
+ XmlNode? nextChild = null;
while (child != null)
{
nextChild = child.NextSibling;
@@ -888,7 +890,7 @@ namespace System.Security.Cryptography.Xml
inputElement.AppendChild(elemED);
break;
case false:
- XmlNode parentNode = inputElement.ParentNode;
+ XmlNode parentNode = inputElement.ParentNode!;
// remove the input element from the containing document
parentNode.ReplaceChild(elemED, inputElement);
break;
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptionMethod.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptionMethod.cs
index 4ef3bf89a87..d50aa84b1dc 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptionMethod.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptionMethod.cs
@@ -1,27 +1,29 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+using System.Diagnostics.CodeAnalysis;
using System.Xml;
namespace System.Security.Cryptography.Xml
{
public class EncryptionMethod
{
- private XmlElement _cachedXml;
+ private XmlElement? _cachedXml;
private int _keySize;
- private string _algorithm;
+ private string? _algorithm;
public EncryptionMethod()
{
_cachedXml = null;
}
- public EncryptionMethod(string algorithm)
+ public EncryptionMethod(string? algorithm)
{
_algorithm = algorithm;
_cachedXml = null;
}
+ [MemberNotNullWhen(true, nameof(_cachedXml))]
private bool CacheValid
{
get
@@ -42,7 +44,7 @@ namespace System.Security.Cryptography.Xml
}
}
- public string KeyAlgorithm
+ public string? KeyAlgorithm
{
get { return _algorithm; }
set
@@ -54,7 +56,7 @@ namespace System.Security.Cryptography.Xml
public XmlElement GetXml()
{
- if (CacheValid) return (_cachedXml);
+ if (CacheValid) return _cachedXml;
XmlDocument document = new XmlDocument();
document.PreserveWhitespace = true;
@@ -90,7 +92,7 @@ namespace System.Security.Cryptography.Xml
XmlElement encryptionMethodElement = value;
_algorithm = Utils.GetAttribute(encryptionMethodElement, "Algorithm", EncryptedXml.XmlEncNamespaceUrl);
- XmlNode keySizeNode = value.SelectSingleNode("enc:KeySize", nsm);
+ XmlNode? keySizeNode = value.SelectSingleNode("enc:KeySize", nsm);
if (keySizeNode != null)
{
KeySize = Convert.ToInt32(Utils.DiscardWhiteSpaces(keySizeNode.InnerText), null);
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptionProperty.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptionProperty.cs
index 6077bd264f8..73fc558402c 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptionProperty.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptionProperty.cs
@@ -1,16 +1,17 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+using System.Diagnostics.CodeAnalysis;
using System.Xml;
namespace System.Security.Cryptography.Xml
{
public sealed class EncryptionProperty
{
- private string _target;
- private string _id;
- private XmlElement _elemProp;
- private XmlElement _cachedXml;
+ private string? _target;
+ private string? _id;
+ private XmlElement? _elemProp;
+ private XmlElement? _cachedXml;
// We are being lax here as per the spec
public EncryptionProperty() { }
@@ -29,17 +30,18 @@ namespace System.Security.Cryptography.Xml
_cachedXml = null;
}
- public string Id
+ public string? Id
{
get { return _id; }
}
- public string Target
+ public string? Target
{
get { return _target; }
}
- public XmlElement PropertyElement
+ [DisallowNull]
+ public XmlElement? PropertyElement
{
get { return _elemProp; }
set
@@ -54,6 +56,7 @@ namespace System.Security.Cryptography.Xml
}
}
+ [MemberNotNullWhen(true, nameof(_cachedXml))]
private bool CacheValid
{
get
@@ -73,7 +76,7 @@ namespace System.Security.Cryptography.Xml
internal XmlElement GetXml(XmlDocument document)
{
- return document.ImportNode(_elemProp, true) as XmlElement;
+ return (document.ImportNode(_elemProp!, true) as XmlElement)!;
}
public void LoadXml(XmlElement value)
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptionPropertyCollection.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptionPropertyCollection.cs
index 0fca5ef01af..6246b541f61 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptionPropertyCollection.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/EncryptionPropertyCollection.cs
@@ -25,7 +25,7 @@ namespace System.Security.Cryptography.Xml
}
/// <internalonly/>
- int IList.Add(object value)
+ int IList.Add(object? value)
{
if (!(value is EncryptionProperty))
throw new ArgumentException(SR.Cryptography_Xml_IncorrectObjectType, nameof(value));
@@ -44,7 +44,7 @@ namespace System.Security.Cryptography.Xml
}
/// <internalonly/>
- bool IList.Contains(object value)
+ bool IList.Contains(object? value)
{
if (!(value is EncryptionProperty))
throw new ArgumentException(SR.Cryptography_Xml_IncorrectObjectType, nameof(value));
@@ -58,7 +58,7 @@ namespace System.Security.Cryptography.Xml
}
/// <internalonly/>
- int IList.IndexOf(object value)
+ int IList.IndexOf(object? value)
{
if (!(value is EncryptionProperty))
throw new ArgumentException(SR.Cryptography_Xml_IncorrectObjectType, nameof(value));
@@ -72,7 +72,7 @@ namespace System.Security.Cryptography.Xml
}
/// <internalonly/>
- void IList.Insert(int index, object value)
+ void IList.Insert(int index, object? value)
{
if (!(value is EncryptionProperty))
throw new ArgumentException(SR.Cryptography_Xml_IncorrectObjectType, nameof(value));
@@ -86,7 +86,7 @@ namespace System.Security.Cryptography.Xml
}
/// <internalonly/>
- void IList.Remove(object value)
+ void IList.Remove(object? value)
{
if (!(value is EncryptionProperty))
throw new ArgumentException(SR.Cryptography_Xml_IncorrectObjectType, nameof(value));
@@ -116,7 +116,7 @@ namespace System.Security.Cryptography.Xml
public EncryptionProperty Item(int index)
{
- return (EncryptionProperty)_props[index];
+ return (EncryptionProperty)_props[index]!;
}
[System.Runtime.CompilerServices.IndexerName("ItemOf")]
@@ -124,7 +124,7 @@ namespace System.Security.Cryptography.Xml
{
get
{
- return (EncryptionProperty)((IList)this)[index];
+ return (EncryptionProperty)((IList)this)[index]!;
}
set
{
@@ -133,7 +133,7 @@ namespace System.Security.Cryptography.Xml
}
/// <internalonly/>
- object IList.this[int index]
+ object? IList.this[int index]
{
get { return _props[index]; }
set
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/ExcAncestralNamespaceContextManager.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/ExcAncestralNamespaceContextManager.cs
index 4c5738fcf69..92b47b42f5c 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/ExcAncestralNamespaceContextManager.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/ExcAncestralNamespaceContextManager.cs
@@ -33,8 +33,8 @@ namespace System.Security.Cryptography.Xml
}
int rDepth;
- XmlAttribute local = (XmlAttribute)nsLocallyDeclared[nsPrefix];
- XmlAttribute rAncestral = GetNearestRenderedNamespaceWithMatchingPrefix(nsPrefix, out rDepth);
+ XmlAttribute? local = (XmlAttribute?)nsLocallyDeclared[nsPrefix];
+ XmlAttribute? rAncestral = GetNearestRenderedNamespaceWithMatchingPrefix(nsPrefix, out rDepth);
if (local != null)
{
@@ -47,7 +47,7 @@ namespace System.Security.Cryptography.Xml
else
{
int uDepth;
- XmlAttribute uAncestral = GetNearestUnrenderedNamespaceWithMatchingPrefix(nsPrefix, out uDepth);
+ XmlAttribute? uAncestral = GetNearestUnrenderedNamespaceWithMatchingPrefix(nsPrefix, out uDepth);
if (uAncestral != null && uDepth > rDepth && Utils.IsNonRedundantNamespaceDecl(uAncestral, rAncestral))
{
nsListToRender.Add(uAncestral, null);
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/ExcCanonicalXml.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/ExcCanonicalXml.cs
index 4a846539bcc..41d3a466d65 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/ExcCanonicalXml.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/ExcCanonicalXml.cs
@@ -45,7 +45,7 @@ namespace System.Security.Cryptography.Xml
throw new ArgumentNullException(nameof(nodeList));
}
- XmlDocument doc = Utils.GetOwnerDocument(nodeList);
+ XmlDocument? doc = Utils.GetOwnerDocument(nodeList);
if (doc == null)
throw new ArgumentException(nameof(nodeList));
@@ -69,7 +69,7 @@ namespace System.Security.Cryptography.Xml
{
_c14nDoc.WriteHash(hash, DocPosition.BeforeRootElement, _ancMgr);
hash.TransformFinalBlock(Array.Empty<byte>(), 0, 0);
- byte[] res = (byte[])hash.Hash.Clone();
+ byte[] res = (byte[])hash.Hash!.Clone();
// reinitialize the hash so it is still usable after the call
hash.Initialize();
return res;
@@ -85,8 +85,8 @@ namespace System.Security.Cryptography.Xml
do
{
- XmlNode currentNode = (XmlNode)elementList[index];
- XmlNode currentNodeCanonical = (XmlNode)elementListCanonical[index];
+ XmlNode currentNode = (XmlNode)elementList[index]!;
+ XmlNode currentNodeCanonical = (XmlNode)elementListCanonical[index]!;
XmlNodeList childNodes = currentNode.ChildNodes;
XmlNodeList childNodesCanonical = currentNodeCanonical.ChildNodes;
for (int i = 0; i < childNodes.Count; i++)
@@ -96,17 +96,17 @@ namespace System.Security.Cryptography.Xml
if (Utils.NodeInList(childNodes[i], nodeList))
{
- MarkNodeAsIncluded(childNodesCanonical[i]);
+ MarkNodeAsIncluded(childNodesCanonical[i]!);
}
- XmlAttributeCollection attribNodes = childNodes[i].Attributes;
+ XmlAttributeCollection? attribNodes = childNodes[i]!.Attributes;
if (attribNodes != null)
{
for (int j = 0; j < attribNodes.Count; j++)
{
if (Utils.NodeInList(attribNodes[j], nodeList))
{
- MarkNodeAsIncluded(childNodesCanonical[i].Attributes.Item(j));
+ MarkNodeAsIncluded(childNodesCanonical[i]!.Attributes!.Item(j)!);
}
}
}
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/KeyInfo.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/KeyInfo.cs
index 81bad806cd9..8b4db7b7674 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/KeyInfo.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/KeyInfo.cs
@@ -8,7 +8,7 @@ namespace System.Security.Cryptography.Xml
{
public class KeyInfo : IEnumerable
{
- private string _id;
+ private string? _id;
private readonly ArrayList _keyInfoClauses;
//
@@ -24,7 +24,7 @@ namespace System.Security.Cryptography.Xml
// public properties
//
- public string Id
+ public string? Id
{
get { return _id; }
set { _id = value; }
@@ -49,7 +49,7 @@ namespace System.Security.Cryptography.Xml
// Add all the clauses that go underneath it
for (int i = 0; i < _keyInfoClauses.Count; ++i)
{
- XmlElement xmlElement = ((KeyInfoClause)_keyInfoClauses[i]).GetXml(xmlDocument);
+ XmlElement xmlElement = ((KeyInfoClause)_keyInfoClauses[i]!).GetXml(xmlDocument);
if (xmlElement != null)
{
keyInfoElement.AppendChild(xmlElement);
@@ -70,10 +70,10 @@ namespace System.Security.Cryptography.Xml
if (!Utils.VerifyAttributes(keyInfoElement, "Id"))
throw new CryptographicException(SR.Cryptography_Xml_InvalidElement, "KeyInfo");
- XmlNode child = keyInfoElement.FirstChild;
+ XmlNode? child = keyInfoElement.FirstChild;
while (child != null)
{
- XmlElement elem = child as XmlElement;
+ XmlElement? elem = child as XmlElement;
if (elem != null)
{
// Create the right type of KeyInfoClause; we use a combination of the namespace and tag name (local name)
@@ -81,14 +81,14 @@ namespace System.Security.Cryptography.Xml
// Special-case handling for KeyValue -- we have to go one level deeper
if (kicString == "http://www.w3.org/2000/09/xmldsig# KeyValue")
{
- if (!Utils.VerifyAttributes(elem, (string[])null))
+ if (!Utils.VerifyAttributes(elem, (string[]?)null))
{
throw new CryptographicException(SR.Cryptography_Xml_InvalidElement, "KeyInfo/KeyValue");
}
XmlNodeList nodeList2 = elem.ChildNodes;
foreach (XmlNode node2 in nodeList2)
{
- XmlElement elem2 = node2 as XmlElement;
+ XmlElement? elem2 = node2 as XmlElement;
if (elem2 != null)
{
kicString += "/" + elem2.LocalName;
@@ -97,7 +97,7 @@ namespace System.Security.Cryptography.Xml
}
}
- KeyInfoClause keyInfoClause = CryptoHelpers.CreateFromName<KeyInfoClause>(kicString);
+ KeyInfoClause? keyInfoClause = CryptoHelpers.CreateFromName<KeyInfoClause>(kicString);
// if we don't know what kind of KeyInfoClause we're looking at, use a generic KeyInfoNode:
keyInfoClause ??= new KeyInfoNode();
@@ -138,7 +138,7 @@ namespace System.Security.Cryptography.Xml
while (tempEnum.MoveNext())
{
- tempObj = tempEnum.Current;
+ tempObj = tempEnum.Current!;
if (requestedObjectType.Equals(tempObj.GetType()))
requestedList.Add(tempObj);
}
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/KeyInfoEncryptedKey.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/KeyInfoEncryptedKey.cs
index 2ddeee99d99..02321596fdb 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/KeyInfoEncryptedKey.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/KeyInfoEncryptedKey.cs
@@ -7,7 +7,7 @@ namespace System.Security.Cryptography.Xml
{
public class KeyInfoEncryptedKey : KeyInfoClause
{
- private EncryptedKey _encryptedKey;
+ private EncryptedKey? _encryptedKey;
public KeyInfoEncryptedKey() { }
@@ -16,7 +16,7 @@ namespace System.Security.Cryptography.Xml
_encryptedKey = encryptedKey;
}
- public EncryptedKey EncryptedKey
+ public EncryptedKey? EncryptedKey
{
get { return _encryptedKey; }
set { _encryptedKey = value; }
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/KeyInfoName.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/KeyInfoName.cs
index 7c39edd82a7..46082bbb0aa 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/KeyInfoName.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/KeyInfoName.cs
@@ -7,7 +7,7 @@ namespace System.Security.Cryptography.Xml
{
public class KeyInfoName : KeyInfoClause
{
- private string _keyName;
+ private string? _keyName;
//
// public constructors
@@ -15,7 +15,7 @@ namespace System.Security.Cryptography.Xml
public KeyInfoName() : this(null) { }
- public KeyInfoName(string keyName)
+ public KeyInfoName(string? keyName)
{
Value = keyName;
}
@@ -24,7 +24,7 @@ namespace System.Security.Cryptography.Xml
// public properties
//
- public string Value
+ public string? Value
{
get { return _keyName; }
set { _keyName = value; }
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/KeyInfoNode.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/KeyInfoNode.cs
index 87e7c19c335..c0c47bd4cc3 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/KeyInfoNode.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/KeyInfoNode.cs
@@ -8,7 +8,7 @@ namespace System.Security.Cryptography.Xml
// This is for generic, unknown nodes
public class KeyInfoNode : KeyInfoClause
{
- private XmlElement _node;
+ private XmlElement? _node;
//
// public constructors
@@ -25,7 +25,7 @@ namespace System.Security.Cryptography.Xml
// public properties
//
- public XmlElement Value
+ public XmlElement? Value
{
get { return _node; }
set { _node = value; }
@@ -44,7 +44,7 @@ namespace System.Security.Cryptography.Xml
internal override XmlElement GetXml(XmlDocument xmlDocument)
{
- return xmlDocument.ImportNode(_node, true) as XmlElement;
+ return (xmlDocument.ImportNode(_node!, true) as XmlElement)!;
}
public override void LoadXml(XmlElement value)
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/KeyInfoRetrievalMethod.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/KeyInfoRetrievalMethod.cs
index 65b6853437e..9f26e6f1866 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/KeyInfoRetrievalMethod.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/KeyInfoRetrievalMethod.cs
@@ -7,8 +7,8 @@ namespace System.Security.Cryptography.Xml
{
public class KeyInfoRetrievalMethod : KeyInfoClause
{
- private string _uri;
- private string _type;
+ private string? _uri;
+ private string? _type;
//
// public constructors
@@ -16,7 +16,7 @@ namespace System.Security.Cryptography.Xml
public KeyInfoRetrievalMethod() { }
- public KeyInfoRetrievalMethod(string strUri)
+ public KeyInfoRetrievalMethod(string? strUri)
{
_uri = strUri;
}
@@ -31,13 +31,13 @@ namespace System.Security.Cryptography.Xml
// public properties
//
- public string Uri
+ public string? Uri
{
get { return _uri; }
set { _uri = value; }
}
- public string Type
+ public string? Type
{
get { return _type; }
set { _type = value; }
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/KeyInfoX509Data.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/KeyInfoX509Data.cs
index cfde60fc31d..87bb9ac53ef 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/KeyInfoX509Data.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/KeyInfoX509Data.cs
@@ -12,15 +12,15 @@ namespace System.Security.Cryptography.Xml
public class KeyInfoX509Data : KeyInfoClause
{
// An array of certificates representing the certificate chain
- private ArrayList _certificates;
+ private ArrayList? _certificates;
// An array of issuer serial structs
- private ArrayList _issuerSerials;
+ private ArrayList? _issuerSerials;
// An array of SKIs
- private ArrayList _subjectKeyIds;
+ private ArrayList? _subjectKeyIds;
// An array of subject names
- private ArrayList _subjectNames;
+ private ArrayList? _subjectNames;
// A raw byte data representing a certificate revocation list
- private byte[] _CRL;
+ private byte[]? _CRL;
//
// public constructors
@@ -97,7 +97,7 @@ namespace System.Security.Cryptography.Xml
// public properties
//
- public ArrayList Certificates
+ public ArrayList? Certificates
{
get { return _certificates; }
}
@@ -115,7 +115,7 @@ namespace System.Security.Cryptography.Xml
_certificates.Add(x509);
}
- public ArrayList SubjectKeyIds
+ public ArrayList? SubjectKeyIds
{
get { return _subjectKeyIds; }
}
@@ -132,7 +132,7 @@ namespace System.Security.Cryptography.Xml
_subjectKeyIds.Add(Utils.DecodeHexString(subjectKeyId));
}
- public ArrayList SubjectNames
+ public ArrayList? SubjectNames
{
get { return _subjectNames; }
}
@@ -143,7 +143,7 @@ namespace System.Security.Cryptography.Xml
_subjectNames.Add(subjectName);
}
- public ArrayList IssuerSerials
+ public ArrayList? IssuerSerials
{
get { return _issuerSerials; }
}
@@ -171,7 +171,7 @@ namespace System.Security.Cryptography.Xml
_issuerSerials.Add(Utils.CreateX509IssuerSerial(issuerName, serialNumber));
}
- public byte[] CRL
+ public byte[]? CRL
{
get { return _CRL; }
set { _CRL = value; }
@@ -270,11 +270,11 @@ namespace System.Security.Cryptography.Xml
XmlNamespaceManager nsm = new XmlNamespaceManager(element.OwnerDocument.NameTable);
nsm.AddNamespace("ds", SignedXml.XmlDsigNamespaceUrl);
- XmlNodeList x509IssuerSerialNodes = element.SelectNodes("ds:X509IssuerSerial", nsm);
- XmlNodeList x509SKINodes = element.SelectNodes("ds:X509SKI", nsm);
- XmlNodeList x509SubjectNameNodes = element.SelectNodes("ds:X509SubjectName", nsm);
- XmlNodeList x509CertificateNodes = element.SelectNodes("ds:X509Certificate", nsm);
- XmlNodeList x509CRLNodes = element.SelectNodes("ds:X509CRL", nsm);
+ XmlNodeList x509IssuerSerialNodes = element.SelectNodes("ds:X509IssuerSerial", nsm)!;
+ XmlNodeList x509SKINodes = element.SelectNodes("ds:X509SKI", nsm)!;
+ XmlNodeList x509SubjectNameNodes = element.SelectNodes("ds:X509SubjectName", nsm)!;
+ XmlNodeList x509CertificateNodes = element.SelectNodes("ds:X509Certificate", nsm)!;
+ XmlNodeList x509CRLNodes = element.SelectNodes("ds:X509CRL", nsm)!;
if ((x509CRLNodes.Count == 0 && x509IssuerSerialNodes.Count == 0 && x509SKINodes.Count == 0
&& x509SubjectNameNodes.Count == 0 && x509CertificateNodes.Count == 0)) // Bad X509Data tag, or Empty tag
@@ -284,12 +284,12 @@ namespace System.Security.Cryptography.Xml
Clear();
if (x509CRLNodes.Count != 0)
- _CRL = Convert.FromBase64String(Utils.DiscardWhiteSpaces(x509CRLNodes.Item(0).InnerText));
+ _CRL = Convert.FromBase64String(Utils.DiscardWhiteSpaces(x509CRLNodes.Item(0)!.InnerText));
foreach (XmlNode issuerSerialNode in x509IssuerSerialNodes)
{
- XmlNode x509IssuerNameNode = issuerSerialNode.SelectSingleNode("ds:X509IssuerName", nsm);
- XmlNode x509SerialNumberNode = issuerSerialNode.SelectSingleNode("ds:X509SerialNumber", nsm);
+ XmlNode? x509IssuerNameNode = issuerSerialNode.SelectSingleNode("ds:X509IssuerName", nsm);
+ XmlNode? x509SerialNumberNode = issuerSerialNode.SelectSingleNode("ds:X509SerialNumber", nsm);
if (x509IssuerNameNode == null || x509SerialNumberNode == null)
throw new CryptographicException(SR.Cryptography_Xml_InvalidElement, "IssuerSerial");
InternalAddIssuerSerial(x509IssuerNameNode.InnerText.Trim(), x509SerialNumberNode.InnerText.Trim());
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/MyXmlDocument.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/MyXmlDocument.cs
index 808a3bbbd77..281c64f6929 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/MyXmlDocument.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/MyXmlDocument.cs
@@ -7,7 +7,7 @@ namespace System.Security.Cryptography.Xml
{
internal sealed class MyXmlDocument : XmlDocument
{
- protected override XmlAttribute CreateDefaultAttribute(string prefix, string localName, string namespaceURI)
+ protected override XmlAttribute CreateDefaultAttribute(string? prefix, string localName, string? namespaceURI)
{
return CreateAttribute(prefix, localName, namespaceURI);
}
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/NamespaceFrame.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/NamespaceFrame.cs
index 1af976d8fb8..639f25e1579 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/NamespaceFrame.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/NamespaceFrame.cs
@@ -21,9 +21,9 @@ namespace System.Security.Cryptography.Xml
_rendered.Add(Utils.GetNamespacePrefix(attr), attr);
}
- internal XmlAttribute GetRendered(string nsPrefix)
+ internal XmlAttribute? GetRendered(string nsPrefix)
{
- return (XmlAttribute)_rendered[nsPrefix];
+ return (XmlAttribute?)_rendered[nsPrefix];
}
internal void AddUnrendered(XmlAttribute attr)
@@ -31,9 +31,9 @@ namespace System.Security.Cryptography.Xml
_unrendered.Add(Utils.GetNamespacePrefix(attr), attr);
}
- internal XmlAttribute GetUnrendered(string nsPrefix)
+ internal XmlAttribute? GetUnrendered(string nsPrefix)
{
- return (XmlAttribute)_unrendered[nsPrefix];
+ return (XmlAttribute?)_unrendered[nsPrefix];
}
internal Hashtable GetUnrendered()
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/NamespaceSortOrder.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/NamespaceSortOrder.cs
index 1e998ef7e88..7a0766dbdc3 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/NamespaceSortOrder.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/NamespaceSortOrder.cs
@@ -10,10 +10,10 @@ namespace System.Security.Cryptography.Xml
{
internal NamespaceSortOrder() { }
- public int Compare(object a, object b)
+ public int Compare(object? a, object? b)
{
- XmlNode nodeA = a as XmlNode;
- XmlNode nodeB = b as XmlNode;
+ XmlNode? nodeA = a as XmlNode;
+ XmlNode? nodeB = b as XmlNode;
if ((nodeA == null) || (nodeB == null))
throw new ArgumentException();
bool nodeAdefault = Utils.IsDefaultNamespaceNode(nodeA);
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/RSAKeyValue.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/RSAKeyValue.cs
index aab2e015266..c71e2b2016a 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/RSAKeyValue.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/RSAKeyValue.cs
@@ -79,11 +79,11 @@ namespace System.Security.Cryptography.Xml
XmlElement rsaKeyValueElement = xmlDocument.CreateElement(RSAKeyValueElementName, SignedXml.XmlDsigNamespaceUrl);
XmlElement modulusElement = xmlDocument.CreateElement(ModulusElementName, SignedXml.XmlDsigNamespaceUrl);
- modulusElement.AppendChild(xmlDocument.CreateTextNode(Convert.ToBase64String(rsaParams.Modulus)));
+ modulusElement.AppendChild(xmlDocument.CreateTextNode(Convert.ToBase64String(rsaParams.Modulus!)));
rsaKeyValueElement.AppendChild(modulusElement);
XmlElement exponentElement = xmlDocument.CreateElement(ExponentElementName, SignedXml.XmlDsigNamespaceUrl);
- exponentElement.AppendChild(xmlDocument.CreateTextNode(Convert.ToBase64String(rsaParams.Exponent)));
+ exponentElement.AppendChild(xmlDocument.CreateTextNode(Convert.ToBase64String(rsaParams.Exponent!)));
rsaKeyValueElement.AppendChild(exponentElement);
keyValueElement.AppendChild(rsaKeyValueElement);
@@ -123,7 +123,7 @@ namespace System.Security.Cryptography.Xml
XmlNamespaceManager xmlNamespaceManager = new XmlNamespaceManager(value.OwnerDocument.NameTable);
xmlNamespaceManager.AddNamespace(xmlDsigNamespacePrefix, SignedXml.XmlDsigNamespaceUrl);
- XmlNode rsaKeyValueElement = value.SelectSingleNode($"{xmlDsigNamespacePrefix}:{RSAKeyValueElementName}", xmlNamespaceManager);
+ XmlNode? rsaKeyValueElement = value.SelectSingleNode($"{xmlDsigNamespacePrefix}:{RSAKeyValueElementName}", xmlNamespaceManager);
if (rsaKeyValueElement == null)
{
throw new CryptographicException(SR.Format(SR.MustContainChildElement, KeyValueElementName, RSAKeyValueElementName));
@@ -133,8 +133,8 @@ namespace System.Security.Cryptography.Xml
{
Key.ImportParameters(new RSAParameters
{
- Modulus = Convert.FromBase64String(rsaKeyValueElement.SelectSingleNode($"{xmlDsigNamespacePrefix}:{ModulusElementName}", xmlNamespaceManager).InnerText),
- Exponent = Convert.FromBase64String(rsaKeyValueElement.SelectSingleNode($"{xmlDsigNamespacePrefix}:{ExponentElementName}", xmlNamespaceManager).InnerText)
+ Modulus = Convert.FromBase64String(rsaKeyValueElement.SelectSingleNode($"{xmlDsigNamespacePrefix}:{ModulusElementName}", xmlNamespaceManager)!.InnerText),
+ Exponent = Convert.FromBase64String(rsaKeyValueElement.SelectSingleNode($"{xmlDsigNamespacePrefix}:{ExponentElementName}", xmlNamespaceManager)!.InnerText)
});
}
catch (Exception ex)
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/RSAPKCS1SignatureDescription.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/RSAPKCS1SignatureDescription.cs
index f19884fbc88..9c48c3172d4 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/RSAPKCS1SignatureDescription.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/RSAPKCS1SignatureDescription.cs
@@ -15,17 +15,17 @@ namespace System.Security.Cryptography.Xml
public sealed override AsymmetricSignatureDeformatter CreateDeformatter(AsymmetricAlgorithm key)
{
- var item = (AsymmetricSignatureDeformatter)CryptoConfig.CreateFromName(DeformatterAlgorithm);
+ var item = (AsymmetricSignatureDeformatter)CryptoConfig.CreateFromName(DeformatterAlgorithm!)!;
item.SetKey(key);
- item.SetHashAlgorithm(DigestAlgorithm);
+ item.SetHashAlgorithm(DigestAlgorithm!);
return item;
}
public sealed override AsymmetricSignatureFormatter CreateFormatter(AsymmetricAlgorithm key)
{
- var item = (AsymmetricSignatureFormatter)CryptoConfig.CreateFromName(FormatterAlgorithm);
+ var item = (AsymmetricSignatureFormatter)CryptoConfig.CreateFromName(FormatterAlgorithm!)!;
item.SetKey(key);
- item.SetHashAlgorithm(DigestAlgorithm);
+ item.SetHashAlgorithm(DigestAlgorithm!);
return item;
}
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/Reference.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/Reference.cs
index 05c7625170e..801dae7f9e9 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/Reference.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/Reference.cs
@@ -4,6 +4,7 @@
using System.IO;
using System.Net;
using System.Xml;
+using System.Diagnostics.CodeAnalysis;
namespace System.Security.Cryptography.Xml
{
@@ -11,18 +12,18 @@ namespace System.Security.Cryptography.Xml
{
internal const string DefaultDigestMethod = SignedXml.XmlDsigSHA256Url;
- private string _id;
- private string _uri;
- private string _type;
+ private string? _id;
+ private string? _uri;
+ private string? _type;
private TransformChain _transformChain;
private string _digestMethod;
- private byte[] _digestValue;
- private HashAlgorithm _hashAlgorithm;
- private readonly object _refTarget;
+ private byte[]? _digestValue;
+ private HashAlgorithm? _hashAlgorithm;
+ private readonly object? _refTarget;
private readonly ReferenceTargetType _refTargetType;
- private XmlElement _cachedXml;
- private SignedXml _signedXml;
- internal CanonicalXmlNodeList _namespaces;
+ private XmlElement? _cachedXml;
+ private SignedXml? _signedXml;
+ internal CanonicalXmlNodeList? _namespaces;
//
// public constructors
@@ -46,7 +47,7 @@ namespace System.Security.Cryptography.Xml
_digestMethod = DefaultDigestMethod;
}
- public Reference(string uri)
+ public Reference(string? uri)
{
_transformChain = new TransformChain();
_refTarget = uri;
@@ -69,13 +70,13 @@ namespace System.Security.Cryptography.Xml
// public properties
//
- public string Id
+ public string? Id
{
get { return _id; }
set { _id = value; }
}
- public string Uri
+ public string? Uri
{
get { return _uri; }
set
@@ -85,7 +86,7 @@ namespace System.Security.Cryptography.Xml
}
}
- public string Type
+ public string? Type
{
get { return _type; }
set
@@ -105,7 +106,7 @@ namespace System.Security.Cryptography.Xml
}
}
- public byte[] DigestValue
+ public byte[]? DigestValue
{
get { return _digestValue; }
set
@@ -125,6 +126,7 @@ namespace System.Security.Cryptography.Xml
}
}
+ [MemberNotNullWhen(true, nameof(_cachedXml))]
internal bool CacheValid
{
get
@@ -133,7 +135,7 @@ namespace System.Security.Cryptography.Xml
}
}
- internal SignedXml SignedXml
+ internal SignedXml? SignedXml
{
get { return _signedXml; }
set { _signedXml = value; }
@@ -153,7 +155,7 @@ namespace System.Security.Cryptography.Xml
public XmlElement GetXml()
{
- if (CacheValid) return (_cachedXml);
+ if (CacheValid) return _cachedXml;
XmlDocument document = new XmlDocument();
document.PreserveWhitespace = true;
@@ -188,13 +190,13 @@ namespace System.Security.Cryptography.Xml
if (DigestValue == null)
{
- if (_hashAlgorithm.Hash == null)
+ if (_hashAlgorithm!.Hash == null)
throw new CryptographicException(SR.Cryptography_Xml_DigestValueRequired);
DigestValue = _hashAlgorithm.Hash;
}
XmlElement digestValueElement = document.CreateElement("DigestValue", SignedXml.XmlDsigNamespaceUrl);
- digestValueElement.AppendChild(document.CreateTextNode(Convert.ToBase64String(_digestValue)));
+ digestValueElement.AppendChild(document.CreateTextNode(Convert.ToBase64String(_digestValue!)));
referenceElement.AppendChild(digestValueElement);
return referenceElement;
@@ -219,7 +221,7 @@ namespace System.Security.Cryptography.Xml
// Transforms
bool hasTransforms = false;
TransformChain = new TransformChain();
- XmlNodeList transformsNodes = value.SelectNodes("ds:Transforms", nsm);
+ XmlNodeList? transformsNodes = value.SelectNodes("ds:Transforms", nsm);
if (transformsNodes != null && transformsNodes.Count != 0)
{
if (transformsNodes.Count > 1)
@@ -227,15 +229,15 @@ namespace System.Security.Cryptography.Xml
throw new CryptographicException(SR.Cryptography_Xml_InvalidElement, "Reference/Transforms");
}
hasTransforms = true;
- XmlElement transformsElement = transformsNodes[0] as XmlElement;
- if (!Utils.VerifyAttributes(transformsElement, (string[])null))
+ XmlElement transformsElement = (transformsNodes[0] as XmlElement)!;
+ if (!Utils.VerifyAttributes(transformsElement, (string[]?)null))
{
throw new CryptographicException(SR.Cryptography_Xml_InvalidElement, "Reference/Transforms");
}
- XmlNodeList transformNodes = transformsElement.SelectNodes("ds:Transform", nsm);
+ XmlNodeList? transformNodes = transformsElement.SelectNodes("ds:Transform", nsm);
if (transformNodes != null)
{
- if (transformNodes.Count != transformsElement.SelectNodes("*").Count)
+ if (transformNodes.Count != transformsElement.SelectNodes("*")!.Count)
{
throw new CryptographicException(SR.Cryptography_Xml_InvalidElement, "Reference/Transforms");
}
@@ -245,13 +247,13 @@ namespace System.Security.Cryptography.Xml
}
foreach (XmlNode transformNode in transformNodes)
{
- XmlElement transformElement = transformNode as XmlElement;
- string algorithm = Utils.GetAttribute(transformElement, "Algorithm", SignedXml.XmlDsigNamespaceUrl);
+ XmlElement transformElement = (transformNode as XmlElement)!;
+ string? algorithm = Utils.GetAttribute(transformElement, "Algorithm", SignedXml.XmlDsigNamespaceUrl);
if (algorithm == null || !Utils.VerifyAttributes(transformElement, "Algorithm"))
{
throw new CryptographicException(SR.Cryptography_Xml_UnknownTransform);
}
- Transform transform = CryptoHelpers.CreateFromName<Transform>(algorithm);
+ Transform? transform = CryptoHelpers.CreateFromName<Transform>(algorithm);
if (transform == null)
{
throw new CryptographicException(SR.Cryptography_Xml_UnknownTransform);
@@ -265,15 +267,15 @@ namespace System.Security.Cryptography.Xml
{
// Walk back to the Signature tag. Find the nearest signature ancestor
// Signature-->SignedInfo-->Reference-->Transforms-->Transform
- XmlNode signatureTag = transformElement.SelectSingleNode("ancestor::ds:Signature[1]", nsm);
+ XmlNode? signatureTag = transformElement.SelectSingleNode("ancestor::ds:Signature[1]", nsm);
// Resolve the reference to get starting point for position calculation.
- XmlNode referenceTarget =
+ XmlNode? referenceTarget =
_uri.Length == 0
? transformElement.OwnerDocument
- : SignedXml.GetIdElement(transformElement.OwnerDocument, Utils.GetIdFromLocalUri(_uri, out bool _));
+ : SignedXml!.GetIdElement(transformElement.OwnerDocument, Utils.GetIdFromLocalUri(_uri, out bool _));
- XmlNodeList signatureList = referenceTarget?.SelectNodes(".//ds:Signature", nsm);
+ XmlNodeList? signatureList = referenceTarget?.SelectNodes(".//ds:Signature", nsm);
if (signatureList != null)
{
int position = 0;
@@ -293,26 +295,26 @@ namespace System.Security.Cryptography.Xml
}
// DigestMethod
- XmlNodeList digestMethodNodes = value.SelectNodes("ds:DigestMethod", nsm);
+ XmlNodeList? digestMethodNodes = value.SelectNodes("ds:DigestMethod", nsm);
if (digestMethodNodes == null || digestMethodNodes.Count == 0 || digestMethodNodes.Count > 1)
throw new CryptographicException(SR.Cryptography_Xml_InvalidElement, "Reference/DigestMethod");
- XmlElement digestMethodElement = digestMethodNodes[0] as XmlElement;
- _digestMethod = Utils.GetAttribute(digestMethodElement, "Algorithm", SignedXml.XmlDsigNamespaceUrl);
+ XmlElement digestMethodElement = (digestMethodNodes[0] as XmlElement)!;
+ _digestMethod = Utils.GetAttribute(digestMethodElement, "Algorithm", SignedXml.XmlDsigNamespaceUrl)!;
if (_digestMethod == null || !Utils.VerifyAttributes(digestMethodElement, "Algorithm"))
throw new CryptographicException(SR.Cryptography_Xml_InvalidElement, "Reference/DigestMethod");
// DigestValue
- XmlNodeList digestValueNodes = value.SelectNodes("ds:DigestValue", nsm);
+ XmlNodeList? digestValueNodes = value.SelectNodes("ds:DigestValue", nsm);
if (digestValueNodes == null || digestValueNodes.Count == 0 || digestValueNodes.Count > 1)
throw new CryptographicException(SR.Cryptography_Xml_InvalidElement, "Reference/DigestValue");
- XmlElement digestValueElement = digestValueNodes[0] as XmlElement;
+ XmlElement digestValueElement = (digestValueNodes[0] as XmlElement)!;
_digestValue = Convert.FromBase64String(Utils.DiscardWhiteSpaces(digestValueElement.InnerText));
- if (!Utils.VerifyAttributes(digestValueElement, (string[])null))
+ if (!Utils.VerifyAttributes(digestValueElement, (string[]?)null))
throw new CryptographicException(SR.Cryptography_Xml_InvalidElement, "Reference/DigestValue");
// Verify that there aren't any extra nodes that aren't allowed
int expectedChildNodeCount = hasTransforms ? 3 : 2;
- if (value.SelectNodes("*").Count != expectedChildNodeCount)
+ if (value.SelectNodes("*")!.Count != expectedChildNodeCount)
throw new CryptographicException(SR.Cryptography_Xml_InvalidElement, "Reference");
// cache the Xml
@@ -337,7 +339,7 @@ namespace System.Security.Cryptography.Xml
// What we want to do is pump the input through the TransformChain and then
// hash the output of the chain document is the document context for resolving relative references
- internal byte[] CalculateHashValue(XmlDocument document, CanonicalXmlNodeList refList)
+ internal byte[]? CalculateHashValue(XmlDocument document, CanonicalXmlNodeList refList)
{
// refList is a list of elements that might be targets of references
// Now's the time to create our hashing algorithm
@@ -347,11 +349,11 @@ namespace System.Security.Cryptography.Xml
// Let's go get the target.
string baseUri = (document == null ? System.Environment.CurrentDirectory + "\\" : document.BaseURI);
- Stream hashInputStream = null;
- WebResponse response = null;
- Stream inputStream = null;
- XmlResolver resolver = null;
- byte[] hashval = null;
+ Stream? hashInputStream = null;
+ WebResponse? response = null;
+ Stream? inputStream = null;
+ XmlResolver? resolver = null;
+ byte[] hashval;
try
{
@@ -359,8 +361,8 @@ namespace System.Security.Cryptography.Xml
{
case ReferenceTargetType.Stream:
// This is the easiest case. We already have a stream, so just pump it through the TransformChain
- resolver = (SignedXml.ResolverSet ? SignedXml._xmlResolver : XmlResolverHelper.GetThrowingResolver());
- hashInputStream = TransformChain.TransformToOctetStream((Stream)_refTarget, resolver, baseUri);
+ resolver = (SignedXml!.ResolverSet ? SignedXml._xmlResolver : XmlResolverHelper.GetThrowingResolver());
+ hashInputStream = TransformChain.TransformToOctetStream((Stream?)_refTarget, resolver, baseUri);
break;
case ReferenceTargetType.UriReference:
// Second-easiest case -- dereference the URI & pump through the TransformChain
@@ -369,10 +371,10 @@ namespace System.Security.Cryptography.Xml
if (_uri == null)
{
// We need to create a DocumentNavigator out of the XmlElement
- resolver = (SignedXml.ResolverSet ? SignedXml._xmlResolver : XmlResolverHelper.GetThrowingResolver());
+ resolver = (SignedXml!.ResolverSet ? SignedXml._xmlResolver : XmlResolverHelper.GetThrowingResolver());
// In the case of a Uri-less reference, we will simply pass null to the transform chain.
// The first transform in the chain is expected to know how to retrieve the data to hash.
- hashInputStream = TransformChain.TransformToOctetStream((Stream)null, resolver, baseUri);
+ hashInputStream = TransformChain.TransformToOctetStream((Stream?)null, resolver!, baseUri);
}
else if (_uri.Length == 0)
{
@@ -382,8 +384,8 @@ namespace System.Security.Cryptography.Xml
throw new CryptographicException(SR.Format(SR.Cryptography_Xml_SelfReferenceRequiresContext, _uri));
// Normalize the containing document
- resolver = (SignedXml.ResolverSet ? SignedXml._xmlResolver : XmlResolverHelper.GetThrowingResolver());
- XmlDocument docWithNoComments = Utils.DiscardComments(Utils.PreProcessDocumentInput(document, resolver, baseUri));
+ resolver = (SignedXml!.ResolverSet ? SignedXml._xmlResolver : XmlResolverHelper.GetThrowingResolver());
+ XmlDocument docWithNoComments = Utils.DiscardComments(Utils.PreProcessDocumentInput(document, resolver!, baseUri));
hashInputStream = TransformChain.TransformToOctetStream(docWithNoComments, resolver, baseUri);
}
else if (_uri[0] == '#')
@@ -398,12 +400,12 @@ namespace System.Security.Cryptography.Xml
throw new CryptographicException(SR.Format(SR.Cryptography_Xml_SelfReferenceRequiresContext, _uri));
// We should not discard comments here!!!
- resolver = (SignedXml.ResolverSet ? SignedXml._xmlResolver : XmlResolverHelper.GetThrowingResolver());
- hashInputStream = TransformChain.TransformToOctetStream(Utils.PreProcessDocumentInput(document, resolver, baseUri), resolver, baseUri);
+ resolver = (SignedXml!.ResolverSet ? SignedXml._xmlResolver : XmlResolverHelper.GetThrowingResolver());
+ hashInputStream = TransformChain.TransformToOctetStream(Utils.PreProcessDocumentInput(document, resolver!, baseUri), resolver, baseUri);
break;
}
- XmlElement elem = SignedXml.GetIdElement(document, idref);
+ XmlElement? elem = SignedXml!.GetIdElement(document, idref);
if (elem != null)
_namespaces = Utils.GetPropagatedAttributes(elem.ParentNode as XmlElement);
@@ -414,12 +416,12 @@ namespace System.Security.Cryptography.Xml
{
foreach (XmlNode node in refList)
{
- XmlElement tempElem = node as XmlElement;
+ XmlElement? tempElem = node as XmlElement;
if ((tempElem != null) && (Utils.HasAttribute(tempElem, "Id", SignedXml.XmlDsigNamespaceUrl))
- && (Utils.GetAttribute(tempElem, "Id", SignedXml.XmlDsigNamespaceUrl).Equals(idref)))
+ && (Utils.GetAttribute(tempElem, "Id", SignedXml.XmlDsigNamespaceUrl)!.Equals(idref)))
{
elem = tempElem;
- if (_signedXml._context != null)
+ if (_signedXml!._context != null)
_namespaces = Utils.GetPropagatedAttributes(_signedXml._context);
break;
}
@@ -430,9 +432,9 @@ namespace System.Security.Cryptography.Xml
if (elem == null)
throw new CryptographicException(SR.Cryptography_Xml_InvalidReference);
- XmlDocument normDocument = Utils.PreProcessElementInput(elem, resolver, baseUri);
+ XmlDocument normDocument = Utils.PreProcessElementInput(elem, resolver!, baseUri);
// Add the propagated attributes
- Utils.AddNamespaces(normDocument.DocumentElement, _namespaces);
+ Utils.AddNamespaces(normDocument.DocumentElement!, _namespaces);
resolver = (SignedXml.ResolverSet ? SignedXml._xmlResolver : XmlResolverHelper.GetThrowingResolver());
if (discardComments)
@@ -454,8 +456,8 @@ namespace System.Security.Cryptography.Xml
break;
case ReferenceTargetType.XmlElement:
// We need to create a DocumentNavigator out of the XmlElement
- resolver = (SignedXml.ResolverSet ? SignedXml._xmlResolver : XmlResolverHelper.GetThrowingResolver());
- hashInputStream = TransformChain.TransformToOctetStream(Utils.PreProcessElementInput((XmlElement)_refTarget, resolver, baseUri), resolver, baseUri);
+ resolver = (SignedXml!.ResolverSet ? SignedXml._xmlResolver : XmlResolverHelper.GetThrowingResolver());
+ hashInputStream = TransformChain.TransformToOctetStream(Utils.PreProcessElementInput((XmlElement)_refTarget!, resolver!, baseUri), resolver, baseUri);
break;
default:
throw new CryptographicException(SR.Cryptography_Xml_UriNotResolved, _uri);
@@ -463,7 +465,7 @@ namespace System.Security.Cryptography.Xml
// Compute the new hash value
hashInputStream = SignedXmlDebugLog.LogReferenceData(this, hashInputStream);
- hashval = _hashAlgorithm.ComputeHash(hashInputStream);
+ hashval = _hashAlgorithm.ComputeHash(hashInputStream!);
}
finally
{
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/ReferenceList.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/ReferenceList.cs
index ed01208d6d7..a1c76e80507 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/ReferenceList.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/ReferenceList.cs
@@ -24,7 +24,8 @@ namespace System.Security.Cryptography.Xml
get { return _references.Count; }
}
- public int Add(object value)
+#pragma warning disable CS8995 // Nullable type 'object?' is null-checked and will throw if null.
+ public int Add(object? value)
{
if (value is null)
{
@@ -36,23 +37,24 @@ namespace System.Security.Cryptography.Xml
return _references.Add(value);
}
+#pragma warning restore
public void Clear()
{
_references.Clear();
}
- public bool Contains(object value)
+ public bool Contains(object? value)
{
return _references.Contains(value);
}
- public int IndexOf(object value)
+ public int IndexOf(object? value)
{
return _references.IndexOf(value);
}
- public void Insert(int index, object value)
+ public void Insert(int index, object? value)
{
if (value is null)
{
@@ -64,8 +66,9 @@ namespace System.Security.Cryptography.Xml
_references.Insert(index, value);
}
+#pragma warning restore
- public void Remove(object value)
+ public void Remove(object? value)
{
_references.Remove(value);
}
@@ -75,9 +78,9 @@ namespace System.Security.Cryptography.Xml
_references.RemoveAt(index);
}
- public EncryptedReference Item(int index)
+ public EncryptedReference? Item(int index)
{
- return (EncryptedReference)_references[index];
+ return (EncryptedReference?)_references[index];
}
[System.Runtime.CompilerServices.IndexerName("ItemOf")]
@@ -85,7 +88,7 @@ namespace System.Security.Cryptography.Xml
{
get
{
- return Item(index);
+ return Item(index)!;
}
set
{
@@ -94,7 +97,7 @@ namespace System.Security.Cryptography.Xml
}
/// <internalonly/>
- object IList.this[int index]
+ object? IList.this[int index]
{
get { return _references[index]; }
set
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/Signature.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/Signature.cs
index e88334f9ee1..d227ea020a1 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/Signature.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/Signature.cs
@@ -8,16 +8,16 @@ namespace System.Security.Cryptography.Xml
{
public class Signature
{
- private string _id;
- private SignedInfo _signedInfo;
- private byte[] _signatureValue;
- private string _signatureValueId;
- private KeyInfo _keyInfo;
+ private string? _id;
+ private SignedInfo? _signedInfo;
+ private byte[]? _signatureValue;
+ private string? _signatureValueId;
+ private KeyInfo? _keyInfo;
private IList _embeddedObjects;
private readonly CanonicalXmlNodeList _referencedItems;
- private SignedXml _signedXml;
+ private SignedXml? _signedXml;
- internal SignedXml SignedXml
+ internal SignedXml? SignedXml
{
get { return _signedXml; }
set { _signedXml = value; }
@@ -37,13 +37,13 @@ namespace System.Security.Cryptography.Xml
// public properties
//
- public string Id
+ public string? Id
{
get { return _id; }
set { _id = value; }
}
- public SignedInfo SignedInfo
+ public SignedInfo? SignedInfo
{
get { return _signedInfo; }
set
@@ -54,7 +54,7 @@ namespace System.Security.Cryptography.Xml
}
}
- public byte[] SignatureValue
+ public byte[]? SignatureValue
{
get { return _signatureValue; }
set { _signatureValue = value; }
@@ -118,7 +118,7 @@ namespace System.Security.Cryptography.Xml
// Add the Objects
foreach (object obj in _embeddedObjects)
{
- DataObject dataObj = obj as DataObject;
+ DataObject? dataObj = obj as DataObject;
if (dataObj != null)
{
signatureElement.AppendChild(dataObj.GetXml(document));
@@ -150,20 +150,20 @@ namespace System.Security.Cryptography.Xml
int expectedChildNodes = 0;
// SignedInfo
- XmlNodeList signedInfoNodes = signatureElement.SelectNodes("ds:SignedInfo", nsm);
+ XmlNodeList? signedInfoNodes = signatureElement.SelectNodes("ds:SignedInfo", nsm);
if (signedInfoNodes == null || signedInfoNodes.Count == 0 || signedInfoNodes.Count > 1)
throw new CryptographicException(SR.Cryptography_Xml_InvalidElement, "SignedInfo");
- XmlElement signedInfoElement = signedInfoNodes[0] as XmlElement;
+ XmlElement signedInfoElement = (signedInfoNodes[0] as XmlElement)!;
expectedChildNodes += signedInfoNodes.Count;
SignedInfo = new SignedInfo();
SignedInfo.LoadXml(signedInfoElement);
// SignatureValue
- XmlNodeList signatureValueNodes = signatureElement.SelectNodes("ds:SignatureValue", nsm);
+ XmlNodeList? signatureValueNodes = signatureElement.SelectNodes("ds:SignatureValue", nsm);
if (signatureValueNodes == null || signatureValueNodes.Count == 0 || signatureValueNodes.Count > 1)
throw new CryptographicException(SR.Cryptography_Xml_InvalidElement, "SignatureValue");
- XmlElement signatureValueElement = signatureValueNodes[0] as XmlElement;
+ XmlElement signatureValueElement = (signatureValueNodes[0] as XmlElement)!;
expectedChildNodes += signatureValueNodes.Count;
_signatureValue = Convert.FromBase64String(Utils.DiscardWhiteSpaces(signatureValueElement.InnerText));
_signatureValueId = Utils.GetAttribute(signatureValueElement, "Id", SignedXml.XmlDsigNamespaceUrl);
@@ -171,7 +171,7 @@ namespace System.Security.Cryptography.Xml
throw new CryptographicException(SR.Cryptography_Xml_InvalidElement, "SignatureValue");
// KeyInfo - optional single element
- XmlNodeList keyInfoNodes = signatureElement.SelectNodes("ds:KeyInfo", nsm);
+ XmlNodeList? keyInfoNodes = signatureElement.SelectNodes("ds:KeyInfo", nsm);
_keyInfo = new KeyInfo();
if (keyInfoNodes != null)
{
@@ -181,7 +181,7 @@ namespace System.Security.Cryptography.Xml
}
foreach (XmlNode node in keyInfoNodes)
{
- XmlElement keyInfoElement = node as XmlElement;
+ XmlElement? keyInfoElement = node as XmlElement;
if (keyInfoElement != null)
_keyInfo.LoadXml(keyInfoElement);
}
@@ -189,13 +189,13 @@ namespace System.Security.Cryptography.Xml
}
// Object - zero or more elements allowed
- XmlNodeList objectNodes = signatureElement.SelectNodes("ds:Object", nsm);
+ XmlNodeList? objectNodes = signatureElement.SelectNodes("ds:Object", nsm);
_embeddedObjects.Clear();
if (objectNodes != null)
{
foreach (XmlNode node in objectNodes)
{
- XmlElement objectElement = node as XmlElement;
+ XmlElement? objectElement = node as XmlElement;
if (objectElement != null)
{
DataObject dataObj = new DataObject();
@@ -207,7 +207,7 @@ namespace System.Security.Cryptography.Xml
}
// Select all elements that have Id attributes
- XmlNodeList nodeList = signatureElement.SelectNodes("//*[@Id]", nsm);
+ XmlNodeList? nodeList = signatureElement.SelectNodes("//*[@Id]", nsm);
if (nodeList != null)
{
foreach (XmlNode node in nodeList)
@@ -216,7 +216,7 @@ namespace System.Security.Cryptography.Xml
}
}
// Verify that there aren't any extra nodes that aren't allowed
- if (signatureElement.SelectNodes("*").Count != expectedChildNodes)
+ if (signatureElement.SelectNodes("*")!.Count != expectedChildNodes)
{
throw new CryptographicException(SR.Cryptography_Xml_InvalidElement, "Signature");
}
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/SignedInfo.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/SignedInfo.cs
index 6cac8c541c3..8941e4635b6 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/SignedInfo.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/SignedInfo.cs
@@ -2,22 +2,23 @@
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections;
+using System.Diagnostics.CodeAnalysis;
using System.Xml;
namespace System.Security.Cryptography.Xml
{
public class SignedInfo : ICollection
{
- private string _id;
- private string _canonicalizationMethod;
- private string _signatureMethod;
- private string _signatureLength;
+ private string? _id;
+ private string? _canonicalizationMethod;
+ private string? _signatureMethod;
+ private string? _signatureLength;
private readonly ArrayList _references;
- private XmlElement _cachedXml;
- private SignedXml _signedXml;
- private Transform _canonicalizationMethodTransform;
+ private XmlElement? _cachedXml;
+ private SignedXml? _signedXml;
+ private Transform? _canonicalizationMethodTransform;
- internal SignedXml SignedXml
+ internal SignedXml? SignedXml
{
get { return _signedXml; }
set { _signedXml = value; }
@@ -62,7 +63,7 @@ namespace System.Security.Cryptography.Xml
// public properties
//
- public string Id
+ public string? Id
{
get { return _id; }
set
@@ -72,6 +73,7 @@ namespace System.Security.Cryptography.Xml
}
}
+ [AllowNull]
public string CanonicalizationMethod
{
get
@@ -104,7 +106,7 @@ namespace System.Security.Cryptography.Xml
}
}
- public string SignatureMethod
+ public string? SignatureMethod
{
get { return _signatureMethod; }
set
@@ -114,7 +116,7 @@ namespace System.Security.Cryptography.Xml
}
}
- public string SignatureLength
+ public string? SignatureLength
{
get { return _signatureLength; }
set
@@ -129,6 +131,7 @@ namespace System.Security.Cryptography.Xml
get { return _references; }
}
+ [MemberNotNullWhen(true, nameof(_cachedXml))]
internal bool CacheValid
{
get
@@ -190,7 +193,7 @@ namespace System.Security.Cryptography.Xml
for (int i = 0; i < _references.Count; ++i)
{
- Reference reference = (Reference)_references[i];
+ Reference reference = (Reference)_references[i]!;
signedInfoElement.AppendChild(reference.GetXml(document));
}
@@ -219,10 +222,10 @@ namespace System.Security.Cryptography.Xml
throw new CryptographicException(SR.Cryptography_Xml_InvalidElement, "SignedInfo");
// CanonicalizationMethod -- must be present
- XmlNodeList canonicalizationMethodNodes = signedInfoElement.SelectNodes("ds:CanonicalizationMethod", nsm);
+ XmlNodeList? canonicalizationMethodNodes = signedInfoElement.SelectNodes("ds:CanonicalizationMethod", nsm);
if (canonicalizationMethodNodes == null || canonicalizationMethodNodes.Count == 0 || canonicalizationMethodNodes.Count > 1)
throw new CryptographicException(SR.Cryptography_Xml_InvalidElement, "SignedInfo/CanonicalizationMethod");
- XmlElement canonicalizationMethodElement = canonicalizationMethodNodes.Item(0) as XmlElement;
+ XmlElement canonicalizationMethodElement = (canonicalizationMethodNodes.Item(0) as XmlElement)!;
expectedChildNodes += canonicalizationMethodNodes.Count;
_canonicalizationMethod = Utils.GetAttribute(canonicalizationMethodElement, "Algorithm", SignedXml.XmlDsigNamespaceUrl);
if (_canonicalizationMethod == null || !Utils.VerifyAttributes(canonicalizationMethodElement, "Algorithm"))
@@ -232,17 +235,17 @@ namespace System.Security.Cryptography.Xml
CanonicalizationMethodObject.LoadInnerXml(canonicalizationMethodElement.ChildNodes);
// SignatureMethod -- must be present
- XmlNodeList signatureMethodNodes = signedInfoElement.SelectNodes("ds:SignatureMethod", nsm);
+ XmlNodeList? signatureMethodNodes = signedInfoElement.SelectNodes("ds:SignatureMethod", nsm);
if (signatureMethodNodes == null || signatureMethodNodes.Count == 0 || signatureMethodNodes.Count > 1)
throw new CryptographicException(SR.Cryptography_Xml_InvalidElement, "SignedInfo/SignatureMethod");
- XmlElement signatureMethodElement = signatureMethodNodes.Item(0) as XmlElement;
+ XmlElement signatureMethodElement = (signatureMethodNodes.Item(0) as XmlElement)!;
expectedChildNodes += signatureMethodNodes.Count;
_signatureMethod = Utils.GetAttribute(signatureMethodElement, "Algorithm", SignedXml.XmlDsigNamespaceUrl);
if (_signatureMethod == null || !Utils.VerifyAttributes(signatureMethodElement, "Algorithm"))
throw new CryptographicException(SR.Cryptography_Xml_InvalidElement, "SignedInfo/SignatureMethod");
// Now get the output length if we are using a MAC algorithm
- XmlElement signatureLengthElement = signatureMethodElement.SelectSingleNode("ds:HMACOutputLength", nsm) as XmlElement;
+ XmlElement? signatureLengthElement = signatureMethodElement.SelectSingleNode("ds:HMACOutputLength", nsm) as XmlElement;
if (signatureLengthElement != null)
_signatureLength = signatureLengthElement.InnerXml;
@@ -250,7 +253,7 @@ namespace System.Security.Cryptography.Xml
_references.Clear();
// Reference - 0 or more
- XmlNodeList referenceNodes = signedInfoElement.SelectNodes("ds:Reference", nsm);
+ XmlNodeList? referenceNodes = signedInfoElement.SelectNodes("ds:Reference", nsm);
if (referenceNodes != null)
{
if (referenceNodes.Count > Utils.MaxReferencesPerSignedInfo)
@@ -259,14 +262,14 @@ namespace System.Security.Cryptography.Xml
}
foreach (XmlNode node in referenceNodes)
{
- XmlElement referenceElement = node as XmlElement;
+ XmlElement referenceElement = (node as XmlElement)!;
Reference reference = new Reference();
AddReference(reference);
reference.LoadXml(referenceElement);
}
expectedChildNodes += referenceNodes.Count;
// Verify that there aren't any extra nodes that aren't allowed
- if (signedInfoElement.SelectNodes("*").Count != expectedChildNodes)
+ if (signedInfoElement.SelectNodes("*")!.Count != expectedChildNodes)
{
throw new CryptographicException(SR.Cryptography_Xml_InvalidElement, "SignedInfo");
}
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/SignedXml.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/SignedXml.cs
index 5d722d0f180..0a3a3510cb8 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/SignedXml.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/SignedXml.cs
@@ -4,6 +4,8 @@
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Security.Cryptography.X509Certificates;
using System.Xml;
@@ -13,28 +15,28 @@ namespace System.Security.Cryptography.Xml
public class SignedXml
{
protected Signature m_signature;
- protected string m_strSigningKeyName;
+ protected string? m_strSigningKeyName;
- private AsymmetricAlgorithm _signingKey;
- private XmlDocument _containingDocument;
- private IEnumerator _keyInfoEnum;
- private X509Certificate2Collection _x509Collection;
- private IEnumerator _x509Enum;
+ private AsymmetricAlgorithm? _signingKey;
+ private XmlDocument? _containingDocument;
+ private IEnumerator? _keyInfoEnum;
+ private X509Certificate2Collection? _x509Collection;
+ private IEnumerator? _x509Enum;
- private bool[] _refProcessed;
- private int[] _refLevelCache;
+ private bool[]? _refProcessed;
+ private int[]? _refLevelCache;
- internal XmlResolver _xmlResolver;
- internal XmlElement _context;
+ internal XmlResolver? _xmlResolver;
+ internal XmlElement? _context;
private bool _bResolverSet;
private Func<SignedXml, bool> _signatureFormatValidator = DefaultSignatureFormatValidator;
private Collection<string> _safeCanonicalizationMethods;
// Built in canonicalization algorithm URIs
- private static IList<string> s_knownCanonicalizationMethods;
+ private static IList<string>? s_knownCanonicalizationMethods;
// Built in transform algorithm URIs (excluding canonicalization URIs)
- private static IList<string> s_defaultSafeTransformMethods;
+ private static IList<string>? s_defaultSafeTransformMethods;
// additional HMAC Url identifiers
private const string XmlDsigMoreHMACMD5Url = "http://www.w3.org/2001/04/xmldsig-more#hmac-md5";
@@ -44,7 +46,7 @@ namespace System.Security.Cryptography.Xml
private const string XmlDsigMoreHMACRIPEMD160Url = "http://www.w3.org/2001/04/xmldsig-more#hmac-ripemd160";
// defines the XML encryption processing rules
- private EncryptedXml _exml;
+ private EncryptedXml? _exml;
//
// public constant Url identifiers most frequently used within the XML Signature classes
@@ -110,7 +112,9 @@ namespace System.Security.Cryptography.Xml
Initialize(elem);
}
- private void Initialize(XmlElement element)
+ [MemberNotNull(nameof(m_signature))]
+ [MemberNotNull(nameof(_safeCanonicalizationMethods))]
+ private void Initialize(XmlElement? element)
{
_containingDocument = element?.OwnerDocument;
_context = element;
@@ -127,7 +131,7 @@ namespace System.Security.Cryptography.Xml
//
/// <internalonly/>
- public string SigningKeyName
+ public string? SigningKeyName
{
get { return m_strSigningKeyName; }
set { m_strSigningKeyName = value; }
@@ -160,15 +164,16 @@ namespace System.Security.Cryptography.Xml
get { return _safeCanonicalizationMethods; }
}
- public AsymmetricAlgorithm SigningKey
+ public AsymmetricAlgorithm? SigningKey
{
get { return _signingKey; }
set { _signingKey = value; }
}
+ [AllowNull]
public EncryptedXml EncryptedXml
{
- get => _exml ??= new EncryptedXml(_containingDocument); // default processing rules
+ get => _exml ??= new EncryptedXml(_containingDocument!); // default processing rules
set => _exml = value;
}
@@ -177,22 +182,22 @@ namespace System.Security.Cryptography.Xml
get { return m_signature; }
}
- public SignedInfo SignedInfo
+ public SignedInfo? SignedInfo
{
get { return m_signature.SignedInfo; }
}
- public string SignatureMethod
+ public string? SignatureMethod
{
- get { return m_signature.SignedInfo.SignatureMethod; }
+ get { return m_signature.SignedInfo!.SignatureMethod; }
}
- public string SignatureLength
+ public string? SignatureLength
{
- get { return m_signature.SignedInfo.SignatureLength; }
+ get { return m_signature.SignedInfo!.SignatureLength; }
}
- public byte[] SignatureValue
+ public byte[]? SignatureValue
{
get { return m_signature.SignatureValue; }
}
@@ -232,7 +237,7 @@ namespace System.Security.Cryptography.Xml
public void AddReference(Reference reference)
{
- m_signature.SignedInfo.AddReference(reference);
+ m_signature.SignedInfo!.AddReference(reference);
}
public void AddObject(DataObject dataObject)
@@ -245,13 +250,13 @@ namespace System.Security.Cryptography.Xml
return CheckSignatureReturningKey(out _);
}
- public bool CheckSignatureReturningKey(out AsymmetricAlgorithm signingKey)
+ public bool CheckSignatureReturningKey(out AsymmetricAlgorithm? signingKey)
{
SignedXmlDebugLog.LogBeginSignatureVerification(this, _context);
signingKey = null;
bool bRet = false;
- AsymmetricAlgorithm key;
+ AsymmetricAlgorithm? key;
if (!CheckSignatureFormat())
{
@@ -326,7 +331,7 @@ namespace System.Security.Cryptography.Xml
// Check key usages to make sure it is good for signing.
foreach (X509Extension extension in certificate.Extensions)
{
- if (string.Equals(extension.Oid.Value, "2.5.29.15" /* szOID_KEY_USAGE */, StringComparison.OrdinalIgnoreCase))
+ if (string.Equals(extension.Oid!.Value, "2.5.29.15" /* szOID_KEY_USAGE */, StringComparison.OrdinalIgnoreCase))
{
X509KeyUsageExtension keyUsage = new X509KeyUsageExtension();
keyUsage.CopyFrom(extension);
@@ -357,9 +362,9 @@ namespace System.Security.Cryptography.Xml
}
}
- using (AsymmetricAlgorithm publicKey = Utils.GetAnyPublicKey(certificate))
+ using (AsymmetricAlgorithm? publicKey = Utils.GetAnyPublicKey(certificate))
{
- if (!CheckSignature(publicKey))
+ if (!CheckSignature(publicKey!))
{
return false;
}
@@ -371,18 +376,18 @@ namespace System.Security.Cryptography.Xml
public void ComputeSignature()
{
- SignedXmlDebugLog.LogBeginSignatureComputation(this, _context);
+ SignedXmlDebugLog.LogBeginSignatureComputation(this, _context!);
BuildDigestedReferences();
// Load the key
- AsymmetricAlgorithm key = SigningKey;
+ AsymmetricAlgorithm? key = SigningKey;
if (key == null)
throw new CryptographicException(SR.Cryptography_Xml_LoadKeyFailed);
// Check the signature algorithm associated with the key so that we can accordingly set the signature method
- if (SignedInfo.SignatureMethod == null)
+ if (SignedInfo!.SignatureMethod == null)
{
if (key is DSA)
{
@@ -400,10 +405,10 @@ namespace System.Security.Cryptography.Xml
}
// See if there is a signature description class defined in the Config file
- SignatureDescription signatureDescription = CryptoHelpers.CreateFromName<SignatureDescription>(SignedInfo.SignatureMethod);
+ SignatureDescription? signatureDescription = CryptoHelpers.CreateFromName<SignatureDescription>(SignedInfo.SignatureMethod);
if (signatureDescription == null)
throw new CryptographicException(SR.Cryptography_Xml_SignatureDescriptionNotCreated);
- HashAlgorithm hashAlg = signatureDescription.CreateDigest();
+ HashAlgorithm? hashAlg = signatureDescription.CreateDigest();
if (hashAlg == null)
throw new CryptographicException(SR.Cryptography_Xml_CreateHashAlgorithmFailed);
@@ -424,12 +429,12 @@ namespace System.Security.Cryptography.Xml
throw new ArgumentNullException(nameof(macAlg));
}
- HMAC hash = macAlg as HMAC;
+ HMAC? hash = macAlg as HMAC;
if (hash == null)
throw new CryptographicException(SR.Cryptography_Xml_SignatureMethodKeyMismatch);
int signatureLength;
- if (m_signature.SignedInfo.SignatureLength == null)
+ if (m_signature.SignedInfo!.SignatureLength == null)
signatureLength = hash.HashSize;
else
signatureLength = Convert.ToInt32(m_signature.SignedInfo.SignatureLength, null);
@@ -440,7 +445,7 @@ namespace System.Security.Cryptography.Xml
throw new CryptographicException(SR.Cryptography_Xml_InvalidSignatureLength2);
BuildDigestedReferences();
- SignedInfo.SignatureMethod = hash.HashName switch
+ SignedInfo!.SignatureMethod = hash.HashName switch
{
"SHA1" => SignedXml.XmlDsigHMACSHA1Url,
"SHA256" => SignedXml.XmlDsigMoreHMACSHA256Url,
@@ -461,14 +466,14 @@ namespace System.Security.Cryptography.Xml
// virtual methods
//
- protected virtual AsymmetricAlgorithm GetPublicKey()
+ protected virtual AsymmetricAlgorithm? GetPublicKey()
{
if (KeyInfo == null)
throw new CryptographicException(SR.Cryptography_Xml_KeyInfoRequired);
if (_x509Enum != null)
{
- AsymmetricAlgorithm key = GetNextCertificatePublicKey();
+ AsymmetricAlgorithm? key = GetNextCertificatePublicKey();
if (key != null)
return key;
}
@@ -491,7 +496,7 @@ namespace System.Security.Cryptography.Xml
if (_x509Collection.Count > 0)
{
_x509Enum = _x509Collection.GetEnumerator();
- AsymmetricAlgorithm key = GetNextCertificatePublicKey();
+ AsymmetricAlgorithm? key = GetNextCertificatePublicKey();
if (key != null)
return key;
}
@@ -519,11 +524,11 @@ namespace System.Security.Cryptography.Xml
return collection;
}
- private AsymmetricAlgorithm GetNextCertificatePublicKey()
+ private AsymmetricAlgorithm? GetNextCertificatePublicKey()
{
- while (_x509Enum.MoveNext())
+ while (_x509Enum!.MoveNext())
{
- X509Certificate2 certificate = (X509Certificate2)_x509Enum.Current;
+ X509Certificate2? certificate = (X509Certificate2?)_x509Enum.Current;
if (certificate != null)
return Utils.GetAnyPublicKey(certificate);
}
@@ -531,12 +536,12 @@ namespace System.Security.Cryptography.Xml
return null;
}
- public virtual XmlElement GetIdElement(XmlDocument document, string idValue)
+ public virtual XmlElement? GetIdElement(XmlDocument? document, string idValue)
{
return DefaultGetIdElement(document, idValue);
}
- internal static XmlElement DefaultGetIdElement(XmlDocument document, string idValue)
+ internal static XmlElement? DefaultGetIdElement(XmlDocument? document, string idValue)
{
if (document == null)
return null;
@@ -555,14 +560,14 @@ namespace System.Security.Cryptography.Xml
}
// Get the element with idValue
- XmlElement elem = document.GetElementById(idValue);
+ XmlElement? elem = document.GetElementById(idValue);
if (elem != null)
{
// Have to check for duplicate ID values from the DTD.
XmlDocument docClone = (XmlDocument)document.CloneNode(true);
- XmlElement cloneElem = docClone.GetElementById(idValue);
+ XmlElement? cloneElem = docClone.GetElementById(idValue);
// If it's null here we want to know about it, because it means that
// GetElementById failed to work across the cloning, and our uniqueness
@@ -574,7 +579,7 @@ namespace System.Security.Cryptography.Xml
{
cloneElem.Attributes.RemoveAll();
- XmlElement cloneElem2 = docClone.GetElementById(idValue);
+ XmlElement? cloneElem2 = docClone.GetElementById(idValue);
if (cloneElem2 != null)
{
@@ -602,7 +607,7 @@ namespace System.Security.Cryptography.Xml
//
private bool _bCacheValid;
- private byte[] _digestedSignedInfo;
+ private byte[]? _digestedSignedInfo;
private static bool DefaultSignatureFormatValidator(SignedXml signedXml)
{
@@ -628,13 +633,13 @@ namespace System.Security.Cryptography.Xml
private bool DoesSignatureUseTruncatedHmac()
{
// If we're not using the SignatureLength property, then we're not truncating the signature length
- if (SignedInfo.SignatureLength == null)
+ if (SignedInfo!.SignatureLength == null)
{
return false;
}
// See if we're signed witn an HMAC algorithm
- HMAC hmac = CryptoHelpers.CreateFromName<HMAC>(SignatureMethod);
+ HMAC? hmac = CryptoHelpers.CreateFromName<HMAC>(SignatureMethod!);
if (hmac == null)
{
// We aren't signed with an HMAC algorithm, so we cannot have a truncated HMAC
@@ -661,13 +666,13 @@ namespace System.Security.Cryptography.Xml
{
foreach (string safeAlgorithm in SafeCanonicalizationMethods)
{
- if (string.Equals(safeAlgorithm, SignedInfo.CanonicalizationMethod, StringComparison.OrdinalIgnoreCase))
+ if (string.Equals(safeAlgorithm, SignedInfo!.CanonicalizationMethod, StringComparison.OrdinalIgnoreCase))
{
return true;
}
}
- SignedXmlDebugLog.LogUnsafeCanonicalizationMethod(this, SignedInfo.CanonicalizationMethod, SafeCanonicalizationMethods);
+ SignedXmlDebugLog.LogUnsafeCanonicalizationMethod(this, SignedInfo!.CanonicalizationMethod, SafeCanonicalizationMethods);
return false;
}
@@ -680,7 +685,7 @@ namespace System.Security.Cryptography.Xml
{
Transform transform = transformChain[i];
- if (!IsSafeTransform(transform.Algorithm))
+ if (!IsSafeTransform(transform.Algorithm!))
{
return false;
}
@@ -772,16 +777,16 @@ namespace System.Security.Cryptography.Xml
private byte[] GetC14NDigest(HashAlgorithm hash)
{
bool isKeyedHashAlgorithm = hash is KeyedHashAlgorithm;
- if (isKeyedHashAlgorithm || !_bCacheValid || !SignedInfo.CacheValid)
+ if (isKeyedHashAlgorithm || !_bCacheValid || !SignedInfo!.CacheValid)
{
- string baseUri = _containingDocument?.BaseURI;
- XmlResolver resolver = (_bResolverSet ? _xmlResolver : XmlResolverHelper.GetThrowingResolver());
- XmlDocument doc = Utils.PreProcessElementInput(SignedInfo.GetXml(), resolver, baseUri);
+ string? baseUri = _containingDocument?.BaseURI;
+ XmlResolver? resolver = (_bResolverSet ? _xmlResolver : XmlResolverHelper.GetThrowingResolver());
+ XmlDocument doc = Utils.PreProcessElementInput(SignedInfo!.GetXml(), resolver!, baseUri );
// Add non default namespaces in scope
- CanonicalXmlNodeList namespaces = (_context == null ? null : Utils.GetPropagatedAttributes(_context));
+ CanonicalXmlNodeList? namespaces = (_context == null ? null : Utils.GetPropagatedAttributes(_context));
SignedXmlDebugLog.LogNamespacePropagation(this, namespaces);
- Utils.AddNamespaces(doc.DocumentElement, namespaces);
+ Utils.AddNamespaces(doc.DocumentElement!, namespaces);
Transform c14nMethodTransform = SignedInfo.CanonicalizationMethodObject;
c14nMethodTransform.Resolver = resolver;
@@ -794,14 +799,17 @@ namespace System.Security.Cryptography.Xml
_bCacheValid = !isKeyedHashAlgorithm;
}
- return _digestedSignedInfo;
+ return _digestedSignedInfo!;
}
private int GetReferenceLevel(int index, ArrayList references)
{
+ Debug.Assert(_refProcessed != null);
+ Debug.Assert(_refLevelCache != null);
+
if (_refProcessed[index]) return _refLevelCache[index];
_refProcessed[index] = true;
- Reference reference = (Reference)references[index];
+ Reference reference = (Reference)references[index]!;
if (reference.Uri == null || reference.Uri.Length == 0 || (reference.Uri.Length > 0 && reference.Uri[0] != '#'))
{
_refLevelCache[index] = 0;
@@ -818,7 +826,7 @@ namespace System.Security.Cryptography.Xml
// If this is pointing to another reference
for (int j = 0; j < references.Count; ++j)
{
- if (((Reference)references[j]).Id == idref)
+ if (((Reference)references[j]!).Id == idref)
{
_refLevelCache[index] = GetReferenceLevel(j, references) + 1;
return (_refLevelCache[index]);
@@ -834,19 +842,19 @@ namespace System.Security.Cryptography.Xml
private sealed class ReferenceLevelSortOrder : IComparer
{
- private ArrayList _references;
+ private ArrayList? _references;
public ReferenceLevelSortOrder() { }
public ArrayList References
{
- get { return _references; }
+ get { return _references!; }
set { _references = value; }
}
- public int Compare(object a, object b)
+ public int Compare(object? a, object? b)
{
- Reference referenceA = a as Reference;
- Reference referenceB = b as Reference;
+ Reference? referenceA = a as Reference;
+ Reference? referenceB = b as Reference;
// Get the indexes
int iIndexA = 0;
@@ -859,8 +867,8 @@ namespace System.Security.Cryptography.Xml
i++;
}
- int iLevelA = referenceA.SignedXml.GetReferenceLevel(iIndexA, References);
- int iLevelB = referenceB.SignedXml.GetReferenceLevel(iIndexB, References);
+ int iLevelA = referenceA!.SignedXml!.GetReferenceLevel(iIndexA, References);
+ int iLevelB = referenceB!.SignedXml!.GetReferenceLevel(iIndexB, References);
return iLevelA.CompareTo(iLevelB);
}
}
@@ -868,7 +876,7 @@ namespace System.Security.Cryptography.Xml
private void BuildDigestedReferences()
{
// Default the DigestMethod and Canonicalization
- ArrayList references = SignedInfo.References;
+ ArrayList references = SignedInfo!.References;
// Reset the cache
_refProcessed = new bool[references.Count];
_refLevelCache = new int[references.Count];
@@ -895,7 +903,7 @@ namespace System.Security.Cryptography.Xml
SignedXmlDebugLog.LogSigningReference(this, reference);
- reference.UpdateHashValue(_containingDocument, nodeList);
+ reference.UpdateHashValue(_containingDocument!, nodeList);
// If this reference has an Id attribute, add it
if (reference.Id != null)
nodeList.Add(reference.GetXml());
@@ -904,10 +912,10 @@ namespace System.Security.Cryptography.Xml
private bool CheckDigestedReferences()
{
- ArrayList references = m_signature.SignedInfo.References;
+ ArrayList references = m_signature.SignedInfo!.References;
for (int i = 0; i < references.Count; ++i)
{
- Reference digestedReference = (Reference)references[i];
+ Reference digestedReference = (Reference)references[i]!;
if (!ReferenceUsesSafeTransformMethods(digestedReference))
{
@@ -915,10 +923,10 @@ namespace System.Security.Cryptography.Xml
}
SignedXmlDebugLog.LogVerifyReference(this, digestedReference);
- byte[] calculatedHash;
+ byte[]? calculatedHash;
try
{
- calculatedHash = digestedReference.CalculateHashValue(_containingDocument, m_signature.ReferencedItems);
+ calculatedHash = digestedReference.CalculateHashValue(_containingDocument!, m_signature.ReferencedItems);
}
catch (CryptoSignedXmlRecursionException)
{
@@ -943,7 +951,7 @@ namespace System.Security.Cryptography.Xml
// This method makes no attempt to disguise the length of either of its inputs. It is assumed the attacker has
// knowledge of the algorithms used, and thus the output length. Length is difficult to properly blind in modern CPUs.
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
- private static bool CryptographicEquals(byte[] a, byte[] b)
+ private static bool CryptographicEquals(byte[]? a, byte[]? b)
{
System.Diagnostics.Debug.Assert(a != null);
System.Diagnostics.Debug.Assert(b != null);
@@ -997,18 +1005,18 @@ namespace System.Security.Cryptography.Xml
throw new ArgumentNullException(nameof(key));
}
- SignedXmlDebugLog.LogBeginCheckSignedInfo(this, m_signature.SignedInfo);
+ SignedXmlDebugLog.LogBeginCheckSignedInfo(this, m_signature.SignedInfo!);
- SignatureDescription signatureDescription = CryptoHelpers.CreateFromName<SignatureDescription>(SignatureMethod);
+ SignatureDescription? signatureDescription = CryptoHelpers.CreateFromName<SignatureDescription>(SignatureMethod);
if (signatureDescription == null)
throw new CryptographicException(SR.Cryptography_Xml_SignatureDescriptionNotCreated);
// Let's see if the key corresponds with the SignatureMethod
- Type ta = Type.GetType(signatureDescription.KeyAlgorithm);
+ Type ta = Type.GetType(signatureDescription.KeyAlgorithm!)!;
if (!IsKeyTheCorrectAlgorithm(key, ta))
return false;
- HashAlgorithm hashAlgorithm = signatureDescription.CreateDigest();
+ HashAlgorithm? hashAlgorithm = signatureDescription.CreateDigest();
if (hashAlgorithm == null)
throw new CryptographicException(SR.Cryptography_Xml_CreateHashAlgorithmFailed);
byte[] hashval = GetC14NDigest(hashAlgorithm);
@@ -1021,7 +1029,7 @@ namespace System.Security.Cryptography.Xml
asymmetricSignatureDeformatter,
hashval,
m_signature.SignatureValue);
- return asymmetricSignatureDeformatter.VerifySignature(hashval, m_signature.SignatureValue);
+ return asymmetricSignatureDeformatter.VerifySignature(hashval, m_signature.SignatureValue!);
}
private bool CheckSignedInfo(KeyedHashAlgorithm macAlg)
@@ -1031,10 +1039,10 @@ namespace System.Security.Cryptography.Xml
throw new ArgumentNullException(nameof(macAlg));
}
- SignedXmlDebugLog.LogBeginCheckSignedInfo(this, m_signature.SignedInfo);
+ SignedXmlDebugLog.LogBeginCheckSignedInfo(this, m_signature.SignedInfo!);
int signatureLength;
- if (m_signature.SignedInfo.SignatureLength == null)
+ if (m_signature.SignedInfo!.SignatureLength == null)
signatureLength = macAlg.HashSize;
else
signatureLength = Convert.ToInt32(m_signature.SignedInfo.SignatureLength, null);
@@ -1056,7 +1064,7 @@ namespace System.Security.Cryptography.Xml
return m_signature.SignatureValue.AsSpan().SequenceEqual(hashValue.AsSpan(0, m_signature.SignatureValue.Length));
}
- private static XmlElement GetSingleReferenceTarget(XmlDocument document, string idAttributeName, string idValue)
+ private static XmlElement? GetSingleReferenceTarget(XmlDocument document, string idAttributeName, string idValue)
{
// idValue has already been tested as an NCName (unless overridden for compatibility), so there's no
// escaping that needs to be done here.
@@ -1071,7 +1079,7 @@ namespace System.Security.Cryptography.Xml
// In this case, we'll treat it the same as having found nothing across all fallbacks (but shortcut so that we don't
// fall into a trap of finding a secondary element which wasn't the originally signed one).
- XmlNodeList nodeList = document.SelectNodes(xPath);
+ XmlNodeList? nodeList = document.SelectNodes(xPath);
if (nodeList == null || nodeList.Count == 0)
{
@@ -1108,7 +1116,7 @@ namespace System.Security.Cryptography.Xml
//
while (expectedType != null && expectedType.BaseType != typeof(AsymmetricAlgorithm))
{
- expectedType = expectedType.BaseType;
+ expectedType = expectedType.BaseType!;
}
if (expectedType == null)
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/SignedXmlDebugLog.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/SignedXmlDebugLog.cs
index bbe28edd204..7c9f7e74be8 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/SignedXmlDebugLog.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/SignedXmlDebugLog.cs
@@ -3,6 +3,7 @@
using System.Collections.Generic;
using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.IO;
using System.Reflection;
@@ -191,7 +192,7 @@ namespace System.Security.Cryptography.Xml
/// <summary>
/// Convert the byte array into a hex string
/// </summary>
- private static string FormatBytes(byte[] bytes)
+ private static string FormatBytes(byte[]? bytes)
{
if (bytes == null)
return NullString;
@@ -206,9 +207,9 @@ namespace System.Security.Cryptography.Xml
{
Debug.Assert(key != null, "key != null");
- ICspAsymmetricAlgorithm cspKey = key as ICspAsymmetricAlgorithm;
- X509Certificate certificate = key as X509Certificate;
- X509Certificate2 certificate2 = key as X509Certificate2;
+ ICspAsymmetricAlgorithm? cspKey = key as ICspAsymmetricAlgorithm;
+ X509Certificate? certificate = key as X509Certificate;
+ X509Certificate2? certificate2 = key as X509Certificate2;
//
// Use the following sources for key names, if available:
@@ -255,11 +256,11 @@ namespace System.Security.Cryptography.Xml
/// <summary>
/// Map an OID to the friendliest name possible
/// </summary>
- private static string GetOidName(Oid oid)
+ private static string? GetOidName(Oid oid)
{
Debug.Assert(oid != null, "oid != null");
- string friendlyName = oid.FriendlyName;
+ string? friendlyName = oid.FriendlyName;
if (string.IsNullOrEmpty(friendlyName))
friendlyName = oid.Value;
@@ -292,7 +293,7 @@ namespace System.Security.Cryptography.Xml
{
string canonicalizationSettings = SR.Format(CultureInfo.InvariantCulture,
SR.Log_CanonicalizationSettings,
- canonicalizationTransform.Resolver.GetType(),
+ canonicalizationTransform.Resolver!.GetType(),
canonicalizationTransform.BaseURI);
WriteLine(signedXml,
TraceEventType.Verbose,
@@ -318,7 +319,7 @@ namespace System.Security.Cryptography.Xml
string logMessage = SR.Format(CultureInfo.InvariantCulture,
SR.Log_CheckSignatureFormat,
validationMethod.Module.Assembly.FullName,
- validationMethod.DeclaringType.FullName,
+ validationMethod.DeclaringType!.FullName,
validationMethod.Name);
WriteLine(signedXml, TraceEventType.Information, SignedXmlDebugEvent.BeginCheckSignatureFormat, logMessage);
}
@@ -378,7 +379,7 @@ namespace System.Security.Cryptography.Xml
/// </summary>
/// <param name="signedXml">SignedXml object doing the verification</param>
/// <param name="context">Context of the verification</param>
- internal static void LogBeginSignatureVerification(SignedXml signedXml, XmlElement context)
+ internal static void LogBeginSignatureVerification(SignedXml signedXml, XmlElement? context)
{
Debug.Assert(signedXml != null, "signedXml != null");
@@ -415,7 +416,7 @@ namespace System.Security.Cryptography.Xml
if (VerboseLoggingEnabled)
{
- using (StreamReader reader = new StreamReader(canonicalizationTransform.GetOutput(typeof(Stream)) as Stream))
+ using (StreamReader reader = new StreamReader((canonicalizationTransform.GetOutput(typeof(Stream)) as Stream)!))
{
string logMessage = SR.Format(CultureInfo.InvariantCulture,
SR.Log_CanonicalizedOutput,
@@ -452,7 +453,7 @@ namespace System.Security.Cryptography.Xml
/// <param name="signedXml">SignedXml object doing the signature verification</param>
/// <param name="algorithm">Canonicalization algorithm</param>
/// <param name="validAlgorithms">List of valid canonicalization algorithms</param>
- internal static void LogUnsafeCanonicalizationMethod(SignedXml signedXml, string algorithm, IEnumerable<string> validAlgorithms)
+ internal static void LogUnsafeCanonicalizationMethod(SignedXml signedXml, string algorithm, IEnumerable<string>? validAlgorithms)
{
Debug.Assert(signedXml != null, "signedXml != null");
Debug.Assert(validAlgorithms != null, "validAlgorithms != null");
@@ -490,7 +491,7 @@ namespace System.Security.Cryptography.Xml
internal static void LogUnsafeTransformMethod(
SignedXml signedXml,
string algorithm,
- IEnumerable<string> validC14nAlgorithms,
+ IEnumerable<string>? validC14nAlgorithms,
IEnumerable<string> validTransformAlgorithms)
{
Debug.Assert(signedXml != null, "signedXml != null");
@@ -534,7 +535,7 @@ namespace System.Security.Cryptography.Xml
/// </summary>
/// <param name="signedXml">SignedXml doing the signing or verification</param>
/// <param name="namespaces">namespaces being propagated</param>
- internal static void LogNamespacePropagation(SignedXml signedXml, XmlNodeList namespaces)
+ internal static void LogNamespacePropagation(SignedXml signedXml, XmlNodeList? namespaces)
{
Debug.Assert(signedXml != null, "signedXml != null");
@@ -571,7 +572,8 @@ namespace System.Security.Cryptography.Xml
/// <param name="reference">The reference being processed</param>
/// <param name="data">Stream containing the output of the reference</param>
/// <returns>Stream containing the output of the reference</returns>
- internal static Stream LogReferenceData(Reference reference, Stream data)
+ [return: NotNullIfNotNull("data")]
+ internal static Stream? LogReferenceData(Reference reference, Stream? data)
{
if (VerboseLoggingEnabled)
{
@@ -589,7 +591,7 @@ namespace System.Security.Cryptography.Xml
int readBytes;
do
{
- readBytes = data.Read(buffer, 0, buffer.Length);
+ readBytes = data!.Read(buffer, 0, buffer.Length);
ms.Write(buffer, 0, readBytes);
} while (readBytes == buffer.Length);
@@ -682,7 +684,7 @@ namespace System.Security.Cryptography.Xml
if (VerboseLoggingEnabled)
{
- HashAlgorithm hashAlgorithm = CryptoHelpers.CreateFromName<HashAlgorithm>(reference.DigestMethod);
+ HashAlgorithm? hashAlgorithm = CryptoHelpers.CreateFromName<HashAlgorithm>(reference.DigestMethod);
string hashAlgorithmName = hashAlgorithm == null ? "null" : hashAlgorithm.GetType().Name;
string logMessage = SR.Format(CultureInfo.InvariantCulture,
SR.Log_SigningReference,
@@ -762,7 +764,7 @@ namespace System.Security.Cryptography.Xml
string logMessage = SR.Format(CultureInfo.InvariantCulture,
SR.Log_KeyUsages,
keyUsages.KeyUsages,
- GetOidName(keyUsages.Oid),
+ GetOidName(keyUsages.Oid!),
GetKeyName(certificate));
WriteLine(signedXml,
@@ -807,8 +809,8 @@ namespace System.Security.Cryptography.Xml
/// <param name="expectedHash">hash value the signature expected the reference to have</param>
internal static void LogVerifyReferenceHash(SignedXml signedXml,
Reference reference,
- byte[] actualHash,
- byte[] expectedHash)
+ byte[]? actualHash,
+ byte[]? expectedHash)
{
Debug.Assert(signedXml != null, "signedXml != null");
Debug.Assert(reference != null, "reference != null");
@@ -817,7 +819,7 @@ namespace System.Security.Cryptography.Xml
if (VerboseLoggingEnabled)
{
- HashAlgorithm hashAlgorithm = CryptoHelpers.CreateFromName<HashAlgorithm>(reference.DigestMethod);
+ HashAlgorithm? hashAlgorithm = CryptoHelpers.CreateFromName<HashAlgorithm>(reference.DigestMethod);
string hashAlgorithmName = hashAlgorithm == null ? "null" : hashAlgorithm.GetType().Name;
string logMessage = SR.Format(CultureInfo.InvariantCulture,
SR.Log_ReferenceHash,
@@ -850,8 +852,8 @@ namespace System.Security.Cryptography.Xml
SignatureDescription signatureDescription,
HashAlgorithm hashAlgorithm,
AsymmetricSignatureDeformatter asymmetricSignatureDeformatter,
- byte[] actualHashValue,
- byte[] signatureValue)
+ byte[]? actualHashValue,
+ byte[]? signatureValue)
{
Debug.Assert(signedXml != null, "signedXml != null");
Debug.Assert(signatureDescription != null, "signatureDescription != null");
@@ -896,8 +898,8 @@ namespace System.Security.Cryptography.Xml
/// <param name="signatureValue">raw signature value</param>
internal static void LogVerifySignedInfo(SignedXml signedXml,
KeyedHashAlgorithm mac,
- byte[] actualHashValue,
- byte[] signatureValue)
+ byte[]? actualHashValue,
+ byte[]? signatureValue)
{
Debug.Assert(signedXml != null, "signedXml != null");
Debug.Assert(mac != null, "mac != null");
@@ -1031,7 +1033,7 @@ namespace System.Security.Cryptography.Xml
if (InformationLoggingEnabled)
{
- HashAlgorithm hashAlgorithm = CryptoHelpers.CreateFromName<HashAlgorithm>(reference.DigestMethod);
+ HashAlgorithm? hashAlgorithm = CryptoHelpers.CreateFromName<HashAlgorithm>(reference.DigestMethod);
string hashAlgorithmName = hashAlgorithm == null ? "null" : hashAlgorithm.GetType().Name;
string logMessage = SR.Format(CultureInfo.InvariantCulture,
SR.Log_SignedXmlRecursionLimit,
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/SymmetricKeyWrap.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/SymmetricKeyWrap.cs
index 0cfb7f60218..f4c983e2086 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/SymmetricKeyWrap.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/SymmetricKeyWrap.cs
@@ -36,9 +36,9 @@ namespace System.Security.Cryptography.Xml
// rgbWKCS = rgbWrappedKeyData | (first 8 bytes of the hash)
byte[] rgbWKCKS = new byte[rgbWrappedKeyData.Length + 8];
- TripleDES tripleDES = null;
- ICryptoTransform enc1 = null;
- ICryptoTransform enc2 = null;
+ TripleDES? tripleDES = null;
+ ICryptoTransform? enc1 = null;
+ ICryptoTransform? enc2 = null;
try
{
@@ -75,9 +75,9 @@ namespace System.Security.Cryptography.Xml
&& rgbEncryptedWrappedKeyData.Length != 48)
throw new CryptographicException(SR.Cryptography_Xml_KW_BadKeySize);
- TripleDES tripleDES = null;
- ICryptoTransform dec1 = null;
- ICryptoTransform dec2 = null;
+ TripleDES? tripleDES = null;
+ ICryptoTransform? dec1 = null;
+ ICryptoTransform? dec2 = null;
try
{
@@ -125,8 +125,8 @@ namespace System.Security.Cryptography.Xml
if ((rgbWrappedKeyData.Length % 8 != 0) || N <= 0)
throw new CryptographicException(SR.Cryptography_Xml_KW_BadKeySize);
- Aes aes = null;
- ICryptoTransform enc = null;
+ Aes? aes = null;
+ ICryptoTransform? enc = null;
try
{
@@ -188,8 +188,8 @@ namespace System.Security.Cryptography.Xml
throw new CryptographicException(SR.Cryptography_Xml_KW_BadKeySize);
byte[] rgbOutput = new byte[N << 3];
- Aes aes = null;
- ICryptoTransform dec = null;
+ Aes? aes = null;
+ ICryptoTransform? dec = null;
try
{
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/Transform.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/Transform.cs
index 45a05d6d062..b4d9f66b69c 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/Transform.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/Transform.cs
@@ -14,6 +14,7 @@
// stream. (We only bother implementing that much now since every use of transform chains in XmlDsig ultimately yields something to hash).
using System.Collections;
+using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Xml;
@@ -21,28 +22,28 @@ namespace System.Security.Cryptography.Xml
{
public abstract class Transform
{
- private string _algorithm;
- private string _baseUri;
- internal XmlResolver _xmlResolver;
+ private string? _algorithm;
+ private string? _baseUri;
+ internal XmlResolver? _xmlResolver;
private bool _bResolverSet;
- private SignedXml _signedXml;
- private Reference _reference;
- private Hashtable _propagatedNamespaces;
- private XmlElement _context;
+ private SignedXml? _signedXml;
+ private Reference? _reference;
+ private Hashtable? _propagatedNamespaces;
+ private XmlElement? _context;
- internal string BaseURI
+ internal string? BaseURI
{
get { return _baseUri; }
set { _baseUri = value; }
}
- internal SignedXml SignedXml
+ internal SignedXml? SignedXml
{
get { return _signedXml; }
set { _signedXml = value; }
}
- internal Reference Reference
+ internal Reference? Reference
{
get { return _reference; }
set { _reference = value; }
@@ -58,13 +59,13 @@ namespace System.Security.Cryptography.Xml
// public properties
//
- public string Algorithm
+ public string? Algorithm
{
get { return _algorithm; }
set { _algorithm = value; }
}
- public XmlResolver Resolver
+ public XmlResolver? Resolver
{
internal get
{
@@ -79,6 +80,7 @@ namespace System.Security.Cryptography.Xml
}
}
+ [MemberNotNullWhen(true, nameof(_xmlResolver))]
internal bool ResolverSet
{
get { return _bResolverSet; }
@@ -128,7 +130,7 @@ namespace System.Security.Cryptography.Xml
XmlElement transformElement = document.CreateElement(name, SignedXml.XmlDsigNamespaceUrl);
if (!string.IsNullOrEmpty(Algorithm))
transformElement.SetAttribute("Algorithm", Algorithm);
- XmlNodeList children = GetInnerXml();
+ XmlNodeList? children = GetInnerXml();
if (children != null)
{
foreach (XmlNode node in children)
@@ -141,7 +143,7 @@ namespace System.Security.Cryptography.Xml
public abstract void LoadInnerXml(XmlNodeList nodeList);
- protected abstract XmlNodeList GetInnerXml();
+ protected abstract XmlNodeList? GetInnerXml();
public abstract void LoadInput(object obj);
@@ -154,15 +156,15 @@ namespace System.Security.Cryptography.Xml
return hash.ComputeHash((Stream)GetOutput(typeof(Stream)));
}
- public XmlElement Context
+ public XmlElement? Context
{
get
{
if (_context != null)
return _context;
- Reference reference = Reference;
- SignedXml signedXml = (reference == null ? SignedXml : reference.SignedXml);
+ Reference? reference = Reference;
+ SignedXml? signedXml = (reference == null ? SignedXml : reference.SignedXml);
if (signedXml == null)
return null;
@@ -181,8 +183,8 @@ namespace System.Security.Cryptography.Xml
if (_propagatedNamespaces != null)
return _propagatedNamespaces;
- Reference reference = Reference;
- SignedXml signedXml = (reference == null ? SignedXml : reference.SignedXml);
+ Reference? reference = Reference;
+ SignedXml? signedXml = (reference == null ? SignedXml : reference.SignedXml);
// If the reference is not a Uri reference with a DataObject target, return an empty hashtable.
if (reference != null &&
@@ -193,7 +195,7 @@ namespace System.Security.Cryptography.Xml
return _propagatedNamespaces;
}
- CanonicalXmlNodeList namespaces = null;
+ CanonicalXmlNodeList? namespaces = null;
if (reference != null)
namespaces = reference._namespaces;
else if (signedXml?._context != null)
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/TransformChain.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/TransformChain.cs
index 2aeda5a2ad2..bec0ab08e3f 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/TransformChain.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/TransformChain.cs
@@ -52,15 +52,15 @@ namespace System.Security.Cryptography.Xml
{
if (index >= _transforms.Count)
throw new ArgumentException(SR.ArgumentOutOfRange_IndexMustBeLess, nameof(index));
- return (Transform)_transforms[index];
+ return (Transform)_transforms[index]!;
}
}
// The goal behind this method is to pump the input stream through the transforms and get back something that
// can be hashed
- internal Stream TransformToOctetStream(object inputObject, Type inputType, XmlResolver resolver, string baseUri)
+ internal Stream TransformToOctetStream(object? inputObject, Type inputType, XmlResolver? resolver, string? baseUri)
{
- object currentInput = inputObject;
+ object? currentInput = inputObject;
foreach (Transform transform in _transforms)
{
if (currentInput == null || transform.AcceptsType(currentInput.GetType()))
@@ -68,7 +68,7 @@ namespace System.Security.Cryptography.Xml
//in this case, no translation necessary, pump it through
transform.Resolver = resolver;
transform.BaseURI = baseUri;
- transform.LoadInput(currentInput);
+ transform.LoadInput(currentInput!);
currentInput = transform.GetOutput();
}
else
@@ -79,7 +79,7 @@ namespace System.Security.Cryptography.Xml
{
if (transform.AcceptsType(typeof(XmlDocument)))
{
- Stream currentInputStream = currentInput as Stream;
+ Stream currentInputStream = (currentInput as Stream)!;
XmlDocument doc = new XmlDocument();
doc.PreserveWhitespace = true;
XmlReader valReader = Utils.PreProcessStreamInput(currentInputStream, resolver, baseUri);
@@ -131,31 +131,31 @@ namespace System.Security.Cryptography.Xml
}
// Final processing, either we already have a stream or have to canonicalize
- if (currentInput is Stream)
+ if (currentInput is Stream inputStream)
{
- return currentInput as Stream;
+ return inputStream;
}
if (currentInput is XmlNodeList)
{
CanonicalXml c14n = new CanonicalXml((XmlNodeList)currentInput, resolver, false);
- MemoryStream ms = new MemoryStream(c14n.GetBytes());
+ MemoryStream? ms = new MemoryStream(c14n.GetBytes());
return ms;
}
if (currentInput is XmlDocument)
{
CanonicalXml c14n = new CanonicalXml((XmlDocument)currentInput, resolver);
- MemoryStream ms = new MemoryStream(c14n.GetBytes());
+ MemoryStream? ms = new MemoryStream(c14n.GetBytes());
return ms;
}
throw new CryptographicException(SR.Cryptography_Xml_TransformIncorrectInputType);
}
- internal Stream TransformToOctetStream(Stream input, XmlResolver resolver, string baseUri)
+ internal Stream TransformToOctetStream(Stream? input, XmlResolver? resolver, string baseUri)
{
return TransformToOctetStream(input, typeof(Stream), resolver, baseUri);
}
- internal Stream TransformToOctetStream(XmlDocument document, XmlResolver resolver, string baseUri)
+ internal Stream TransformToOctetStream(XmlDocument? document, XmlResolver? resolver, string? baseUri)
{
return TransformToOctetStream(document, typeof(XmlDocument), resolver, baseUri);
}
@@ -186,16 +186,16 @@ namespace System.Security.Cryptography.Xml
XmlNamespaceManager nsm = new XmlNamespaceManager(value.OwnerDocument.NameTable);
nsm.AddNamespace("ds", SignedXml.XmlDsigNamespaceUrl);
- XmlNodeList transformNodes = value.SelectNodes("ds:Transform", nsm);
- if (transformNodes.Count == 0)
+ XmlNodeList? transformNodes = value.SelectNodes("ds:Transform", nsm);
+ if (transformNodes!.Count == 0)
throw new CryptographicException(SR.Cryptography_Xml_InvalidElement, "Transforms");
_transforms.Clear();
for (int i = 0; i < transformNodes.Count; ++i)
{
- XmlElement transformElement = (XmlElement)transformNodes.Item(i);
- string algorithm = Utils.GetAttribute(transformElement, "Algorithm", SignedXml.XmlDsigNamespaceUrl);
- Transform transform = CryptoHelpers.CreateFromName<Transform>(algorithm);
+ XmlElement transformElement = (XmlElement)transformNodes.Item(i)!;
+ string? algorithm = Utils.GetAttribute(transformElement, "Algorithm", SignedXml.XmlDsigNamespaceUrl);
+ Transform? transform = CryptoHelpers.CreateFromName<Transform>(algorithm);
if (transform == null)
throw new CryptographicException(SR.Cryptography_Xml_UnknownTransform);
// let the transform read the children of the transformElement for data
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/Utils.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/Utils.cs
index e5de6bee4c3..634e30e4990 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/Utils.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/Utils.cs
@@ -50,10 +50,10 @@ namespace System.Security.Cryptography.Xml
throw new ArgumentNullException(nameof(element));
}
- XmlNode ancestorNode = ((XmlNode)element).ParentNode;
+ XmlNode? ancestorNode = ((XmlNode)element).ParentNode;
while (ancestorNode != null)
{
- XmlElement ancestorElement = ancestorNode as XmlElement;
+ XmlElement? ancestorElement = ancestorNode as XmlElement;
if (ancestorElement != null)
if (HasNamespace(ancestorElement, prefix, value)) return true;
ancestorNode = ancestorNode.ParentNode;
@@ -62,9 +62,9 @@ namespace System.Security.Cryptography.Xml
return false;
}
- internal static string GetAttribute(XmlElement element, string localName, string namespaceURI)
+ internal static string? GetAttribute(XmlElement element, string localName, string namespaceURI)
{
- string s = (element.HasAttribute(localName) ? element.GetAttribute(localName) : null);
+ string? s = (element.HasAttribute(localName) ? element.GetAttribute(localName) : null);
if (s == null && element.HasAttribute(localName, namespaceURI))
s = element.GetAttribute(localName, namespaceURI);
return s;
@@ -75,12 +75,12 @@ namespace System.Security.Cryptography.Xml
return element.HasAttribute(localName) || element.HasAttribute(localName, namespaceURI);
}
- internal static bool VerifyAttributes(XmlElement element, string expectedAttrName)
+ internal static bool VerifyAttributes(XmlElement element, string? expectedAttrName)
{
return VerifyAttributes(element, expectedAttrName == null ? null : new string[] { expectedAttrName });
}
- internal static bool VerifyAttributes(XmlElement element, string[] expectedAttrNames)
+ internal static bool VerifyAttributes(XmlElement element, string[]? expectedAttrNames)
{
foreach (XmlAttribute attr in element.Attributes)
{
@@ -118,7 +118,7 @@ namespace System.Security.Cryptography.Xml
internal static bool IsEmptyDefaultNamespaceNode(XmlNode n)
{
- return IsDefaultNamespaceNode(n) && n.Value.Length == 0;
+ return IsDefaultNamespaceNode(n) && n.Value!.Length == 0;
}
internal static string GetNamespacePrefix(XmlAttribute a)
@@ -132,7 +132,7 @@ namespace System.Security.Cryptography.Xml
return GetNamespacePrefix(a).Equals(nsPrefix);
}
- internal static bool IsNonRedundantNamespaceDecl(XmlAttribute a, XmlAttribute nearestAncestorWithSamePrefix)
+ internal static bool IsNonRedundantNamespaceDecl(XmlAttribute a, XmlAttribute? nearestAncestorWithSamePrefix)
{
if (nearestAncestorWithSamePrefix == null)
return !IsEmptyDefaultNamespaceNode(a);
@@ -183,14 +183,14 @@ namespace System.Security.Cryptography.Xml
}
}
- internal static XmlReader PreProcessStreamInput(Stream inputStream, XmlResolver xmlResolver, string baseUri)
+ internal static XmlReader PreProcessStreamInput(Stream inputStream, XmlResolver? xmlResolver, string? baseUri)
{
XmlReaderSettings settings = GetSecureXmlReaderSettings(xmlResolver);
XmlReader reader = XmlReader.Create(inputStream, settings, baseUri);
return reader;
}
- internal static XmlReaderSettings GetSecureXmlReaderSettings(XmlResolver xmlResolver)
+ internal static XmlReaderSettings GetSecureXmlReaderSettings(XmlResolver? xmlResolver)
{
XmlReaderSettings settings = new XmlReaderSettings();
settings.XmlResolver = xmlResolver;
@@ -224,7 +224,7 @@ namespace System.Security.Cryptography.Xml
return doc;
}
- internal static XmlDocument PreProcessElementInput(XmlElement elem, XmlResolver xmlResolver, string baseUri)
+ internal static XmlDocument PreProcessElementInput(XmlElement elem, XmlResolver xmlResolver, string? baseUri)
{
if (elem is null)
{
@@ -249,12 +249,12 @@ namespace System.Security.Cryptography.Xml
internal static XmlDocument DiscardComments(XmlDocument document)
{
- XmlNodeList nodeList = document.SelectNodes("//comment()");
+ XmlNodeList? nodeList = document.SelectNodes("//comment()");
if (nodeList != null)
{
foreach (XmlNode node1 in nodeList)
{
- node1.ParentNode.RemoveChild(node1);
+ node1.ParentNode!.RemoveChild(node1);
}
}
return document;
@@ -272,7 +272,7 @@ namespace System.Security.Cryptography.Xml
do
{
- XmlNode rootNode = (XmlNode)elementList[index];
+ XmlNode rootNode = (XmlNode)elementList[index]!;
// Add the children nodes
XmlNodeList childNodes = rootNode.ChildNodes;
if (childNodes != null)
@@ -286,10 +286,10 @@ namespace System.Security.Cryptography.Xml
}
}
// Add the attribute nodes
- XmlAttributeCollection attribNodes = rootNode.Attributes;
+ XmlAttributeCollection? attribNodes = rootNode.Attributes;
if (attribNodes != null)
{
- foreach (XmlNode attribNode in rootNode.Attributes)
+ foreach (XmlNode attribNode in rootNode.Attributes!)
{
if (attribNode.LocalName == "xmlns" || attribNode.Prefix == "xmlns")
namespaceList.Add(attribNode);
@@ -315,7 +315,7 @@ namespace System.Security.Cryptography.Xml
return nodeList;
}
- internal static bool NodeInList(XmlNode node, XmlNodeList nodeList)
+ internal static bool NodeInList(XmlNode? node, XmlNodeList nodeList)
{
foreach (XmlNode nodeElem in nodeList)
{
@@ -345,9 +345,9 @@ namespace System.Security.Cryptography.Xml
return idref;
}
- internal static string ExtractIdFromLocalUri(string uri)
+ internal static string ExtractIdFromLocalUri(string? uri)
{
- string idref = uri.Substring(1);
+ string idref = uri!.Substring(1);
// Deal with XPointer of type #xpointer(id("ID")). Other XPointer support isn't handled here and is anyway optional
if (idref.StartsWith("xpointer(id(", StringComparison.Ordinal))
@@ -366,8 +366,8 @@ namespace System.Security.Cryptography.Xml
// This removes all children of an element.
internal static void RemoveAllChildren(XmlElement inputElement)
{
- XmlNode child = inputElement.FirstChild;
- XmlNode sibling;
+ XmlNode? child = inputElement.FirstChild;
+ XmlNode? sibling;
while (child != null)
{
@@ -384,7 +384,7 @@ namespace System.Security.Cryptography.Xml
internal static long Pump(Stream input, Stream output)
{
// Use MemoryStream's WriteTo(Stream) method if possible
- MemoryStream inputMS = input as MemoryStream;
+ MemoryStream? inputMS = input as MemoryStream;
if (inputMS != null && inputMS.Position == 0)
{
inputMS.WriteTo(output);
@@ -426,7 +426,7 @@ namespace System.Security.Cryptography.Xml
return set;
}
- internal static string EscapeWhitespaceData(string data)
+ internal static string EscapeWhitespaceData(string? data)
{
StringBuilder sb = new StringBuilder();
sb.Append(data);
@@ -434,7 +434,7 @@ namespace System.Security.Cryptography.Xml
return sb.ToString();
}
- internal static string EscapeTextData(string data)
+ internal static string EscapeTextData(string? data)
{
StringBuilder sb = new StringBuilder();
sb.Append(data);
@@ -463,7 +463,7 @@ namespace System.Security.Cryptography.Xml
return sb.ToString();
}
- internal static XmlDocument GetOwnerDocument(XmlNodeList nodeList)
+ internal static XmlDocument? GetOwnerDocument(XmlNodeList nodeList)
{
foreach (XmlNode node in nodeList)
{
@@ -473,7 +473,7 @@ namespace System.Security.Cryptography.Xml
return null;
}
- internal static void AddNamespaces(XmlElement elem, CanonicalXmlNodeList namespaces)
+ internal static void AddNamespaces(XmlElement elem, CanonicalXmlNodeList? namespaces)
{
if (namespaces != null)
{
@@ -504,18 +504,18 @@ namespace System.Security.Cryptography.Xml
}
// This method gets the attributes that should be propagated
- internal static CanonicalXmlNodeList GetPropagatedAttributes(XmlElement elem)
+ internal static CanonicalXmlNodeList? GetPropagatedAttributes(XmlElement? elem)
{
if (elem == null)
return null;
CanonicalXmlNodeList namespaces = new CanonicalXmlNodeList();
- XmlNode ancestorNode = elem;
+ XmlNode? ancestorNode = elem;
bool bDefNamespaceToAdd = true;
while (ancestorNode != null)
{
- XmlElement ancestorElement = ancestorNode as XmlElement;
+ XmlElement? ancestorElement = ancestorNode as XmlElement;
if (ancestorElement == null)
{
ancestorNode = ancestorNode.ParentNode;
@@ -625,7 +625,7 @@ namespace System.Security.Cryptography.Xml
}
// Mimic the behavior of the X509IssuerSerial constructor with null and empty checks
- internal static X509IssuerSerial CreateX509IssuerSerial(string issuerName, string serialNumber)
+ internal static X509IssuerSerial CreateX509IssuerSerial(string? issuerName, string? serialNumber)
{
if (issuerName == null || issuerName.Length == 0)
throw new ArgumentException(SR.Arg_EmptyOrNullString, nameof(issuerName));
@@ -642,7 +642,7 @@ namespace System.Security.Cryptography.Xml
internal static X509Certificate2Collection BuildBagOfCerts(KeyInfoX509Data keyInfoX509Data, CertUsageType certUsageType)
{
X509Certificate2Collection collection = new X509Certificate2Collection();
- ArrayList decryptionIssuerSerials = (certUsageType == CertUsageType.Decryption ? new ArrayList() : null);
+ ArrayList? decryptionIssuerSerials = (certUsageType == CertUsageType.Decryption ? new ArrayList() : null);
if (keyInfoX509Data.Certificates != null)
{
foreach (X509Certificate2 certificate in keyInfoX509Data.Certificates)
@@ -653,7 +653,7 @@ namespace System.Security.Cryptography.Xml
collection.Add(certificate);
break;
case CertUsageType.Decryption:
- decryptionIssuerSerials.Add(CreateX509IssuerSerial(certificate.IssuerName.Name, certificate.SerialNumber));
+ decryptionIssuerSerials!.Add(CreateX509IssuerSerial(certificate.IssuerName.Name, certificate.SerialNumber));
break;
}
}
@@ -674,7 +674,7 @@ namespace System.Security.Cryptography.Xml
{
if (stores[index] != null)
{
- X509Certificate2Collection filters = null;
+ X509Certificate2Collection? filters = null;
// We don't care if we can't open the store.
try
{
@@ -756,9 +756,9 @@ namespace System.Security.Cryptography.Xml
return false;
}
- internal static AsymmetricAlgorithm GetAnyPublicKey(X509Certificate2 certificate)
+ internal static AsymmetricAlgorithm? GetAnyPublicKey(X509Certificate2 certificate)
{
- AsymmetricAlgorithm algorithm = (AsymmetricAlgorithm)certificate.GetRSAPublicKey() ?? certificate.GetECDsaPublicKey();
+ AsymmetricAlgorithm? algorithm = (AsymmetricAlgorithm?)certificate.GetRSAPublicKey() ?? certificate.GetECDsaPublicKey();
#if NETCOREAPP
if (algorithm is null && !OperatingSystem.IsTvOS() && !OperatingSystem.IsIOS())
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDecryptionTransform.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDecryptionTransform.cs
index b31bf6a7003..e12455290d3 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDecryptionTransform.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDecryptionTransform.cs
@@ -14,11 +14,11 @@ namespace System.Security.Cryptography.Xml
{
private readonly Type[] _inputTypes = { typeof(Stream), typeof(XmlDocument) };
private readonly Type[] _outputTypes = { typeof(XmlDocument) };
- private XmlNodeList _encryptedDataList;
- private ArrayList _arrayListUri; // this ArrayList object represents the Uri's to be excluded
- private EncryptedXml _exml; // defines the XML encryption processing rules
- private XmlDocument _containingDocument;
- private XmlNamespaceManager _nsm;
+ private XmlNodeList? _encryptedDataList;
+ private ArrayList? _arrayListUri; // this ArrayList object represents the Uri's to be excluded
+ private EncryptedXml? _exml; // defines the XML encryption processing rules
+ private XmlDocument? _containingDocument;
+ private XmlNamespaceManager? _nsm;
private const string XmlDecryptionTransformNamespaceUrl = "http://www.w3.org/2002/07/decrypt#";
public XmlDecryptionTransform()
@@ -28,7 +28,7 @@ namespace System.Security.Cryptography.Xml
private ArrayList ExceptUris => _arrayListUri ??= new ArrayList();
- protected virtual bool IsTargetElement(XmlElement inputElement, string idValue)
+ protected virtual bool IsTargetElement(XmlElement? inputElement, string idValue)
{
if (inputElement == null)
return false;
@@ -46,10 +46,10 @@ namespace System.Security.Cryptography.Xml
if (_exml != null)
return _exml;
- Reference reference = Reference;
- SignedXml signedXml = (reference == null ? SignedXml : reference.SignedXml);
+ Reference? reference = Reference;
+ SignedXml? signedXml = (reference == null ? SignedXml : reference.SignedXml);
if (signedXml == null || signedXml.EncryptedXml == null)
- _exml = new EncryptedXml(_containingDocument); // default processing rules
+ _exml = new EncryptedXml(_containingDocument!); // default processing rules
else
_exml = signedXml.EncryptedXml;
@@ -85,13 +85,13 @@ namespace System.Security.Cryptography.Xml
ExceptUris.Clear();
foreach (XmlNode node in nodeList)
{
- XmlElement elem = node as XmlElement;
+ XmlElement? elem = node as XmlElement;
if (elem != null)
{
if (elem.LocalName == "Except" && elem.NamespaceURI == XmlDecryptionTransformNamespaceUrl)
{
// the Uri is required
- string uri = Utils.GetAttribute(elem, "URI", XmlDecryptionTransformNamespaceUrl);
+ string? uri = Utils.GetAttribute(elem, "URI", XmlDecryptionTransformNamespaceUrl);
if (uri == null || uri.Length == 0 || uri[0] != '#')
throw new CryptographicException(SR.Cryptography_Xml_UriRequired);
if (!Utils.VerifyAttributes(elem, "URI"))
@@ -109,7 +109,7 @@ namespace System.Security.Cryptography.Xml
}
}
- protected override XmlNodeList GetInnerXml()
+ protected override XmlNodeList? GetInnerXml()
{
if (ExceptUris.Count == 0)
return null;
@@ -143,7 +143,7 @@ namespace System.Security.Cryptography.Xml
XmlDocument document = new XmlDocument();
document.PreserveWhitespace = true;
XmlResolver resolver = (ResolverSet ? _xmlResolver : XmlResolverHelper.GetThrowingResolver());
- XmlReader xmlReader = Utils.PreProcessStreamInput(stream, resolver, BaseURI);
+ XmlReader xmlReader = Utils.PreProcessStreamInput(stream, resolver, BaseURI!);
document.Load(xmlReader);
_containingDocument = document;
_nsm = new XmlNamespaceManager(_containingDocument.NameTable);
@@ -169,7 +169,7 @@ namespace System.Security.Cryptography.Xml
// Replace the encrypted XML element with the decrypted data for signature verification
private void ReplaceEncryptedData(XmlElement encryptedDataElement, byte[] decrypted)
{
- XmlNode parent = encryptedDataElement.ParentNode;
+ XmlNode parent = encryptedDataElement.ParentNode!;
if (parent.NodeType == XmlNodeType.Document)
{
// We're replacing the root element. In order to correctly reflect the semantics of the
@@ -194,13 +194,13 @@ namespace System.Security.Cryptography.Xml
{
for (int index = 0; index < ExceptUris.Count; index++)
{
- if (IsTargetElement(encryptedDataElement, (string)ExceptUris[index]))
+ if (IsTargetElement(encryptedDataElement, (string)ExceptUris[index]!))
return false;
}
}
EncryptedData ed = new EncryptedData();
ed.LoadXml(encryptedDataElement);
- SymmetricAlgorithm symAlg = EncryptedXml.GetDecryptionKey(ed, null);
+ SymmetricAlgorithm? symAlg = EncryptedXml.GetDecryptionKey(ed, null);
if (symAlg == null)
throw new CryptographicException(SR.Cryptography_Xml_MissingDecryptionKey);
byte[] decrypted = EncryptedXml.DecryptData(ed, symAlg);
@@ -218,24 +218,24 @@ namespace System.Security.Cryptography.Xml
{
encryptedDatasQueue.Enqueue(value);
}
- XmlNode node = encryptedDatasQueue.Dequeue() as XmlNode;
+ XmlNode? node = encryptedDatasQueue.Dequeue() as XmlNode;
while (node != null)
{
- XmlElement encryptedDataElement = node as XmlElement;
+ XmlElement? encryptedDataElement = node as XmlElement;
if (encryptedDataElement != null && encryptedDataElement.LocalName == "EncryptedData" &&
encryptedDataElement.NamespaceURI == EncryptedXml.XmlEncNamespaceUrl)
{
- XmlNode sibling = encryptedDataElement.NextSibling;
- XmlNode parent = encryptedDataElement.ParentNode;
+ XmlNode sibling = encryptedDataElement.NextSibling!;
+ XmlNode parent = encryptedDataElement.ParentNode!;
if (ProcessEncryptedDataItem(encryptedDataElement))
{
// find the new decrypted element.
- XmlNode child = parent.FirstChild;
+ XmlNode? child = parent.FirstChild;
while (child != null && child.NextSibling != sibling)
child = child.NextSibling;
if (child != null)
{
- XmlNodeList nodes = child.SelectNodes("//enc:EncryptedData", _nsm);
+ XmlNodeList nodes = child.SelectNodes("//enc:EncryptedData", _nsm!)!;
if (nodes.Count > 0)
{
foreach (XmlNode value in nodes)
@@ -258,7 +258,7 @@ namespace System.Security.Cryptography.Xml
if (_encryptedDataList != null)
ProcessElementRecursively(_encryptedDataList);
// propagate namespaces
- Utils.AddNamespaces(_containingDocument.DocumentElement, PropagatedNamespaces);
+ Utils.AddNamespaces(_containingDocument!.DocumentElement!, PropagatedNamespaces);
return _containingDocument;
}
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDsigBase64Transform.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDsigBase64Transform.cs
index ed1b2b16db2..3cbb48b60bd 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDsigBase64Transform.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDsigBase64Transform.cs
@@ -12,7 +12,7 @@ namespace System.Security.Cryptography.Xml
{
private readonly Type[] _inputTypes = { typeof(Stream), typeof(XmlNodeList), typeof(XmlDocument) };
private readonly Type[] _outputTypes = { typeof(Stream) };
- private CryptoStream _cs;
+ private CryptoStream? _cs;
public XmlDsigBase64Transform()
{
@@ -33,7 +33,7 @@ namespace System.Security.Cryptography.Xml
{
}
- protected override XmlNodeList GetInnerXml()
+ protected override XmlNodeList? GetInnerXml()
{
return null;
}
@@ -52,7 +52,7 @@ namespace System.Security.Cryptography.Xml
}
if (obj is XmlDocument)
{
- LoadXmlNodeListInput(((XmlDocument)obj).SelectNodes("//."));
+ LoadXmlNodeListInput(((XmlDocument)obj).SelectNodes("//.")!);
return;
}
}
@@ -93,7 +93,7 @@ namespace System.Security.Cryptography.Xml
StringBuilder sb = new StringBuilder();
foreach (XmlNode node in nodeList)
{
- XmlNode result = node.SelectSingleNode("self::text()");
+ XmlNode? result = node.SelectSingleNode("self::text()");
if (result != null)
sb.Append(result.OuterXml);
}
@@ -118,14 +118,14 @@ namespace System.Security.Cryptography.Xml
public override object GetOutput()
{
- return _cs;
+ return _cs!;
}
public override object GetOutput(Type type)
{
if (type != typeof(Stream) && !type.IsSubclassOf(typeof(Stream)))
throw new ArgumentException(SR.Cryptography_Xml_TransformIncorrectInputType, nameof(type));
- return _cs;
+ return _cs!;
}
}
}
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDsigC14NTransform.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDsigC14NTransform.cs
index d70778e8fcf..ea087bdb0f7 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDsigC14NTransform.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDsigC14NTransform.cs
@@ -10,7 +10,7 @@ namespace System.Security.Cryptography.Xml
{
private readonly Type[] _inputTypes = { typeof(Stream), typeof(XmlDocument), typeof(XmlNodeList) };
private readonly Type[] _outputTypes = { typeof(Stream) };
- private CanonicalXml _cXml;
+ private CanonicalXml? _cXml;
private readonly bool _includeComments;
public XmlDsigC14NTransform()
@@ -40,17 +40,17 @@ namespace System.Security.Cryptography.Xml
throw new CryptographicException(SR.Cryptography_Xml_UnknownTransform);
}
- protected override XmlNodeList GetInnerXml()
+ protected override XmlNodeList? GetInnerXml()
{
return null;
}
public override void LoadInput(object obj)
{
- XmlResolver resolver = (ResolverSet ? _xmlResolver : XmlResolverHelper.GetThrowingResolver());
+ XmlResolver resolver = ResolverSet ? _xmlResolver : XmlResolverHelper.GetThrowingResolver();
if (obj is Stream)
{
- _cXml = new CanonicalXml((Stream)obj, _includeComments, resolver, BaseURI);
+ _cXml = new CanonicalXml((Stream)obj, _includeComments, resolver, BaseURI!);
return;
}
if (obj is XmlDocument)
@@ -70,19 +70,19 @@ namespace System.Security.Cryptography.Xml
public override object GetOutput()
{
- return new MemoryStream(_cXml.GetBytes());
+ return new MemoryStream(_cXml!.GetBytes());
}
public override object GetOutput(Type type)
{
if (type != typeof(Stream) && !type.IsSubclassOf(typeof(Stream)))
throw new ArgumentException(SR.Cryptography_Xml_TransformIncorrectInputType, nameof(type));
- return new MemoryStream(_cXml.GetBytes());
+ return new MemoryStream(_cXml!.GetBytes());
}
public override byte[] GetDigestedOutput(HashAlgorithm hash)
{
- return _cXml.GetDigestedBytes(hash);
+ return _cXml!.GetDigestedBytes(hash);
}
}
}
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDsigEnvelopedSignatureTransform.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDsigEnvelopedSignatureTransform.cs
index 3aa5b2b5cbb..f9c7594c30d 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDsigEnvelopedSignatureTransform.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDsigEnvelopedSignatureTransform.cs
@@ -10,10 +10,10 @@ namespace System.Security.Cryptography.Xml
{
private readonly Type[] _inputTypes = { typeof(Stream), typeof(XmlNodeList), typeof(XmlDocument) };
private readonly Type[] _outputTypes = { typeof(XmlNodeList), typeof(XmlDocument) };
- private XmlNodeList _inputNodeList;
+ private XmlNodeList? _inputNodeList;
private readonly bool _includeComments;
- private XmlNamespaceManager _nsm;
- private XmlDocument _containingDocument;
+ private XmlNamespaceManager? _nsm;
+ private XmlDocument? _containingDocument;
private int _signaturePosition;
internal int SignaturePosition
@@ -51,7 +51,7 @@ namespace System.Security.Cryptography.Xml
}
// An enveloped signature has no inner XML elements
- protected override XmlNodeList GetInnerXml()
+ protected override XmlNodeList? GetInnerXml()
{
return null;
}
@@ -79,8 +79,8 @@ namespace System.Security.Cryptography.Xml
{
XmlDocument doc = new XmlDocument();
doc.PreserveWhitespace = true;
- XmlResolver resolver = (ResolverSet ? _xmlResolver : XmlResolverHelper.GetThrowingResolver());
- XmlReader xmlReader = Utils.PreProcessStreamInput(stream, resolver, BaseURI);
+ XmlResolver resolver = ResolverSet ? _xmlResolver : XmlResolverHelper.GetThrowingResolver();
+ XmlReader xmlReader = Utils.PreProcessStreamInput(stream, resolver, BaseURI!);
doc.Load(xmlReader);
_containingDocument = doc;
if (_containingDocument == null)
@@ -127,11 +127,11 @@ namespace System.Security.Cryptography.Xml
{
// If the position has not been set, then we don't want to remove any signature tags
if (_signaturePosition == 0) return _inputNodeList;
- XmlNodeList signatureList = _containingDocument.SelectNodes("//dsig:Signature", _nsm);
+ XmlNodeList? signatureList = _containingDocument.SelectNodes("//dsig:Signature", _nsm!);
if (signatureList == null) return _inputNodeList;
CanonicalXmlNodeList resultNodeList = new CanonicalXmlNodeList();
- foreach (XmlNode node in _inputNodeList)
+ foreach (XmlNode? node in _inputNodeList)
{
if (node == null) continue;
// keep namespaces
@@ -145,7 +145,7 @@ namespace System.Security.Cryptography.Xml
try
{
// Find the nearest signature ancestor tag
- XmlNode result = node.SelectSingleNode("ancestor-or-self::dsig:Signature[1]", _nsm);
+ XmlNode result = node.SelectSingleNode("ancestor-or-self::dsig:Signature[1]", _nsm!)!;
int position = 0;
foreach (XmlNode node1 in signatureList)
{
@@ -165,12 +165,12 @@ namespace System.Security.Cryptography.Xml
// Else we have received either a stream or a document as input
else
{
- XmlNodeList signatureList = _containingDocument.SelectNodes("//dsig:Signature", _nsm);
+ XmlNodeList? signatureList = _containingDocument.SelectNodes("//dsig:Signature", _nsm!);
if (signatureList == null) return _containingDocument;
if (signatureList.Count < _signaturePosition || _signaturePosition <= 0) return _containingDocument;
// Remove the signature node with all its children nodes
- signatureList[_signaturePosition - 1].ParentNode.RemoveChild(signatureList[_signaturePosition - 1]);
+ signatureList[_signaturePosition - 1]!.ParentNode!.RemoveChild(signatureList[_signaturePosition - 1]!);
return _containingDocument;
}
}
@@ -179,7 +179,7 @@ namespace System.Security.Cryptography.Xml
{
if (type == typeof(XmlNodeList) || type.IsSubclassOf(typeof(XmlNodeList)))
{
- _inputNodeList ??= Utils.AllDescendantNodes(_containingDocument, true);
+ _inputNodeList ??= Utils.AllDescendantNodes(_containingDocument!, true);
return (XmlNodeList)GetOutput();
}
else if (type == typeof(XmlDocument) || type.IsSubclassOf(typeof(XmlDocument)))
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDsigExcC14NTransform.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDsigExcC14NTransform.cs
index e0007c207fc..844601a0adc 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDsigExcC14NTransform.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDsigExcC14NTransform.cs
@@ -11,8 +11,8 @@ namespace System.Security.Cryptography.Xml
private readonly Type[] _inputTypes = { typeof(Stream), typeof(XmlDocument), typeof(XmlNodeList) };
private readonly Type[] _outputTypes = { typeof(Stream) };
private readonly bool _includeComments;
- private string _inclusiveNamespacesPrefixList;
- private ExcCanonicalXml _excCanonicalXml;
+ private string? _inclusiveNamespacesPrefixList;
+ private ExcCanonicalXml? _excCanonicalXml;
public XmlDsigExcC14NTransform() : this(false, null) { }
@@ -20,14 +20,14 @@ namespace System.Security.Cryptography.Xml
public XmlDsigExcC14NTransform(string inclusiveNamespacesPrefixList) : this(false, inclusiveNamespacesPrefixList) { }
- public XmlDsigExcC14NTransform(bool includeComments, string inclusiveNamespacesPrefixList)
+ public XmlDsigExcC14NTransform(bool includeComments, string? inclusiveNamespacesPrefixList)
{
_includeComments = includeComments;
_inclusiveNamespacesPrefixList = inclusiveNamespacesPrefixList;
Algorithm = (includeComments ? SignedXml.XmlDsigExcC14NWithCommentsTransformUrl : SignedXml.XmlDsigExcC14NTransformUrl);
}
- public string InclusiveNamespacesPrefixList
+ public string? InclusiveNamespacesPrefixList
{
get { return _inclusiveNamespacesPrefixList; }
set { _inclusiveNamespacesPrefixList = value; }
@@ -49,7 +49,7 @@ namespace System.Security.Cryptography.Xml
{
foreach (XmlNode n in nodeList)
{
- XmlElement e = n as XmlElement;
+ XmlElement? e = n as XmlElement;
if (e != null)
{
if (e.LocalName.Equals("InclusiveNamespaces")
@@ -77,21 +77,21 @@ namespace System.Security.Cryptography.Xml
XmlResolver resolver = (ResolverSet ? _xmlResolver : XmlResolverHelper.GetThrowingResolver());
if (obj is Stream)
{
- _excCanonicalXml = new ExcCanonicalXml((Stream)obj, _includeComments, _inclusiveNamespacesPrefixList, resolver, BaseURI);
+ _excCanonicalXml = new ExcCanonicalXml((Stream)obj, _includeComments, _inclusiveNamespacesPrefixList!, resolver, BaseURI!);
}
else if (obj is XmlDocument)
{
- _excCanonicalXml = new ExcCanonicalXml((XmlDocument)obj, _includeComments, _inclusiveNamespacesPrefixList, resolver);
+ _excCanonicalXml = new ExcCanonicalXml((XmlDocument)obj, _includeComments, _inclusiveNamespacesPrefixList!, resolver);
}
else if (obj is XmlNodeList)
{
- _excCanonicalXml = new ExcCanonicalXml((XmlNodeList)obj, _includeComments, _inclusiveNamespacesPrefixList, resolver);
+ _excCanonicalXml = new ExcCanonicalXml((XmlNodeList)obj, _includeComments, _inclusiveNamespacesPrefixList!, resolver);
}
else
throw new ArgumentException(SR.Cryptography_Xml_IncorrectObjectType, nameof(obj));
}
- protected override XmlNodeList GetInnerXml()
+ protected override XmlNodeList? GetInnerXml()
{
if (InclusiveNamespacesPrefixList == null)
return null;
@@ -107,19 +107,19 @@ namespace System.Security.Cryptography.Xml
public override object GetOutput()
{
- return new MemoryStream(_excCanonicalXml.GetBytes());
+ return new MemoryStream(_excCanonicalXml!.GetBytes());
}
public override object GetOutput(Type type)
{
if (type != typeof(Stream) && !type.IsSubclassOf(typeof(Stream)))
throw new ArgumentException(SR.Cryptography_Xml_TransformIncorrectInputType, nameof(type));
- return new MemoryStream(_excCanonicalXml.GetBytes());
+ return new MemoryStream(_excCanonicalXml!.GetBytes());
}
public override byte[] GetDigestedOutput(HashAlgorithm hash)
{
- return _excCanonicalXml.GetDigestedBytes(hash);
+ return _excCanonicalXml!.GetDigestedBytes(hash);
}
}
}
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDsigXPathTransform.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDsigXPathTransform.cs
index bd5675c3640..136cb3285f9 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDsigXPathTransform.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDsigXPathTransform.cs
@@ -13,9 +13,9 @@ namespace System.Security.Cryptography.Xml
{
private readonly Type[] _inputTypes = { typeof(Stream), typeof(XmlNodeList), typeof(XmlDocument) };
private readonly Type[] _outputTypes = { typeof(XmlNodeList) };
- private string _xpathexpr;
- private XmlDocument _document;
- private XmlNamespaceManager _nsm;
+ private string? _xpathexpr;
+ private XmlDocument? _document;
+ private XmlNamespaceManager? _nsm;
public XmlDsigXPathTransform()
{
@@ -40,9 +40,9 @@ namespace System.Security.Cryptography.Xml
foreach (XmlNode node in nodeList)
{
- string prefix = null;
- string namespaceURI = null;
- XmlElement elem = node as XmlElement;
+ string? prefix = null;
+ string? namespaceURI = null;
+ XmlElement? elem = node as XmlElement;
if (elem != null)
{
if (elem.LocalName == "XPath")
@@ -51,7 +51,7 @@ namespace System.Security.Cryptography.Xml
XmlNodeReader nr = new XmlNodeReader(elem);
XmlNameTable nt = nr.NameTable;
_nsm = new XmlNamespaceManager(nt);
- if (!Utils.VerifyAttributes(elem, (string)null))
+ if (!Utils.VerifyAttributes(elem, (string?)null))
{
throw new CryptographicException(SR.Cryptography_Xml_UnknownTransform);
}
@@ -83,7 +83,7 @@ namespace System.Security.Cryptography.Xml
throw new CryptographicException(SR.Cryptography_Xml_UnknownTransform);
}
- protected override XmlNodeList GetInnerXml()
+ protected override XmlNodeList? GetInnerXml()
{
XmlDocument document = new XmlDocument();
XmlElement element = document.CreateElement(null, "XPath", SignedXml.XmlDsigNamespaceUrl);
@@ -110,7 +110,7 @@ namespace System.Security.Cryptography.Xml
}
}
// Add the XPath as the inner xml of the element
- element.InnerXml = _xpathexpr;
+ element.InnerXml = _xpathexpr!;
document.AppendChild(element);
return document.ChildNodes;
}
@@ -134,7 +134,7 @@ namespace System.Security.Cryptography.Xml
private void LoadStreamInput(Stream stream)
{
XmlResolver resolver = (ResolverSet ? _xmlResolver : XmlResolverHelper.GetThrowingResolver());
- XmlReader valReader = Utils.PreProcessStreamInput(stream, resolver, BaseURI);
+ XmlReader valReader = Utils.PreProcessStreamInput(stream, resolver, BaseURI!);
_document = new XmlDocument();
_document.PreserveWhitespace = true;
_document.Load(valReader);
@@ -161,15 +161,15 @@ namespace System.Security.Cryptography.Xml
CanonicalXmlNodeList resultNodeList = new CanonicalXmlNodeList();
if (!string.IsNullOrEmpty(_xpathexpr))
{
- XPathNavigator navigator = _document.CreateNavigator();
+ XPathNavigator navigator = _document!.CreateNavigator()!;
XPathNodeIterator it = navigator.Select("//. | //@*");
XPathExpression xpathExpr = navigator.Compile("boolean(" + _xpathexpr + ")");
- xpathExpr.SetContext(_nsm);
+ xpathExpr.SetContext(_nsm!);
while (it.MoveNext())
{
- XmlNode node = ((IHasXmlNode)it.Current).GetNode();
+ XmlNode node = ((IHasXmlNode)it.Current!).GetNode();
bool include = (bool)it.Current.Evaluate(xpathExpr);
if (include)
@@ -180,7 +180,7 @@ namespace System.Security.Cryptography.Xml
it = navigator.Select("//namespace::*");
while (it.MoveNext())
{
- XmlNode node = ((IHasXmlNode)it.Current).GetNode();
+ XmlNode node = ((IHasXmlNode)it.Current!).GetNode();
resultNodeList.Add(node);
}
}
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDsigXsltTransform.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDsigXsltTransform.cs
index 486888f48f1..d536c2894f4 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDsigXsltTransform.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDsigXsltTransform.cs
@@ -12,9 +12,9 @@ namespace System.Security.Cryptography.Xml
{
private readonly Type[] _inputTypes = { typeof(Stream), typeof(XmlDocument), typeof(XmlNodeList) };
private readonly Type[] _outputTypes = { typeof(Stream) };
- private XmlNodeList _xslNodes;
- private string _xslFragment;
- private Stream _inputStream;
+ private XmlNodeList? _xslNodes;
+ private string? _xslFragment;
+ private Stream? _inputStream;
private readonly bool _includeComments;
public XmlDsigXsltTransform()
@@ -49,7 +49,7 @@ namespace System.Security.Cryptography.Xml
if (nodeList == null)
throw new CryptographicException(SR.Cryptography_Xml_UnknownTransform);
// check that the XSLT element is well formed
- XmlElement firstDataElement = null;
+ XmlElement? firstDataElement = null;
int count = 0;
foreach (XmlNode node in nodeList)
{
@@ -72,7 +72,7 @@ namespace System.Security.Cryptography.Xml
_xslFragment = firstDataElement.OuterXml.Trim(null);
}
- protected override XmlNodeList GetInnerXml()
+ protected override XmlNodeList? GetInnerXml()
{
return _xslNodes;
}
@@ -87,7 +87,7 @@ namespace System.Security.Cryptography.Xml
}
else if (obj is XmlNodeList)
{
- CanonicalXml xmlDoc = new CanonicalXml((XmlNodeList)obj, null, _includeComments);
+ CanonicalXml xmlDoc = new CanonicalXml((XmlNodeList)obj, null!, _includeComments);
byte[] buffer = xmlDoc.GetBytes();
if (buffer == null) return;
_inputStream.Write(buffer, 0, buffer.Length);
@@ -96,7 +96,7 @@ namespace System.Security.Cryptography.Xml
}
else if (obj is XmlDocument)
{
- CanonicalXml xmlDoc = new CanonicalXml((XmlDocument)obj, null, _includeComments);
+ CanonicalXml xmlDoc = new CanonicalXml((XmlDocument)obj, null!, _includeComments);
byte[] buffer = xmlDoc.GetBytes();
if (buffer == null) return;
_inputStream.Write(buffer, 0, buffer.Length);
@@ -118,13 +118,13 @@ namespace System.Security.Cryptography.Xml
settings.XmlResolver = null;
settings.MaxCharactersFromEntities = Utils.MaxCharactersFromEntities;
settings.MaxCharactersInDocument = Utils.MaxCharactersInDocument;
- using (StringReader sr = new StringReader(_xslFragment))
+ using (StringReader sr = new StringReader(_xslFragment!))
{
- XmlReader readerXsl = XmlReader.Create(sr, settings, (string)null);
+ XmlReader readerXsl = XmlReader.Create(sr, settings, (string)null!);
xslt.Load(readerXsl, XsltSettings.Default, null);
// Now load the input stream, XmlDocument can be used but is less efficient
- XmlReader reader = XmlReader.Create(_inputStream, settings, BaseURI);
+ XmlReader reader = XmlReader.Create(_inputStream!, settings, BaseURI);
XPathDocument inputData = new XPathDocument(reader, XmlSpace.Preserve);
// Create an XmlTextWriter
diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlLicenseTransform.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlLicenseTransform.cs
index 5d4ec348f72..b19de95bb01 100644
--- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlLicenseTransform.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlLicenseTransform.cs
@@ -10,9 +10,9 @@ namespace System.Security.Cryptography.Xml
{
private readonly Type[] _inputTypes = { typeof(XmlDocument) };
private readonly Type[] _outputTypes = { typeof(XmlDocument) };
- private XmlNamespaceManager _namespaceManager;
- private XmlDocument _license;
- private IRelDecryptor _relDecryptor;
+ private XmlNamespaceManager? _namespaceManager;
+ private XmlDocument? _license;
+ private IRelDecryptor? _relDecryptor;
private const string ElementIssuer = "issuer";
private const string NamespaceUriCore = "urn:mpeg:mpeg21:2003:01-REL-R-NS";
@@ -31,7 +31,7 @@ namespace System.Security.Cryptography.Xml
get { return _outputTypes; }
}
- public IRelDecryptor Decryptor
+ public IRelDecryptor? Decryptor
{
get { return _relDecryptor; }
set { _relDecryptor = value; }
@@ -39,18 +39,18 @@ namespace System.Security.Cryptography.Xml
private void DecryptEncryptedGrants(XmlNodeList encryptedGrantList, IRelDecryptor decryptor)
{
- XmlElement encryptionMethod;
- XmlElement keyInfo;
- XmlElement cipherData;
+ XmlElement? encryptionMethod;
+ XmlElement? keyInfo;
+ XmlElement? cipherData;
EncryptionMethod encryptionMethodObj;
KeyInfo keyInfoObj;
CipherData cipherDataObj;
for (int i = 0, count = encryptedGrantList.Count; i < count; i++)
{
- encryptionMethod = encryptedGrantList[i].SelectSingleNode("//r:encryptedGrant/enc:EncryptionMethod", _namespaceManager) as XmlElement;
- keyInfo = encryptedGrantList[i].SelectSingleNode("//r:encryptedGrant/dsig:KeyInfo", _namespaceManager) as XmlElement;
- cipherData = encryptedGrantList[i].SelectSingleNode("//r:encryptedGrant/enc:CipherData", _namespaceManager) as XmlElement;
+ encryptionMethod = encryptedGrantList[i]!.SelectSingleNode("//r:encryptedGrant/enc:EncryptionMethod", _namespaceManager!) as XmlElement;
+ keyInfo = encryptedGrantList[i]!.SelectSingleNode("//r:encryptedGrant/dsig:KeyInfo", _namespaceManager!) as XmlElement;
+ cipherData = encryptedGrantList[i]!.SelectSingleNode("//r:encryptedGrant/enc:CipherData", _namespaceManager!) as XmlElement;
if ((encryptionMethod != null) &&
(keyInfo != null) &&
(cipherData != null))
@@ -63,14 +63,14 @@ namespace System.Security.Cryptography.Xml
keyInfoObj.LoadXml(keyInfo);
cipherDataObj.LoadXml(cipherData);
- MemoryStream toDecrypt = null;
- Stream decryptedContent = null;
- StreamReader streamReader = null;
+ MemoryStream? toDecrypt = null;
+ Stream? decryptedContent = null;
+ StreamReader? streamReader = null;
try
{
- toDecrypt = new MemoryStream(cipherDataObj.CipherValue);
- decryptedContent = _relDecryptor.Decrypt(encryptionMethodObj,
+ toDecrypt = new MemoryStream(cipherDataObj.CipherValue!);
+ decryptedContent = _relDecryptor!.Decrypt(encryptionMethodObj,
keyInfoObj, toDecrypt);
if ((decryptedContent == null) || (decryptedContent.Length == 0))
@@ -79,7 +79,8 @@ namespace System.Security.Cryptography.Xml
streamReader = new StreamReader(decryptedContent);
string clearContent = streamReader.ReadToEnd();
- encryptedGrantList[i].ParentNode.InnerXml = clearContent;
+ // red flag
+ encryptedGrantList[i]!.ParentNode!.InnerXml = clearContent;
}
finally
{
@@ -92,14 +93,14 @@ namespace System.Security.Cryptography.Xml
}
// License transform has no inner XML elements
- protected override XmlNodeList GetInnerXml()
+ protected override XmlNodeList? GetInnerXml()
{
return null;
}
public override object GetOutput()
{
- return _license;
+ return _license!;
}
public override object GetOutput(Type type)
@@ -130,9 +131,9 @@ namespace System.Security.Cryptography.Xml
_namespaceManager.AddNamespace("enc", EncryptedXml.XmlEncNamespaceUrl);
_namespaceManager.AddNamespace("r", NamespaceUriCore);
- XmlElement currentIssuerContext;
- XmlElement currentLicenseContext;
- XmlNode signatureNode;
+ XmlElement? currentIssuerContext;
+ XmlElement? currentLicenseContext;
+ XmlNode? signatureNode;
// Get the nearest issuer node
currentIssuerContext = Context.SelectSingleNode("ancestor-or-self::r:issuer[1]", _namespaceManager) as XmlElement;
@@ -140,27 +141,27 @@ namespace System.Security.Cryptography.Xml
throw new CryptographicException(SR.Cryptography_Xml_XrmlMissingIssuer);
signatureNode = currentIssuerContext.SelectSingleNode("descendant-or-self::dsig:Signature[1]", _namespaceManager) as XmlElement;
- signatureNode?.ParentNode.RemoveChild(signatureNode);
+ signatureNode?.ParentNode!.RemoveChild(signatureNode);
// Get the nearest license node
currentLicenseContext = currentIssuerContext.SelectSingleNode("ancestor-or-self::r:license[1]", _namespaceManager) as XmlElement;
if (currentLicenseContext == null)
throw new CryptographicException(SR.Cryptography_Xml_XrmlMissingLicence);
- XmlNodeList issuerList = currentLicenseContext.SelectNodes("descendant-or-self::r:license[1]/r:issuer", _namespaceManager);
+ XmlNodeList issuerList = currentLicenseContext.SelectNodes("descendant-or-self::r:license[1]/r:issuer", _namespaceManager)!;
// Remove all issuer nodes except current
for (int i = 0, count = issuerList.Count; i < count; i++)
{
- if (issuerList[i] == currentIssuerContext)
+ if (issuerList[i]! == currentIssuerContext)
continue;
- if ((issuerList[i].LocalName == ElementIssuer) &&
- (issuerList[i].NamespaceURI == NamespaceUriCore))
- issuerList[i].ParentNode.RemoveChild(issuerList[i]);
+ if ((issuerList[i]!.LocalName == ElementIssuer) &&
+ (issuerList[i]!.NamespaceURI == NamespaceUriCore))
+ issuerList[i]!.ParentNode!.RemoveChild(issuerList[i]!);
}
- XmlNodeList encryptedGrantList = currentLicenseContext.SelectNodes("/r:license/r:grant/r:encryptedGrant", _namespaceManager);
+ XmlNodeList encryptedGrantList = currentLicenseContext.SelectNodes("/r:license/r:grant/r:encryptedGrant", _namespaceManager)!;
if (encryptedGrantList.Count > 0)
{
diff --git a/src/libraries/System.Security.Cryptography.Xml/tests/SignedXmlTest.cs b/src/libraries/System.Security.Cryptography.Xml/tests/SignedXmlTest.cs
index 8841cf2f821..3db8c44aed8 100644
--- a/src/libraries/System.Security.Cryptography.Xml/tests/SignedXmlTest.cs
+++ b/src/libraries/System.Security.Cryptography.Xml/tests/SignedXmlTest.cs
@@ -12,6 +12,7 @@
using System.Globalization;
using System.IO;
using System.Net;
+using System.Net.Sockets;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading;
@@ -1596,31 +1597,9 @@ namespace System.Security.Cryptography.Xml.Tests
[ActiveIssue("https://github.com/dotnet/runtime/issues/74115")]
public void VerifyXmlResolver(bool provideResolver)
{
- HttpListener listener;
- int port = 9000;
-
- while (true)
- {
- listener = new HttpListener();
- listener.Prefixes.Add($"http://127.0.0.1:{port}/");
- listener.IgnoreWriteExceptions = true;
-
- try
- {
- listener.Start();
- break;
- }
- catch
- {
- }
-
- port++;
-
- if (port > 10000)
- {
- throw new InvalidOperationException("Could not find an open port");
- }
- }
+ TcpListener listener = new TcpListener(IPAddress.Loopback, 0);
+ listener.Start();
+ int port = ((IPEndPoint)listener.LocalEndpoint).Port;
string xml = $@"<!DOCTYPE foo [<!ENTITY xxe SYSTEM ""http://127.0.0.1:{port}/"" >]>
<ExampleDoc>Example doc to be signed.&xxe;<Signature xmlns=""http://www.w3.org/2000/09/xmldsig#"">
@@ -1641,7 +1620,7 @@ namespace System.Security.Cryptography.Xml.Tests
bool listenerContacted = false;
CancellationTokenSource tokenSource = new CancellationTokenSource();
- Task listenerTask = ProcessRequests(listener, req => listenerContacted = true, tokenSource.Token);
+ Task listenerTask = ProcessRequests(listener, () => listenerContacted = true, tokenSource.Token);
XmlDocument doc = new XmlDocument();
doc.LoadXml(xml);
@@ -1677,36 +1656,68 @@ namespace System.Security.Cryptography.Xml.Tests
catch
{
}
-
- ((IDisposable)listener).Dispose();
}
static async Task ProcessRequests(
- HttpListener listener,
- Action<HttpListenerRequest> requestReceived,
+ TcpListener listener,
+ Action requestReceived,
CancellationToken cancellationToken)
{
+ static byte[] GetResponse() =>
+ ("HTTP/1.1 200 OK\r\nContent-Type: text/plain; charset=UTF-8\r\nContent-Length: 0\r\n\r\n"u8).ToArray();
+
while (!cancellationToken.IsCancellationRequested)
{
- HttpListenerContext ctx;
+ Socket socket;
try
{
- ctx = await listener.GetContextAsync();
+#if NETCOREAPP
+ socket = await listener.AcceptSocketAsync(cancellationToken);
+#else
+ socket = await listener.AcceptSocketAsync();
+#endif
}
catch
{
break;
}
- HttpListenerRequest req = ctx.Request;
- requestReceived(req);
-
- using (HttpListenerResponse resp = ctx.Response)
+ using (socket)
+ using (NetworkStream stream = new NetworkStream(socket))
{
- resp.ContentType = "text/plain";
- resp.ContentEncoding = Encoding.UTF8;
- resp.ContentLength64 = 0;
+ requestReceived();
+ byte[] buf = new byte[1024];
+ int offset = 0;
+
+ // Drain out the request.
+ do
+ {
+ int read = await stream.ReadAsync(buf, offset, buf.Length - offset, cancellationToken);
+
+ if (read <= 0)
+ {
+ break;
+ }
+
+ offset += read;
+
+ if (offset >= buf.Length)
+ {
+ throw new InvalidOperationException();
+ }
+
+ if (offset > 4)
+ {
+ if (buf.AsSpan(offset - 4, 4).SequenceEqual("\r\n\r\n"u8))
+ {
+ break;
+ }
+ }
+ } while (true);
+
+ byte[] response = GetResponse();
+ await stream.WriteAsync(response, 0, response.Length, cancellationToken);
}
}
}
diff --git a/src/libraries/System.Security.Cryptography.Xml/tests/System.Security.Cryptography.Xml.Tests.csproj b/src/libraries/System.Security.Cryptography.Xml/tests/System.Security.Cryptography.Xml.Tests.csproj
index 1d31bc399da..57c47b0787b 100644
--- a/src/libraries/System.Security.Cryptography.Xml/tests/System.Security.Cryptography.Xml.Tests.csproj
+++ b/src/libraries/System.Security.Cryptography.Xml/tests/System.Security.Cryptography.Xml.Tests.csproj
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>$(NetCoreAppCurrent);$(NetFrameworkMinimum)</TargetFrameworks>
+ <Nullable>annotations</Nullable>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)System\Security\Cryptography\PlatformSupport.cs"
diff --git a/src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.cs b/src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.cs
index 99e9063d8ec..a90b8977d5b 100644
--- a/src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.cs
+++ b/src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.cs
@@ -270,6 +270,12 @@ namespace System.Security.Cryptography
public abstract void SetHashAlgorithm(string strName);
public abstract void SetKey(System.Security.Cryptography.AsymmetricAlgorithm key);
}
+ public sealed partial class AuthenticationTagMismatchException : System.Security.Cryptography.CryptographicException
+ {
+ public AuthenticationTagMismatchException() { }
+ public AuthenticationTagMismatchException(string? message) { }
+ public AuthenticationTagMismatchException(string? message, System.Exception? inner) { }
+ }
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
diff --git a/src/libraries/System.Security.Cryptography/src/System.Security.Cryptography.csproj b/src/libraries/System.Security.Cryptography/src/System.Security.Cryptography.csproj
index 996f80f6687..b8d2342e227 100644
--- a/src/libraries/System.Security.Cryptography/src/System.Security.Cryptography.csproj
+++ b/src/libraries/System.Security.Cryptography/src/System.Security.Cryptography.csproj
@@ -283,6 +283,7 @@
<Compile Include="System\Security\Cryptography\AsymmetricKeyExchangeFormatter.cs" />
<Compile Include="System\Security\Cryptography\AsymmetricSignatureDeformatter.cs" />
<Compile Include="System\Security\Cryptography\AsymmetricSignatureFormatter.cs" />
+ <Compile Include="System\Security\Cryptography\AuthenticationTagMismatchException.cs" />
<Compile Include="System\Security\Cryptography\Base64Transforms.cs" />
<Compile Include="System\Security\Cryptography\BasicSymmetricCipher.cs" />
<Compile Include="System\Security\Cryptography\ChaCha20Poly1305.cs" />
@@ -787,6 +788,7 @@
<Compile Include="System\Security\Cryptography\CapiHelper.DSA.Shared.cs" />
<Compile Include="System\Security\Cryptography\CapiHelper.Shared.cs" />
<Compile Include="System\Security\Cryptography\CapiHelper.Unix.cs" />
+ <Compile Include="System\Security\Cryptography\ChaCha20Poly1305.OpenSsl.cs" />
<Compile Include="System\Security\Cryptography\Cng.NotSupported.cs" />
<Compile Include="System\Security\Cryptography\CspKeyContainerInfo.NotSupported.cs" />
<Compile Include="System\Security\Cryptography\DESCryptoServiceProvider.Unix.cs" />
@@ -867,7 +869,6 @@
Link="Common\Interop\Unix\System.Security.Cryptography.Native\Interop.EVP.Cipher.cs" />
<Compile Include="$(CommonPath)Microsoft\Win32\SafeHandles\SafeEvpCipherCtxHandle.Unix.cs"
Link="Common\Microsoft\Win32\SafeHandles\SafeEvpCipherCtxHandle.Unix.cs" />
- <Compile Include="System\Security\Cryptography\ChaCha20Poly1305.OpenSsl.cs" />
<Compile Include="System\Security\Cryptography\AesCcm.OpenSsl.cs" />
<Compile Include="System\Security\Cryptography\AesGcm.OpenSsl.cs" />
</ItemGroup>
@@ -1256,6 +1257,8 @@
Link="Common\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.Rsa.cs" />
<Compile Include="$(CommonPath)Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSslVersion.cs"
Link="Common\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSslVersion.cs" />
+ <Compile Include="$(CommonPath)Interop\OSX\System.Security.Cryptography.Native.Apple\Interop.Aead.cs"
+ Link="Common\Interop\OSX\System.Security.Cryptography.Native.Apple\Interop.Aead.cs" />
<Compile Include="$(CommonPath)Interop\OSX\System.Security.Cryptography.Native.Apple\Interop.Keychain.macOS.cs"
Link="Common\Interop\OSX\System.Security.Cryptography.Native.Apple\Interop.Keychain.macOS.cs" />
<Compile Include="$(CommonPath)Interop\OSX\System.Security.Cryptography.Native.Apple\Interop.Pbkdf2.cs"
@@ -1288,6 +1291,7 @@
Link="Common\System\Security\Cryptography\RSASecurityTransforms.macOS.cs" />
<Compile Include="$(CommonPath)System\Security\Cryptography\RSAOpenSsl.cs"
Link="Common\System\Security\Cryptography\RSAOpenSsl.cs" />
+ <Compile Include="System\Security\Cryptography\ChaCha20Poly1305.macOS.cs" />
<Compile Include="System\Security\Cryptography\DSA.Create.SecurityTransforms.cs" />
<Compile Include="System\Security\Cryptography\DSACryptoServiceProvider.Unix.cs" />
<Compile Include="System\Security\Cryptography\DSAOpenSsl.cs" />
@@ -1411,12 +1415,18 @@
Link="Common\Interop\Windows\BCrypt\Interop.BCryptDuplicateHash.cs" />
<Compile Include="$(CommonPath)\Interop\Windows\BCrypt\Interop.BCryptEncryptDecrypt.cs"
Link="Common\Interop\Windows\BCrypt\Interop.BCryptEncryptDecrypt.cs" />
+ <Compile Include="$(CommonPath)\Interop\Windows\BCrypt\Interop.BCryptEncryptDecrypt.RSA.cs"
+ Link="Common\Interop\Windows\BCrypt\Interop.BCryptEncryptDecrypt.RSA.cs" />
<Compile Include="$(CommonPath)Interop\Windows\BCrypt\Interop.BCryptExportKey.cs"
Link="Common\Interop\Windows\BCrypt\Interop.BCryptExportKey.cs" />
+ <Compile Include="$(CommonPath)Interop\Windows\BCrypt\Interop.BCryptFinalizeKey.cs"
+ Link="Common\Interop\Windows\BCrypt\Interop.BCryptFinalizeKey.cs" />
<Compile Include="$(CommonPath)Interop\Windows\BCrypt\Interop.BCryptFinishHash.cs"
Link="Common\Interop\Windows\BCrypt\Interop.BCryptFinishHash.cs" />
<Compile Include="$(CommonPath)Interop\Windows\BCrypt\Interop.BCryptGenRandom.cs"
Link="Common\Interop\Windows\BCrypt\Interop.BCryptGenRandom.cs" />
+ <Compile Include="$(CommonPath)Interop\Windows\BCrypt\Interop.BCryptGenerateKeyPair.cs"
+ Link="Common\Interop\Windows\BCrypt\Interop.BCryptGenerateKeyPair.cs" />
<Compile Include="$(CommonPath)Interop\Windows\BCrypt\Interop.BCryptGenerateSymmetricKey.cs"
Link="Common\Interop\Windows\BCrypt\Interop.BCryptGenerateSymmetricKey.cs" />
<Compile Include="$(CommonPath)Interop\Windows\BCrypt\Interop.BCryptGetProperty.cs"
@@ -1427,12 +1437,18 @@
Link="Common\Interop\Windows\BCrypt\Interop.BCryptHashData.cs" />
<Compile Include="$(CommonPath)\Interop\Windows\BCrypt\Interop.BCryptImportKey.cs"
Link="Common\Interop\Windows\BCrypt\Interop.BCryptImportKey.cs" />
+ <Compile Include="$(CommonPath)\Interop\Windows\BCrypt\Interop.BCryptImportKeyPair.cs"
+ Link="Common\Interop\Windows\BCrypt\Interop.BCryptImportKeyPair.cs" />
<Compile Include="$(CommonPath)Interop\Windows\BCrypt\Interop.BCryptKeyDerivation.cs"
Link="Common\Interop\Windows\BCrypt\Interop.BCryptKeyDerivation.cs" />
<Compile Include="$(CommonPath)Interop\Windows\BCrypt\Interop.BCryptOpenAlgorithmProvider.cs"
Link="Common\Interop\Windows\BCrypt\Interop.BCryptOpenAlgorithmProvider.cs" />
<Compile Include="$(CommonPath)Interop\Windows\BCrypt\Interop.BCryptPropertyStrings.cs"
Link="Common\Interop\Windows\BCrypt\Interop.BCryptPropertyStrings.cs" />
+ <Compile Include="$(CommonPath)Interop\Windows\BCrypt\Interop.BCryptSignHash.cs"
+ Link="Common\Interop\Windows\BCrypt\Interop.BCryptSignHash.cs" />
+ <Compile Include="$(CommonPath)Interop\Windows\BCrypt\Interop.BCryptVerifySignature.cs"
+ Link="Common\Interop\Windows\BCrypt\Interop.BCryptVerifySignature.cs" />
<Compile Include="$(CommonPath)Interop\Windows\BCrypt\Interop.Blobs.cs"
Link="Common\Interop\Windows\BCrypt\Interop.Blobs.cs" />
<Compile Include="$(CommonPath)Interop\Windows\BCrypt\Interop.CreateCryptographicException.cs"
@@ -1776,11 +1792,11 @@
<Compile Include="System\Security\Cryptography\RC2CryptoServiceProvider.Windows.cs" />
<Compile Include="System\Security\Cryptography\RC2Implementation.Windows.cs" />
<Compile Include="System\Security\Cryptography\RSA.Create.Windows.cs" />
+ <Compile Include="System\Security\Cryptography\RSABCrypt.cs" />
<Compile Include="System\Security\Cryptography\RSACryptoServiceProvider.Windows.cs" />
<Compile Include="System\Security\Cryptography\RSACng.cs" />
<Compile Include="System\Security\Cryptography\RSACng.ImportExport.cs" />
<Compile Include="System\Security\Cryptography\RSACng.Key.cs" />
- <Compile Include="System\Security\Cryptography\RSAWrapper.cs" />
<Compile Include="System\Security\Cryptography\TripleDESCng.Windows.cs" />
<Compile Include="System\Security\Cryptography\TripleDESCryptoServiceProvider.Wrap.cs" />
<Compile Include="System\Security\Cryptography\TripleDesImplementation.Windows.cs" />
diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AeadCommon.Windows.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AeadCommon.Windows.cs
index fe10a0ed2ca..909f650a7aa 100644
--- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AeadCommon.Windows.cs
+++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AeadCommon.Windows.cs
@@ -104,7 +104,7 @@ namespace System.Security.Cryptography
CryptographicOperations.ZeroMemory(plaintext);
}
- throw new CryptographicException(SR.Cryptography_AuthTagMismatch);
+ throw new AuthenticationTagMismatchException();
default:
throw CreateCryptographicException(ntStatus);
}
diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AesCcm.Android.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AesCcm.Android.cs
index 39247bed98e..b7089bd3d10 100644
--- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AesCcm.Android.cs
+++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AesCcm.Android.cs
@@ -69,11 +69,13 @@ namespace System.Security.Cryptography
throw new CryptographicException();
}
- if (!Interop.Crypto.EvpCipherFinalEx(
+ if (!Interop.Crypto.EvpAeadCipherFinalEx(
ctx,
ciphertextAndTag.Slice(ciphertextBytesWritten),
- out int bytesWritten))
+ out int bytesWritten,
+ out bool authTagMismatch))
{
+ Debug.Assert(!authTagMismatch);
throw new CryptographicException();
}
@@ -141,13 +143,20 @@ namespace System.Security.Cryptography
plaintextBytesWritten += bytesWritten;
- if (!Interop.Crypto.EvpCipherFinalEx(
+ if (!Interop.Crypto.EvpAeadCipherFinalEx(
ctx,
plaintext.Slice(plaintextBytesWritten),
- out bytesWritten))
+ out bytesWritten,
+ out bool authTagMismatch))
{
CryptographicOperations.ZeroMemory(plaintext);
- throw new CryptographicException(SR.Cryptography_AuthTagMismatch);
+
+ if (authTagMismatch)
+ {
+ throw new AuthenticationTagMismatchException();
+ }
+
+ throw new CryptographicException(SR.Arg_CryptographyException);
}
plaintextBytesWritten += bytesWritten;
diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AesCcm.OpenSsl.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AesCcm.OpenSsl.cs
index 6c78bee075e..0aedd34fe2d 100644
--- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AesCcm.OpenSsl.cs
+++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AesCcm.OpenSsl.cs
@@ -104,7 +104,7 @@ namespace System.Security.Cryptography
if (!Interop.Crypto.EvpCipherUpdate(ctx, plaintext, out int plaintextBytesWritten, ciphertext))
{
plaintext.Clear();
- throw new CryptographicException(SR.Cryptography_AuthTagMismatch);
+ throw new AuthenticationTagMismatchException();
}
if (plaintextBytesWritten != plaintext.Length)
diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AesGcm.Android.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AesGcm.Android.cs
index 3e36ef16d38..471338a8e8a 100644
--- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AesGcm.Android.cs
+++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AesGcm.Android.cs
@@ -74,11 +74,13 @@ namespace System.Security.Cryptography
throw new CryptographicException();
}
- if (!Interop.Crypto.EvpCipherFinalEx(
+ if (!Interop.Crypto.EvpAeadCipherFinalEx(
_ctxHandle,
ciphertextAndTag.Slice(ciphertextBytesWritten),
- out int bytesWritten))
+ out int bytesWritten,
+ out bool authTagMismatch))
{
+ Debug.Assert(!authTagMismatch);
throw new CryptographicException();
}
@@ -141,13 +143,20 @@ namespace System.Security.Cryptography
plaintextBytesWritten += bytesWritten;
- if (!Interop.Crypto.EvpCipherFinalEx(
+ if (!Interop.Crypto.EvpAeadCipherFinalEx(
_ctxHandle,
plaintext.Slice(plaintextBytesWritten),
- out bytesWritten))
+ out bytesWritten,
+ out bool authTagMismatch))
{
CryptographicOperations.ZeroMemory(plaintext);
- throw new CryptographicException(SR.Cryptography_AuthTagMismatch);
+
+ if (authTagMismatch)
+ {
+ throw new AuthenticationTagMismatchException();
+ }
+
+ throw new CryptographicException(SR.Arg_CryptographyException);
}
plaintextBytesWritten += bytesWritten;
diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AesGcm.OpenSsl.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AesGcm.OpenSsl.cs
index 1691f3357db..f11936951bc 100644
--- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AesGcm.OpenSsl.cs
+++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AesGcm.OpenSsl.cs
@@ -106,7 +106,7 @@ namespace System.Security.Cryptography
out int bytesWritten))
{
CryptographicOperations.ZeroMemory(plaintext);
- throw new CryptographicException(SR.Cryptography_AuthTagMismatch);
+ throw new AuthenticationTagMismatchException();
}
plaintextBytesWritten += bytesWritten;
diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AuthenticationTagMismatchException.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AuthenticationTagMismatchException.cs
new file mode 100644
index 00000000000..6c63045da0f
--- /dev/null
+++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AuthenticationTagMismatchException.cs
@@ -0,0 +1,47 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+namespace System.Security.Cryptography
+{
+ /// <summary>
+ /// The exception that is thrown when a decryption operation with an authenticated cipher
+ /// has an authentication tag mismatch.
+ /// </summary>
+ public sealed class AuthenticationTagMismatchException : CryptographicException
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="AuthenticationTagMismatchException" /> class with default
+ /// properties.
+ /// </summary>
+ public AuthenticationTagMismatchException() : base(SR.Cryptography_AuthTagMismatch)
+ {
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="AuthenticationTagMismatchException" /> class with a specified
+ /// error message.
+ /// </summary>
+ /// <param name="message">
+ /// The error message that explains the reason for the exception.
+ /// </param>
+ public AuthenticationTagMismatchException(string? message) : base(message)
+ {
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="AuthenticationTagMismatchException" /> class with a specified
+ /// error message and a reference to the inner exception that is the cause of this exception.
+ /// </summary>
+ /// <param name="message">
+ /// The error message that explains the reason for the exception.
+ /// </param>
+ /// <param name="inner">
+ /// The exception that is the cause of the current exception. If the parameter is not
+ /// <see langword="null" />, the current exception is raised in a catch block that handles the inner exception.
+ /// </param>
+ public AuthenticationTagMismatchException(string? message, Exception? inner)
+ : base(message, inner)
+ {
+ }
+ }
+}
diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/ChaCha20Poly1305.Android.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/ChaCha20Poly1305.Android.cs
index a36599202e3..3c6f78d5425 100644
--- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/ChaCha20Poly1305.Android.cs
+++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/ChaCha20Poly1305.Android.cs
@@ -71,11 +71,13 @@ namespace System.Security.Cryptography
throw new CryptographicException();
}
- if (!Interop.Crypto.EvpCipherFinalEx(
+ if (!Interop.Crypto.EvpAeadCipherFinalEx(
_ctxHandle,
ciphertextAndTag.Slice(ciphertextBytesWritten),
- out int bytesWritten))
+ out int bytesWritten,
+ out bool authTagMismatch))
{
+ Debug.Assert(!authTagMismatch);
throw new CryptographicException();
}
@@ -133,13 +135,20 @@ namespace System.Security.Cryptography
plaintextBytesWritten += bytesWritten;
- if (!Interop.Crypto.EvpCipherFinalEx(
+ if (!Interop.Crypto.EvpAeadCipherFinalEx(
_ctxHandle,
plaintext.Slice(plaintextBytesWritten),
- out bytesWritten))
+ out bytesWritten,
+ out bool authTagMismatch))
{
CryptographicOperations.ZeroMemory(plaintext);
- throw new CryptographicException(SR.Cryptography_AuthTagMismatch);
+
+ if (authTagMismatch)
+ {
+ throw new AuthenticationTagMismatchException();
+ }
+
+ throw new CryptographicException(SR.Arg_CryptographyException);
}
plaintextBytesWritten += bytesWritten;
diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/ChaCha20Poly1305.OpenSsl.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/ChaCha20Poly1305.OpenSsl.cs
index 6fd211689ae..353f7429403 100644
--- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/ChaCha20Poly1305.OpenSsl.cs
+++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/ChaCha20Poly1305.OpenSsl.cs
@@ -106,7 +106,7 @@ namespace System.Security.Cryptography
out int bytesWritten))
{
CryptographicOperations.ZeroMemory(plaintext);
- throw new CryptographicException(SR.Cryptography_AuthTagMismatch);
+ throw new AuthenticationTagMismatchException();
}
plaintextBytesWritten += bytesWritten;
diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/ChaCha20Poly1305.macOS.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/ChaCha20Poly1305.macOS.cs
new file mode 100644
index 00000000000..82f1633c188
--- /dev/null
+++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/ChaCha20Poly1305.macOS.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+
+namespace System.Security.Cryptography
+{
+ public sealed partial class ChaCha20Poly1305
+ {
+ // CryptoKit added ChaCha20Poly1305 in macOS 10.15, which is our minimum target for macOS.
+ public static bool IsSupported => true;
+ private byte[]? _key;
+
+ [MemberNotNull(nameof(_key))]
+ private void ImportKey(ReadOnlySpan<byte> key)
+ {
+ // We should only be calling this in the constructor, so there shouldn't be a previous key.
+ Debug.Assert(_key is null);
+
+ // Pin the array on the POH so that the GC doesn't move it around to allow zeroing to be more effective.
+ _key = GC.AllocateArray<byte>(key.Length, pinned: true);
+ key.CopyTo(_key);
+ }
+
+ private void EncryptCore(
+ ReadOnlySpan<byte> nonce,
+ ReadOnlySpan<byte> plaintext,
+ Span<byte> ciphertext,
+ Span<byte> tag,
+ ReadOnlySpan<byte> associatedData = default)
+ {
+ CheckDisposed();
+ Interop.AppleCrypto.ChaCha20Poly1305Encrypt(
+ _key,
+ nonce,
+ plaintext,
+ ciphertext,
+ tag,
+ associatedData);
+ }
+
+ private void DecryptCore(
+ ReadOnlySpan<byte> nonce,
+ ReadOnlySpan<byte> ciphertext,
+ ReadOnlySpan<byte> tag,
+ Span<byte> plaintext,
+ ReadOnlySpan<byte> associatedData = default)
+ {
+ CheckDisposed();
+ Interop.AppleCrypto.ChaCha20Poly1305Decrypt(
+ _key,
+ nonce,
+ ciphertext,
+ tag,
+ plaintext,
+ associatedData);
+ }
+
+ public void Dispose()
+ {
+ CryptographicOperations.ZeroMemory(_key);
+ _key = null;
+ }
+
+ [MemberNotNull(nameof(_key))]
+ private void CheckDisposed()
+ {
+ ObjectDisposedException.ThrowIf(_key is null, this);
+ }
+ }
+}
diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngHelpers.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngHelpers.cs
index 59db73d98f0..80ef8bd1341 100644
--- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngHelpers.cs
+++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngHelpers.cs
@@ -3,12 +3,15 @@
using System.Diagnostics;
using System.IO;
+using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using Internal.Cryptography;
using Microsoft.Win32.SafeHandles;
+using BCRYPT_RSAKEY_BLOB = Interop.BCrypt.BCRYPT_RSAKEY_BLOB;
using ErrorCode = Interop.NCrypt.ErrorCode;
+using KeyBlobMagicNumber = Interop.BCrypt.KeyBlobMagicNumber;
namespace System.Security.Cryptography
{
@@ -244,5 +247,193 @@ namespace System.Security.Cryptography
}
}
}
+
+ internal static unsafe ArraySegment<byte> ToBCryptBlob(this in RSAParameters parameters)
+ {
+ if (parameters.Exponent == null || parameters.Modulus == null)
+ throw new CryptographicException(SR.Cryptography_InvalidRsaParameters);
+
+ bool includePrivate;
+ if (parameters.D == null)
+ {
+ includePrivate = false;
+
+ if (parameters.P != null ||
+ parameters.DP != null ||
+ parameters.Q != null ||
+ parameters.DQ != null ||
+ parameters.InverseQ != null)
+ {
+ throw new CryptographicException(SR.Cryptography_InvalidRsaParameters);
+ }
+ }
+ else
+ {
+ includePrivate = true;
+
+ if (parameters.P == null ||
+ parameters.DP == null ||
+ parameters.Q == null ||
+ parameters.DQ == null ||
+ parameters.InverseQ == null)
+ {
+ throw new CryptographicException(SR.Cryptography_InvalidRsaParameters);
+ }
+
+ // Half, rounded up.
+ int halfModulusLength = (parameters.Modulus.Length + 1) / 2;
+
+ // The same checks are done by RSACryptoServiceProvider on import (when building the key blob)
+ // Historically RSACng let CNG handle this (reporting NTE_NOT_SUPPORTED), but on RS1 CNG let the
+ // import succeed, then on private key use (e.g. signing) it would report NTE_INVALID_PARAMETER.
+ //
+ // Doing the check here prevents the state in RS1 where the Import succeeds, but corrupts the key,
+ // and makes for a friendlier exception message.
+ if (parameters.D.Length != parameters.Modulus.Length ||
+ parameters.P.Length != halfModulusLength ||
+ parameters.Q.Length != halfModulusLength ||
+ parameters.DP.Length != halfModulusLength ||
+ parameters.DQ.Length != halfModulusLength ||
+ parameters.InverseQ.Length != halfModulusLength)
+ {
+ throw new CryptographicException(SR.Cryptography_InvalidRsaParameters);
+ }
+ }
+
+ //
+ // We need to build a key blob structured as follows:
+ //
+ // BCRYPT_RSAKEY_BLOB header
+ // byte[cbPublicExp] publicExponent - Exponent
+ // byte[cbModulus] modulus - Modulus
+ // -- Only if "includePrivate" is true --
+ // byte[cbPrime1] prime1 - P
+ // byte[cbPrime2] prime2 - Q
+ // ------------------
+ //
+
+ int blobSize = sizeof(BCRYPT_RSAKEY_BLOB) +
+ parameters.Exponent.Length +
+ parameters.Modulus.Length;
+ if (includePrivate)
+ {
+ blobSize += parameters.P!.Length +
+ parameters.Q!.Length;
+ }
+
+ byte[] rsaBlob = CryptoPool.Rent(blobSize);
+
+ fixed (byte* pRsaBlob = &rsaBlob[0])
+ {
+ // Build the header
+ BCRYPT_RSAKEY_BLOB* pBcryptBlob = (BCRYPT_RSAKEY_BLOB*)pRsaBlob;
+ pBcryptBlob->Magic = includePrivate ? KeyBlobMagicNumber.BCRYPT_RSAPRIVATE_MAGIC : KeyBlobMagicNumber.BCRYPT_RSAPUBLIC_MAGIC;
+ pBcryptBlob->BitLength = parameters.Modulus.Length * 8;
+ pBcryptBlob->cbPublicExp = parameters.Exponent.Length;
+ pBcryptBlob->cbModulus = parameters.Modulus.Length;
+
+ if (includePrivate)
+ {
+ pBcryptBlob->cbPrime1 = parameters.P!.Length;
+ pBcryptBlob->cbPrime2 = parameters.Q!.Length;
+ }
+ else
+ {
+ pBcryptBlob->cbPrime1 = pBcryptBlob->cbPrime2 = 0;
+ }
+
+ int offset = sizeof(BCRYPT_RSAKEY_BLOB);
+
+ Interop.BCrypt.Emit(rsaBlob, ref offset, parameters.Exponent);
+ Interop.BCrypt.Emit(rsaBlob, ref offset, parameters.Modulus);
+
+ if (includePrivate)
+ {
+ Interop.BCrypt.Emit(rsaBlob, ref offset, parameters.P!);
+ Interop.BCrypt.Emit(rsaBlob, ref offset, parameters.Q!);
+ }
+
+ // We better have computed the right allocation size above!
+ Debug.Assert(offset == blobSize, "offset == blobSize");
+ }
+
+ return new ArraySegment<byte>(rsaBlob, 0, blobSize);
+ }
+
+ internal static void FromBCryptBlob(
+ this ref RSAParameters rsaParams,
+ ReadOnlySpan<byte> rsaBlob,
+ bool includePrivateParameters)
+ {
+ //
+ // We now have a buffer laid out as follows:
+ // BCRYPT_RSAKEY_BLOB header
+ // byte[cbPublicExp] publicExponent - Exponent
+ // byte[cbModulus] modulus - Modulus
+ // -- Private only --
+ // byte[cbPrime1] prime1 - P
+ // byte[cbPrime2] prime2 - Q
+ // byte[cbPrime1] exponent1 - DP
+ // byte[cbPrime2] exponent2 - DQ
+ // byte[cbPrime1] coefficient - InverseQ
+ // byte[cbModulus] privateExponent - D
+ //
+
+ unsafe
+ {
+ // Fail-fast if a rogue provider gave us a blob that isn't even the size of the blob header.
+ if (rsaBlob.Length < sizeof(BCRYPT_RSAKEY_BLOB))
+ throw ErrorCode.E_FAIL.ToCryptographicException();
+
+ fixed (byte* pRsaBlob = &rsaBlob[0])
+ {
+ KeyBlobMagicNumber magic = (KeyBlobMagicNumber)Unsafe.ReadUnaligned<int>(pRsaBlob);
+
+ // Check the magic value in the key blob header. If the blob does not have the required magic,
+ // then throw a CryptographicException.
+ CheckMagicValueOfKey(magic, includePrivateParameters);
+
+ BCRYPT_RSAKEY_BLOB* pBcryptBlob = (BCRYPT_RSAKEY_BLOB*)pRsaBlob;
+
+ int offset = sizeof(BCRYPT_RSAKEY_BLOB);
+
+ // Read out the exponent
+ rsaParams.Exponent = Interop.BCrypt.Consume(rsaBlob, ref offset, pBcryptBlob->cbPublicExp);
+ rsaParams.Modulus = Interop.BCrypt.Consume(rsaBlob, ref offset, pBcryptBlob->cbModulus);
+
+ if (includePrivateParameters)
+ {
+ rsaParams.P = Interop.BCrypt.Consume(rsaBlob, ref offset, pBcryptBlob->cbPrime1);
+ rsaParams.Q = Interop.BCrypt.Consume(rsaBlob, ref offset, pBcryptBlob->cbPrime2);
+ rsaParams.DP = Interop.BCrypt.Consume(rsaBlob, ref offset, pBcryptBlob->cbPrime1);
+ rsaParams.DQ = Interop.BCrypt.Consume(rsaBlob, ref offset, pBcryptBlob->cbPrime2);
+ rsaParams.InverseQ = Interop.BCrypt.Consume(rsaBlob, ref offset, pBcryptBlob->cbPrime1);
+ rsaParams.D = Interop.BCrypt.Consume(rsaBlob, ref offset, pBcryptBlob->cbModulus);
+ }
+ }
+ }
+
+ static void CheckMagicValueOfKey(KeyBlobMagicNumber magic, bool includePrivateParameters)
+ {
+ if (includePrivateParameters)
+ {
+ if (magic != KeyBlobMagicNumber.BCRYPT_RSAPRIVATE_MAGIC && magic != KeyBlobMagicNumber.BCRYPT_RSAFULLPRIVATE_MAGIC)
+ {
+ throw new CryptographicException(SR.Cryptography_NotValidPrivateKey);
+ }
+ }
+ else
+ {
+ if (magic != KeyBlobMagicNumber.BCRYPT_RSAPUBLIC_MAGIC)
+ {
+ // Private key magic is permissible too since the public key can be derived from the private key blob.
+ if (magic != KeyBlobMagicNumber.BCRYPT_RSAPRIVATE_MAGIC && magic != KeyBlobMagicNumber.BCRYPT_RSAFULLPRIVATE_MAGIC)
+ {
+ throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey);
+ }
+ }
+ }
+ }
+ }
}
}
diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/ECAlgorithm.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/ECAlgorithm.cs
index 8362bd70572..5acdad43f82 100644
--- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/ECAlgorithm.cs
+++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/ECAlgorithm.cs
@@ -19,6 +19,12 @@ namespace System.Security.Cryptography
// ECDH and ECMQV are not valid in this context.
};
+ private protected static readonly KeySizes[] s_defaultKeySizes =
+ {
+ new KeySizes(minSize: 256, maxSize: 384, skipSize: 128),
+ new KeySizes(minSize: 521, maxSize: 521, skipSize: 0),
+ };
+
/// <summary>
/// When overridden in a derived class, exports the named or explicit <see cref="ECParameters" /> for an ECCurve.
/// If the curve has a name, the Curve property will contain named curve parameters otherwise it will contain explicit parameters.
diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RSA.Create.Windows.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RSA.Create.Windows.cs
index 1871e87f87c..33fc8f1813d 100644
--- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RSA.Create.Windows.cs
+++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RSA.Create.Windows.cs
@@ -7,7 +7,7 @@ namespace System.Security.Cryptography
{
public static new partial RSA Create()
{
- return new RSAWrapper(new RSACng());
+ return new RSABCrypt();
}
}
}
diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RSABCrypt.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RSABCrypt.cs
new file mode 100644
index 00000000000..b3297e9e56a
--- /dev/null
+++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RSABCrypt.cs
@@ -0,0 +1,433 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Diagnostics;
+using System.Threading;
+using Internal.NativeCrypto;
+using Microsoft.Win32.SafeHandles;
+
+namespace System.Security.Cryptography
+{
+ internal sealed class RSABCrypt : RSA
+ {
+ private static readonly SafeBCryptAlgorithmHandle s_algHandle =
+ Interop.BCrypt.BCryptOpenAlgorithmProvider(BCryptNative.AlgorithmName.RSA);
+
+ // See https://msdn.microsoft.com/en-us/library/windows/desktop/bb931354(v=vs.85).aspx
+ // All values are in bits.
+ private static readonly KeySizes s_keySizes =
+ new KeySizes(minSize: 512, maxSize: 16384, skipSize: 64);
+
+ private SafeBCryptKeyHandle? _key;
+ private int _lastKeySize;
+
+ internal RSABCrypt()
+ {
+ KeySizeValue = 2048;
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing)
+ {
+ _key?.Dispose();
+ }
+
+ _lastKeySize = -1;
+ }
+
+ private SafeBCryptKeyHandle GetKey()
+ {
+ int keySize = KeySize;
+
+ // Since _lastKeySize also tracks the disposal state, we can do the equals check first.
+ if (_lastKeySize == keySize)
+ {
+ Debug.Assert(_key != null);
+ return _key;
+ }
+
+ ThrowIfDisposed();
+
+ SafeBCryptKeyHandle newKey = Interop.BCrypt.BCryptGenerateKeyPair(s_algHandle, keySize);
+ Interop.BCrypt.BCryptFinalizeKeyPair(newKey);
+ SetKey(newKey);
+ return newKey;
+ }
+
+ private void SetKey(SafeBCryptKeyHandle newKey)
+ {
+ Debug.Assert(!newKey.IsInvalid);
+
+ int keySize = Interop.BCrypt.BCryptGetDWordProperty(
+ newKey,
+ Interop.BCrypt.BCryptPropertyStrings.BCRYPT_KEY_STRENGTH);
+
+ SafeBCryptKeyHandle? oldKey = Interlocked.Exchange(ref _key, newKey);
+ ForceSetKeySize(keySize);
+ oldKey?.Dispose();
+ }
+
+ public override RSAParameters ExportParameters(bool includePrivateParameters)
+ {
+ SafeBCryptKeyHandle key = GetKey();
+
+ ArraySegment<byte> keyBlob = Interop.BCrypt.BCryptExportKey(
+ key,
+ includePrivateParameters ?
+ Interop.BCrypt.KeyBlobType.BCRYPT_RSAFULLPRIVATE_BLOB :
+ Interop.BCrypt.KeyBlobType.BCRYPT_RSAPUBLIC_KEY_BLOB);
+
+ RSAParameters ret = default;
+ ret.FromBCryptBlob(keyBlob, includePrivateParameters);
+
+ // FromBCryptBlob isn't expected to have any failures since it's reading
+ // data directly from BCryptExportKey, so we don't need to bother with
+ // a try/finally.
+ CryptoPool.Return(keyBlob);
+
+ return ret;
+ }
+
+ public override void ImportParameters(RSAParameters parameters)
+ {
+ ThrowIfDisposed();
+
+ ArraySegment<byte> keyBlob = parameters.ToBCryptBlob();
+ SafeBCryptKeyHandle newKey;
+
+ try
+ {
+ newKey = Interop.BCrypt.BCryptImportKeyPair(
+ s_algHandle,
+ parameters.D != null ?
+ Interop.BCrypt.KeyBlobType.BCRYPT_RSAPRIVATE_BLOB :
+ Interop.BCrypt.KeyBlobType.BCRYPT_RSAPUBLIC_KEY_BLOB,
+ keyBlob);
+ }
+ finally
+ {
+ // Return (and clear) the BCryptBlob array even if the parameters
+ // are invalid and the import fails/throws (e.g. P*Q != Modulus).
+ CryptoPool.Return(keyBlob);
+ }
+
+ SetKey(newKey);
+ }
+
+ public override byte[] Encrypt(byte[] data, RSAEncryptionPadding padding)
+ {
+ ArgumentNullException.ThrowIfNull(data);
+ ArgumentNullException.ThrowIfNull(padding);
+
+ byte[] ret = new byte[AsymmetricAlgorithmHelpers.BitsToBytes(KeySize)];
+ int written = Encrypt(new ReadOnlySpan<byte>(data), ret.AsSpan(), padding);
+
+ VerifyWritten(ret, written);
+ return ret;
+ }
+
+ public override byte[] Decrypt(byte[] data, RSAEncryptionPadding padding)
+ {
+ ArgumentNullException.ThrowIfNull(data);
+ ArgumentNullException.ThrowIfNull(padding);
+
+ return Decrypt(new ReadOnlySpan<byte>(data), padding);
+ }
+
+ public override byte[] SignHash(
+ byte[] hash,
+ HashAlgorithmName hashAlgorithm,
+ RSASignaturePadding padding)
+ {
+ ArgumentNullException.ThrowIfNull(hash);
+ ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
+ ArgumentNullException.ThrowIfNull(padding);
+
+ byte[] ret = new byte[AsymmetricAlgorithmHelpers.BitsToBytes(KeySize)];
+
+ int written = SignHash(
+ new ReadOnlySpan<byte>(hash),
+ ret.AsSpan(),
+ hashAlgorithm,
+ padding);
+
+ VerifyWritten(ret, written);
+ return ret;
+ }
+
+ public override bool VerifyHash(
+ byte[] hash,
+ byte[] signature,
+ HashAlgorithmName hashAlgorithm,
+ RSASignaturePadding padding)
+ {
+ ArgumentNullException.ThrowIfNull(hash);
+ ArgumentNullException.ThrowIfNull(signature);
+ ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
+ ArgumentNullException.ThrowIfNull(padding);
+
+ return VerifyHash(
+ new ReadOnlySpan<byte>(hash),
+ new ReadOnlySpan<byte>(signature),
+ hashAlgorithm,
+ padding);
+ }
+
+ public override bool TryDecrypt(
+ ReadOnlySpan<byte> data,
+ Span<byte> destination,
+ RSAEncryptionPadding padding,
+ out int bytesWritten)
+ {
+ ArgumentNullException.ThrowIfNull(padding);
+
+ SafeBCryptKeyHandle key = GetKey();
+ int modulusSizeInBytes = RsaPaddingProcessor.BytesRequiredForBitCount(KeySize);
+
+ if (data.Length != modulusSizeInBytes)
+ {
+ throw new CryptographicException(SR.Cryptography_RSA_DecryptWrongSize);
+ }
+
+ switch (padding.Mode)
+ {
+ case RSAEncryptionPaddingMode.Pkcs1:
+ return Interop.BCrypt.BCryptDecryptPkcs1(key, data, destination, out bytesWritten);
+ case RSAEncryptionPaddingMode.Oaep:
+ return Interop.BCrypt.BCryptDecryptOaep(
+ key,
+ data,
+ destination,
+ padding.OaepHashAlgorithm.Name,
+ out bytesWritten);
+ }
+
+ throw new CryptographicException(SR.Cryptography_UnsupportedPaddingMode);
+ }
+
+ public override bool TryEncrypt(
+ ReadOnlySpan<byte> data,
+ Span<byte> destination,
+ RSAEncryptionPadding padding,
+ out int bytesWritten)
+ {
+ ArgumentNullException.ThrowIfNull(padding);
+
+ SafeBCryptKeyHandle key = GetKey();
+ int modulusSizeInBytes = RsaPaddingProcessor.BytesRequiredForBitCount(KeySize);
+
+ if (destination.Length < modulusSizeInBytes)
+ {
+ bytesWritten = 0;
+ return false;
+ }
+
+ const int Pkcs1PaddingOverhead = 11;
+
+ switch (padding.Mode)
+ {
+ case RSAEncryptionPaddingMode.Pkcs1:
+ if (modulusSizeInBytes - Pkcs1PaddingOverhead < data.Length)
+ {
+ throw new CryptographicException(
+ SR.Format(
+ SR.Cryptography_Encryption_MessageTooLong,
+ modulusSizeInBytes - Pkcs1PaddingOverhead));
+ }
+
+ bytesWritten = Interop.BCrypt.BCryptEncryptPkcs1(key, data, destination);
+ return true;
+ case RSAEncryptionPaddingMode.Oaep:
+ bytesWritten = Interop.BCrypt.BCryptEncryptOaep(
+ key,
+ data,
+ destination,
+ padding.OaepHashAlgorithm.Name);
+
+ return true;
+ }
+
+ throw new CryptographicException(SR.Cryptography_UnsupportedPaddingMode);
+ }
+
+ public override bool TrySignHash(
+ ReadOnlySpan<byte> hash,
+ Span<byte> destination,
+ HashAlgorithmName hashAlgorithm,
+ RSASignaturePadding padding,
+ out int bytesWritten)
+ {
+ string? hashAlgorithmName = hashAlgorithm.Name;
+ ArgumentException.ThrowIfNullOrEmpty(hashAlgorithmName, nameof(hashAlgorithm));
+ ArgumentNullException.ThrowIfNull(padding);
+
+ SafeBCryptKeyHandle key = GetKey();
+
+ if (hash.Length != RSACng.GetHashSizeInBytes(hashAlgorithm))
+ {
+ throw new CryptographicException(SR.Cryptography_SignHash_WrongSize);
+ }
+
+ Interop.BCrypt.NTSTATUS status;
+ int written;
+
+ switch (padding.Mode)
+ {
+ case RSASignaturePaddingMode.Pkcs1:
+ status = Interop.BCrypt.BCryptSignHashPkcs1(
+ key,
+ hash,
+ destination,
+ hashAlgorithmName,
+ out written);
+
+ break;
+ case RSASignaturePaddingMode.Pss:
+ status = Interop.BCrypt.BCryptSignHashPss(
+ key,
+ hash,
+ destination,
+ hashAlgorithmName,
+ out written);
+
+ break;
+ default:
+ throw new CryptographicException(SR.Cryptography_UnsupportedPaddingMode);
+ }
+
+ if (status == Interop.BCrypt.NTSTATUS.STATUS_SUCCESS)
+ {
+ bytesWritten = written;
+ return true;
+ }
+
+ if (status == Interop.BCrypt.NTSTATUS.STATUS_BUFFER_TOO_SMALL)
+ {
+ bytesWritten = 0;
+ return false;
+ }
+
+ throw Interop.BCrypt.CreateCryptographicException(status);
+ }
+
+ public override bool VerifyHash(
+ ReadOnlySpan<byte> hash,
+ ReadOnlySpan<byte> signature,
+ HashAlgorithmName hashAlgorithm,
+ RSASignaturePadding padding)
+ {
+ string? hashAlgorithmName = hashAlgorithm.Name;
+ ArgumentException.ThrowIfNullOrEmpty(hashAlgorithmName, nameof(hashAlgorithm));
+ ArgumentNullException.ThrowIfNull(padding);
+
+ SafeBCryptKeyHandle key = GetKey();
+
+ if (hash.Length != RSACng.GetHashSizeInBytes(hashAlgorithm))
+ {
+ return false;
+ }
+
+ switch (padding.Mode)
+ {
+ case RSASignaturePaddingMode.Pkcs1:
+ return Interop.BCrypt.BCryptVerifySignaturePkcs1(
+ key,
+ hash,
+ signature,
+ hashAlgorithmName);
+ case RSASignaturePaddingMode.Pss:
+ return Interop.BCrypt.BCryptVerifySignaturePss(
+ key,
+ hash,
+ signature,
+ hashAlgorithmName);
+ default:
+ throw new CryptographicException(SR.Cryptography_UnsupportedPaddingMode);
+ }
+ }
+
+ public override KeySizes[] LegalKeySizes => new KeySizes[] { s_keySizes };
+
+ public override unsafe void ImportEncryptedPkcs8PrivateKey(
+ ReadOnlySpan<byte> passwordBytes,
+ ReadOnlySpan<byte> source,
+ out int bytesRead)
+ {
+ ThrowIfDisposed();
+ base.ImportEncryptedPkcs8PrivateKey(passwordBytes, source, out bytesRead);
+ }
+
+ public override unsafe void ImportEncryptedPkcs8PrivateKey(
+ ReadOnlySpan<char> password,
+ ReadOnlySpan<byte> source,
+ out int bytesRead)
+ {
+ ThrowIfDisposed();
+ base.ImportEncryptedPkcs8PrivateKey(password, source, out bytesRead);
+ }
+
+ public override unsafe void ImportPkcs8PrivateKey(ReadOnlySpan<byte> source, out int bytesRead)
+ {
+ ThrowIfDisposed();
+ base.ImportPkcs8PrivateKey(source, out bytesRead);
+ }
+
+ public override void ImportRSAPrivateKey(ReadOnlySpan<byte> source, out int bytesRead)
+ {
+ ThrowIfDisposed();
+ base.ImportRSAPrivateKey(source, out bytesRead);
+ }
+
+ public override void ImportRSAPublicKey(ReadOnlySpan<byte> source, out int bytesRead)
+ {
+ ThrowIfDisposed();
+ base.ImportRSAPublicKey(source, out bytesRead);
+ }
+
+ public override void ImportSubjectPublicKeyInfo(ReadOnlySpan<byte> source, out int bytesRead)
+ {
+ ThrowIfDisposed();
+ base.ImportSubjectPublicKeyInfo(source, out bytesRead);
+ }
+
+ private void ForceSetKeySize(int newKeySize)
+ {
+ // Our LegalKeySizes value stores the values that we encoded as being the correct
+ // legal key size limitations for this algorithm, as documented on MSDN.
+ //
+ // But on a new OS version we might not question if our limit is accurate, or MSDN
+ // could have been inaccurate to start with.
+ //
+ // Since the key is already loaded, we know that Windows thought it to be valid;
+ // therefore we should set KeySizeValue directly to bypass the LegalKeySizes conformance
+ // check.
+ //
+ // For RSA there are known cases where this change matters. RSACryptoServiceProvider can
+ // create a 384-bit RSA key, which we consider too small to be legal. It can also create
+ // a 1032-bit RSA key, which we consider illegal because it doesn't match our 64-bit
+ // alignment requirement. (In both cases Windows loads it just fine)
+ KeySizeValue = newKeySize;
+ _lastKeySize = newKeySize;
+ }
+
+ private static void VerifyWritten(byte[] array, int written)
+ {
+ if (array.Length != written)
+ {
+ Debug.Fail(
+ $"An array-filling operation wrote {written} when {array.Length} was expected.");
+
+ throw new CryptographicException();
+ }
+ }
+
+ private void ThrowIfDisposed()
+ {
+ if (_lastKeySize < 0)
+ {
+ throw new ObjectDisposedException(nameof(RSA));
+ }
+ }
+ }
+}
diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RSACng.ImportExport.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RSACng.ImportExport.cs
index b656c41fa82..dcc2f974299 100644
--- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RSACng.ImportExport.cs
+++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RSACng.ImportExport.cs
@@ -15,7 +15,7 @@ namespace System.Security.Cryptography
private static readonly CngKeyBlobFormat s_rsaPublicBlob =
new CngKeyBlobFormat(Interop.BCrypt.KeyBlobType.BCRYPT_RSAPUBLIC_KEY_BLOB);
- private void ImportKeyBlob(byte[] rsaBlob, bool includePrivate)
+ private void ImportKeyBlob(ReadOnlySpan<byte> rsaBlob, bool includePrivate)
{
CngKeyBlobFormat blobFormat = includePrivate ? s_rsaPrivateBlob : s_rsaPublicBlob;
diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/Utils.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/Utils.cs
deleted file mode 100644
index abcbb90ac13..00000000000
--- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/Utils.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-namespace System.Security.Cryptography
-{
- /// <summary>
- /// Contains CLR specific constants
- /// </summary>
- internal static class Constants
- {
- internal const int CLR_KEYLEN = 1;
- internal const int CLR_PUBLICKEYONLY = 2;
- internal const int CLR_EXPORTABLE = 3;
- internal const int CLR_REMOVABLE = 4;
- internal const int CLR_HARDWARE = 5;
- internal const int CLR_ACCESSIBLE = 6;
- internal const int CLR_PROTECTED = 7;
- internal const int CLR_UNIQUE_CONTAINER = 8;
- internal const int CLR_ALGID = 9;
- internal const int CLR_PP_CLIENT_HWND = 10;
- internal const int CLR_PP_PIN = 11;
-
- internal const int SIZE_OF_DWORD = 4;
- }
-}
diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Certificate2.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Certificate2.cs
index 422c29c10e8..b2855084370 100644
--- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Certificate2.cs
+++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Certificate2.cs
@@ -1433,16 +1433,18 @@ namespace System.Security.Cryptography.X509Certificates
{
if (label.SequenceEqual(eligibleLabel))
{
- TAlg key = factory();
- key.ImportFromPem(contents[fields.Location]);
-
- try
- {
- return import(key);
- }
- catch (ArgumentException ae)
+ using (TAlg key = factory())
{
- throw new CryptographicException(SR.Cryptography_X509_NoOrMismatchedPemKey, ae);
+ key.ImportFromPem(contents[fields.Location]);
+
+ try
+ {
+ return import(key);
+ }
+ catch (ArgumentException ae)
+ {
+ throw new CryptographicException(SR.Cryptography_X509_NoOrMismatchedPemKey, ae);
+ }
}
}
}
diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Pal.Windows.PublicKey.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Pal.Windows.PublicKey.cs
index 4e7c58e98a9..525b31b1f11 100644
--- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Pal.Windows.PublicKey.cs
+++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Pal.Windows.PublicKey.cs
@@ -56,9 +56,9 @@ namespace System.Security.Cryptography.X509Certificates
case AlgId.CALG_RSA_KEYX:
case AlgId.CALG_RSA_SIGN:
{
- byte[] keyBlob = DecodeKeyBlob(CryptDecodeObjectStructType.CNG_RSA_PUBLIC_KEY_BLOB, encodedKeyValue);
- CngKey cngKey = CngKey.Import(keyBlob, CngKeyBlobFormat.GenericPublicBlob);
- return new RSACng(cngKey, transferOwnership: true);
+ RSA rsa = new RSABCrypt();
+ rsa.ImportRSAPublicKey(encodedKeyValue, out _);
+ return rsa;
}
case AlgId.CALG_DSS_SIGN:
{
@@ -84,7 +84,6 @@ namespace System.Security.Cryptography.X509Certificates
using (SafeBCryptKeyHandle bCryptKeyHandle = ImportPublicKeyInfo(certContext, importFlags))
{
CngKeyBlobFormat blobFormat;
- byte[] keyBlob;
string? curveName = GetCurveName(bCryptKeyHandle);
if (curveName == null)
@@ -98,15 +97,24 @@ namespace System.Security.Cryptography.X509Certificates
blobFormat = CngKeyBlobFormat.EccPublicBlob;
}
- keyBlob = ExportKeyBlob(bCryptKeyHandle, blobFormat);
- key = factory(CngKey.Import(keyBlob, blobFormat));
+ ArraySegment<byte> keyBlob = ExportKeyBlob(bCryptKeyHandle, blobFormat);
+
+ try
+ {
+ key = factory(CngKey.Import(keyBlob, blobFormat));
+ }
+ finally
+ {
+ CryptoPool.Return(keyBlob);
+ }
}
else
{
blobFormat = CngKeyBlobFormat.EccPublicBlob;
- keyBlob = ExportKeyBlob(bCryptKeyHandle, blobFormat);
+ ArraySegment<byte> keyBlob = ExportKeyBlob(bCryptKeyHandle, blobFormat);
ECParameters ecparams = default;
ExportNamedCurveParameters(ref ecparams, keyBlob, false);
+ CryptoPool.Return(keyBlob);
ecparams.Curve = ECCurve.CreateFromFriendlyName(curveName);
key = new TAlgorithm();
key.ImportParameters(ecparams);
@@ -146,25 +154,14 @@ namespace System.Security.Cryptography.X509Certificates
}
}
- private static byte[] ExportKeyBlob(SafeBCryptKeyHandle bCryptKeyHandle, CngKeyBlobFormat blobFormat)
+ private static ArraySegment<byte> ExportKeyBlob(SafeBCryptKeyHandle bCryptKeyHandle, CngKeyBlobFormat blobFormat)
{
string blobFormatString = blobFormat.Format;
- int numBytesNeeded;
- NTSTATUS ntStatus = Interop.BCrypt.BCryptExportKey(bCryptKeyHandle, IntPtr.Zero, blobFormatString, null, 0, out numBytesNeeded, 0);
- if (ntStatus != NTSTATUS.STATUS_SUCCESS)
- throw new CryptographicException(Interop.Kernel32.GetMessage((int)ntStatus));
-
- byte[] keyBlob = new byte[numBytesNeeded];
- ntStatus = Interop.BCrypt.BCryptExportKey(bCryptKeyHandle, IntPtr.Zero, blobFormatString, keyBlob, keyBlob.Length, out numBytesNeeded, 0);
- if (ntStatus != NTSTATUS.STATUS_SUCCESS)
- throw new CryptographicException(Interop.Kernel32.GetMessage((int)ntStatus));
-
- Array.Resize(ref keyBlob, numBytesNeeded);
- return keyBlob;
+ return Interop.BCrypt.BCryptExportKey(bCryptKeyHandle, blobFormatString);
}
- private static void ExportNamedCurveParameters(ref ECParameters ecParams, byte[] ecBlob, bool includePrivateParameters)
+ private static void ExportNamedCurveParameters(ref ECParameters ecParams, ReadOnlySpan<byte> ecBlob, bool includePrivateParameters)
{
// We now have a buffer laid out as follows:
// BCRYPT_ECCKEY_BLOB header
diff --git a/src/libraries/System.Security.Cryptography/tests/AesCcmTests.cs b/src/libraries/System.Security.Cryptography/tests/AesCcmTests.cs
index 1d662f9a085..8b68d7f1d61 100644
--- a/src/libraries/System.Security.Cryptography/tests/AesCcmTests.cs
+++ b/src/libraries/System.Security.Cryptography/tests/AesCcmTests.cs
@@ -34,7 +34,7 @@ namespace System.Security.Cryptography.Tests
additionalData[0] ^= 1;
byte[] decrypted = new byte[dataLength];
- Assert.Throws<CryptographicException>(
+ Assert.Throws<AuthenticationTagMismatchException>(
() => aesCcm.Decrypt(nonce, ciphertext, tag, decrypted, additionalData));
}
}
@@ -305,7 +305,7 @@ namespace System.Security.Cryptography.Tests
tag[0] ^= 1;
- Assert.Throws<CryptographicException>(
+ Assert.Throws<AuthenticationTagMismatchException>(
() => aesCcm.Decrypt(nonce, data, tag, data));
Assert.Equal(new byte[data.Length], data);
}
@@ -347,7 +347,7 @@ namespace System.Security.Cryptography.Tests
byte[] plaintext = new byte[testCase.Plaintext.Length];
RandomNumberGenerator.Fill(plaintext);
- Assert.Throws<CryptographicException>(
+ Assert.Throws<AuthenticationTagMismatchException>(
() => aesCcm.Decrypt(testCase.Nonce, ciphertext, tag, plaintext, testCase.AssociatedData));
Assert.Equal(new byte[plaintext.Length], plaintext);
}
@@ -370,7 +370,7 @@ namespace System.Security.Cryptography.Tests
byte[] plaintext = new byte[testCase.Plaintext.Length];
RandomNumberGenerator.Fill(plaintext);
- Assert.Throws<CryptographicException>(
+ Assert.Throws<AuthenticationTagMismatchException>(
() => aesCcm.Decrypt(testCase.Nonce, ciphertext, tag, plaintext, testCase.AssociatedData));
Assert.Equal(new byte[plaintext.Length], plaintext);
}
diff --git a/src/libraries/System.Security.Cryptography/tests/AesGcmTests.cs b/src/libraries/System.Security.Cryptography/tests/AesGcmTests.cs
index 1a41a2beb3f..6ef5391e40e 100644
--- a/src/libraries/System.Security.Cryptography/tests/AesGcmTests.cs
+++ b/src/libraries/System.Security.Cryptography/tests/AesGcmTests.cs
@@ -34,7 +34,7 @@ namespace System.Security.Cryptography.Tests
additionalData[0] ^= 1;
byte[] decrypted = new byte[dataLength];
- Assert.Throws<CryptographicException>(
+ Assert.Throws<AuthenticationTagMismatchException>(
() => aesGcm.Decrypt(nonce, ciphertext, tag, decrypted, additionalData));
}
}
@@ -312,7 +312,7 @@ namespace System.Security.Cryptography.Tests
tag[0] ^= 1;
- Assert.Throws<CryptographicException>(
+ Assert.Throws<AuthenticationTagMismatchException>(
() => aesGcm.Decrypt(nonce, data, tag, data));
Assert.Equal(new byte[data.Length], data);
}
@@ -354,7 +354,7 @@ namespace System.Security.Cryptography.Tests
byte[] plaintext = new byte[testCase.Plaintext.Length];
RandomNumberGenerator.Fill(plaintext);
- Assert.Throws<CryptographicException>(
+ Assert.Throws<AuthenticationTagMismatchException>(
() => aesGcm.Decrypt(testCase.Nonce, ciphertext, tag, plaintext, testCase.AssociatedData));
Assert.Equal(new byte[plaintext.Length], plaintext);
}
@@ -377,7 +377,7 @@ namespace System.Security.Cryptography.Tests
byte[] plaintext = new byte[testCase.Plaintext.Length];
RandomNumberGenerator.Fill(plaintext);
- Assert.Throws<CryptographicException>(
+ Assert.Throws<AuthenticationTagMismatchException>(
() => aesGcm.Decrypt(testCase.Nonce, ciphertext, tag, plaintext, testCase.AssociatedData));
Assert.Equal(new byte[plaintext.Length], plaintext);
}
diff --git a/src/libraries/System.Security.Cryptography/tests/ChaCha20Poly1305Tests.cs b/src/libraries/System.Security.Cryptography/tests/ChaCha20Poly1305Tests.cs
index 7d39b45922f..40f17690cdf 100644
--- a/src/libraries/System.Security.Cryptography/tests/ChaCha20Poly1305Tests.cs
+++ b/src/libraries/System.Security.Cryptography/tests/ChaCha20Poly1305Tests.cs
@@ -35,7 +35,7 @@ namespace System.Security.Cryptography.Tests
additionalData[0] ^= 1;
byte[] decrypted = new byte[dataLength];
- Assert.Throws<CryptographicException>(
+ Assert.Throws<AuthenticationTagMismatchException>(
() => chaChaPoly.Decrypt(nonce, ciphertext, tag, decrypted, additionalData));
}
}
@@ -271,7 +271,7 @@ namespace System.Security.Cryptography.Tests
tag[0] ^= 1;
- Assert.Throws<CryptographicException>(
+ Assert.Throws<AuthenticationTagMismatchException>(
() => chaChaPoly.Decrypt(nonce, data, tag, data));
Assert.Equal(new byte[data.Length], data);
}
@@ -310,7 +310,7 @@ namespace System.Security.Cryptography.Tests
tag[0] ^= 1;
byte[] plaintext = RandomNumberGenerator.GetBytes(testCase.Plaintext.Length);
- Assert.Throws<CryptographicException>(
+ Assert.Throws<AuthenticationTagMismatchException>(
() => chaChaPoly.Decrypt(testCase.Nonce, ciphertext, tag, plaintext, testCase.AssociatedData));
Assert.Equal(new byte[plaintext.Length], plaintext);
}
@@ -457,8 +457,12 @@ namespace System.Security.Cryptography.Tests
// OpenSSL is present, and a high enough version,
// but the distro build options turned off ChaCha/Poly.
}
- else if (PlatformDetection.OpenSslPresentOnSystem &&
- (PlatformDetection.IsOSX || PlatformDetection.IsOpenSslSupported))
+ else if (PlatformDetection.IsOSX)
+ {
+ // CryptoKit is supported on macOS 10.15+, which is our minimum target.
+ expectedIsSupported = true;
+ }
+ else if (PlatformDetection.OpenSslPresentOnSystem && PlatformDetection.IsOpenSslSupported)
{
const int OpenSslChaChaMinimumVersion = 0x1_01_00_00_F; //major_minor_fix_patch_status
expectedIsSupported = SafeEvpPKeyHandle.OpenSslVersion >= OpenSslChaChaMinimumVersion;
diff --git a/src/libraries/System.Security.Principal/System.Security.Principal.sln b/src/libraries/System.Security.Principal/System.Security.Principal.sln
index 522665e3574..5bc22fe47b9 100644
--- a/src/libraries/System.Security.Principal/System.Security.Principal.sln
+++ b/src/libraries/System.Security.Principal/System.Security.Principal.sln
@@ -3,6 +3,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", ".
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{9C81AA4B-B9FB-42CC-9BEF-D3B3768BC0C3}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{9588C69A-D16F-4FFA-B979-E93BAA214128}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{78AB5DCA-38B8-4C2B-A795-5297F724DA98}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{9CC911BC-E81D-477F-9545-564CEE69A909}"
@@ -63,11 +65,23 @@ Global
{9C81AA4B-B9FB-42CC-9BEF-D3B3768BC0C3}.Release|x86.ActiveCfg = Release|Any CPU
{9C81AA4B-B9FB-42CC-9BEF-D3B3768BC0C3}.Release|x86.Build.0 = Release|Any CPU
{9C81AA4B-B9FB-42CC-9BEF-D3B3768BC0C3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {9C81AA4B-B9FB-42CC-9BEF-D3B3768BC0C3}.Checked|Any CPU.Build.0 = Debug|Any CPU
{9C81AA4B-B9FB-42CC-9BEF-D3B3768BC0C3}.Checked|x64.ActiveCfg = Debug|Any CPU
- {9C81AA4B-B9FB-42CC-9BEF-D3B3768BC0C3}.Checked|x64.Build.0 = Debug|Any CPU
{9C81AA4B-B9FB-42CC-9BEF-D3B3768BC0C3}.Checked|x86.ActiveCfg = Debug|Any CPU
- {9C81AA4B-B9FB-42CC-9BEF-D3B3768BC0C3}.Checked|x86.Build.0 = Debug|Any CPU
+ {9588C69A-D16F-4FFA-B979-E93BAA214128}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9588C69A-D16F-4FFA-B979-E93BAA214128}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9588C69A-D16F-4FFA-B979-E93BAA214128}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {9588C69A-D16F-4FFA-B979-E93BAA214128}.Debug|x64.Build.0 = Debug|Any CPU
+ {9588C69A-D16F-4FFA-B979-E93BAA214128}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {9588C69A-D16F-4FFA-B979-E93BAA214128}.Debug|x86.Build.0 = Debug|Any CPU
+ {9588C69A-D16F-4FFA-B979-E93BAA214128}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9588C69A-D16F-4FFA-B979-E93BAA214128}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9588C69A-D16F-4FFA-B979-E93BAA214128}.Release|x64.ActiveCfg = Release|Any CPU
+ {9588C69A-D16F-4FFA-B979-E93BAA214128}.Release|x64.Build.0 = Release|Any CPU
+ {9588C69A-D16F-4FFA-B979-E93BAA214128}.Release|x86.ActiveCfg = Release|Any CPU
+ {9588C69A-D16F-4FFA-B979-E93BAA214128}.Release|x86.Build.0 = Release|Any CPU
+ {9588C69A-D16F-4FFA-B979-E93BAA214128}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {9588C69A-D16F-4FFA-B979-E93BAA214128}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {9588C69A-D16F-4FFA-B979-E93BAA214128}.Checked|x86.ActiveCfg = Debug|Any CPU
{78AB5DCA-38B8-4C2B-A795-5297F724DA98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{78AB5DCA-38B8-4C2B-A795-5297F724DA98}.Debug|Any CPU.Build.0 = Debug|Any CPU
{78AB5DCA-38B8-4C2B-A795-5297F724DA98}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -81,11 +95,8 @@ Global
{78AB5DCA-38B8-4C2B-A795-5297F724DA98}.Release|x86.ActiveCfg = Release|Any CPU
{78AB5DCA-38B8-4C2B-A795-5297F724DA98}.Release|x86.Build.0 = Release|Any CPU
{78AB5DCA-38B8-4C2B-A795-5297F724DA98}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {78AB5DCA-38B8-4C2B-A795-5297F724DA98}.Checked|Any CPU.Build.0 = Debug|Any CPU
{78AB5DCA-38B8-4C2B-A795-5297F724DA98}.Checked|x64.ActiveCfg = Debug|Any CPU
- {78AB5DCA-38B8-4C2B-A795-5297F724DA98}.Checked|x64.Build.0 = Debug|Any CPU
{78AB5DCA-38B8-4C2B-A795-5297F724DA98}.Checked|x86.ActiveCfg = Debug|Any CPU
- {78AB5DCA-38B8-4C2B-A795-5297F724DA98}.Checked|x86.Build.0 = Debug|Any CPU
{9CC911BC-E81D-477F-9545-564CEE69A909}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9CC911BC-E81D-477F-9545-564CEE69A909}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9CC911BC-E81D-477F-9545-564CEE69A909}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -99,11 +110,8 @@ Global
{9CC911BC-E81D-477F-9545-564CEE69A909}.Release|x86.ActiveCfg = Release|Any CPU
{9CC911BC-E81D-477F-9545-564CEE69A909}.Release|x86.Build.0 = Release|Any CPU
{9CC911BC-E81D-477F-9545-564CEE69A909}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {9CC911BC-E81D-477F-9545-564CEE69A909}.Checked|Any CPU.Build.0 = Debug|Any CPU
{9CC911BC-E81D-477F-9545-564CEE69A909}.Checked|x64.ActiveCfg = Debug|Any CPU
- {9CC911BC-E81D-477F-9545-564CEE69A909}.Checked|x64.Build.0 = Debug|Any CPU
{9CC911BC-E81D-477F-9545-564CEE69A909}.Checked|x86.ActiveCfg = Debug|Any CPU
- {9CC911BC-E81D-477F-9545-564CEE69A909}.Checked|x86.Build.0 = Debug|Any CPU
{991F950D-A1C9-4499-BCF6-0986F6B226CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{991F950D-A1C9-4499-BCF6-0986F6B226CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{991F950D-A1C9-4499-BCF6-0986F6B226CE}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -117,11 +125,8 @@ Global
{991F950D-A1C9-4499-BCF6-0986F6B226CE}.Release|x86.ActiveCfg = Release|Any CPU
{991F950D-A1C9-4499-BCF6-0986F6B226CE}.Release|x86.Build.0 = Release|Any CPU
{991F950D-A1C9-4499-BCF6-0986F6B226CE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {991F950D-A1C9-4499-BCF6-0986F6B226CE}.Checked|Any CPU.Build.0 = Debug|Any CPU
{991F950D-A1C9-4499-BCF6-0986F6B226CE}.Checked|x64.ActiveCfg = Debug|Any CPU
- {991F950D-A1C9-4499-BCF6-0986F6B226CE}.Checked|x64.Build.0 = Debug|Any CPU
{991F950D-A1C9-4499-BCF6-0986F6B226CE}.Checked|x86.ActiveCfg = Debug|Any CPU
- {991F950D-A1C9-4499-BCF6-0986F6B226CE}.Checked|x86.Build.0 = Debug|Any CPU
{23171947-F933-47A6-9D1A-D43A186E7C43}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{23171947-F933-47A6-9D1A-D43A186E7C43}.Debug|Any CPU.Build.0 = Debug|Any CPU
{23171947-F933-47A6-9D1A-D43A186E7C43}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -135,11 +140,8 @@ Global
{23171947-F933-47A6-9D1A-D43A186E7C43}.Release|x86.ActiveCfg = Release|Any CPU
{23171947-F933-47A6-9D1A-D43A186E7C43}.Release|x86.Build.0 = Release|Any CPU
{23171947-F933-47A6-9D1A-D43A186E7C43}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {23171947-F933-47A6-9D1A-D43A186E7C43}.Checked|Any CPU.Build.0 = Debug|Any CPU
{23171947-F933-47A6-9D1A-D43A186E7C43}.Checked|x64.ActiveCfg = Debug|Any CPU
- {23171947-F933-47A6-9D1A-D43A186E7C43}.Checked|x64.Build.0 = Debug|Any CPU
{23171947-F933-47A6-9D1A-D43A186E7C43}.Checked|x86.ActiveCfg = Debug|Any CPU
- {23171947-F933-47A6-9D1A-D43A186E7C43}.Checked|x86.Build.0 = Debug|Any CPU
{BCF529C8-91CA-44BE-A59C-C8FCAEC04D51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BCF529C8-91CA-44BE-A59C-C8FCAEC04D51}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BCF529C8-91CA-44BE-A59C-C8FCAEC04D51}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -153,11 +155,8 @@ Global
{BCF529C8-91CA-44BE-A59C-C8FCAEC04D51}.Release|x86.ActiveCfg = Release|Any CPU
{BCF529C8-91CA-44BE-A59C-C8FCAEC04D51}.Release|x86.Build.0 = Release|Any CPU
{BCF529C8-91CA-44BE-A59C-C8FCAEC04D51}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {BCF529C8-91CA-44BE-A59C-C8FCAEC04D51}.Checked|Any CPU.Build.0 = Debug|Any CPU
{BCF529C8-91CA-44BE-A59C-C8FCAEC04D51}.Checked|x64.ActiveCfg = Debug|Any CPU
- {BCF529C8-91CA-44BE-A59C-C8FCAEC04D51}.Checked|x64.Build.0 = Debug|Any CPU
{BCF529C8-91CA-44BE-A59C-C8FCAEC04D51}.Checked|x86.ActiveCfg = Debug|Any CPU
- {BCF529C8-91CA-44BE-A59C-C8FCAEC04D51}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -168,6 +167,7 @@ Global
{9C81AA4B-B9FB-42CC-9BEF-D3B3768BC0C3} = {3D3EBB3C-5E3D-41A9-8634-434FC0E7E4FD}
{78AB5DCA-38B8-4C2B-A795-5297F724DA98} = {3D3EBB3C-5E3D-41A9-8634-434FC0E7E4FD}
{9CC911BC-E81D-477F-9545-564CEE69A909} = {3D3EBB3C-5E3D-41A9-8634-434FC0E7E4FD}
+ {9588C69A-D16F-4FFA-B979-E93BAA214128} = {DC35DE57-330D-4DE1-822D-12AEA72B1015}
{991F950D-A1C9-4499-BCF6-0986F6B226CE} = {DC35DE57-330D-4DE1-822D-12AEA72B1015}
{23171947-F933-47A6-9D1A-D43A186E7C43} = {DC35DE57-330D-4DE1-822D-12AEA72B1015}
EndGlobalSection
diff --git a/src/libraries/System.Text.Encoding.Extensions/System.Text.Encoding.Extensions.sln b/src/libraries/System.Text.Encoding.Extensions/System.Text.Encoding.Extensions.sln
index 0963445fa7d..f07b0655e63 100644
--- a/src/libraries/System.Text.Encoding.Extensions/System.Text.Encoding.Extensions.sln
+++ b/src/libraries/System.Text.Encoding.Extensions/System.Text.Encoding.Extensions.sln
@@ -5,6 +5,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{0FB90CF0-6B17-4FAB-A737-0532B5BCAADB}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{D6104D98-DF18-4142-A171-E1A38BA8512E}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{2D766334-1ABC-46EF-9065-0945A3981D99}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{2A579CCA-3FAC-46A0-A49F-F63F1DC693BB}"
@@ -69,11 +71,8 @@ Global
{CC6D3524-D6C8-468B-B908-CE746C1DB175}.Release|x86.ActiveCfg = Release|Any CPU
{CC6D3524-D6C8-468B-B908-CE746C1DB175}.Release|x86.Build.0 = Release|Any CPU
{CC6D3524-D6C8-468B-B908-CE746C1DB175}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {CC6D3524-D6C8-468B-B908-CE746C1DB175}.Checked|Any CPU.Build.0 = Debug|Any CPU
{CC6D3524-D6C8-468B-B908-CE746C1DB175}.Checked|x64.ActiveCfg = Debug|Any CPU
- {CC6D3524-D6C8-468B-B908-CE746C1DB175}.Checked|x64.Build.0 = Debug|Any CPU
{CC6D3524-D6C8-468B-B908-CE746C1DB175}.Checked|x86.ActiveCfg = Debug|Any CPU
- {CC6D3524-D6C8-468B-B908-CE746C1DB175}.Checked|x86.Build.0 = Debug|Any CPU
{0FB90CF0-6B17-4FAB-A737-0532B5BCAADB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0FB90CF0-6B17-4FAB-A737-0532B5BCAADB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0FB90CF0-6B17-4FAB-A737-0532B5BCAADB}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -87,11 +86,23 @@ Global
{0FB90CF0-6B17-4FAB-A737-0532B5BCAADB}.Release|x86.ActiveCfg = Release|Any CPU
{0FB90CF0-6B17-4FAB-A737-0532B5BCAADB}.Release|x86.Build.0 = Release|Any CPU
{0FB90CF0-6B17-4FAB-A737-0532B5BCAADB}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {0FB90CF0-6B17-4FAB-A737-0532B5BCAADB}.Checked|Any CPU.Build.0 = Debug|Any CPU
{0FB90CF0-6B17-4FAB-A737-0532B5BCAADB}.Checked|x64.ActiveCfg = Debug|Any CPU
- {0FB90CF0-6B17-4FAB-A737-0532B5BCAADB}.Checked|x64.Build.0 = Debug|Any CPU
{0FB90CF0-6B17-4FAB-A737-0532B5BCAADB}.Checked|x86.ActiveCfg = Debug|Any CPU
- {0FB90CF0-6B17-4FAB-A737-0532B5BCAADB}.Checked|x86.Build.0 = Debug|Any CPU
+ {D6104D98-DF18-4142-A171-E1A38BA8512E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D6104D98-DF18-4142-A171-E1A38BA8512E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D6104D98-DF18-4142-A171-E1A38BA8512E}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {D6104D98-DF18-4142-A171-E1A38BA8512E}.Debug|x64.Build.0 = Debug|Any CPU
+ {D6104D98-DF18-4142-A171-E1A38BA8512E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {D6104D98-DF18-4142-A171-E1A38BA8512E}.Debug|x86.Build.0 = Debug|Any CPU
+ {D6104D98-DF18-4142-A171-E1A38BA8512E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D6104D98-DF18-4142-A171-E1A38BA8512E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D6104D98-DF18-4142-A171-E1A38BA8512E}.Release|x64.ActiveCfg = Release|Any CPU
+ {D6104D98-DF18-4142-A171-E1A38BA8512E}.Release|x64.Build.0 = Release|Any CPU
+ {D6104D98-DF18-4142-A171-E1A38BA8512E}.Release|x86.ActiveCfg = Release|Any CPU
+ {D6104D98-DF18-4142-A171-E1A38BA8512E}.Release|x86.Build.0 = Release|Any CPU
+ {D6104D98-DF18-4142-A171-E1A38BA8512E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {D6104D98-DF18-4142-A171-E1A38BA8512E}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {D6104D98-DF18-4142-A171-E1A38BA8512E}.Checked|x86.ActiveCfg = Debug|Any CPU
{2D766334-1ABC-46EF-9065-0945A3981D99}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2D766334-1ABC-46EF-9065-0945A3981D99}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2D766334-1ABC-46EF-9065-0945A3981D99}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -105,11 +116,8 @@ Global
{2D766334-1ABC-46EF-9065-0945A3981D99}.Release|x86.ActiveCfg = Release|Any CPU
{2D766334-1ABC-46EF-9065-0945A3981D99}.Release|x86.Build.0 = Release|Any CPU
{2D766334-1ABC-46EF-9065-0945A3981D99}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {2D766334-1ABC-46EF-9065-0945A3981D99}.Checked|Any CPU.Build.0 = Debug|Any CPU
{2D766334-1ABC-46EF-9065-0945A3981D99}.Checked|x64.ActiveCfg = Debug|Any CPU
- {2D766334-1ABC-46EF-9065-0945A3981D99}.Checked|x64.Build.0 = Debug|Any CPU
{2D766334-1ABC-46EF-9065-0945A3981D99}.Checked|x86.ActiveCfg = Debug|Any CPU
- {2D766334-1ABC-46EF-9065-0945A3981D99}.Checked|x86.Build.0 = Debug|Any CPU
{2A579CCA-3FAC-46A0-A49F-F63F1DC693BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2A579CCA-3FAC-46A0-A49F-F63F1DC693BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2A579CCA-3FAC-46A0-A49F-F63F1DC693BB}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -123,11 +131,8 @@ Global
{2A579CCA-3FAC-46A0-A49F-F63F1DC693BB}.Release|x86.ActiveCfg = Release|Any CPU
{2A579CCA-3FAC-46A0-A49F-F63F1DC693BB}.Release|x86.Build.0 = Release|Any CPU
{2A579CCA-3FAC-46A0-A49F-F63F1DC693BB}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {2A579CCA-3FAC-46A0-A49F-F63F1DC693BB}.Checked|Any CPU.Build.0 = Debug|Any CPU
{2A579CCA-3FAC-46A0-A49F-F63F1DC693BB}.Checked|x64.ActiveCfg = Debug|Any CPU
- {2A579CCA-3FAC-46A0-A49F-F63F1DC693BB}.Checked|x64.Build.0 = Debug|Any CPU
{2A579CCA-3FAC-46A0-A49F-F63F1DC693BB}.Checked|x86.ActiveCfg = Debug|Any CPU
- {2A579CCA-3FAC-46A0-A49F-F63F1DC693BB}.Checked|x86.Build.0 = Debug|Any CPU
{0B2A96B8-0B17-4FF5-B95E-4D98CAFF9363}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0B2A96B8-0B17-4FF5-B95E-4D98CAFF9363}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0B2A96B8-0B17-4FF5-B95E-4D98CAFF9363}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -141,11 +146,8 @@ Global
{0B2A96B8-0B17-4FF5-B95E-4D98CAFF9363}.Release|x86.ActiveCfg = Release|Any CPU
{0B2A96B8-0B17-4FF5-B95E-4D98CAFF9363}.Release|x86.Build.0 = Release|Any CPU
{0B2A96B8-0B17-4FF5-B95E-4D98CAFF9363}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {0B2A96B8-0B17-4FF5-B95E-4D98CAFF9363}.Checked|Any CPU.Build.0 = Debug|Any CPU
{0B2A96B8-0B17-4FF5-B95E-4D98CAFF9363}.Checked|x64.ActiveCfg = Debug|Any CPU
- {0B2A96B8-0B17-4FF5-B95E-4D98CAFF9363}.Checked|x64.Build.0 = Debug|Any CPU
{0B2A96B8-0B17-4FF5-B95E-4D98CAFF9363}.Checked|x86.ActiveCfg = Debug|Any CPU
- {0B2A96B8-0B17-4FF5-B95E-4D98CAFF9363}.Checked|x86.Build.0 = Debug|Any CPU
{F66FD767-48C4-4AD2-B5CF-36AB39AEB78C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F66FD767-48C4-4AD2-B5CF-36AB39AEB78C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F66FD767-48C4-4AD2-B5CF-36AB39AEB78C}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -159,11 +161,8 @@ Global
{F66FD767-48C4-4AD2-B5CF-36AB39AEB78C}.Release|x86.ActiveCfg = Release|Any CPU
{F66FD767-48C4-4AD2-B5CF-36AB39AEB78C}.Release|x86.Build.0 = Release|Any CPU
{F66FD767-48C4-4AD2-B5CF-36AB39AEB78C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {F66FD767-48C4-4AD2-B5CF-36AB39AEB78C}.Checked|Any CPU.Build.0 = Debug|Any CPU
{F66FD767-48C4-4AD2-B5CF-36AB39AEB78C}.Checked|x64.ActiveCfg = Debug|Any CPU
- {F66FD767-48C4-4AD2-B5CF-36AB39AEB78C}.Checked|x64.Build.0 = Debug|Any CPU
{F66FD767-48C4-4AD2-B5CF-36AB39AEB78C}.Checked|x86.ActiveCfg = Debug|Any CPU
- {F66FD767-48C4-4AD2-B5CF-36AB39AEB78C}.Checked|x86.Build.0 = Debug|Any CPU
{EF713897-15F9-42E4-979F-271FA1EF6ECA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EF713897-15F9-42E4-979F-271FA1EF6ECA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EF713897-15F9-42E4-979F-271FA1EF6ECA}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -177,11 +176,8 @@ Global
{EF713897-15F9-42E4-979F-271FA1EF6ECA}.Release|x86.ActiveCfg = Release|Any CPU
{EF713897-15F9-42E4-979F-271FA1EF6ECA}.Release|x86.Build.0 = Release|Any CPU
{EF713897-15F9-42E4-979F-271FA1EF6ECA}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {EF713897-15F9-42E4-979F-271FA1EF6ECA}.Checked|Any CPU.Build.0 = Debug|Any CPU
{EF713897-15F9-42E4-979F-271FA1EF6ECA}.Checked|x64.ActiveCfg = Debug|Any CPU
- {EF713897-15F9-42E4-979F-271FA1EF6ECA}.Checked|x64.Build.0 = Debug|Any CPU
{EF713897-15F9-42E4-979F-271FA1EF6ECA}.Checked|x86.ActiveCfg = Debug|Any CPU
- {EF713897-15F9-42E4-979F-271FA1EF6ECA}.Checked|x86.Build.0 = Debug|Any CPU
{777B4928-6EE5-42D2-8F95-E43EB027D14E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{777B4928-6EE5-42D2-8F95-E43EB027D14E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{777B4928-6EE5-42D2-8F95-E43EB027D14E}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -195,11 +191,8 @@ Global
{777B4928-6EE5-42D2-8F95-E43EB027D14E}.Release|x86.ActiveCfg = Release|Any CPU
{777B4928-6EE5-42D2-8F95-E43EB027D14E}.Release|x86.Build.0 = Release|Any CPU
{777B4928-6EE5-42D2-8F95-E43EB027D14E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {777B4928-6EE5-42D2-8F95-E43EB027D14E}.Checked|Any CPU.Build.0 = Debug|Any CPU
{777B4928-6EE5-42D2-8F95-E43EB027D14E}.Checked|x64.ActiveCfg = Debug|Any CPU
- {777B4928-6EE5-42D2-8F95-E43EB027D14E}.Checked|x64.Build.0 = Debug|Any CPU
{777B4928-6EE5-42D2-8F95-E43EB027D14E}.Checked|x86.ActiveCfg = Debug|Any CPU
- {777B4928-6EE5-42D2-8F95-E43EB027D14E}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -212,6 +205,7 @@ Global
{0FB90CF0-6B17-4FAB-A737-0532B5BCAADB} = {6906BA55-F0A0-4E71-942D-E24C6C85A353}
{2D766334-1ABC-46EF-9065-0945A3981D99} = {6906BA55-F0A0-4E71-942D-E24C6C85A353}
{2A579CCA-3FAC-46A0-A49F-F63F1DC693BB} = {6906BA55-F0A0-4E71-942D-E24C6C85A353}
+ {D6104D98-DF18-4142-A171-E1A38BA8512E} = {F4F19285-4785-496C-8F6C-579249EAA5BB}
{0B2A96B8-0B17-4FF5-B95E-4D98CAFF9363} = {F4F19285-4785-496C-8F6C-579249EAA5BB}
{F66FD767-48C4-4AD2-B5CF-36AB39AEB78C} = {F4F19285-4785-496C-8F6C-579249EAA5BB}
EndGlobalSection
diff --git a/src/libraries/System.Text.Encoding/System.Text.Encoding.sln b/src/libraries/System.Text.Encoding/System.Text.Encoding.sln
index 45683f840bc..483737a54f8 100644
--- a/src/libraries/System.Text.Encoding/System.Text.Encoding.sln
+++ b/src/libraries/System.Text.Encoding/System.Text.Encoding.sln
@@ -11,6 +11,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.IO.Pipelines", "..\S
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{604213DB-0DCD-41AC-A244-502BDBA57CB5}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{561EED1B-D4D8-4FA3-AEDC-0319A19A9CD9}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{108A17C9-3550-4FBD-86AB-32C771B300B7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{084FE3C6-4130-4F8E-AB6A-EB0560550664}"
@@ -75,11 +77,8 @@ Global
{9E01529D-6C36-4F34-84CB-68304E93E1F5}.Release|x86.ActiveCfg = Release|Any CPU
{9E01529D-6C36-4F34-84CB-68304E93E1F5}.Release|x86.Build.0 = Release|Any CPU
{9E01529D-6C36-4F34-84CB-68304E93E1F5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {9E01529D-6C36-4F34-84CB-68304E93E1F5}.Checked|Any CPU.Build.0 = Debug|Any CPU
{9E01529D-6C36-4F34-84CB-68304E93E1F5}.Checked|x64.ActiveCfg = Debug|Any CPU
- {9E01529D-6C36-4F34-84CB-68304E93E1F5}.Checked|x64.Build.0 = Debug|Any CPU
{9E01529D-6C36-4F34-84CB-68304E93E1F5}.Checked|x86.ActiveCfg = Debug|Any CPU
- {9E01529D-6C36-4F34-84CB-68304E93E1F5}.Checked|x86.Build.0 = Debug|Any CPU
{2B15EE47-1C5F-444F-A9CD-EABBE370718E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2B15EE47-1C5F-444F-A9CD-EABBE370718E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2B15EE47-1C5F-444F-A9CD-EABBE370718E}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -93,11 +92,8 @@ Global
{2B15EE47-1C5F-444F-A9CD-EABBE370718E}.Release|x86.ActiveCfg = Release|Any CPU
{2B15EE47-1C5F-444F-A9CD-EABBE370718E}.Release|x86.Build.0 = Release|Any CPU
{2B15EE47-1C5F-444F-A9CD-EABBE370718E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {2B15EE47-1C5F-444F-A9CD-EABBE370718E}.Checked|Any CPU.Build.0 = Debug|Any CPU
{2B15EE47-1C5F-444F-A9CD-EABBE370718E}.Checked|x64.ActiveCfg = Debug|Any CPU
- {2B15EE47-1C5F-444F-A9CD-EABBE370718E}.Checked|x64.Build.0 = Debug|Any CPU
{2B15EE47-1C5F-444F-A9CD-EABBE370718E}.Checked|x86.ActiveCfg = Debug|Any CPU
- {2B15EE47-1C5F-444F-A9CD-EABBE370718E}.Checked|x86.Build.0 = Debug|Any CPU
{657AE296-9F0B-4D8C-B11B-BF454EF90E7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{657AE296-9F0B-4D8C-B11B-BF454EF90E7C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{657AE296-9F0B-4D8C-B11B-BF454EF90E7C}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -111,11 +107,8 @@ Global
{657AE296-9F0B-4D8C-B11B-BF454EF90E7C}.Release|x86.ActiveCfg = Release|Any CPU
{657AE296-9F0B-4D8C-B11B-BF454EF90E7C}.Release|x86.Build.0 = Release|Any CPU
{657AE296-9F0B-4D8C-B11B-BF454EF90E7C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {657AE296-9F0B-4D8C-B11B-BF454EF90E7C}.Checked|Any CPU.Build.0 = Debug|Any CPU
{657AE296-9F0B-4D8C-B11B-BF454EF90E7C}.Checked|x64.ActiveCfg = Debug|Any CPU
- {657AE296-9F0B-4D8C-B11B-BF454EF90E7C}.Checked|x64.Build.0 = Debug|Any CPU
{657AE296-9F0B-4D8C-B11B-BF454EF90E7C}.Checked|x86.ActiveCfg = Debug|Any CPU
- {657AE296-9F0B-4D8C-B11B-BF454EF90E7C}.Checked|x86.Build.0 = Debug|Any CPU
{530C65D8-0440-4AF2-8975-F03EFF573195}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{530C65D8-0440-4AF2-8975-F03EFF573195}.Debug|Any CPU.Build.0 = Debug|Any CPU
{530C65D8-0440-4AF2-8975-F03EFF573195}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -129,11 +122,8 @@ Global
{530C65D8-0440-4AF2-8975-F03EFF573195}.Release|x86.ActiveCfg = Release|Any CPU
{530C65D8-0440-4AF2-8975-F03EFF573195}.Release|x86.Build.0 = Release|Any CPU
{530C65D8-0440-4AF2-8975-F03EFF573195}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {530C65D8-0440-4AF2-8975-F03EFF573195}.Checked|Any CPU.Build.0 = Debug|Any CPU
{530C65D8-0440-4AF2-8975-F03EFF573195}.Checked|x64.ActiveCfg = Debug|Any CPU
- {530C65D8-0440-4AF2-8975-F03EFF573195}.Checked|x64.Build.0 = Debug|Any CPU
{530C65D8-0440-4AF2-8975-F03EFF573195}.Checked|x86.ActiveCfg = Debug|Any CPU
- {530C65D8-0440-4AF2-8975-F03EFF573195}.Checked|x86.Build.0 = Debug|Any CPU
{604213DB-0DCD-41AC-A244-502BDBA57CB5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{604213DB-0DCD-41AC-A244-502BDBA57CB5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{604213DB-0DCD-41AC-A244-502BDBA57CB5}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -147,11 +137,23 @@ Global
{604213DB-0DCD-41AC-A244-502BDBA57CB5}.Release|x86.ActiveCfg = Release|Any CPU
{604213DB-0DCD-41AC-A244-502BDBA57CB5}.Release|x86.Build.0 = Release|Any CPU
{604213DB-0DCD-41AC-A244-502BDBA57CB5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {604213DB-0DCD-41AC-A244-502BDBA57CB5}.Checked|Any CPU.Build.0 = Debug|Any CPU
{604213DB-0DCD-41AC-A244-502BDBA57CB5}.Checked|x64.ActiveCfg = Debug|Any CPU
- {604213DB-0DCD-41AC-A244-502BDBA57CB5}.Checked|x64.Build.0 = Debug|Any CPU
{604213DB-0DCD-41AC-A244-502BDBA57CB5}.Checked|x86.ActiveCfg = Debug|Any CPU
- {604213DB-0DCD-41AC-A244-502BDBA57CB5}.Checked|x86.Build.0 = Debug|Any CPU
+ {561EED1B-D4D8-4FA3-AEDC-0319A19A9CD9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {561EED1B-D4D8-4FA3-AEDC-0319A19A9CD9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {561EED1B-D4D8-4FA3-AEDC-0319A19A9CD9}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {561EED1B-D4D8-4FA3-AEDC-0319A19A9CD9}.Debug|x64.Build.0 = Debug|Any CPU
+ {561EED1B-D4D8-4FA3-AEDC-0319A19A9CD9}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {561EED1B-D4D8-4FA3-AEDC-0319A19A9CD9}.Debug|x86.Build.0 = Debug|Any CPU
+ {561EED1B-D4D8-4FA3-AEDC-0319A19A9CD9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {561EED1B-D4D8-4FA3-AEDC-0319A19A9CD9}.Release|Any CPU.Build.0 = Release|Any CPU
+ {561EED1B-D4D8-4FA3-AEDC-0319A19A9CD9}.Release|x64.ActiveCfg = Release|Any CPU
+ {561EED1B-D4D8-4FA3-AEDC-0319A19A9CD9}.Release|x64.Build.0 = Release|Any CPU
+ {561EED1B-D4D8-4FA3-AEDC-0319A19A9CD9}.Release|x86.ActiveCfg = Release|Any CPU
+ {561EED1B-D4D8-4FA3-AEDC-0319A19A9CD9}.Release|x86.Build.0 = Release|Any CPU
+ {561EED1B-D4D8-4FA3-AEDC-0319A19A9CD9}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {561EED1B-D4D8-4FA3-AEDC-0319A19A9CD9}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {561EED1B-D4D8-4FA3-AEDC-0319A19A9CD9}.Checked|x86.ActiveCfg = Debug|Any CPU
{108A17C9-3550-4FBD-86AB-32C771B300B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{108A17C9-3550-4FBD-86AB-32C771B300B7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{108A17C9-3550-4FBD-86AB-32C771B300B7}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -165,11 +167,8 @@ Global
{108A17C9-3550-4FBD-86AB-32C771B300B7}.Release|x86.ActiveCfg = Release|Any CPU
{108A17C9-3550-4FBD-86AB-32C771B300B7}.Release|x86.Build.0 = Release|Any CPU
{108A17C9-3550-4FBD-86AB-32C771B300B7}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {108A17C9-3550-4FBD-86AB-32C771B300B7}.Checked|Any CPU.Build.0 = Debug|Any CPU
{108A17C9-3550-4FBD-86AB-32C771B300B7}.Checked|x64.ActiveCfg = Debug|Any CPU
- {108A17C9-3550-4FBD-86AB-32C771B300B7}.Checked|x64.Build.0 = Debug|Any CPU
{108A17C9-3550-4FBD-86AB-32C771B300B7}.Checked|x86.ActiveCfg = Debug|Any CPU
- {108A17C9-3550-4FBD-86AB-32C771B300B7}.Checked|x86.Build.0 = Debug|Any CPU
{084FE3C6-4130-4F8E-AB6A-EB0560550664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{084FE3C6-4130-4F8E-AB6A-EB0560550664}.Debug|Any CPU.Build.0 = Debug|Any CPU
{084FE3C6-4130-4F8E-AB6A-EB0560550664}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -183,11 +182,8 @@ Global
{084FE3C6-4130-4F8E-AB6A-EB0560550664}.Release|x86.ActiveCfg = Release|Any CPU
{084FE3C6-4130-4F8E-AB6A-EB0560550664}.Release|x86.Build.0 = Release|Any CPU
{084FE3C6-4130-4F8E-AB6A-EB0560550664}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {084FE3C6-4130-4F8E-AB6A-EB0560550664}.Checked|Any CPU.Build.0 = Debug|Any CPU
{084FE3C6-4130-4F8E-AB6A-EB0560550664}.Checked|x64.ActiveCfg = Debug|Any CPU
- {084FE3C6-4130-4F8E-AB6A-EB0560550664}.Checked|x64.Build.0 = Debug|Any CPU
{084FE3C6-4130-4F8E-AB6A-EB0560550664}.Checked|x86.ActiveCfg = Debug|Any CPU
- {084FE3C6-4130-4F8E-AB6A-EB0560550664}.Checked|x86.Build.0 = Debug|Any CPU
{604A750C-B6A0-46BE-A125-9B4B5013C692}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{604A750C-B6A0-46BE-A125-9B4B5013C692}.Debug|Any CPU.Build.0 = Debug|Any CPU
{604A750C-B6A0-46BE-A125-9B4B5013C692}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -201,11 +197,8 @@ Global
{604A750C-B6A0-46BE-A125-9B4B5013C692}.Release|x86.ActiveCfg = Release|Any CPU
{604A750C-B6A0-46BE-A125-9B4B5013C692}.Release|x86.Build.0 = Release|Any CPU
{604A750C-B6A0-46BE-A125-9B4B5013C692}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {604A750C-B6A0-46BE-A125-9B4B5013C692}.Checked|Any CPU.Build.0 = Debug|Any CPU
{604A750C-B6A0-46BE-A125-9B4B5013C692}.Checked|x64.ActiveCfg = Debug|Any CPU
- {604A750C-B6A0-46BE-A125-9B4B5013C692}.Checked|x64.Build.0 = Debug|Any CPU
{604A750C-B6A0-46BE-A125-9B4B5013C692}.Checked|x86.ActiveCfg = Debug|Any CPU
- {604A750C-B6A0-46BE-A125-9B4B5013C692}.Checked|x86.Build.0 = Debug|Any CPU
{B4D27B82-8D9C-4699-9E37-06796D9981EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B4D27B82-8D9C-4699-9E37-06796D9981EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B4D27B82-8D9C-4699-9E37-06796D9981EB}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -219,11 +212,8 @@ Global
{B4D27B82-8D9C-4699-9E37-06796D9981EB}.Release|x86.ActiveCfg = Release|Any CPU
{B4D27B82-8D9C-4699-9E37-06796D9981EB}.Release|x86.Build.0 = Release|Any CPU
{B4D27B82-8D9C-4699-9E37-06796D9981EB}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {B4D27B82-8D9C-4699-9E37-06796D9981EB}.Checked|Any CPU.Build.0 = Debug|Any CPU
{B4D27B82-8D9C-4699-9E37-06796D9981EB}.Checked|x64.ActiveCfg = Debug|Any CPU
- {B4D27B82-8D9C-4699-9E37-06796D9981EB}.Checked|x64.Build.0 = Debug|Any CPU
{B4D27B82-8D9C-4699-9E37-06796D9981EB}.Checked|x86.ActiveCfg = Debug|Any CPU
- {B4D27B82-8D9C-4699-9E37-06796D9981EB}.Checked|x86.Build.0 = Debug|Any CPU
{57B651DB-5817-4AB7-BF66-C440109F16F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{57B651DB-5817-4AB7-BF66-C440109F16F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{57B651DB-5817-4AB7-BF66-C440109F16F9}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -237,11 +227,8 @@ Global
{57B651DB-5817-4AB7-BF66-C440109F16F9}.Release|x86.ActiveCfg = Release|Any CPU
{57B651DB-5817-4AB7-BF66-C440109F16F9}.Release|x86.Build.0 = Release|Any CPU
{57B651DB-5817-4AB7-BF66-C440109F16F9}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {57B651DB-5817-4AB7-BF66-C440109F16F9}.Checked|Any CPU.Build.0 = Debug|Any CPU
{57B651DB-5817-4AB7-BF66-C440109F16F9}.Checked|x64.ActiveCfg = Debug|Any CPU
- {57B651DB-5817-4AB7-BF66-C440109F16F9}.Checked|x64.Build.0 = Debug|Any CPU
{57B651DB-5817-4AB7-BF66-C440109F16F9}.Checked|x86.ActiveCfg = Debug|Any CPU
- {57B651DB-5817-4AB7-BF66-C440109F16F9}.Checked|x86.Build.0 = Debug|Any CPU
{EE236E3F-7A5C-4493-A477-560C59B28602}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EE236E3F-7A5C-4493-A477-560C59B28602}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EE236E3F-7A5C-4493-A477-560C59B28602}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -255,11 +242,8 @@ Global
{EE236E3F-7A5C-4493-A477-560C59B28602}.Release|x86.ActiveCfg = Release|Any CPU
{EE236E3F-7A5C-4493-A477-560C59B28602}.Release|x86.Build.0 = Release|Any CPU
{EE236E3F-7A5C-4493-A477-560C59B28602}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {EE236E3F-7A5C-4493-A477-560C59B28602}.Checked|Any CPU.Build.0 = Debug|Any CPU
{EE236E3F-7A5C-4493-A477-560C59B28602}.Checked|x64.ActiveCfg = Debug|Any CPU
- {EE236E3F-7A5C-4493-A477-560C59B28602}.Checked|x64.Build.0 = Debug|Any CPU
{EE236E3F-7A5C-4493-A477-560C59B28602}.Checked|x86.ActiveCfg = Debug|Any CPU
- {EE236E3F-7A5C-4493-A477-560C59B28602}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -272,6 +256,7 @@ Global
{2B15EE47-1C5F-444F-A9CD-EABBE370718E} = {A4D340E7-AF75-4FA7-AB84-B743E8BB163E}
{EE236E3F-7A5C-4493-A477-560C59B28602} = {A4D340E7-AF75-4FA7-AB84-B743E8BB163E}
{657AE296-9F0B-4D8C-B11B-BF454EF90E7C} = {F3E9EF8A-43E5-433A-84EA-EA5409091019}
+ {561EED1B-D4D8-4FA3-AEDC-0319A19A9CD9} = {F3E9EF8A-43E5-433A-84EA-EA5409091019}
{604A750C-B6A0-46BE-A125-9B4B5013C692} = {F3E9EF8A-43E5-433A-84EA-EA5409091019}
{B4D27B82-8D9C-4699-9E37-06796D9981EB} = {F3E9EF8A-43E5-433A-84EA-EA5409091019}
{604213DB-0DCD-41AC-A244-502BDBA57CB5} = {81CF2B5E-4EF1-404B-9CA7-80197E1A7523}
diff --git a/src/libraries/System.Text.Json/Common/JsonConstants.cs b/src/libraries/System.Text.Json/Common/JsonConstants.cs
index 0d121d9c6ff..63bf065d126 100644
--- a/src/libraries/System.Text.Json/Common/JsonConstants.cs
+++ b/src/libraries/System.Text.Json/Common/JsonConstants.cs
@@ -5,9 +5,6 @@ namespace System.Text.Json
{
internal static partial class JsonConstants
{
- // The maximum number of parameters a constructor can have where it can be supported by the serializer.
- public const int MaxParameterCount = 64;
-
// Standard format for double and single on non-inbox frameworks.
public const string DoubleFormatString = "G17";
public const string SingleFormatString = "G9";
diff --git a/src/libraries/System.Text.Json/System.Text.Json.sln b/src/libraries/System.Text.Json/System.Text.Json.sln
index 7faee7cfcdb..820721e85b2 100644
--- a/src/libraries/System.Text.Json/System.Text.Json.sln
+++ b/src/libraries/System.Text.Json/System.Text.Json.sln
@@ -5,6 +5,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bcl.AsyncInterfac
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bcl.AsyncInterfaces", "..\Microsoft.Bcl.AsyncInterfaces\src\Microsoft.Bcl.AsyncInterfaces.csproj", "{E9AA0AEB-AEAE-4B28-8D4D-17A6D7C89D17}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primitives", "..\Microsoft.Extensions.Primitives\ref\Microsoft.Extensions.Primitives.csproj", "{282400DF-F3D8-4419-90F1-1E2F2D8B760C}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primitives", "..\Microsoft.Extensions.Primitives\src\Microsoft.Extensions.Primitives.csproj", "{6E9E4359-44F8-45AA-AEC5-D0F9FFBB13D6}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Collections.Concurrent", "..\System.Collections.Concurrent\ref\System.Collections.Concurrent.csproj", "{09F77672-101E-4495-9D88-29376919C121}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Collections.Immutable", "..\System.Collections.Immutable\ref\System.Collections.Immutable.csproj", "{BE27618A-2916-4269-9AD5-6BC5EDC32B30}"
@@ -33,6 +37,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGene
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.0", "gen\System.Text.Json.SourceGeneration.Roslyn4.0.csproj", "{6485EED4-C313-4551-9865-8ADCED603629}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.4", "gen\System.Text.Json.SourceGeneration.Roslyn4.4.csproj", "{143AFE8A-3490-444C-A82D-6A375EB59F01}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "ref\System.Text.Json.csproj", "{7015E94D-D20D-48C8-86D7-6A996BE99E0E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "src\System.Text.Json.csproj", "{1285FF43-F491-4BE0-B92C-37DA689CBD4B}"
@@ -79,6 +85,14 @@ Global
{E9AA0AEB-AEAE-4B28-8D4D-17A6D7C89D17}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E9AA0AEB-AEAE-4B28-8D4D-17A6D7C89D17}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E9AA0AEB-AEAE-4B28-8D4D-17A6D7C89D17}.Release|Any CPU.Build.0 = Release|Any CPU
+ {282400DF-F3D8-4419-90F1-1E2F2D8B760C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {282400DF-F3D8-4419-90F1-1E2F2D8B760C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {282400DF-F3D8-4419-90F1-1E2F2D8B760C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {282400DF-F3D8-4419-90F1-1E2F2D8B760C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6E9E4359-44F8-45AA-AEC5-D0F9FFBB13D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6E9E4359-44F8-45AA-AEC5-D0F9FFBB13D6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6E9E4359-44F8-45AA-AEC5-D0F9FFBB13D6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6E9E4359-44F8-45AA-AEC5-D0F9FFBB13D6}.Release|Any CPU.Build.0 = Release|Any CPU
{09F77672-101E-4495-9D88-29376919C121}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{09F77672-101E-4495-9D88-29376919C121}.Debug|Any CPU.Build.0 = Debug|Any CPU
{09F77672-101E-4495-9D88-29376919C121}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -135,6 +149,10 @@ Global
{6485EED4-C313-4551-9865-8ADCED603629}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6485EED4-C313-4551-9865-8ADCED603629}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6485EED4-C313-4551-9865-8ADCED603629}.Release|Any CPU.Build.0 = Release|Any CPU
+ {143AFE8A-3490-444C-A82D-6A375EB59F01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {143AFE8A-3490-444C-A82D-6A375EB59F01}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {143AFE8A-3490-444C-A82D-6A375EB59F01}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {143AFE8A-3490-444C-A82D-6A375EB59F01}.Release|Any CPU.Build.0 = Release|Any CPU
{7015E94D-D20D-48C8-86D7-6A996BE99E0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7015E94D-D20D-48C8-86D7-6A996BE99E0E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7015E94D-D20D-48C8-86D7-6A996BE99E0E}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -190,6 +208,7 @@ Global
{F6A18EB5-A8CC-4A39-9E85-5FA226019C3D} = {E07C6980-EB71-4D19-A80A-7BEB80B635B1}
{A0178BAA-A1AF-4C69-8E4A-A700A2723DDC} = {E07C6980-EB71-4D19-A80A-7BEB80B635B1}
{73D5739C-E382-4E22-A7D3-B82705C58C74} = {0371C5D8-D5F5-4747-9810-D91D71D8C0E4}
+ {282400DF-F3D8-4419-90F1-1E2F2D8B760C} = {0371C5D8-D5F5-4747-9810-D91D71D8C0E4}
{09F77672-101E-4495-9D88-29376919C121} = {0371C5D8-D5F5-4747-9810-D91D71D8C0E4}
{BE27618A-2916-4269-9AD5-6BC5EDC32B30} = {0371C5D8-D5F5-4747-9810-D91D71D8C0E4}
{C2C7BA09-F9EE-4E43-8EE4-871CC000342C} = {0371C5D8-D5F5-4747-9810-D91D71D8C0E4}
@@ -199,6 +218,7 @@ Global
{C56337BB-8CBC-4EE5-AB4D-8BB0A922813E} = {0371C5D8-D5F5-4747-9810-D91D71D8C0E4}
{7015E94D-D20D-48C8-86D7-6A996BE99E0E} = {0371C5D8-D5F5-4747-9810-D91D71D8C0E4}
{E9AA0AEB-AEAE-4B28-8D4D-17A6D7C89D17} = {E49881A9-09F6-442F-9E1D-6D87F5F837F1}
+ {6E9E4359-44F8-45AA-AEC5-D0F9FFBB13D6} = {E49881A9-09F6-442F-9E1D-6D87F5F837F1}
{1C8262DB-7355-40A8-A2EC-4EED7363134A} = {E49881A9-09F6-442F-9E1D-6D87F5F837F1}
{D05FD93A-BC51-466E-BD56-3F3D6BBE6B06} = {E49881A9-09F6-442F-9E1D-6D87F5F837F1}
{9BCCDA15-8907-4AE3-8871-2F17775DDE4C} = {E49881A9-09F6-442F-9E1D-6D87F5F837F1}
@@ -207,6 +227,7 @@ Global
{E4B72517-C694-486A-950E-6AB03C651FDC} = {F254F143-4704-4432-9995-20D87FA8BF8D}
{04AEB008-EE4F-44DE-A361-2DBD2D0FD6A4} = {F254F143-4704-4432-9995-20D87FA8BF8D}
{6485EED4-C313-4551-9865-8ADCED603629} = {F254F143-4704-4432-9995-20D87FA8BF8D}
+ {143AFE8A-3490-444C-A82D-6A375EB59F01} = {F254F143-4704-4432-9995-20D87FA8BF8D}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5868B757-D821-41FC-952E-2113A0519506}
diff --git a/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Emitter.cs b/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Emitter.cs
index 68b0bf76bf9..db7b990e095 100644
--- a/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Emitter.cs
+++ b/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Emitter.cs
@@ -951,11 +951,6 @@ private static {JsonParameterInfoValuesTypeRef}[] {typeGenerationSpec.TypeInfoPr
int paramCount = parameters.Length;
Debug.Assert(paramCount != 0);
- if (paramCount > JsonConstants.MaxParameterCount)
- {
- return "null";
- }
-
const string ArgsVarName = "args";
int lastIndex = paramCount - 1;
diff --git a/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Roslyn4.0.cs b/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Roslyn4.0.cs
index 8f4cd15e2df..1a7df0e821e 100644
--- a/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Roslyn4.0.cs
+++ b/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Roslyn4.0.cs
@@ -13,7 +13,9 @@ using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Text;
+#if !ROSLYN4_4_OR_GREATER
using Microsoft.CodeAnalysis.DotnetRuntime.Extensions;
+#endif
namespace System.Text.Json.SourceGeneration
{
@@ -27,7 +29,9 @@ namespace System.Text.Json.SourceGeneration
{
IncrementalValuesProvider<ClassDeclarationSyntax> classDeclarations = context.SyntaxProvider
.ForAttributeWithMetadataName(
+#if !ROSLYN4_4_OR_GREATER
context,
+#endif
Parser.JsonSerializableAttributeFullName,
(node, _) => node is ClassDeclarationSyntax,
(context, _) => (ClassDeclarationSyntax)context.TargetNode);
diff --git a/src/libraries/System.Text.Json/gen/System.Text.Json.SourceGeneration.Roslyn4.4.csproj b/src/libraries/System.Text.Json/gen/System.Text.Json.SourceGeneration.Roslyn4.4.csproj
new file mode 100644
index 00000000000..9e538deef6e
--- /dev/null
+++ b/src/libraries/System.Text.Json/gen/System.Text.Json.SourceGeneration.Roslyn4.4.csproj
@@ -0,0 +1,20 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <AnalyzerRoslynVersion>4.4</AnalyzerRoslynVersion>
+ <RoslynApiVersion>$(MicrosoftCodeAnalysisVersion_4_4)</RoslynApiVersion>
+ <DefineConstants>$(DefineConstants);ROSLYN4_0_OR_GREATER;ROSLYN4_4_OR_GREATER</DefineConstants>
+ </PropertyGroup>
+
+ <Import Project="System.Text.Json.SourceGeneration.targets" />
+
+ <ItemGroup>
+ <Compile Include="JsonSourceGenerator.Roslyn4.0.cs" />
+ </ItemGroup>
+
+ <ItemGroup>
+ <Compile Include="$(CoreLibSharedDir)System\Collections\Generic\ValueListBuilder.cs" Link="Production\ValueListBuilder.cs" />
+ <Compile Include="$(CoreLibSharedDir)System\Collections\Generic\ValueListBuilder.Pop.cs" Link="Production\ValueListBuilder.Pop.cs" />
+ </ItemGroup>
+
+</Project>
diff --git a/src/libraries/System.Text.Json/src/Resources/Strings.resx b/src/libraries/System.Text.Json/src/Resources/Strings.resx
index 2f466b9c05d..ecd19e18c44 100644
--- a/src/libraries/System.Text.Json/src/Resources/Strings.resx
+++ b/src/libraries/System.Text.Json/src/Resources/Strings.resx
@@ -485,9 +485,6 @@
<data name="ConstructorParamIncompleteBinding" xml:space="preserve">
<value>Each parameter in the deserialization constructor on type '{0}' must bind to an object property or field on deserialization. Each parameter name must match with a property or field on the object. Fields are only considered when 'JsonSerializerOptions.IncludeFields' is enabled. The match can be case-insensitive.</value>
</data>
- <data name="ConstructorMaxOf64Parameters" xml:space="preserve">
- <value>The deserialization constructor on type '{0}' may not have more than 64 parameters for deserialization.</value>
- </data>
<data name="ObjectWithParameterizedCtorRefMetadataNotSupported" xml:space="preserve">
<value>Reference metadata is not supported when deserializing constructor parameters. See type '{0}'.</value>
</data>
diff --git a/src/libraries/System.Text.Json/src/System.Text.Json.csproj b/src/libraries/System.Text.Json/src/System.Text.Json.csproj
index 8cd779f5a02..f0341a10930 100644
--- a/src/libraries/System.Text.Json/src/System.Text.Json.csproj
+++ b/src/libraries/System.Text.Json/src/System.Text.Json.csproj
@@ -385,5 +385,6 @@ The System.Text.Json library is built-in as part of the shared framework in .NET
<ItemGroup>
<AnalyzerReference Include="..\gen\System.Text.Json.SourceGeneration.Roslyn3.11.csproj" Pack="true" ReferenceAnalyzer="false" Condition="'$(DotNetBuildFromSource)' != 'true'" />
<AnalyzerReference Include="..\gen\System.Text.Json.SourceGeneration.Roslyn4.0.csproj" Pack="true" ReferenceAnalyzer="false" />
+ <AnalyzerReference Include="..\gen\System.Text.Json.SourceGeneration.Roslyn4.4.csproj" Pack="true" ReferenceAnalyzer="false" />
</ItemGroup>
</Project>
diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Object/ObjectWithParameterizedConstructorConverter.Large.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Object/ObjectWithParameterizedConstructorConverter.Large.cs
index 938d2a96056..f87356505ad 100644
--- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Object/ObjectWithParameterizedConstructorConverter.Large.cs
+++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Object/ObjectWithParameterizedConstructorConverter.Large.cs
@@ -34,16 +34,13 @@ namespace System.Text.Json.Serialization.Converters
protected sealed override object CreateObject(ref ReadStackFrame frame)
{
- object[] arguments = (object[])frame.CtorArgumentState!.Arguments;
- frame.CtorArgumentState.Arguments = null!;
+ Debug.Assert(frame.CtorArgumentState != null);
+ Debug.Assert(frame.JsonTypeInfo.CreateObjectWithArgs != null);
- var createObject = (Func<object[], T>?)frame.JsonTypeInfo.CreateObjectWithArgs;
+ object[] arguments = (object[])frame.CtorArgumentState.Arguments;
+ frame.CtorArgumentState.Arguments = null!;
- if (createObject == null)
- {
- // This means this constructor has more than 64 parameters.
- ThrowHelper.ThrowNotSupportedException_ConstructorMaxOf64Parameters(TypeToConvert);
- }
+ Func<object[], T> createObject = (Func<object[], T>)frame.JsonTypeInfo.CreateObjectWithArgs;
object obj = createObject(arguments);
diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonPolymorphismOptions.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonPolymorphismOptions.cs
index 392db9f467a..e19ea7c80bf 100644
--- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonPolymorphismOptions.cs
+++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonPolymorphismOptions.cs
@@ -18,6 +18,13 @@ namespace System.Text.Json.Serialization.Metadata
private string? _typeDiscriminatorPropertyName;
/// <summary>
+ /// Creates an empty <see cref="JsonPolymorphismOptions"/> instance.
+ /// </summary>
+ public JsonPolymorphismOptions()
+ {
+ }
+
+ /// <summary>
/// Gets the list of derived types supported in the current polymorphic type configuration.
/// </summary>
public IList<JsonDerivedType> DerivedTypes => _derivedTypes ??= new(this);
diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/MemberAccessor.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/MemberAccessor.cs
index d685d241628..326ab657b88 100644
--- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/MemberAccessor.cs
+++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/MemberAccessor.cs
@@ -12,7 +12,7 @@ namespace System.Text.Json.Serialization.Metadata
public abstract Func<object>? CreateConstructor(
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type classType);
- public abstract Func<object[], T>? CreateParameterizedConstructor<T>(ConstructorInfo constructor);
+ public abstract Func<object[], T> CreateParameterizedConstructor<T>(ConstructorInfo constructor);
public abstract JsonTypeInfo.ParameterizedConstructorDelegate<T, TArg0, TArg1, TArg2, TArg3>?
CreateParameterizedConstructor<T, TArg0, TArg1, TArg2, TArg3>(ConstructorInfo constructor);
diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/ReflectionEmitCachingMemberAccessor.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/ReflectionEmitCachingMemberAccessor.cs
index 3eccece6f15..a243f4be4d8 100644
--- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/ReflectionEmitCachingMemberAccessor.cs
+++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/ReflectionEmitCachingMemberAccessor.cs
@@ -45,7 +45,7 @@ namespace System.Text.Json.Serialization.Metadata
=> s_cache.GetOrAdd((nameof(CreateImmutableEnumerableCreateRangeDelegate), typeof((TCollection, TElement)), null),
static (_) => s_sourceAccessor.CreateImmutableEnumerableCreateRangeDelegate<TCollection, TElement>());
- public override Func<object[], T>? CreateParameterizedConstructor<T>(ConstructorInfo constructor)
+ public override Func<object[], T> CreateParameterizedConstructor<T>(ConstructorInfo constructor)
=> s_cache.GetOrAdd((nameof(CreateParameterizedConstructor), typeof(T), constructor), static key => s_sourceAccessor.CreateParameterizedConstructor<T>((ConstructorInfo)key.member!));
public override JsonTypeInfo.ParameterizedConstructorDelegate<T, TArg0, TArg1, TArg2, TArg3>? CreateParameterizedConstructor<T, TArg0, TArg1, TArg2, TArg3>(ConstructorInfo constructor)
diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/ReflectionEmitMemberAccessor.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/ReflectionEmitMemberAccessor.cs
index bb5970821ce..106c07b1e7a 100644
--- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/ReflectionEmitMemberAccessor.cs
+++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/ReflectionEmitMemberAccessor.cs
@@ -59,13 +59,13 @@ namespace System.Text.Json.Serialization.Metadata
generator.Emit(OpCodes.Ret);
- return (Func<object>)dynamicMethod.CreateDelegate(typeof(Func<object>));
+ return CreateDelegate<Func<object>>(dynamicMethod);
}
- public override Func<object[], T>? CreateParameterizedConstructor<T>(ConstructorInfo constructor) =>
+ public override Func<object[], T> CreateParameterizedConstructor<T>(ConstructorInfo constructor) =>
CreateDelegate<Func<object[], T>>(CreateParameterizedConstructor(constructor));
- private static DynamicMethod? CreateParameterizedConstructor(ConstructorInfo constructor)
+ private static DynamicMethod CreateParameterizedConstructor(ConstructorInfo constructor)
{
Type? type = constructor.DeclaringType;
@@ -76,11 +76,6 @@ namespace System.Text.Json.Serialization.Metadata
ParameterInfo[] parameters = constructor.GetParameters();
int parameterCount = parameters.Length;
- if (parameterCount > JsonConstants.MaxParameterCount)
- {
- return null;
- }
-
var dynamicMethod = new DynamicMethod(
ConstructorInfo.ConstructorName,
type,
@@ -95,7 +90,7 @@ namespace System.Text.Json.Serialization.Metadata
Type paramType = parameters[i].ParameterType;
generator.Emit(OpCodes.Ldarg_0);
- generator.Emit(OpCodes.Ldc_I4_S, i);
+ generator.Emit(OpCodes.Ldc_I4, i);
generator.Emit(OpCodes.Ldelem_Ref);
generator.Emit(OpCodes.Unbox_Any, paramType);
}
diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/ReflectionMemberAccessor.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/ReflectionMemberAccessor.cs
index 9914033a11b..606ad6aba79 100644
--- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/ReflectionMemberAccessor.cs
+++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/ReflectionMemberAccessor.cs
@@ -41,7 +41,7 @@ namespace System.Text.Json.Serialization.Metadata
return new ConstructorContext(type).CreateInstance!;
}
- public override Func<object[], T>? CreateParameterizedConstructor<T>(ConstructorInfo constructor)
+ public override Func<object[], T> CreateParameterizedConstructor<T>(ConstructorInfo constructor)
{
Type type = typeof(T);
@@ -50,11 +50,6 @@ namespace System.Text.Json.Serialization.Metadata
int parameterCount = constructor.GetParameters().Length;
- if (parameterCount > JsonConstants.MaxParameterCount)
- {
- return null;
- }
-
return (arguments) =>
{
// The input array was rented from the shared ArrayPool, so its size is likely to be larger than the param count.
diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/ThrowHelper.Serialization.cs b/src/libraries/System.Text.Json/src/System/Text/Json/ThrowHelper.Serialization.cs
index 23c0006fa37..84ab3050395 100644
--- a/src/libraries/System.Text.Json/src/System/Text/Json/ThrowHelper.Serialization.cs
+++ b/src/libraries/System.Text.Json/src/System/Text/Json/ThrowHelper.Serialization.cs
@@ -41,12 +41,6 @@ namespace System.Text.Json
}
[DoesNotReturn]
- public static void ThrowNotSupportedException_ConstructorMaxOf64Parameters(Type type)
- {
- throw new NotSupportedException(SR.Format(SR.ConstructorMaxOf64Parameters, type));
- }
-
- [DoesNotReturn]
public static void ThrowNotSupportedException_DictionaryKeyTypeNotSupported(Type keyType, JsonConverter converter)
{
throw new NotSupportedException(SR.Format(SR.DictionaryKeyTypeNotSupported, keyType, converter.GetType()));
diff --git a/src/libraries/System.Text.Json/tests/Common/ConstructorTests/ConstructorTests.ParameterMatching.cs b/src/libraries/System.Text.Json/tests/Common/ConstructorTests/ConstructorTests.ParameterMatching.cs
index 39becedff99..b0561b22a62 100644
--- a/src/libraries/System.Text.Json/tests/Common/ConstructorTests/ConstructorTests.ParameterMatching.cs
+++ b/src/libraries/System.Text.Json/tests/Common/ConstructorTests/ConstructorTests.ParameterMatching.cs
@@ -726,7 +726,7 @@ namespace System.Text.Json.Serialization.Tests
}
[Fact]
- public async Task Cannot_Deserialize_ObjectWith_Ctor_With_65_Params()
+ public async Task Can_Deserialize_ObjectWith_Ctor_With_65_Params()
{
async Task RunTestAsync<T>()
{
@@ -752,11 +752,8 @@ namespace System.Text.Json.Serialization.Tests
sb.Append("Int32");
sb.Append(")");
- NotSupportedException ex = await Assert.ThrowsAsync<NotSupportedException>(() => Serializer.DeserializeWrapper<T>(input));
- Assert.Contains(type.ToString(), ex.ToString());
-
- ex = await Assert.ThrowsAsync<NotSupportedException>(() => Serializer.DeserializeWrapper<T>("{}"));
- Assert.Contains(type.ToString(), ex.ToString());
+ T value = await Serializer.DeserializeWrapper<T>(input);
+ value = await Serializer.DeserializeWrapper<T>("{}");
}
await RunTestAsync<Class_With_Ctor_With_65_Params>();
@@ -1426,6 +1423,17 @@ namespace System.Text.Json.Serialization.Tests
JsonTestHelper.AssertJsonEqual(json, await Serializer.SerializeWrapper(obj));
}
+ [Fact]
+ public async Task TestClassWithManyConstructorParameters()
+ {
+ ClassWithManyConstructorParameters value = ClassWithManyConstructorParameters.Create();
+ string json = JsonSerializer.Serialize(value);
+
+ ClassWithManyConstructorParameters result = await Serializer.DeserializeWrapper<ClassWithManyConstructorParameters>(json);
+
+ Assert.Equal(value, result); // Type is C# record that implements structural equality.
+ }
+
public class ClassWithDefaultCtorParams
{
public Point_2D_Struct_WithAttribute Struct { get; }
diff --git a/src/libraries/System.Text.Json/tests/Common/ConstructorTests/ConstructorTests.Stream.cs b/src/libraries/System.Text.Json/tests/Common/ConstructorTests/ConstructorTests.Stream.cs
index 5c96e06c1f2..28dda8e5b30 100644
--- a/src/libraries/System.Text.Json/tests/Common/ConstructorTests/ConstructorTests.Stream.cs
+++ b/src/libraries/System.Text.Json/tests/Common/ConstructorTests/ConstructorTests.Stream.cs
@@ -118,7 +118,7 @@ namespace System.Text.Json.Serialization.Tests
}
[Fact]
- public async Task Cannot_DeserializeAsync_ObjectWith_Ctor_With_65_Params()
+ public async Task Can_DeserializeAsync_ObjectWith_Ctor_With_65_Params()
{
if (StreamingSerializer is null)
{
@@ -137,6 +137,7 @@ namespace System.Text.Json.Serialization.Tests
sb.Append("}");
string input = sb.ToString();
+ T value;
using (MemoryStream stream = new MemoryStream(Encoding.UTF8.GetBytes(input)))
{
@@ -145,7 +146,7 @@ namespace System.Text.Json.Serialization.Tests
DefaultBufferSize = 1
};
- await Assert.ThrowsAsync<NotSupportedException>(async () => await StreamingSerializer.DeserializeWrapper<T>(stream, options));
+ value = await StreamingSerializer.DeserializeWrapper<T>(stream, options);
}
using (MemoryStream stream = new MemoryStream("{}"u8.ToArray()))
@@ -155,7 +156,7 @@ namespace System.Text.Json.Serialization.Tests
DefaultBufferSize = 1
};
- await Assert.ThrowsAsync<NotSupportedException>(async () => await StreamingSerializer.DeserializeWrapper<T>(stream, options));
+ value = await StreamingSerializer.DeserializeWrapper<T>(stream, options);
}
}
diff --git a/src/libraries/System.Text.Json/tests/Common/TestClasses/TestClasses.Constructor.cs b/src/libraries/System.Text.Json/tests/Common/TestClasses/TestClasses.Constructor.cs
index 35e065a11d3..28e9e2dbbd4 100644
--- a/src/libraries/System.Text.Json/tests/Common/TestClasses/TestClasses.Constructor.cs
+++ b/src/libraries/System.Text.Json/tests/Common/TestClasses/TestClasses.Constructor.cs
@@ -2389,4 +2389,212 @@ namespace System.Text.Json.Serialization.Tests
[JsonConstructor]
public StructWithFourArgs(int w, int x, int y, int z) => (W, X, Y, Z) = (w, x, y, z);
}
+
+ public record ClassWithManyConstructorParameters(
+ int P000, int P001, int P002, int P003, int P004, int P005, int P006, int P007, int P008, int P009,
+ int P010, int P011, int P012, int P013, int P014, int P015, int P016, int P017, int P018, int P019,
+ int P020, int P021, int P022, int P023, int P024, int P025, int P026, int P027, int P028, int P029,
+ int P030, int P031, int P032, int P033, int P034, int P035, int P036, int P037, int P038, int P039,
+ int P040, int P041, int P042, int P043, int P044, int P045, int P046, int P047, int P048, int P049,
+ int P050, int P051, int P052, int P053, int P054, int P055, int P056, int P057, int P058, int P059,
+ int P060, int P061, int P062, int P063, int P064, int P065, int P066, int P067, int P068, int P069,
+ int P070, int P071, int P072, int P073, int P074, int P075, int P076, int P077, int P078, int P079,
+ int P080, int P081, int P082, int P083, int P084, int P085, int P086, int P087, int P088, int P089,
+ int P090, int P091, int P092, int P093, int P094, int P095, int P096, int P097, int P098, int P099,
+ int P100, int P101, int P102, int P103, int P104, int P105, int P106, int P107, int P108, int P109,
+ int P110, int P111, int P112, int P113, int P114, int P115, int P116, int P117, int P118, int P119,
+ int P120, int P121, int P122, int P123, int P124, int P125, int P126, int P127, int P128, int P129,
+ int P130, int P131, int P132, int P133, int P134, int P135, int P136, int P137, int P138, int P139,
+ int P140, int P141, int P142, int P143, int P144, int P145, int P146, int P147, int P148, int P149,
+ int P150, int P151, int P152, int P153, int P154, int P155, int P156, int P157, int P158, int P159,
+ int P160, int P161, int P162, int P163, int P164, int P165, int P166, int P167, int P168, int P169,
+ int P170, int P171, int P172, int P173, int P174, int P175, int P176, int P177, int P178, int P179,
+ int P180, int P181, int P182, int P183, int P184, int P185, int P186, int P187, int P188, int P189,
+ int P190, int P191, int P192, int P193, int P194, int P195, int P196, int P197, int P198, int P199,
+ int P200, int P201, int P202, int P203, int P204, int P205, int P206, int P207, int P208, int P209,
+ int P210, int P211, int P212, int P213, int P214, int P215, int P216, int P217, int P218, int P219,
+ int P220, int P221, int P222, int P223, int P224, int P225, int P226, int P227, int P228, int P229,
+ int P230, int P231, int P232, int P233, int P234, int P235, int P236, int P237, int P238, int P239,
+ int P240, int P241, int P242, int P243, int P244, int P245, int P246, int P247, int P248, int P249,
+ int P250, int P251, int P252, int P253, int P254, int P255, int P256, int P257, int P258, int P259,
+ int P260, int P261, int P262, int P263, int P264, int P265, int P266, int P267, int P268, int P269,
+ int P270, int P271, int P272, int P273, int P274, int P275, int P276, int P277, int P278, int P279,
+ int P280, int P281, int P282, int P283, int P284, int P285, int P286, int P287, int P288, int P289,
+ int P290, int P291, int P292, int P293, int P294, int P295, int P296, int P297, int P298, int P299,
+ int P300, int P301, int P302, int P303, int P304, int P305, int P306, int P307, int P308, int P309,
+ int P310, int P311, int P312, int P313, int P314, int P315, int P316, int P317, int P318, int P319,
+ int P320, int P321, int P322, int P323, int P324, int P325, int P326, int P327, int P328, int P329,
+ int P330, int P331, int P332, int P333, int P334, int P335, int P336, int P337, int P338, int P339,
+ int P340, int P341, int P342, int P343, int P344, int P345, int P346, int P347, int P348, int P349,
+ int P350, int P351, int P352, int P353, int P354, int P355, int P356, int P357, int P358, int P359,
+ int P360, int P361, int P362, int P363, int P364, int P365, int P366, int P367, int P368, int P369,
+ int P370, int P371, int P372, int P373, int P374, int P375, int P376, int P377, int P378, int P379,
+ int P380, int P381, int P382, int P383, int P384, int P385, int P386, int P387, int P388, int P389,
+ int P390, int P391, int P392, int P393, int P394, int P395, int P396, int P397, int P398, int P399,
+ int P400, int P401, int P402, int P403, int P404, int P405, int P406, int P407, int P408, int P409,
+ int P410, int P411, int P412, int P413, int P414, int P415, int P416, int P417, int P418, int P419,
+ int P420, int P421, int P422, int P423, int P424, int P425, int P426, int P427, int P428, int P429,
+ int P430, int P431, int P432, int P433, int P434, int P435, int P436, int P437, int P438, int P439,
+ int P440, int P441, int P442, int P443, int P444, int P445, int P446, int P447, int P448, int P449,
+ int P450, int P451, int P452, int P453, int P454, int P455, int P456, int P457, int P458, int P459,
+ int P460, int P461, int P462, int P463, int P464, int P465, int P466, int P467, int P468, int P469,
+ int P470, int P471, int P472, int P473, int P474, int P475, int P476, int P477, int P478, int P479,
+ int P480, int P481, int P482, int P483, int P484, int P485, int P486, int P487, int P488, int P489,
+ int P490, int P491, int P492, int P493, int P494, int P495, int P496, int P497, int P498, int P499,
+ int P500, int P501, int P502, int P503, int P504, int P505, int P506, int P507, int P508, int P509,
+ int P510, int P511, int P512, int P513, int P514, int P515, int P516, int P517, int P518, int P519,
+ int P520, int P521, int P522, int P523, int P524, int P525, int P526, int P527, int P528, int P529,
+ int P530, int P531, int P532, int P533, int P534, int P535, int P536, int P537, int P538, int P539,
+ int P540, int P541, int P542, int P543, int P544, int P545, int P546, int P547, int P548, int P549,
+ int P550, int P551, int P552, int P553, int P554, int P555, int P556, int P557, int P558, int P559,
+ int P560, int P561, int P562, int P563, int P564, int P565, int P566, int P567, int P568, int P569,
+ int P570, int P571, int P572, int P573, int P574, int P575, int P576, int P577, int P578, int P579,
+ int P580, int P581, int P582, int P583, int P584, int P585, int P586, int P587, int P588, int P589,
+ int P590, int P591, int P592, int P593, int P594, int P595, int P596, int P597, int P598, int P599,
+ int P600, int P601, int P602, int P603, int P604, int P605, int P606, int P607, int P608, int P609,
+ int P610, int P611, int P612, int P613, int P614, int P615, int P616, int P617, int P618, int P619,
+ int P620, int P621, int P622, int P623, int P624, int P625, int P626, int P627, int P628, int P629,
+ int P630, int P631, int P632, int P633, int P634, int P635, int P636, int P637, int P638, int P639,
+ int P640, int P641, int P642, int P643, int P644, int P645, int P646, int P647, int P648, int P649,
+ int P650, int P651, int P652, int P653, int P654, int P655, int P656, int P657, int P658, int P659,
+ int P660, int P661, int P662, int P663, int P664, int P665, int P666, int P667, int P668, int P669,
+ int P670, int P671, int P672, int P673, int P674, int P675, int P676, int P677, int P678, int P679,
+ int P680, int P681, int P682, int P683, int P684, int P685, int P686, int P687, int P688, int P689,
+ int P690, int P691, int P692, int P693, int P694, int P695, int P696, int P697, int P698, int P699,
+ int P700, int P701, int P702, int P703, int P704, int P705, int P706, int P707, int P708, int P709,
+ int P710, int P711, int P712, int P713, int P714, int P715, int P716, int P717, int P718, int P719,
+ int P720, int P721, int P722, int P723, int P724, int P725, int P726, int P727, int P728, int P729,
+ int P730, int P731, int P732, int P733, int P734, int P735, int P736, int P737, int P738, int P739,
+ int P740, int P741, int P742, int P743, int P744, int P745, int P746, int P747, int P748, int P749,
+ int P750, int P751, int P752, int P753, int P754, int P755, int P756, int P757, int P758, int P759,
+ int P760, int P761, int P762, int P763, int P764, int P765, int P766, int P767, int P768, int P769,
+ int P770, int P771, int P772, int P773, int P774, int P775, int P776, int P777, int P778, int P779,
+ int P780, int P781, int P782, int P783, int P784, int P785, int P786, int P787, int P788, int P789,
+ int P790, int P791, int P792, int P793, int P794, int P795, int P796, int P797, int P798, int P799,
+ int P800, int P801, int P802, int P803, int P804, int P805, int P806, int P807, int P808, int P809,
+ int P810, int P811, int P812, int P813, int P814, int P815, int P816, int P817, int P818, int P819,
+ int P820, int P821, int P822, int P823, int P824, int P825, int P826, int P827, int P828, int P829,
+ int P830, int P831, int P832, int P833, int P834, int P835, int P836, int P837, int P838, int P839,
+ int P840, int P841, int P842, int P843, int P844, int P845, int P846, int P847, int P848, int P849,
+ int P850, int P851, int P852, int P853, int P854, int P855, int P856, int P857, int P858, int P859,
+ int P860, int P861, int P862, int P863, int P864, int P865, int P866, int P867, int P868, int P869,
+ int P870, int P871, int P872, int P873, int P874, int P875, int P876, int P877, int P878, int P879,
+ int P880, int P881, int P882, int P883, int P884, int P885, int P886, int P887, int P888, int P889,
+ int P890, int P891, int P892, int P893, int P894, int P895, int P896, int P897, int P898, int P899,
+ int P900, int P901, int P902, int P903, int P904, int P905, int P906, int P907, int P908, int P909,
+ int P910, int P911, int P912, int P913, int P914, int P915, int P916, int P917, int P918, int P919,
+ int P920, int P921, int P922, int P923, int P924, int P925, int P926, int P927, int P928, int P929,
+ int P930, int P931, int P932, int P933, int P934, int P935, int P936, int P937, int P938, int P939,
+ int P940, int P941, int P942, int P943, int P944, int P945, int P946, int P947, int P948, int P949,
+ int P950, int P951, int P952, int P953, int P954, int P955, int P956, int P957, int P958, int P959,
+ int P960, int P961, int P962, int P963, int P964, int P965, int P966, int P967, int P968, int P969,
+ int P970, int P971, int P972, int P973, int P974, int P975, int P976, int P977, int P978, int P979,
+ int P980, int P981, int P982, int P983, int P984, int P985, int P986, int P987, int P988, int P989,
+ int P990, int P991, int P992, int P993, int P994, int P995, int P996, int P997, int P998, int P999)
+ {
+ public static ClassWithManyConstructorParameters Create()
+ {
+ return new ClassWithManyConstructorParameters(
+ P000: 000, P001: 001, P002: 002, P003: 003, P004: 004, P005: 005, P006: 006, P007: 007, P008: 008, P009: 009,
+ P010: 010, P011: 011, P012: 012, P013: 013, P014: 014, P015: 015, P016: 016, P017: 017, P018: 018, P019: 019,
+ P020: 020, P021: 021, P022: 022, P023: 023, P024: 024, P025: 025, P026: 026, P027: 027, P028: 028, P029: 029,
+ P030: 030, P031: 031, P032: 032, P033: 033, P034: 034, P035: 035, P036: 036, P037: 037, P038: 038, P039: 039,
+ P040: 040, P041: 041, P042: 042, P043: 043, P044: 044, P045: 045, P046: 046, P047: 047, P048: 048, P049: 049,
+ P050: 050, P051: 051, P052: 052, P053: 053, P054: 054, P055: 055, P056: 056, P057: 057, P058: 058, P059: 059,
+ P060: 060, P061: 061, P062: 062, P063: 063, P064: 064, P065: 065, P066: 066, P067: 067, P068: 068, P069: 069,
+ P070: 070, P071: 071, P072: 072, P073: 073, P074: 074, P075: 075, P076: 076, P077: 077, P078: 078, P079: 079,
+ P080: 080, P081: 081, P082: 082, P083: 083, P084: 084, P085: 085, P086: 086, P087: 087, P088: 088, P089: 089,
+ P090: 090, P091: 091, P092: 092, P093: 093, P094: 094, P095: 095, P096: 096, P097: 097, P098: 098, P099: 099,
+ P100: 100, P101: 101, P102: 102, P103: 103, P104: 104, P105: 105, P106: 106, P107: 107, P108: 108, P109: 109,
+ P110: 110, P111: 111, P112: 112, P113: 113, P114: 114, P115: 115, P116: 116, P117: 117, P118: 118, P119: 119,
+ P120: 120, P121: 121, P122: 122, P123: 123, P124: 124, P125: 125, P126: 126, P127: 127, P128: 128, P129: 129,
+ P130: 130, P131: 131, P132: 132, P133: 133, P134: 134, P135: 135, P136: 136, P137: 137, P138: 138, P139: 139,
+ P140: 140, P141: 141, P142: 142, P143: 143, P144: 144, P145: 145, P146: 146, P147: 147, P148: 148, P149: 149,
+ P150: 150, P151: 151, P152: 152, P153: 153, P154: 154, P155: 155, P156: 156, P157: 157, P158: 158, P159: 159,
+ P160: 160, P161: 161, P162: 162, P163: 163, P164: 164, P165: 165, P166: 166, P167: 167, P168: 168, P169: 169,
+ P170: 170, P171: 171, P172: 172, P173: 173, P174: 174, P175: 175, P176: 176, P177: 177, P178: 178, P179: 179,
+ P180: 180, P181: 181, P182: 182, P183: 183, P184: 184, P185: 185, P186: 186, P187: 187, P188: 188, P189: 189,
+ P190: 190, P191: 191, P192: 192, P193: 193, P194: 194, P195: 195, P196: 196, P197: 197, P198: 198, P199: 199,
+ P200: 200, P201: 201, P202: 202, P203: 203, P204: 204, P205: 205, P206: 206, P207: 207, P208: 208, P209: 209,
+ P210: 210, P211: 211, P212: 212, P213: 213, P214: 214, P215: 215, P216: 216, P217: 217, P218: 218, P219: 219,
+ P220: 220, P221: 221, P222: 222, P223: 223, P224: 224, P225: 225, P226: 226, P227: 227, P228: 228, P229: 229,
+ P230: 230, P231: 231, P232: 232, P233: 233, P234: 234, P235: 235, P236: 236, P237: 237, P238: 238, P239: 239,
+ P240: 240, P241: 241, P242: 242, P243: 243, P244: 244, P245: 245, P246: 246, P247: 247, P248: 248, P249: 249,
+ P250: 250, P251: 251, P252: 252, P253: 253, P254: 254, P255: 255, P256: 256, P257: 257, P258: 258, P259: 259,
+ P260: 260, P261: 261, P262: 262, P263: 263, P264: 264, P265: 265, P266: 266, P267: 267, P268: 268, P269: 269,
+ P270: 270, P271: 271, P272: 272, P273: 273, P274: 274, P275: 275, P276: 276, P277: 277, P278: 278, P279: 279,
+ P280: 280, P281: 281, P282: 282, P283: 283, P284: 284, P285: 285, P286: 286, P287: 287, P288: 288, P289: 289,
+ P290: 290, P291: 291, P292: 292, P293: 293, P294: 294, P295: 295, P296: 296, P297: 297, P298: 298, P299: 299,
+ P300: 300, P301: 301, P302: 302, P303: 303, P304: 304, P305: 305, P306: 306, P307: 307, P308: 308, P309: 309,
+ P310: 310, P311: 311, P312: 312, P313: 313, P314: 314, P315: 315, P316: 316, P317: 317, P318: 318, P319: 319,
+ P320: 320, P321: 321, P322: 322, P323: 323, P324: 324, P325: 325, P326: 326, P327: 327, P328: 328, P329: 329,
+ P330: 330, P331: 331, P332: 332, P333: 333, P334: 334, P335: 335, P336: 336, P337: 337, P338: 338, P339: 339,
+ P340: 340, P341: 341, P342: 342, P343: 343, P344: 344, P345: 345, P346: 346, P347: 347, P348: 348, P349: 349,
+ P350: 350, P351: 351, P352: 352, P353: 353, P354: 354, P355: 355, P356: 356, P357: 357, P358: 358, P359: 359,
+ P360: 360, P361: 361, P362: 362, P363: 363, P364: 364, P365: 365, P366: 366, P367: 367, P368: 368, P369: 369,
+ P370: 370, P371: 371, P372: 372, P373: 373, P374: 374, P375: 375, P376: 376, P377: 377, P378: 378, P379: 379,
+ P380: 380, P381: 381, P382: 382, P383: 383, P384: 384, P385: 385, P386: 386, P387: 387, P388: 388, P389: 389,
+ P390: 390, P391: 391, P392: 392, P393: 393, P394: 394, P395: 395, P396: 396, P397: 397, P398: 398, P399: 399,
+ P400: 400, P401: 401, P402: 402, P403: 403, P404: 404, P405: 405, P406: 406, P407: 407, P408: 408, P409: 409,
+ P410: 410, P411: 411, P412: 412, P413: 413, P414: 414, P415: 415, P416: 416, P417: 417, P418: 418, P419: 419,
+ P420: 420, P421: 421, P422: 422, P423: 423, P424: 424, P425: 425, P426: 426, P427: 427, P428: 428, P429: 429,
+ P430: 430, P431: 431, P432: 432, P433: 433, P434: 434, P435: 435, P436: 436, P437: 437, P438: 438, P439: 439,
+ P440: 440, P441: 441, P442: 442, P443: 443, P444: 444, P445: 445, P446: 446, P447: 447, P448: 448, P449: 449,
+ P450: 450, P451: 451, P452: 452, P453: 453, P454: 454, P455: 455, P456: 456, P457: 457, P458: 458, P459: 459,
+ P460: 460, P461: 461, P462: 462, P463: 463, P464: 464, P465: 465, P466: 466, P467: 467, P468: 468, P469: 469,
+ P470: 470, P471: 471, P472: 472, P473: 473, P474: 474, P475: 475, P476: 476, P477: 477, P478: 478, P479: 479,
+ P480: 480, P481: 481, P482: 482, P483: 483, P484: 484, P485: 485, P486: 486, P487: 487, P488: 488, P489: 489,
+ P490: 490, P491: 491, P492: 492, P493: 493, P494: 494, P495: 495, P496: 496, P497: 497, P498: 498, P499: 499,
+ P500: 500, P501: 501, P502: 502, P503: 503, P504: 504, P505: 505, P506: 506, P507: 507, P508: 508, P509: 509,
+ P510: 510, P511: 511, P512: 512, P513: 513, P514: 514, P515: 515, P516: 516, P517: 517, P518: 518, P519: 519,
+ P520: 520, P521: 521, P522: 522, P523: 523, P524: 524, P525: 525, P526: 526, P527: 527, P528: 528, P529: 529,
+ P530: 530, P531: 531, P532: 532, P533: 533, P534: 534, P535: 535, P536: 536, P537: 537, P538: 538, P539: 539,
+ P540: 540, P541: 541, P542: 542, P543: 543, P544: 544, P545: 545, P546: 546, P547: 547, P548: 548, P549: 549,
+ P550: 550, P551: 551, P552: 552, P553: 553, P554: 554, P555: 555, P556: 556, P557: 557, P558: 558, P559: 559,
+ P560: 560, P561: 561, P562: 562, P563: 563, P564: 564, P565: 565, P566: 566, P567: 567, P568: 568, P569: 569,
+ P570: 570, P571: 571, P572: 572, P573: 573, P574: 574, P575: 575, P576: 576, P577: 577, P578: 578, P579: 579,
+ P580: 580, P581: 581, P582: 582, P583: 583, P584: 584, P585: 585, P586: 586, P587: 587, P588: 588, P589: 589,
+ P590: 590, P591: 591, P592: 592, P593: 593, P594: 594, P595: 595, P596: 596, P597: 597, P598: 598, P599: 599,
+ P600: 600, P601: 601, P602: 602, P603: 603, P604: 604, P605: 605, P606: 606, P607: 607, P608: 608, P609: 609,
+ P610: 610, P611: 611, P612: 612, P613: 613, P614: 614, P615: 615, P616: 616, P617: 617, P618: 618, P619: 619,
+ P620: 620, P621: 621, P622: 622, P623: 623, P624: 624, P625: 625, P626: 626, P627: 627, P628: 628, P629: 629,
+ P630: 630, P631: 631, P632: 632, P633: 633, P634: 634, P635: 635, P636: 636, P637: 637, P638: 638, P639: 639,
+ P640: 640, P641: 641, P642: 642, P643: 643, P644: 644, P645: 645, P646: 646, P647: 647, P648: 648, P649: 649,
+ P650: 650, P651: 651, P652: 652, P653: 653, P654: 654, P655: 655, P656: 656, P657: 657, P658: 658, P659: 659,
+ P660: 660, P661: 661, P662: 662, P663: 663, P664: 664, P665: 665, P666: 666, P667: 667, P668: 668, P669: 669,
+ P670: 670, P671: 671, P672: 672, P673: 673, P674: 674, P675: 675, P676: 676, P677: 677, P678: 678, P679: 679,
+ P680: 680, P681: 681, P682: 682, P683: 683, P684: 684, P685: 685, P686: 686, P687: 687, P688: 688, P689: 689,
+ P690: 690, P691: 691, P692: 692, P693: 693, P694: 694, P695: 695, P696: 696, P697: 697, P698: 698, P699: 699,
+ P700: 700, P701: 701, P702: 702, P703: 703, P704: 704, P705: 705, P706: 706, P707: 707, P708: 708, P709: 709,
+ P710: 710, P711: 711, P712: 712, P713: 713, P714: 714, P715: 715, P716: 716, P717: 717, P718: 718, P719: 719,
+ P720: 720, P721: 721, P722: 722, P723: 723, P724: 724, P725: 725, P726: 726, P727: 727, P728: 728, P729: 729,
+ P730: 730, P731: 731, P732: 732, P733: 733, P734: 734, P735: 735, P736: 736, P737: 737, P738: 738, P739: 739,
+ P740: 740, P741: 741, P742: 742, P743: 743, P744: 744, P745: 745, P746: 746, P747: 747, P748: 748, P749: 749,
+ P750: 750, P751: 751, P752: 752, P753: 753, P754: 754, P755: 755, P756: 756, P757: 757, P758: 758, P759: 759,
+ P760: 760, P761: 761, P762: 762, P763: 763, P764: 764, P765: 765, P766: 766, P767: 767, P768: 768, P769: 769,
+ P770: 770, P771: 771, P772: 772, P773: 773, P774: 774, P775: 775, P776: 776, P777: 777, P778: 778, P779: 779,
+ P780: 780, P781: 781, P782: 782, P783: 783, P784: 784, P785: 785, P786: 786, P787: 787, P788: 788, P789: 789,
+ P790: 790, P791: 791, P792: 792, P793: 793, P794: 794, P795: 795, P796: 796, P797: 797, P798: 798, P799: 799,
+ P800: 800, P801: 801, P802: 802, P803: 803, P804: 804, P805: 805, P806: 806, P807: 807, P808: 808, P809: 809,
+ P810: 810, P811: 811, P812: 812, P813: 813, P814: 814, P815: 815, P816: 816, P817: 817, P818: 818, P819: 819,
+ P820: 820, P821: 821, P822: 822, P823: 823, P824: 824, P825: 825, P826: 826, P827: 827, P828: 828, P829: 829,
+ P830: 830, P831: 831, P832: 832, P833: 833, P834: 834, P835: 835, P836: 836, P837: 837, P838: 838, P839: 839,
+ P840: 840, P841: 841, P842: 842, P843: 843, P844: 844, P845: 845, P846: 846, P847: 847, P848: 848, P849: 849,
+ P850: 850, P851: 851, P852: 852, P853: 853, P854: 854, P855: 855, P856: 856, P857: 857, P858: 858, P859: 859,
+ P860: 860, P861: 861, P862: 862, P863: 863, P864: 864, P865: 865, P866: 866, P867: 867, P868: 868, P869: 869,
+ P870: 870, P871: 871, P872: 872, P873: 873, P874: 874, P875: 875, P876: 876, P877: 877, P878: 878, P879: 879,
+ P880: 880, P881: 881, P882: 882, P883: 883, P884: 884, P885: 885, P886: 886, P887: 887, P888: 888, P889: 889,
+ P890: 890, P891: 891, P892: 892, P893: 893, P894: 894, P895: 895, P896: 896, P897: 897, P898: 898, P899: 899,
+ P900: 900, P901: 901, P902: 902, P903: 903, P904: 904, P905: 905, P906: 906, P907: 907, P908: 908, P909: 909,
+ P910: 910, P911: 911, P912: 912, P913: 913, P914: 914, P915: 915, P916: 916, P917: 917, P918: 918, P919: 919,
+ P920: 920, P921: 921, P922: 922, P923: 923, P924: 924, P925: 925, P926: 926, P927: 927, P928: 928, P929: 929,
+ P930: 930, P931: 931, P932: 932, P933: 933, P934: 934, P935: 935, P936: 936, P937: 937, P938: 938, P939: 939,
+ P940: 940, P941: 941, P942: 942, P943: 943, P944: 944, P945: 945, P946: 946, P947: 947, P948: 948, P949: 949,
+ P950: 950, P951: 951, P952: 952, P953: 953, P954: 954, P955: 955, P956: 956, P957: 957, P958: 958, P959: 959,
+ P960: 960, P961: 961, P962: 962, P963: 963, P964: 964, P965: 965, P966: 966, P967: 967, P968: 968, P969: 969,
+ P970: 970, P971: 971, P972: 972, P973: 973, P974: 974, P975: 975, P976: 976, P977: 977, P978: 978, P979: 979,
+ P980: 980, P981: 981, P982: 982, P983: 983, P984: 984, P985: 985, P986: 986, P987: 987, P988: 988, P989: 989,
+ P990: 990, P991: 991, P992: 992, P993: 993, P994: 994, P995: 995, P996: 996, P997: 997, P998: 998, P999: 999);
+ }
+ }
}
diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/Serialization/ConstructorTests.cs b/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/Serialization/ConstructorTests.cs
index 54f5152845e..c76cad3658f 100644
--- a/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/Serialization/ConstructorTests.cs
+++ b/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/Serialization/ConstructorTests.cs
@@ -140,6 +140,7 @@ namespace System.Text.Json.SourceGeneration.Tests
[JsonSerializable(typeof(LargeType_IgnoredProp_Bind_Param))]
[JsonSerializable(typeof(ClassWithIgnoredSameType))]
[JsonSerializable(typeof(ClassWithDefaultCtorParams))]
+ [JsonSerializable(typeof(ClassWithManyConstructorParameters))]
internal sealed partial class ConstructorTestsContext_Metadata : JsonSerializerContext
{
}
@@ -275,6 +276,7 @@ namespace System.Text.Json.SourceGeneration.Tests
[JsonSerializable(typeof(LargeType_IgnoredProp_Bind_Param))]
[JsonSerializable(typeof(ClassWithIgnoredSameType))]
[JsonSerializable(typeof(ClassWithDefaultCtorParams))]
+ [JsonSerializable(typeof(ClassWithManyConstructorParameters))]
internal sealed partial class ConstructorTestsContext_Default : JsonSerializerContext
{
}
diff --git a/src/libraries/System.Text.RegularExpressions/gen/RegexGenerator.cs b/src/libraries/System.Text.RegularExpressions/gen/RegexGenerator.cs
index ed237b82379..effe0127442 100644
--- a/src/libraries/System.Text.RegularExpressions/gen/RegexGenerator.cs
+++ b/src/libraries/System.Text.RegularExpressions/gen/RegexGenerator.cs
@@ -11,7 +11,6 @@ using System.Linq;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
-using Microsoft.CodeAnalysis.DotnetRuntime.Extensions;
[assembly: System.Resources.NeutralResourcesLanguage("en-us")]
@@ -48,7 +47,6 @@ namespace System.Text.RegularExpressions.Generator
// Find all MethodDeclarationSyntax nodes attributed with GeneratedRegex and gather the required information.
.ForAttributeWithMetadataName(
- context,
GeneratedRegexAttributeName,
(node, _) => node is MethodDeclarationSyntax,
GetSemanticTargetForGeneration)
diff --git a/src/libraries/System.Text.RegularExpressions/gen/System.Text.RegularExpressions.Generator.csproj b/src/libraries/System.Text.RegularExpressions/gen/System.Text.RegularExpressions.Generator.csproj
index bf14a855c90..ed6adef2537 100644
--- a/src/libraries/System.Text.RegularExpressions/gen/System.Text.RegularExpressions.Generator.csproj
+++ b/src/libraries/System.Text.RegularExpressions/gen/System.Text.RegularExpressions.Generator.csproj
@@ -14,20 +14,12 @@
<ItemGroup>
<!-- This generator ships as part of the .NET ref pack. Since VS ingests new Roslyn versions at a different cadence than the .NET SDK, we are pinning this generator to build against Roslyn 4.0 to ensure that we don't break users who are using .NET 7 previews in VS. -->
- <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="$(MicrosoftCodeAnalysisVersion_4_0)" PrivateAssets="all" />
+ <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="$(MicrosoftCodeAnalysisVersion_4_4)" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<!-- Common generator support -->
<Compile Include="$(CommonPath)Roslyn\GetBestTypeByMetadataName.cs" Link="Common\Roslyn\GetBestTypeByMetadataName.cs" />
- <Compile Include="$(CommonPath)Roslyn\Hash.cs" Link="Common\Roslyn\Hash.cs" />
- <Compile Include="$(CommonPath)Roslyn\ISyntaxHelper.cs" Link="Common\Roslyn\ISyntaxHelper.cs" />
- <Compile Include="$(CommonPath)Roslyn\CSharpSyntaxHelper.cs" Link="Common\Roslyn\CSharpSyntaxHelper.cs" />
- <Compile Include="$(CommonPath)Roslyn\GlobalAliases.cs" Link="Common\Roslyn\GlobalAliases.cs" />
- <Compile Include="$(CommonPath)Roslyn\SyntaxNodeGrouping.cs" Link="Common\Roslyn\SyntaxNodeGrouping.cs" />
- <Compile Include="$(CommonPath)Roslyn\SyntaxValueProvider.ImmutableArrayValueComparer.cs" Link="Common\Roslyn\SyntaxValueProvider.ImmutableArrayValueComparer.cs" />
- <Compile Include="$(CommonPath)Roslyn\SyntaxValueProvider_ForAttributeWithMetadataName.cs" Link="Common\Roslyn\SyntaxValueProvider_ForAttributeWithMetadataName.cs" />
- <Compile Include="$(CommonPath)Roslyn\SyntaxValueProvider_ForAttributeWithSimpleName.cs" Link="Common\Roslyn\SyntaxValueProvider_ForAttributeWithSimpleName.cs" />
<Compile Include="$(CoreLibSharedDir)System\Runtime\CompilerServices\IsExternalInit.cs" Link="Common\System\Runtime\CompilerServices\IsExternalInit.cs" />
<!-- Code included from System.Text.RegularExpressions -->
diff --git a/src/libraries/System.Text.RegularExpressions/tools/GenerateRegexCasingTable.csproj b/src/libraries/System.Text.RegularExpressions/tools/GenerateRegexCasingTable.csproj
index 26b5733684c..173f2557d23 100644
--- a/src/libraries/System.Text.RegularExpressions/tools/GenerateRegexCasingTable.csproj
+++ b/src/libraries/System.Text.RegularExpressions/tools/GenerateRegexCasingTable.csproj
@@ -2,8 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
- <TargetFramework>net6.0</TargetFramework>
- <LangVersion>latest</LangVersion>
+ <TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
diff --git a/src/libraries/System.Threading.Overlapped/System.Threading.Overlapped.sln b/src/libraries/System.Threading.Overlapped/System.Threading.Overlapped.sln
index a2813f2f551..d651d1b1752 100644
--- a/src/libraries/System.Threading.Overlapped/System.Threading.Overlapped.sln
+++ b/src/libraries/System.Threading.Overlapped/System.Threading.Overlapped.sln
@@ -5,6 +5,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{8BAAF37B-C3C1-4DED-A89A-5513AE866360}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{4687BA7A-AF17-43B9-BB8A-5B802FDD4482}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{C84846A6-ACFA-4145-AF76-AA56A5AC89FC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{8B4BE458-0DE2-42A8-B7A2-3C82F21BAB23}"
@@ -69,11 +71,8 @@ Global
{A4B84F3E-9C18-4CF7-8CA8-9F4AA4A1634F}.Release|x86.ActiveCfg = Release|Any CPU
{A4B84F3E-9C18-4CF7-8CA8-9F4AA4A1634F}.Release|x86.Build.0 = Release|Any CPU
{A4B84F3E-9C18-4CF7-8CA8-9F4AA4A1634F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {A4B84F3E-9C18-4CF7-8CA8-9F4AA4A1634F}.Checked|Any CPU.Build.0 = Debug|Any CPU
{A4B84F3E-9C18-4CF7-8CA8-9F4AA4A1634F}.Checked|x64.ActiveCfg = Debug|Any CPU
- {A4B84F3E-9C18-4CF7-8CA8-9F4AA4A1634F}.Checked|x64.Build.0 = Debug|Any CPU
{A4B84F3E-9C18-4CF7-8CA8-9F4AA4A1634F}.Checked|x86.ActiveCfg = Debug|Any CPU
- {A4B84F3E-9C18-4CF7-8CA8-9F4AA4A1634F}.Checked|x86.Build.0 = Debug|Any CPU
{8BAAF37B-C3C1-4DED-A89A-5513AE866360}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8BAAF37B-C3C1-4DED-A89A-5513AE866360}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8BAAF37B-C3C1-4DED-A89A-5513AE866360}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -87,11 +86,23 @@ Global
{8BAAF37B-C3C1-4DED-A89A-5513AE866360}.Release|x86.ActiveCfg = Release|Any CPU
{8BAAF37B-C3C1-4DED-A89A-5513AE866360}.Release|x86.Build.0 = Release|Any CPU
{8BAAF37B-C3C1-4DED-A89A-5513AE866360}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {8BAAF37B-C3C1-4DED-A89A-5513AE866360}.Checked|Any CPU.Build.0 = Debug|Any CPU
{8BAAF37B-C3C1-4DED-A89A-5513AE866360}.Checked|x64.ActiveCfg = Debug|Any CPU
- {8BAAF37B-C3C1-4DED-A89A-5513AE866360}.Checked|x64.Build.0 = Debug|Any CPU
{8BAAF37B-C3C1-4DED-A89A-5513AE866360}.Checked|x86.ActiveCfg = Debug|Any CPU
- {8BAAF37B-C3C1-4DED-A89A-5513AE866360}.Checked|x86.Build.0 = Debug|Any CPU
+ {4687BA7A-AF17-43B9-BB8A-5B802FDD4482}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4687BA7A-AF17-43B9-BB8A-5B802FDD4482}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4687BA7A-AF17-43B9-BB8A-5B802FDD4482}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {4687BA7A-AF17-43B9-BB8A-5B802FDD4482}.Debug|x64.Build.0 = Debug|Any CPU
+ {4687BA7A-AF17-43B9-BB8A-5B802FDD4482}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {4687BA7A-AF17-43B9-BB8A-5B802FDD4482}.Debug|x86.Build.0 = Debug|Any CPU
+ {4687BA7A-AF17-43B9-BB8A-5B802FDD4482}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4687BA7A-AF17-43B9-BB8A-5B802FDD4482}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4687BA7A-AF17-43B9-BB8A-5B802FDD4482}.Release|x64.ActiveCfg = Release|Any CPU
+ {4687BA7A-AF17-43B9-BB8A-5B802FDD4482}.Release|x64.Build.0 = Release|Any CPU
+ {4687BA7A-AF17-43B9-BB8A-5B802FDD4482}.Release|x86.ActiveCfg = Release|Any CPU
+ {4687BA7A-AF17-43B9-BB8A-5B802FDD4482}.Release|x86.Build.0 = Release|Any CPU
+ {4687BA7A-AF17-43B9-BB8A-5B802FDD4482}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {4687BA7A-AF17-43B9-BB8A-5B802FDD4482}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {4687BA7A-AF17-43B9-BB8A-5B802FDD4482}.Checked|x86.ActiveCfg = Debug|Any CPU
{C84846A6-ACFA-4145-AF76-AA56A5AC89FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C84846A6-ACFA-4145-AF76-AA56A5AC89FC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C84846A6-ACFA-4145-AF76-AA56A5AC89FC}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -105,11 +116,8 @@ Global
{C84846A6-ACFA-4145-AF76-AA56A5AC89FC}.Release|x86.ActiveCfg = Release|Any CPU
{C84846A6-ACFA-4145-AF76-AA56A5AC89FC}.Release|x86.Build.0 = Release|Any CPU
{C84846A6-ACFA-4145-AF76-AA56A5AC89FC}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {C84846A6-ACFA-4145-AF76-AA56A5AC89FC}.Checked|Any CPU.Build.0 = Debug|Any CPU
{C84846A6-ACFA-4145-AF76-AA56A5AC89FC}.Checked|x64.ActiveCfg = Debug|Any CPU
- {C84846A6-ACFA-4145-AF76-AA56A5AC89FC}.Checked|x64.Build.0 = Debug|Any CPU
{C84846A6-ACFA-4145-AF76-AA56A5AC89FC}.Checked|x86.ActiveCfg = Debug|Any CPU
- {C84846A6-ACFA-4145-AF76-AA56A5AC89FC}.Checked|x86.Build.0 = Debug|Any CPU
{8B4BE458-0DE2-42A8-B7A2-3C82F21BAB23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8B4BE458-0DE2-42A8-B7A2-3C82F21BAB23}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8B4BE458-0DE2-42A8-B7A2-3C82F21BAB23}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -123,11 +131,8 @@ Global
{8B4BE458-0DE2-42A8-B7A2-3C82F21BAB23}.Release|x86.ActiveCfg = Release|Any CPU
{8B4BE458-0DE2-42A8-B7A2-3C82F21BAB23}.Release|x86.Build.0 = Release|Any CPU
{8B4BE458-0DE2-42A8-B7A2-3C82F21BAB23}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {8B4BE458-0DE2-42A8-B7A2-3C82F21BAB23}.Checked|Any CPU.Build.0 = Debug|Any CPU
{8B4BE458-0DE2-42A8-B7A2-3C82F21BAB23}.Checked|x64.ActiveCfg = Debug|Any CPU
- {8B4BE458-0DE2-42A8-B7A2-3C82F21BAB23}.Checked|x64.Build.0 = Debug|Any CPU
{8B4BE458-0DE2-42A8-B7A2-3C82F21BAB23}.Checked|x86.ActiveCfg = Debug|Any CPU
- {8B4BE458-0DE2-42A8-B7A2-3C82F21BAB23}.Checked|x86.Build.0 = Debug|Any CPU
{765BE4C9-9DB4-42AF-A4A5-9BA3CCA341A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{765BE4C9-9DB4-42AF-A4A5-9BA3CCA341A4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{765BE4C9-9DB4-42AF-A4A5-9BA3CCA341A4}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -141,11 +146,8 @@ Global
{765BE4C9-9DB4-42AF-A4A5-9BA3CCA341A4}.Release|x86.ActiveCfg = Release|Any CPU
{765BE4C9-9DB4-42AF-A4A5-9BA3CCA341A4}.Release|x86.Build.0 = Release|Any CPU
{765BE4C9-9DB4-42AF-A4A5-9BA3CCA341A4}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {765BE4C9-9DB4-42AF-A4A5-9BA3CCA341A4}.Checked|Any CPU.Build.0 = Debug|Any CPU
{765BE4C9-9DB4-42AF-A4A5-9BA3CCA341A4}.Checked|x64.ActiveCfg = Debug|Any CPU
- {765BE4C9-9DB4-42AF-A4A5-9BA3CCA341A4}.Checked|x64.Build.0 = Debug|Any CPU
{765BE4C9-9DB4-42AF-A4A5-9BA3CCA341A4}.Checked|x86.ActiveCfg = Debug|Any CPU
- {765BE4C9-9DB4-42AF-A4A5-9BA3CCA341A4}.Checked|x86.Build.0 = Debug|Any CPU
{05F39036-EF46-438F-8033-084B5C14832B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{05F39036-EF46-438F-8033-084B5C14832B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{05F39036-EF46-438F-8033-084B5C14832B}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -159,11 +161,8 @@ Global
{05F39036-EF46-438F-8033-084B5C14832B}.Release|x86.ActiveCfg = Release|Any CPU
{05F39036-EF46-438F-8033-084B5C14832B}.Release|x86.Build.0 = Release|Any CPU
{05F39036-EF46-438F-8033-084B5C14832B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {05F39036-EF46-438F-8033-084B5C14832B}.Checked|Any CPU.Build.0 = Debug|Any CPU
{05F39036-EF46-438F-8033-084B5C14832B}.Checked|x64.ActiveCfg = Debug|Any CPU
- {05F39036-EF46-438F-8033-084B5C14832B}.Checked|x64.Build.0 = Debug|Any CPU
{05F39036-EF46-438F-8033-084B5C14832B}.Checked|x86.ActiveCfg = Debug|Any CPU
- {05F39036-EF46-438F-8033-084B5C14832B}.Checked|x86.Build.0 = Debug|Any CPU
{A3D9C10B-53A3-483C-8D90-BE7C078B82DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A3D9C10B-53A3-483C-8D90-BE7C078B82DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A3D9C10B-53A3-483C-8D90-BE7C078B82DF}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -177,11 +176,8 @@ Global
{A3D9C10B-53A3-483C-8D90-BE7C078B82DF}.Release|x86.ActiveCfg = Release|Any CPU
{A3D9C10B-53A3-483C-8D90-BE7C078B82DF}.Release|x86.Build.0 = Release|Any CPU
{A3D9C10B-53A3-483C-8D90-BE7C078B82DF}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {A3D9C10B-53A3-483C-8D90-BE7C078B82DF}.Checked|Any CPU.Build.0 = Debug|Any CPU
{A3D9C10B-53A3-483C-8D90-BE7C078B82DF}.Checked|x64.ActiveCfg = Debug|Any CPU
- {A3D9C10B-53A3-483C-8D90-BE7C078B82DF}.Checked|x64.Build.0 = Debug|Any CPU
{A3D9C10B-53A3-483C-8D90-BE7C078B82DF}.Checked|x86.ActiveCfg = Debug|Any CPU
- {A3D9C10B-53A3-483C-8D90-BE7C078B82DF}.Checked|x86.Build.0 = Debug|Any CPU
{3F9C730B-665F-49A3-AB6D-C0A08E4F7CD1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3F9C730B-665F-49A3-AB6D-C0A08E4F7CD1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3F9C730B-665F-49A3-AB6D-C0A08E4F7CD1}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -195,11 +191,8 @@ Global
{3F9C730B-665F-49A3-AB6D-C0A08E4F7CD1}.Release|x86.ActiveCfg = Release|Any CPU
{3F9C730B-665F-49A3-AB6D-C0A08E4F7CD1}.Release|x86.Build.0 = Release|Any CPU
{3F9C730B-665F-49A3-AB6D-C0A08E4F7CD1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {3F9C730B-665F-49A3-AB6D-C0A08E4F7CD1}.Checked|Any CPU.Build.0 = Debug|Any CPU
{3F9C730B-665F-49A3-AB6D-C0A08E4F7CD1}.Checked|x64.ActiveCfg = Debug|Any CPU
- {3F9C730B-665F-49A3-AB6D-C0A08E4F7CD1}.Checked|x64.Build.0 = Debug|Any CPU
{3F9C730B-665F-49A3-AB6D-C0A08E4F7CD1}.Checked|x86.ActiveCfg = Debug|Any CPU
- {3F9C730B-665F-49A3-AB6D-C0A08E4F7CD1}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -212,6 +205,7 @@ Global
{8BAAF37B-C3C1-4DED-A89A-5513AE866360} = {D07DC3DB-723F-41C6-99A0-56F395D4D055}
{C84846A6-ACFA-4145-AF76-AA56A5AC89FC} = {D07DC3DB-723F-41C6-99A0-56F395D4D055}
{8B4BE458-0DE2-42A8-B7A2-3C82F21BAB23} = {D07DC3DB-723F-41C6-99A0-56F395D4D055}
+ {4687BA7A-AF17-43B9-BB8A-5B802FDD4482} = {1CC21763-DACE-400F-808F-7B9DCF90DCBA}
{765BE4C9-9DB4-42AF-A4A5-9BA3CCA341A4} = {1CC21763-DACE-400F-808F-7B9DCF90DCBA}
{05F39036-EF46-438F-8033-084B5C14832B} = {1CC21763-DACE-400F-808F-7B9DCF90DCBA}
EndGlobalSection
diff --git a/src/libraries/System.Threading.RateLimiting/ref/System.Threading.RateLimiting.cs b/src/libraries/System.Threading.RateLimiting/ref/System.Threading.RateLimiting.cs
index b4905c286ec..9ca87ccd8cf 100644
--- a/src/libraries/System.Threading.RateLimiting/ref/System.Threading.RateLimiting.cs
+++ b/src/libraries/System.Threading.RateLimiting/ref/System.Threading.RateLimiting.cs
@@ -103,10 +103,10 @@ namespace System.Threading.RateLimiting
public partial class RateLimiterStatistics
{
public RateLimiterStatistics() { }
- public long CurrentAvailablePermits { get { throw null; } set { } }
- public long CurrentQueuedCount { get { throw null; } set { } }
- public long TotalFailedLeases { get { throw null; } set { } }
- public long TotalSuccessfulLeases { get { throw null; } set { } }
+ public long CurrentAvailablePermits { get { throw null; } init { } }
+ public long CurrentQueuedCount { get { throw null; } init { } }
+ public long TotalFailedLeases { get { throw null; } init { } }
+ public long TotalSuccessfulLeases { get { throw null; } init { } }
}
public abstract partial class RateLimitLease : System.IDisposable
{
diff --git a/src/libraries/System.Threading.RateLimiting/src/Resources/Strings.resx b/src/libraries/System.Threading.RateLimiting/src/Resources/Strings.resx
index 0bbb8516816..cb67a1ee66d 100644
--- a/src/libraries/System.Threading.RateLimiting/src/Resources/Strings.resx
+++ b/src/libraries/System.Threading.RateLimiting/src/Resources/Strings.resx
@@ -126,4 +126,13 @@
<data name="ReplenishmentLimitTooHigh" xml:space="preserve">
<value>Over 49 days is not supported.</value>
</data>
+ <data name="ShouldBeGreaterThan0" xml:space="preserve">
+ <value>{0} must be set to a value greater than 0.</value>
+ </data>
+ <data name="ShouldBeGreaterThanOrEqual0" xml:space="preserve">
+ <value>{0} must be set to a value greater than or equal to 0.</value>
+ </data>
+ <data name="ShouldBeGreaterThanTimeSpan0" xml:space="preserve">
+ <value>{0} must be set to a value greater than TimeSpan.Zero.</value>
+ </data>
</root> \ No newline at end of file
diff --git a/src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/ConcurrencyLimiter.cs b/src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/ConcurrencyLimiter.cs
index 508340a2e13..90c4620d18d 100644
--- a/src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/ConcurrencyLimiter.cs
+++ b/src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/ConcurrencyLimiter.cs
@@ -47,11 +47,11 @@ namespace System.Threading.RateLimiting
}
if (options.PermitLimit <= 0)
{
- throw new ArgumentException($"{nameof(options.PermitLimit)} must be set to a value greater than 0.", nameof(options));
+ throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThan0, nameof(options.PermitLimit)), nameof(options));
}
if (options.QueueLimit < 0)
{
- throw new ArgumentException($"{nameof(options.QueueLimit)} must be set to a value greater than or equal to 0.", nameof(options));
+ throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThanOrEqual0, nameof(options.QueueLimit)), nameof(options));
}
_options = new ConcurrencyLimiterOptions
diff --git a/src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/FixedWindowRateLimiter.cs b/src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/FixedWindowRateLimiter.cs
index 774a6876c24..71dd29faa14 100644
--- a/src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/FixedWindowRateLimiter.cs
+++ b/src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/FixedWindowRateLimiter.cs
@@ -53,15 +53,15 @@ namespace System.Threading.RateLimiting
}
if (options.PermitLimit <= 0)
{
- throw new ArgumentException($"{nameof(options.PermitLimit)} must be set to a value greater than 0.", nameof(options));
+ throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThan0, nameof(options.PermitLimit)), nameof(options));
}
if (options.QueueLimit < 0)
{
- throw new ArgumentException($"{nameof(options.QueueLimit)} must be set to a value greater than or equal to 0.", nameof(options));
+ throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThanOrEqual0, nameof(options.QueueLimit)), nameof(options));
}
- if (options.Window < TimeSpan.Zero)
+ if (options.Window <= TimeSpan.Zero)
{
- throw new ArgumentException($"{nameof(options.Window)} must be set to a value greater than or equal to TimeSpan.Zero.", nameof(options));
+ throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThanTimeSpan0, nameof(options.Window)), nameof(options));
}
_options = new FixedWindowRateLimiterOptions
diff --git a/src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/FixedWindowRateLimiterOptions.cs b/src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/FixedWindowRateLimiterOptions.cs
index a6d2b164755..8f7dbaa344b 100644
--- a/src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/FixedWindowRateLimiterOptions.cs
+++ b/src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/FixedWindowRateLimiterOptions.cs
@@ -10,9 +10,8 @@ namespace System.Threading.RateLimiting
{
/// <summary>
/// Specifies the time window that takes in the requests.
- /// Must be set to a value >= <see cref="TimeSpan.Zero" /> by the time these options are passed to the constructor of <see cref="FixedWindowRateLimiter"/>.
+ /// Must be set to a value greater than <see cref="TimeSpan.Zero" /> by the time these options are passed to the constructor of <see cref="FixedWindowRateLimiter"/>.
/// </summary>
- /// <remarks><see cref="TimeSpan.Zero"/> means the limiter will never replenish.</remarks>
public TimeSpan Window { get; set; } = TimeSpan.Zero;
/// <summary>
diff --git a/src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/SlidingWindowRateLimiter.cs b/src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/SlidingWindowRateLimiter.cs
index a1fe3e2839e..205b2d5b5bc 100644
--- a/src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/SlidingWindowRateLimiter.cs
+++ b/src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/SlidingWindowRateLimiter.cs
@@ -55,17 +55,21 @@ namespace System.Threading.RateLimiting
{
throw new ArgumentNullException(nameof(options));
}
- if (options.PermitLimit <= 0 || options.SegmentsPerWindow <= 0)
+ if (options.PermitLimit <= 0)
{
- throw new ArgumentException($"Both {nameof(options.PermitLimit)} and {nameof(options.SegmentsPerWindow)} must be set to values greater than 0.", nameof(options));
+ throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThan0, nameof(options.PermitLimit)), nameof(options));
+ }
+ if (options.SegmentsPerWindow <= 0)
+ {
+ throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThan0, nameof(options.SegmentsPerWindow)), nameof(options));
}
if (options.QueueLimit < 0)
{
- throw new ArgumentException($"{nameof(options.QueueLimit)} must be set to a value greater than or equal to 0.", nameof(options));
+ throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThanOrEqual0, nameof(options.QueueLimit)), nameof(options));
}
- if (options.Window < TimeSpan.Zero)
+ if (options.Window <= TimeSpan.Zero)
{
- throw new ArgumentException($"{nameof(options.Window)} must be set to a value greater than or equal to TimeSpan.Zero.", nameof(options));
+ throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThanTimeSpan0, nameof(options.Window)), nameof(options));
}
_options = new SlidingWindowRateLimiterOptions
diff --git a/src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/SlidingWindowRateLimiterOptions.cs b/src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/SlidingWindowRateLimiterOptions.cs
index f7f399e175b..93f7ba933b4 100644
--- a/src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/SlidingWindowRateLimiterOptions.cs
+++ b/src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/SlidingWindowRateLimiterOptions.cs
@@ -10,9 +10,8 @@ namespace System.Threading.RateLimiting
{
/// <summary>
/// Specifies the minimum period between replenishments.
- /// Must be set to a value >= <see cref="TimeSpan.Zero" /> by the time these options are passed to the constructor of <see cref="SlidingWindowRateLimiter"/>.
+ /// Must be set to a value greater than <see cref="TimeSpan.Zero" /> by the time these options are passed to the constructor of <see cref="SlidingWindowRateLimiter"/>.
/// </summary>
- /// <remarks><see cref="TimeSpan.Zero"/> means the limiter will never replenish.</remarks>
public TimeSpan Window { get; set; } = TimeSpan.Zero;
/// <summary>
diff --git a/src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/TokenBucketRateLimiter.cs b/src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/TokenBucketRateLimiter.cs
index 9238a62a0c0..8423b13a603 100644
--- a/src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/TokenBucketRateLimiter.cs
+++ b/src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/TokenBucketRateLimiter.cs
@@ -53,17 +53,21 @@ namespace System.Threading.RateLimiting
{
throw new ArgumentNullException(nameof(options));
}
- if (options.TokenLimit <= 0 || options.TokensPerPeriod <= 0)
+ if (options.TokenLimit <= 0)
{
- throw new ArgumentException($"Both {nameof(options.TokenLimit)} and {nameof(options.TokensPerPeriod)} must be set to values greater than 0.", nameof(options));
+ throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThan0, nameof(options.TokenLimit)), nameof(options));
+ }
+ if (options.TokensPerPeriod <= 0)
+ {
+ throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThan0, nameof(options.TokensPerPeriod)), nameof(options));
}
if (options.QueueLimit < 0)
{
- throw new ArgumentException($"{nameof(options.QueueLimit)} must be set to a value greater than or equal to 0.", nameof(options));
+ throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThanOrEqual0, nameof(options.QueueLimit)), nameof(options));
}
- if (options.ReplenishmentPeriod < TimeSpan.Zero)
+ if (options.ReplenishmentPeriod <= TimeSpan.Zero)
{
- throw new ArgumentException($"{nameof(options.ReplenishmentPeriod)} must be set to a value greater than or equal to TimeSpan.Zero.", nameof(options));
+ throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThanTimeSpan0, nameof(options.ReplenishmentPeriod)), nameof(options));
}
_options = new TokenBucketRateLimiterOptions
diff --git a/src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/TokenBucketRateLimiterOptions.cs b/src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/TokenBucketRateLimiterOptions.cs
index b0371119ce3..2c065d9432e 100644
--- a/src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/TokenBucketRateLimiterOptions.cs
+++ b/src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/TokenBucketRateLimiterOptions.cs
@@ -10,9 +10,8 @@ namespace System.Threading.RateLimiting
{
/// <summary>
/// Specifies the minimum period between replenishments.
- /// Must be set to a value >= <see cref="TimeSpan.Zero" /> by the time these options are passed to the constructor of <see cref="TokenBucketRateLimiter"/>.
+ /// Must be set to a value greater than <see cref="TimeSpan.Zero" /> by the time these options are passed to the constructor of <see cref="TokenBucketRateLimiter"/>.
/// </summary>
- /// <remarks><see cref="TimeSpan.Zero"/> means the limiter will never replenish.</remarks>
public TimeSpan ReplenishmentPeriod { get; set; } = TimeSpan.Zero;
/// <summary>
diff --git a/src/libraries/System.Threading.RateLimiting/tests/ConcurrencyLimiterTests.cs b/src/libraries/System.Threading.RateLimiting/tests/ConcurrencyLimiterTests.cs
index 54e2bbecc19..0669a4bd6bc 100644
--- a/src/libraries/System.Threading.RateLimiting/tests/ConcurrencyLimiterTests.cs
+++ b/src/libraries/System.Threading.RateLimiting/tests/ConcurrencyLimiterTests.cs
@@ -11,13 +11,13 @@ namespace System.Threading.RateLimiting.Test
[Fact]
public override void InvalidOptionsThrows()
{
- Assert.Throws<ArgumentException>(() => new ConcurrencyLimiter(new ConcurrencyLimiterOptions
+ AssertExtensions.Throws<ArgumentException>("options", () => new ConcurrencyLimiter(new ConcurrencyLimiterOptions
{
PermitLimit = -1,
QueueProcessingOrder = QueueProcessingOrder.NewestFirst,
QueueLimit = 1
}));
- Assert.Throws<ArgumentException>(() => new ConcurrencyLimiter(new ConcurrencyLimiterOptions
+ AssertExtensions.Throws<ArgumentException>("options", () => new ConcurrencyLimiter(new ConcurrencyLimiterOptions
{
PermitLimit = 1,
QueueProcessingOrder = QueueProcessingOrder.NewestFirst,
diff --git a/src/libraries/System.Threading.RateLimiting/tests/FixedWindowRateLimiterTests.cs b/src/libraries/System.Threading.RateLimiting/tests/FixedWindowRateLimiterTests.cs
index f5c75a0308a..3e67bd130d7 100644
--- a/src/libraries/System.Threading.RateLimiting/tests/FixedWindowRateLimiterTests.cs
+++ b/src/libraries/System.Threading.RateLimiting/tests/FixedWindowRateLimiterTests.cs
@@ -35,7 +35,7 @@ namespace System.Threading.RateLimiting.Test
[Fact]
public override void InvalidOptionsThrows()
{
- Assert.Throws<ArgumentException>(
+ AssertExtensions.Throws<ArgumentException>("options",
() => new FixedWindowRateLimiter(new FixedWindowRateLimiterOptions
{
PermitLimit = -1,
@@ -44,7 +44,7 @@ namespace System.Threading.RateLimiting.Test
Window = TimeSpan.FromMinutes(2),
AutoReplenishment = false
}));
- Assert.Throws<ArgumentException>(
+ AssertExtensions.Throws<ArgumentException>("options",
() => new FixedWindowRateLimiter(new FixedWindowRateLimiterOptions
{
PermitLimit = 1,
@@ -53,7 +53,7 @@ namespace System.Threading.RateLimiting.Test
Window = TimeSpan.FromMinutes(2),
AutoReplenishment = false
}));
- Assert.Throws<ArgumentException>(
+ AssertExtensions.Throws<ArgumentException>("options",
() => new FixedWindowRateLimiter(new FixedWindowRateLimiterOptions
{
PermitLimit = 1,
@@ -62,7 +62,7 @@ namespace System.Threading.RateLimiting.Test
Window = TimeSpan.MinValue,
AutoReplenishment = false
}));
- Assert.Throws<ArgumentException>(
+ AssertExtensions.Throws<ArgumentException>("options",
() => new FixedWindowRateLimiter(new FixedWindowRateLimiterOptions
{
PermitLimit = 1,
@@ -71,6 +71,15 @@ namespace System.Threading.RateLimiting.Test
Window = TimeSpan.FromMinutes(-2),
AutoReplenishment = false,
}));
+ AssertExtensions.Throws<ArgumentException>("options",
+ () => new FixedWindowRateLimiter(new FixedWindowRateLimiterOptions
+ {
+ PermitLimit = 1,
+ QueueProcessingOrder = QueueProcessingOrder.NewestFirst,
+ QueueLimit = 1,
+ Window = TimeSpan.Zero,
+ AutoReplenishment = false,
+ }));
}
[Fact]
diff --git a/src/libraries/System.Threading.RateLimiting/tests/SlidingWindowRateLimiterTests.cs b/src/libraries/System.Threading.RateLimiting/tests/SlidingWindowRateLimiterTests.cs
index bd0d0d298d5..c45b9d75140 100644
--- a/src/libraries/System.Threading.RateLimiting/tests/SlidingWindowRateLimiterTests.cs
+++ b/src/libraries/System.Threading.RateLimiting/tests/SlidingWindowRateLimiterTests.cs
@@ -37,7 +37,7 @@ namespace System.Threading.RateLimiting.Test
[Fact]
public override void InvalidOptionsThrows()
{
- Assert.Throws<ArgumentException>(
+ AssertExtensions.Throws<ArgumentException>("options",
() => new SlidingWindowRateLimiter(new SlidingWindowRateLimiterOptions
{
PermitLimit = -1,
@@ -47,7 +47,7 @@ namespace System.Threading.RateLimiting.Test
SegmentsPerWindow = 1,
AutoReplenishment = false
}));
- Assert.Throws<ArgumentException>(
+ AssertExtensions.Throws<ArgumentException>("options",
() => new SlidingWindowRateLimiter(new SlidingWindowRateLimiterOptions
{
PermitLimit = 1,
@@ -57,7 +57,7 @@ namespace System.Threading.RateLimiting.Test
SegmentsPerWindow = 1,
AutoReplenishment = false
}));
- Assert.Throws<ArgumentException>(
+ AssertExtensions.Throws<ArgumentException>("options",
() => new SlidingWindowRateLimiter(new SlidingWindowRateLimiterOptions
{
PermitLimit = 1,
@@ -67,7 +67,7 @@ namespace System.Threading.RateLimiting.Test
SegmentsPerWindow = -1,
AutoReplenishment = false
}));
- Assert.Throws<ArgumentException>(
+ AssertExtensions.Throws<ArgumentException>("options",
() => new SlidingWindowRateLimiter(new SlidingWindowRateLimiterOptions
{
PermitLimit = 1,
@@ -77,7 +77,7 @@ namespace System.Threading.RateLimiting.Test
SegmentsPerWindow = 1,
AutoReplenishment = false
}));
- Assert.Throws<ArgumentException>(
+ AssertExtensions.Throws<ArgumentException>("options",
() => new SlidingWindowRateLimiter(new SlidingWindowRateLimiterOptions
{
PermitLimit = 1,
@@ -87,6 +87,16 @@ namespace System.Threading.RateLimiting.Test
SegmentsPerWindow = 1,
AutoReplenishment = false
}));
+ AssertExtensions.Throws<ArgumentException>("options",
+ () => new SlidingWindowRateLimiter(new SlidingWindowRateLimiterOptions
+ {
+ PermitLimit = 1,
+ QueueProcessingOrder = QueueProcessingOrder.NewestFirst,
+ QueueLimit = 1,
+ Window = TimeSpan.Zero,
+ SegmentsPerWindow = 1,
+ AutoReplenishment = false
+ }));
}
[Fact]
diff --git a/src/libraries/System.Threading.RateLimiting/tests/TokenBucketRateLimiterTests.cs b/src/libraries/System.Threading.RateLimiting/tests/TokenBucketRateLimiterTests.cs
index 69876938fdf..e7fefcbf7a0 100644
--- a/src/libraries/System.Threading.RateLimiting/tests/TokenBucketRateLimiterTests.cs
+++ b/src/libraries/System.Threading.RateLimiting/tests/TokenBucketRateLimiterTests.cs
@@ -37,7 +37,7 @@ namespace System.Threading.RateLimiting.Test
[Fact]
public override void InvalidOptionsThrows()
{
- Assert.Throws<ArgumentException>(
+ AssertExtensions.Throws<ArgumentException>("options",
() => new TokenBucketRateLimiter(new TokenBucketRateLimiterOptions
{
TokenLimit = -1,
@@ -47,7 +47,7 @@ namespace System.Threading.RateLimiting.Test
TokensPerPeriod = 1,
AutoReplenishment = false
}));
- Assert.Throws<ArgumentException>(
+ AssertExtensions.Throws<ArgumentException>("options",
() => new TokenBucketRateLimiter(new TokenBucketRateLimiterOptions
{
TokenLimit = 1,
@@ -57,7 +57,7 @@ namespace System.Threading.RateLimiting.Test
TokensPerPeriod = 1,
AutoReplenishment = false
}));
- Assert.Throws<ArgumentException>(
+ AssertExtensions.Throws<ArgumentException>("options",
() => new TokenBucketRateLimiter(new TokenBucketRateLimiterOptions
{
TokenLimit = 1,
@@ -67,7 +67,7 @@ namespace System.Threading.RateLimiting.Test
TokensPerPeriod = -1,
AutoReplenishment = false
}));
- Assert.Throws<ArgumentException>(
+ AssertExtensions.Throws<ArgumentException>("options",
() => new TokenBucketRateLimiter(new TokenBucketRateLimiterOptions
{
TokenLimit = 1,
@@ -77,7 +77,7 @@ namespace System.Threading.RateLimiting.Test
TokensPerPeriod = 1,
AutoReplenishment = false
}));
- Assert.Throws<ArgumentException>(
+ AssertExtensions.Throws<ArgumentException>("options",
() => new TokenBucketRateLimiter(new TokenBucketRateLimiterOptions
{
TokenLimit = 1,
@@ -87,6 +87,16 @@ namespace System.Threading.RateLimiting.Test
TokensPerPeriod = 1,
AutoReplenishment = false
}));
+ AssertExtensions.Throws<ArgumentException>("options",
+ () => new TokenBucketRateLimiter(new TokenBucketRateLimiterOptions
+ {
+ TokenLimit = 1,
+ QueueProcessingOrder = QueueProcessingOrder.NewestFirst,
+ QueueLimit = 1,
+ ReplenishmentPeriod = TimeSpan.Zero,
+ TokensPerPeriod = 1,
+ AutoReplenishment = false
+ }));
}
[Fact]
diff --git a/src/libraries/System.Threading.Tasks.Extensions/System.Threading.Tasks.Extensions.sln b/src/libraries/System.Threading.Tasks.Extensions/System.Threading.Tasks.Extensions.sln
index 7495e50f5d0..f8e47cad0df 100644
--- a/src/libraries/System.Threading.Tasks.Extensions/System.Threading.Tasks.Extensions.sln
+++ b/src/libraries/System.Threading.Tasks.Extensions/System.Threading.Tasks.Extensions.sln
@@ -5,6 +5,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{5650548E-4175-4BD3-B23C-11FCB86AD2EF}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{CCDEFC00-831D-4D9C-BC98-A74621529CE8}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{197382D6-CA6C-4F33-BFE5-0902CE75876E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{8D2E0DCC-477B-44A4-A64B-775E6D024CD6}"
@@ -69,11 +71,8 @@ Global
{FFB40D04-17A5-4F9B-BD47-994E5616ABD9}.Release|x86.ActiveCfg = Release|Any CPU
{FFB40D04-17A5-4F9B-BD47-994E5616ABD9}.Release|x86.Build.0 = Release|Any CPU
{FFB40D04-17A5-4F9B-BD47-994E5616ABD9}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {FFB40D04-17A5-4F9B-BD47-994E5616ABD9}.Checked|Any CPU.Build.0 = Debug|Any CPU
{FFB40D04-17A5-4F9B-BD47-994E5616ABD9}.Checked|x64.ActiveCfg = Debug|Any CPU
- {FFB40D04-17A5-4F9B-BD47-994E5616ABD9}.Checked|x64.Build.0 = Debug|Any CPU
{FFB40D04-17A5-4F9B-BD47-994E5616ABD9}.Checked|x86.ActiveCfg = Debug|Any CPU
- {FFB40D04-17A5-4F9B-BD47-994E5616ABD9}.Checked|x86.Build.0 = Debug|Any CPU
{5650548E-4175-4BD3-B23C-11FCB86AD2EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5650548E-4175-4BD3-B23C-11FCB86AD2EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5650548E-4175-4BD3-B23C-11FCB86AD2EF}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -87,11 +86,23 @@ Global
{5650548E-4175-4BD3-B23C-11FCB86AD2EF}.Release|x86.ActiveCfg = Release|Any CPU
{5650548E-4175-4BD3-B23C-11FCB86AD2EF}.Release|x86.Build.0 = Release|Any CPU
{5650548E-4175-4BD3-B23C-11FCB86AD2EF}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {5650548E-4175-4BD3-B23C-11FCB86AD2EF}.Checked|Any CPU.Build.0 = Debug|Any CPU
{5650548E-4175-4BD3-B23C-11FCB86AD2EF}.Checked|x64.ActiveCfg = Debug|Any CPU
- {5650548E-4175-4BD3-B23C-11FCB86AD2EF}.Checked|x64.Build.0 = Debug|Any CPU
{5650548E-4175-4BD3-B23C-11FCB86AD2EF}.Checked|x86.ActiveCfg = Debug|Any CPU
- {5650548E-4175-4BD3-B23C-11FCB86AD2EF}.Checked|x86.Build.0 = Debug|Any CPU
+ {CCDEFC00-831D-4D9C-BC98-A74621529CE8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {CCDEFC00-831D-4D9C-BC98-A74621529CE8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {CCDEFC00-831D-4D9C-BC98-A74621529CE8}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {CCDEFC00-831D-4D9C-BC98-A74621529CE8}.Debug|x64.Build.0 = Debug|Any CPU
+ {CCDEFC00-831D-4D9C-BC98-A74621529CE8}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {CCDEFC00-831D-4D9C-BC98-A74621529CE8}.Debug|x86.Build.0 = Debug|Any CPU
+ {CCDEFC00-831D-4D9C-BC98-A74621529CE8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {CCDEFC00-831D-4D9C-BC98-A74621529CE8}.Release|Any CPU.Build.0 = Release|Any CPU
+ {CCDEFC00-831D-4D9C-BC98-A74621529CE8}.Release|x64.ActiveCfg = Release|Any CPU
+ {CCDEFC00-831D-4D9C-BC98-A74621529CE8}.Release|x64.Build.0 = Release|Any CPU
+ {CCDEFC00-831D-4D9C-BC98-A74621529CE8}.Release|x86.ActiveCfg = Release|Any CPU
+ {CCDEFC00-831D-4D9C-BC98-A74621529CE8}.Release|x86.Build.0 = Release|Any CPU
+ {CCDEFC00-831D-4D9C-BC98-A74621529CE8}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {CCDEFC00-831D-4D9C-BC98-A74621529CE8}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {CCDEFC00-831D-4D9C-BC98-A74621529CE8}.Checked|x86.ActiveCfg = Debug|Any CPU
{197382D6-CA6C-4F33-BFE5-0902CE75876E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{197382D6-CA6C-4F33-BFE5-0902CE75876E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{197382D6-CA6C-4F33-BFE5-0902CE75876E}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -105,11 +116,8 @@ Global
{197382D6-CA6C-4F33-BFE5-0902CE75876E}.Release|x86.ActiveCfg = Release|Any CPU
{197382D6-CA6C-4F33-BFE5-0902CE75876E}.Release|x86.Build.0 = Release|Any CPU
{197382D6-CA6C-4F33-BFE5-0902CE75876E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {197382D6-CA6C-4F33-BFE5-0902CE75876E}.Checked|Any CPU.Build.0 = Debug|Any CPU
{197382D6-CA6C-4F33-BFE5-0902CE75876E}.Checked|x64.ActiveCfg = Debug|Any CPU
- {197382D6-CA6C-4F33-BFE5-0902CE75876E}.Checked|x64.Build.0 = Debug|Any CPU
{197382D6-CA6C-4F33-BFE5-0902CE75876E}.Checked|x86.ActiveCfg = Debug|Any CPU
- {197382D6-CA6C-4F33-BFE5-0902CE75876E}.Checked|x86.Build.0 = Debug|Any CPU
{8D2E0DCC-477B-44A4-A64B-775E6D024CD6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8D2E0DCC-477B-44A4-A64B-775E6D024CD6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8D2E0DCC-477B-44A4-A64B-775E6D024CD6}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -123,11 +131,8 @@ Global
{8D2E0DCC-477B-44A4-A64B-775E6D024CD6}.Release|x86.ActiveCfg = Release|Any CPU
{8D2E0DCC-477B-44A4-A64B-775E6D024CD6}.Release|x86.Build.0 = Release|Any CPU
{8D2E0DCC-477B-44A4-A64B-775E6D024CD6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {8D2E0DCC-477B-44A4-A64B-775E6D024CD6}.Checked|Any CPU.Build.0 = Debug|Any CPU
{8D2E0DCC-477B-44A4-A64B-775E6D024CD6}.Checked|x64.ActiveCfg = Debug|Any CPU
- {8D2E0DCC-477B-44A4-A64B-775E6D024CD6}.Checked|x64.Build.0 = Debug|Any CPU
{8D2E0DCC-477B-44A4-A64B-775E6D024CD6}.Checked|x86.ActiveCfg = Debug|Any CPU
- {8D2E0DCC-477B-44A4-A64B-775E6D024CD6}.Checked|x86.Build.0 = Debug|Any CPU
{7464DBE9-E9DD-4053-B632-CA5A9DD4A225}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7464DBE9-E9DD-4053-B632-CA5A9DD4A225}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7464DBE9-E9DD-4053-B632-CA5A9DD4A225}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -141,11 +146,8 @@ Global
{7464DBE9-E9DD-4053-B632-CA5A9DD4A225}.Release|x86.ActiveCfg = Release|Any CPU
{7464DBE9-E9DD-4053-B632-CA5A9DD4A225}.Release|x86.Build.0 = Release|Any CPU
{7464DBE9-E9DD-4053-B632-CA5A9DD4A225}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {7464DBE9-E9DD-4053-B632-CA5A9DD4A225}.Checked|Any CPU.Build.0 = Debug|Any CPU
{7464DBE9-E9DD-4053-B632-CA5A9DD4A225}.Checked|x64.ActiveCfg = Debug|Any CPU
- {7464DBE9-E9DD-4053-B632-CA5A9DD4A225}.Checked|x64.Build.0 = Debug|Any CPU
{7464DBE9-E9DD-4053-B632-CA5A9DD4A225}.Checked|x86.ActiveCfg = Debug|Any CPU
- {7464DBE9-E9DD-4053-B632-CA5A9DD4A225}.Checked|x86.Build.0 = Debug|Any CPU
{8E73F6BD-A0A2-4C98-B4E3-42391B135943}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8E73F6BD-A0A2-4C98-B4E3-42391B135943}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8E73F6BD-A0A2-4C98-B4E3-42391B135943}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -159,11 +161,8 @@ Global
{8E73F6BD-A0A2-4C98-B4E3-42391B135943}.Release|x86.ActiveCfg = Release|Any CPU
{8E73F6BD-A0A2-4C98-B4E3-42391B135943}.Release|x86.Build.0 = Release|Any CPU
{8E73F6BD-A0A2-4C98-B4E3-42391B135943}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {8E73F6BD-A0A2-4C98-B4E3-42391B135943}.Checked|Any CPU.Build.0 = Debug|Any CPU
{8E73F6BD-A0A2-4C98-B4E3-42391B135943}.Checked|x64.ActiveCfg = Debug|Any CPU
- {8E73F6BD-A0A2-4C98-B4E3-42391B135943}.Checked|x64.Build.0 = Debug|Any CPU
{8E73F6BD-A0A2-4C98-B4E3-42391B135943}.Checked|x86.ActiveCfg = Debug|Any CPU
- {8E73F6BD-A0A2-4C98-B4E3-42391B135943}.Checked|x86.Build.0 = Debug|Any CPU
{F67BB87D-2927-4BD4-B21B-5A403B6A2209}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F67BB87D-2927-4BD4-B21B-5A403B6A2209}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F67BB87D-2927-4BD4-B21B-5A403B6A2209}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -177,11 +176,8 @@ Global
{F67BB87D-2927-4BD4-B21B-5A403B6A2209}.Release|x86.ActiveCfg = Release|Any CPU
{F67BB87D-2927-4BD4-B21B-5A403B6A2209}.Release|x86.Build.0 = Release|Any CPU
{F67BB87D-2927-4BD4-B21B-5A403B6A2209}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {F67BB87D-2927-4BD4-B21B-5A403B6A2209}.Checked|Any CPU.Build.0 = Debug|Any CPU
{F67BB87D-2927-4BD4-B21B-5A403B6A2209}.Checked|x64.ActiveCfg = Debug|Any CPU
- {F67BB87D-2927-4BD4-B21B-5A403B6A2209}.Checked|x64.Build.0 = Debug|Any CPU
{F67BB87D-2927-4BD4-B21B-5A403B6A2209}.Checked|x86.ActiveCfg = Debug|Any CPU
- {F67BB87D-2927-4BD4-B21B-5A403B6A2209}.Checked|x86.Build.0 = Debug|Any CPU
{AE779AC7-EC2C-42BE-8E59-A2716799E098}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AE779AC7-EC2C-42BE-8E59-A2716799E098}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AE779AC7-EC2C-42BE-8E59-A2716799E098}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -195,11 +191,8 @@ Global
{AE779AC7-EC2C-42BE-8E59-A2716799E098}.Release|x86.ActiveCfg = Release|Any CPU
{AE779AC7-EC2C-42BE-8E59-A2716799E098}.Release|x86.Build.0 = Release|Any CPU
{AE779AC7-EC2C-42BE-8E59-A2716799E098}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {AE779AC7-EC2C-42BE-8E59-A2716799E098}.Checked|Any CPU.Build.0 = Debug|Any CPU
{AE779AC7-EC2C-42BE-8E59-A2716799E098}.Checked|x64.ActiveCfg = Debug|Any CPU
- {AE779AC7-EC2C-42BE-8E59-A2716799E098}.Checked|x64.Build.0 = Debug|Any CPU
{AE779AC7-EC2C-42BE-8E59-A2716799E098}.Checked|x86.ActiveCfg = Debug|Any CPU
- {AE779AC7-EC2C-42BE-8E59-A2716799E098}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -212,6 +205,7 @@ Global
{5650548E-4175-4BD3-B23C-11FCB86AD2EF} = {158053CD-684A-4AF7-9DC4-5ADEFC3E79AC}
{197382D6-CA6C-4F33-BFE5-0902CE75876E} = {158053CD-684A-4AF7-9DC4-5ADEFC3E79AC}
{8D2E0DCC-477B-44A4-A64B-775E6D024CD6} = {158053CD-684A-4AF7-9DC4-5ADEFC3E79AC}
+ {CCDEFC00-831D-4D9C-BC98-A74621529CE8} = {EC5157A4-9B43-4FDC-8FEF-8546A6423844}
{7464DBE9-E9DD-4053-B632-CA5A9DD4A225} = {EC5157A4-9B43-4FDC-8FEF-8546A6423844}
{8E73F6BD-A0A2-4C98-B4E3-42391B135943} = {EC5157A4-9B43-4FDC-8FEF-8546A6423844}
EndGlobalSection
diff --git a/src/libraries/System.Threading.Tasks/System.Threading.Tasks.sln b/src/libraries/System.Threading.Tasks/System.Threading.Tasks.sln
index 628c280c8f3..613727c1c1b 100644
--- a/src/libraries/System.Threading.Tasks/System.Threading.Tasks.sln
+++ b/src/libraries/System.Threading.Tasks/System.Threading.Tasks.sln
@@ -5,6 +5,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{A0477DE6-08C7-4793-A8B6-9974F2675AC7}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{1514879C-1F8B-41EB-8DD3-5A418FE2FF13}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{879D329A-C5F7-46DE-887F-12928E015C8C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{25E8CA91-84A5-4917-90A2-5E077734B0B7}"
@@ -69,11 +71,8 @@ Global
{695A5828-6CFC-4BE1-AE4E-6EC9796B4FC7}.Release|x86.ActiveCfg = Release|Any CPU
{695A5828-6CFC-4BE1-AE4E-6EC9796B4FC7}.Release|x86.Build.0 = Release|Any CPU
{695A5828-6CFC-4BE1-AE4E-6EC9796B4FC7}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {695A5828-6CFC-4BE1-AE4E-6EC9796B4FC7}.Checked|Any CPU.Build.0 = Debug|Any CPU
{695A5828-6CFC-4BE1-AE4E-6EC9796B4FC7}.Checked|x64.ActiveCfg = Debug|Any CPU
- {695A5828-6CFC-4BE1-AE4E-6EC9796B4FC7}.Checked|x64.Build.0 = Debug|Any CPU
{695A5828-6CFC-4BE1-AE4E-6EC9796B4FC7}.Checked|x86.ActiveCfg = Debug|Any CPU
- {695A5828-6CFC-4BE1-AE4E-6EC9796B4FC7}.Checked|x86.Build.0 = Debug|Any CPU
{A0477DE6-08C7-4793-A8B6-9974F2675AC7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A0477DE6-08C7-4793-A8B6-9974F2675AC7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A0477DE6-08C7-4793-A8B6-9974F2675AC7}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -87,11 +86,23 @@ Global
{A0477DE6-08C7-4793-A8B6-9974F2675AC7}.Release|x86.ActiveCfg = Release|Any CPU
{A0477DE6-08C7-4793-A8B6-9974F2675AC7}.Release|x86.Build.0 = Release|Any CPU
{A0477DE6-08C7-4793-A8B6-9974F2675AC7}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {A0477DE6-08C7-4793-A8B6-9974F2675AC7}.Checked|Any CPU.Build.0 = Debug|Any CPU
{A0477DE6-08C7-4793-A8B6-9974F2675AC7}.Checked|x64.ActiveCfg = Debug|Any CPU
- {A0477DE6-08C7-4793-A8B6-9974F2675AC7}.Checked|x64.Build.0 = Debug|Any CPU
{A0477DE6-08C7-4793-A8B6-9974F2675AC7}.Checked|x86.ActiveCfg = Debug|Any CPU
- {A0477DE6-08C7-4793-A8B6-9974F2675AC7}.Checked|x86.Build.0 = Debug|Any CPU
+ {1514879C-1F8B-41EB-8DD3-5A418FE2FF13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1514879C-1F8B-41EB-8DD3-5A418FE2FF13}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1514879C-1F8B-41EB-8DD3-5A418FE2FF13}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {1514879C-1F8B-41EB-8DD3-5A418FE2FF13}.Debug|x64.Build.0 = Debug|Any CPU
+ {1514879C-1F8B-41EB-8DD3-5A418FE2FF13}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {1514879C-1F8B-41EB-8DD3-5A418FE2FF13}.Debug|x86.Build.0 = Debug|Any CPU
+ {1514879C-1F8B-41EB-8DD3-5A418FE2FF13}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1514879C-1F8B-41EB-8DD3-5A418FE2FF13}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1514879C-1F8B-41EB-8DD3-5A418FE2FF13}.Release|x64.ActiveCfg = Release|Any CPU
+ {1514879C-1F8B-41EB-8DD3-5A418FE2FF13}.Release|x64.Build.0 = Release|Any CPU
+ {1514879C-1F8B-41EB-8DD3-5A418FE2FF13}.Release|x86.ActiveCfg = Release|Any CPU
+ {1514879C-1F8B-41EB-8DD3-5A418FE2FF13}.Release|x86.Build.0 = Release|Any CPU
+ {1514879C-1F8B-41EB-8DD3-5A418FE2FF13}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {1514879C-1F8B-41EB-8DD3-5A418FE2FF13}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {1514879C-1F8B-41EB-8DD3-5A418FE2FF13}.Checked|x86.ActiveCfg = Debug|Any CPU
{879D329A-C5F7-46DE-887F-12928E015C8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{879D329A-C5F7-46DE-887F-12928E015C8C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{879D329A-C5F7-46DE-887F-12928E015C8C}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -105,11 +116,8 @@ Global
{879D329A-C5F7-46DE-887F-12928E015C8C}.Release|x86.ActiveCfg = Release|Any CPU
{879D329A-C5F7-46DE-887F-12928E015C8C}.Release|x86.Build.0 = Release|Any CPU
{879D329A-C5F7-46DE-887F-12928E015C8C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {879D329A-C5F7-46DE-887F-12928E015C8C}.Checked|Any CPU.Build.0 = Debug|Any CPU
{879D329A-C5F7-46DE-887F-12928E015C8C}.Checked|x64.ActiveCfg = Debug|Any CPU
- {879D329A-C5F7-46DE-887F-12928E015C8C}.Checked|x64.Build.0 = Debug|Any CPU
{879D329A-C5F7-46DE-887F-12928E015C8C}.Checked|x86.ActiveCfg = Debug|Any CPU
- {879D329A-C5F7-46DE-887F-12928E015C8C}.Checked|x86.Build.0 = Debug|Any CPU
{25E8CA91-84A5-4917-90A2-5E077734B0B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{25E8CA91-84A5-4917-90A2-5E077734B0B7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{25E8CA91-84A5-4917-90A2-5E077734B0B7}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -123,11 +131,8 @@ Global
{25E8CA91-84A5-4917-90A2-5E077734B0B7}.Release|x86.ActiveCfg = Release|Any CPU
{25E8CA91-84A5-4917-90A2-5E077734B0B7}.Release|x86.Build.0 = Release|Any CPU
{25E8CA91-84A5-4917-90A2-5E077734B0B7}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {25E8CA91-84A5-4917-90A2-5E077734B0B7}.Checked|Any CPU.Build.0 = Debug|Any CPU
{25E8CA91-84A5-4917-90A2-5E077734B0B7}.Checked|x64.ActiveCfg = Debug|Any CPU
- {25E8CA91-84A5-4917-90A2-5E077734B0B7}.Checked|x64.Build.0 = Debug|Any CPU
{25E8CA91-84A5-4917-90A2-5E077734B0B7}.Checked|x86.ActiveCfg = Debug|Any CPU
- {25E8CA91-84A5-4917-90A2-5E077734B0B7}.Checked|x86.Build.0 = Debug|Any CPU
{F0449B99-5228-476B-A571-9A805A3439EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F0449B99-5228-476B-A571-9A805A3439EA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F0449B99-5228-476B-A571-9A805A3439EA}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -141,11 +146,8 @@ Global
{F0449B99-5228-476B-A571-9A805A3439EA}.Release|x86.ActiveCfg = Release|Any CPU
{F0449B99-5228-476B-A571-9A805A3439EA}.Release|x86.Build.0 = Release|Any CPU
{F0449B99-5228-476B-A571-9A805A3439EA}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {F0449B99-5228-476B-A571-9A805A3439EA}.Checked|Any CPU.Build.0 = Debug|Any CPU
{F0449B99-5228-476B-A571-9A805A3439EA}.Checked|x64.ActiveCfg = Debug|Any CPU
- {F0449B99-5228-476B-A571-9A805A3439EA}.Checked|x64.Build.0 = Debug|Any CPU
{F0449B99-5228-476B-A571-9A805A3439EA}.Checked|x86.ActiveCfg = Debug|Any CPU
- {F0449B99-5228-476B-A571-9A805A3439EA}.Checked|x86.Build.0 = Debug|Any CPU
{8C762956-7AB1-4806-9144-5E13771CB22B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8C762956-7AB1-4806-9144-5E13771CB22B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8C762956-7AB1-4806-9144-5E13771CB22B}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -159,11 +161,8 @@ Global
{8C762956-7AB1-4806-9144-5E13771CB22B}.Release|x86.ActiveCfg = Release|Any CPU
{8C762956-7AB1-4806-9144-5E13771CB22B}.Release|x86.Build.0 = Release|Any CPU
{8C762956-7AB1-4806-9144-5E13771CB22B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {8C762956-7AB1-4806-9144-5E13771CB22B}.Checked|Any CPU.Build.0 = Debug|Any CPU
{8C762956-7AB1-4806-9144-5E13771CB22B}.Checked|x64.ActiveCfg = Debug|Any CPU
- {8C762956-7AB1-4806-9144-5E13771CB22B}.Checked|x64.Build.0 = Debug|Any CPU
{8C762956-7AB1-4806-9144-5E13771CB22B}.Checked|x86.ActiveCfg = Debug|Any CPU
- {8C762956-7AB1-4806-9144-5E13771CB22B}.Checked|x86.Build.0 = Debug|Any CPU
{53FBD913-F587-441B-951A-195F65041CF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{53FBD913-F587-441B-951A-195F65041CF7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{53FBD913-F587-441B-951A-195F65041CF7}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -177,11 +176,8 @@ Global
{53FBD913-F587-441B-951A-195F65041CF7}.Release|x86.ActiveCfg = Release|Any CPU
{53FBD913-F587-441B-951A-195F65041CF7}.Release|x86.Build.0 = Release|Any CPU
{53FBD913-F587-441B-951A-195F65041CF7}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {53FBD913-F587-441B-951A-195F65041CF7}.Checked|Any CPU.Build.0 = Debug|Any CPU
{53FBD913-F587-441B-951A-195F65041CF7}.Checked|x64.ActiveCfg = Debug|Any CPU
- {53FBD913-F587-441B-951A-195F65041CF7}.Checked|x64.Build.0 = Debug|Any CPU
{53FBD913-F587-441B-951A-195F65041CF7}.Checked|x86.ActiveCfg = Debug|Any CPU
- {53FBD913-F587-441B-951A-195F65041CF7}.Checked|x86.Build.0 = Debug|Any CPU
{A8372DA8-B1DD-41ED-AD2C-C74DD5EE51D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A8372DA8-B1DD-41ED-AD2C-C74DD5EE51D8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A8372DA8-B1DD-41ED-AD2C-C74DD5EE51D8}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -195,11 +191,8 @@ Global
{A8372DA8-B1DD-41ED-AD2C-C74DD5EE51D8}.Release|x86.ActiveCfg = Release|Any CPU
{A8372DA8-B1DD-41ED-AD2C-C74DD5EE51D8}.Release|x86.Build.0 = Release|Any CPU
{A8372DA8-B1DD-41ED-AD2C-C74DD5EE51D8}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {A8372DA8-B1DD-41ED-AD2C-C74DD5EE51D8}.Checked|Any CPU.Build.0 = Debug|Any CPU
{A8372DA8-B1DD-41ED-AD2C-C74DD5EE51D8}.Checked|x64.ActiveCfg = Debug|Any CPU
- {A8372DA8-B1DD-41ED-AD2C-C74DD5EE51D8}.Checked|x64.Build.0 = Debug|Any CPU
{A8372DA8-B1DD-41ED-AD2C-C74DD5EE51D8}.Checked|x86.ActiveCfg = Debug|Any CPU
- {A8372DA8-B1DD-41ED-AD2C-C74DD5EE51D8}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -212,6 +205,7 @@ Global
{A0477DE6-08C7-4793-A8B6-9974F2675AC7} = {BC4D3352-CF0C-44FA-8829-2845DEA0CC75}
{879D329A-C5F7-46DE-887F-12928E015C8C} = {BC4D3352-CF0C-44FA-8829-2845DEA0CC75}
{25E8CA91-84A5-4917-90A2-5E077734B0B7} = {BC4D3352-CF0C-44FA-8829-2845DEA0CC75}
+ {1514879C-1F8B-41EB-8DD3-5A418FE2FF13} = {AF511BE2-5550-4D73-921E-500E98B26AA0}
{F0449B99-5228-476B-A571-9A805A3439EA} = {AF511BE2-5550-4D73-921E-500E98B26AA0}
{8C762956-7AB1-4806-9144-5E13771CB22B} = {AF511BE2-5550-4D73-921E-500E98B26AA0}
EndGlobalSection
diff --git a/src/libraries/System.Threading.Tasks/tests/Task/TaskRtTests.cs b/src/libraries/System.Threading.Tasks/tests/Task/TaskRtTests.cs
index ffb2437aa4b..b2f69398af4 100644
--- a/src/libraries/System.Threading.Tasks/tests/Task/TaskRtTests.cs
+++ b/src/libraries/System.Threading.Tasks/tests/Task/TaskRtTests.cs
@@ -512,6 +512,21 @@ namespace System.Threading.Tasks.Tests
Assert.Same(Task.FromResult(UIntPtr.Zero), Task.FromResult(UIntPtr.Zero));
Assert.Equal(UIntPtr.Zero, Task.FromResult(UIntPtr.Zero).Result);
+ Assert.Same(Task.FromResult((Half)default), Task.FromResult((Half)default));
+ Assert.Equal((Half)default, Task.FromResult((Half)default).Result);
+
+ Assert.Same(Task.FromResult((float)default), Task.FromResult((float)default));
+ Assert.Equal((float)default, Task.FromResult((float)default).Result);
+
+ Assert.Same(Task.FromResult((double)default), Task.FromResult((double)default));
+ Assert.Equal((double)default, Task.FromResult((double)default).Result);
+
+ Assert.Same(Task.FromResult((TimeSpan)default), Task.FromResult((TimeSpan)default));
+ Assert.Equal((TimeSpan)default, Task.FromResult((TimeSpan)default).Result);
+
+ Assert.Same(Task.FromResult((DateTime)default), Task.FromResult((DateTime)default));
+ Assert.Equal((DateTime)default, Task.FromResult((DateTime)default).Result);
+
Assert.Same(Task.FromResult((object)null), Task.FromResult((object)null));
Assert.Null(Task.FromResult((object)null).Result);
@@ -526,10 +541,11 @@ namespace System.Threading.Tasks.Tests
Assert.Equal(i, Task.FromResult(i).Result);
}
- Assert.NotSame(Task.FromResult((double)0), Task.FromResult((double)0));
- Assert.NotSame(Task.FromResult((float)0), Task.FromResult((float)0));
- Assert.NotSame(Task.FromResult((decimal)0), Task.FromResult((decimal)0));
- Assert.NotSame(Task.FromResult((Half)0), Task.FromResult((Half)0));
+ Assert.NotSame(Task.FromResult((double)(+0.0)), Task.FromResult((double)(-0.0)));
+ Assert.NotSame(Task.FromResult((float)(+0.0)), Task.FromResult((float)(-0.0)));
+ Assert.NotSame(Task.FromResult((Half)(+0.0)), Task.FromResult((Half)(-0.0)));
+
+ Assert.NotSame(Task.FromResult((decimal)default), Task.FromResult((decimal)default));
}
[Fact]
diff --git a/src/libraries/System.Threading.Thread/System.Threading.Thread.sln b/src/libraries/System.Threading.Thread/System.Threading.Thread.sln
index cc121ed9ac7..a7a03139617 100644
--- a/src/libraries/System.Threading.Thread/System.Threading.Thread.sln
+++ b/src/libraries/System.Threading.Thread/System.Threading.Thread.sln
@@ -5,6 +5,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{566DB44F-5EF1-4421-B09A-F202E76935A9}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{2747DCC0-980A-4679-8D41-AC1DA06D2BD6}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{B61C780A-7952-4981-842B-4771E7724F63}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{678A6F6C-BFF2-46BC-B512-745F32C229F6}"
@@ -77,11 +79,8 @@ Global
{BF6A7CA7-DDF9-44D4-AD00-D807765663F9}.Release|x86.ActiveCfg = Release|Any CPU
{BF6A7CA7-DDF9-44D4-AD00-D807765663F9}.Release|x86.Build.0 = Release|Any CPU
{BF6A7CA7-DDF9-44D4-AD00-D807765663F9}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {BF6A7CA7-DDF9-44D4-AD00-D807765663F9}.Checked|Any CPU.Build.0 = Debug|Any CPU
{BF6A7CA7-DDF9-44D4-AD00-D807765663F9}.Checked|x64.ActiveCfg = Debug|Any CPU
- {BF6A7CA7-DDF9-44D4-AD00-D807765663F9}.Checked|x64.Build.0 = Debug|Any CPU
{BF6A7CA7-DDF9-44D4-AD00-D807765663F9}.Checked|x86.ActiveCfg = Debug|Any CPU
- {BF6A7CA7-DDF9-44D4-AD00-D807765663F9}.Checked|x86.Build.0 = Debug|Any CPU
{566DB44F-5EF1-4421-B09A-F202E76935A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{566DB44F-5EF1-4421-B09A-F202E76935A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{566DB44F-5EF1-4421-B09A-F202E76935A9}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -95,11 +94,23 @@ Global
{566DB44F-5EF1-4421-B09A-F202E76935A9}.Release|x86.ActiveCfg = Release|Any CPU
{566DB44F-5EF1-4421-B09A-F202E76935A9}.Release|x86.Build.0 = Release|Any CPU
{566DB44F-5EF1-4421-B09A-F202E76935A9}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {566DB44F-5EF1-4421-B09A-F202E76935A9}.Checked|Any CPU.Build.0 = Debug|Any CPU
{566DB44F-5EF1-4421-B09A-F202E76935A9}.Checked|x64.ActiveCfg = Debug|Any CPU
- {566DB44F-5EF1-4421-B09A-F202E76935A9}.Checked|x64.Build.0 = Debug|Any CPU
{566DB44F-5EF1-4421-B09A-F202E76935A9}.Checked|x86.ActiveCfg = Debug|Any CPU
- {566DB44F-5EF1-4421-B09A-F202E76935A9}.Checked|x86.Build.0 = Debug|Any CPU
+ {2747DCC0-980A-4679-8D41-AC1DA06D2BD6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2747DCC0-980A-4679-8D41-AC1DA06D2BD6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2747DCC0-980A-4679-8D41-AC1DA06D2BD6}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {2747DCC0-980A-4679-8D41-AC1DA06D2BD6}.Debug|x64.Build.0 = Debug|Any CPU
+ {2747DCC0-980A-4679-8D41-AC1DA06D2BD6}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {2747DCC0-980A-4679-8D41-AC1DA06D2BD6}.Debug|x86.Build.0 = Debug|Any CPU
+ {2747DCC0-980A-4679-8D41-AC1DA06D2BD6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2747DCC0-980A-4679-8D41-AC1DA06D2BD6}.Release|Any CPU.Build.0 = Release|Any CPU
+ {2747DCC0-980A-4679-8D41-AC1DA06D2BD6}.Release|x64.ActiveCfg = Release|Any CPU
+ {2747DCC0-980A-4679-8D41-AC1DA06D2BD6}.Release|x64.Build.0 = Release|Any CPU
+ {2747DCC0-980A-4679-8D41-AC1DA06D2BD6}.Release|x86.ActiveCfg = Release|Any CPU
+ {2747DCC0-980A-4679-8D41-AC1DA06D2BD6}.Release|x86.Build.0 = Release|Any CPU
+ {2747DCC0-980A-4679-8D41-AC1DA06D2BD6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {2747DCC0-980A-4679-8D41-AC1DA06D2BD6}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {2747DCC0-980A-4679-8D41-AC1DA06D2BD6}.Checked|x86.ActiveCfg = Debug|Any CPU
{B61C780A-7952-4981-842B-4771E7724F63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B61C780A-7952-4981-842B-4771E7724F63}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B61C780A-7952-4981-842B-4771E7724F63}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -113,11 +124,8 @@ Global
{B61C780A-7952-4981-842B-4771E7724F63}.Release|x86.ActiveCfg = Release|Any CPU
{B61C780A-7952-4981-842B-4771E7724F63}.Release|x86.Build.0 = Release|Any CPU
{B61C780A-7952-4981-842B-4771E7724F63}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {B61C780A-7952-4981-842B-4771E7724F63}.Checked|Any CPU.Build.0 = Debug|Any CPU
{B61C780A-7952-4981-842B-4771E7724F63}.Checked|x64.ActiveCfg = Debug|Any CPU
- {B61C780A-7952-4981-842B-4771E7724F63}.Checked|x64.Build.0 = Debug|Any CPU
{B61C780A-7952-4981-842B-4771E7724F63}.Checked|x86.ActiveCfg = Debug|Any CPU
- {B61C780A-7952-4981-842B-4771E7724F63}.Checked|x86.Build.0 = Debug|Any CPU
{678A6F6C-BFF2-46BC-B512-745F32C229F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{678A6F6C-BFF2-46BC-B512-745F32C229F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{678A6F6C-BFF2-46BC-B512-745F32C229F6}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -131,11 +139,8 @@ Global
{678A6F6C-BFF2-46BC-B512-745F32C229F6}.Release|x86.ActiveCfg = Release|Any CPU
{678A6F6C-BFF2-46BC-B512-745F32C229F6}.Release|x86.Build.0 = Release|Any CPU
{678A6F6C-BFF2-46BC-B512-745F32C229F6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {678A6F6C-BFF2-46BC-B512-745F32C229F6}.Checked|Any CPU.Build.0 = Debug|Any CPU
{678A6F6C-BFF2-46BC-B512-745F32C229F6}.Checked|x64.ActiveCfg = Debug|Any CPU
- {678A6F6C-BFF2-46BC-B512-745F32C229F6}.Checked|x64.Build.0 = Debug|Any CPU
{678A6F6C-BFF2-46BC-B512-745F32C229F6}.Checked|x86.ActiveCfg = Debug|Any CPU
- {678A6F6C-BFF2-46BC-B512-745F32C229F6}.Checked|x86.Build.0 = Debug|Any CPU
{793E2BF9-9E41-49A4-ACED-9FF37AEFACBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{793E2BF9-9E41-49A4-ACED-9FF37AEFACBE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{793E2BF9-9E41-49A4-ACED-9FF37AEFACBE}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -149,11 +154,8 @@ Global
{793E2BF9-9E41-49A4-ACED-9FF37AEFACBE}.Release|x86.ActiveCfg = Release|Any CPU
{793E2BF9-9E41-49A4-ACED-9FF37AEFACBE}.Release|x86.Build.0 = Release|Any CPU
{793E2BF9-9E41-49A4-ACED-9FF37AEFACBE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {793E2BF9-9E41-49A4-ACED-9FF37AEFACBE}.Checked|Any CPU.Build.0 = Debug|Any CPU
{793E2BF9-9E41-49A4-ACED-9FF37AEFACBE}.Checked|x64.ActiveCfg = Debug|Any CPU
- {793E2BF9-9E41-49A4-ACED-9FF37AEFACBE}.Checked|x64.Build.0 = Debug|Any CPU
{793E2BF9-9E41-49A4-ACED-9FF37AEFACBE}.Checked|x86.ActiveCfg = Debug|Any CPU
- {793E2BF9-9E41-49A4-ACED-9FF37AEFACBE}.Checked|x86.Build.0 = Debug|Any CPU
{AD5C441F-05EA-452D-B3D2-514B304AA673}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AD5C441F-05EA-452D-B3D2-514B304AA673}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AD5C441F-05EA-452D-B3D2-514B304AA673}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -167,11 +169,8 @@ Global
{AD5C441F-05EA-452D-B3D2-514B304AA673}.Release|x86.ActiveCfg = Release|Any CPU
{AD5C441F-05EA-452D-B3D2-514B304AA673}.Release|x86.Build.0 = Release|Any CPU
{AD5C441F-05EA-452D-B3D2-514B304AA673}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {AD5C441F-05EA-452D-B3D2-514B304AA673}.Checked|Any CPU.Build.0 = Debug|Any CPU
{AD5C441F-05EA-452D-B3D2-514B304AA673}.Checked|x64.ActiveCfg = Debug|Any CPU
- {AD5C441F-05EA-452D-B3D2-514B304AA673}.Checked|x64.Build.0 = Debug|Any CPU
{AD5C441F-05EA-452D-B3D2-514B304AA673}.Checked|x86.ActiveCfg = Debug|Any CPU
- {AD5C441F-05EA-452D-B3D2-514B304AA673}.Checked|x86.Build.0 = Debug|Any CPU
{A73DCB15-F3DF-48CB-A4CA-62102E94122C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A73DCB15-F3DF-48CB-A4CA-62102E94122C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A73DCB15-F3DF-48CB-A4CA-62102E94122C}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -185,11 +184,8 @@ Global
{A73DCB15-F3DF-48CB-A4CA-62102E94122C}.Release|x86.ActiveCfg = Release|Any CPU
{A73DCB15-F3DF-48CB-A4CA-62102E94122C}.Release|x86.Build.0 = Release|Any CPU
{A73DCB15-F3DF-48CB-A4CA-62102E94122C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {A73DCB15-F3DF-48CB-A4CA-62102E94122C}.Checked|Any CPU.Build.0 = Debug|Any CPU
{A73DCB15-F3DF-48CB-A4CA-62102E94122C}.Checked|x64.ActiveCfg = Debug|Any CPU
- {A73DCB15-F3DF-48CB-A4CA-62102E94122C}.Checked|x64.Build.0 = Debug|Any CPU
{A73DCB15-F3DF-48CB-A4CA-62102E94122C}.Checked|x86.ActiveCfg = Debug|Any CPU
- {A73DCB15-F3DF-48CB-A4CA-62102E94122C}.Checked|x86.Build.0 = Debug|Any CPU
{12A6F314-B08D-417D-82EC-0D8799D7C1A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{12A6F314-B08D-417D-82EC-0D8799D7C1A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{12A6F314-B08D-417D-82EC-0D8799D7C1A2}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -203,11 +199,8 @@ Global
{12A6F314-B08D-417D-82EC-0D8799D7C1A2}.Release|x86.ActiveCfg = Release|Any CPU
{12A6F314-B08D-417D-82EC-0D8799D7C1A2}.Release|x86.Build.0 = Release|Any CPU
{12A6F314-B08D-417D-82EC-0D8799D7C1A2}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {12A6F314-B08D-417D-82EC-0D8799D7C1A2}.Checked|Any CPU.Build.0 = Debug|Any CPU
{12A6F314-B08D-417D-82EC-0D8799D7C1A2}.Checked|x64.ActiveCfg = Debug|Any CPU
- {12A6F314-B08D-417D-82EC-0D8799D7C1A2}.Checked|x64.Build.0 = Debug|Any CPU
{12A6F314-B08D-417D-82EC-0D8799D7C1A2}.Checked|x86.ActiveCfg = Debug|Any CPU
- {12A6F314-B08D-417D-82EC-0D8799D7C1A2}.Checked|x86.Build.0 = Debug|Any CPU
{F29BC05D-E596-4AF7-BFFC-D3E2BD8CB7AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F29BC05D-E596-4AF7-BFFC-D3E2BD8CB7AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F29BC05D-E596-4AF7-BFFC-D3E2BD8CB7AE}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -221,11 +214,8 @@ Global
{F29BC05D-E596-4AF7-BFFC-D3E2BD8CB7AE}.Release|x86.ActiveCfg = Release|Any CPU
{F29BC05D-E596-4AF7-BFFC-D3E2BD8CB7AE}.Release|x86.Build.0 = Release|Any CPU
{F29BC05D-E596-4AF7-BFFC-D3E2BD8CB7AE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {F29BC05D-E596-4AF7-BFFC-D3E2BD8CB7AE}.Checked|Any CPU.Build.0 = Debug|Any CPU
{F29BC05D-E596-4AF7-BFFC-D3E2BD8CB7AE}.Checked|x64.ActiveCfg = Debug|Any CPU
- {F29BC05D-E596-4AF7-BFFC-D3E2BD8CB7AE}.Checked|x64.Build.0 = Debug|Any CPU
{F29BC05D-E596-4AF7-BFFC-D3E2BD8CB7AE}.Checked|x86.ActiveCfg = Debug|Any CPU
- {F29BC05D-E596-4AF7-BFFC-D3E2BD8CB7AE}.Checked|x86.Build.0 = Debug|Any CPU
{33684F81-6E4B-4E90-A3B5-7C1BC02FF573}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{33684F81-6E4B-4E90-A3B5-7C1BC02FF573}.Debug|Any CPU.Build.0 = Debug|Any CPU
{33684F81-6E4B-4E90-A3B5-7C1BC02FF573}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -239,11 +229,8 @@ Global
{33684F81-6E4B-4E90-A3B5-7C1BC02FF573}.Release|x86.ActiveCfg = Release|Any CPU
{33684F81-6E4B-4E90-A3B5-7C1BC02FF573}.Release|x86.Build.0 = Release|Any CPU
{33684F81-6E4B-4E90-A3B5-7C1BC02FF573}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {33684F81-6E4B-4E90-A3B5-7C1BC02FF573}.Checked|Any CPU.Build.0 = Debug|Any CPU
{33684F81-6E4B-4E90-A3B5-7C1BC02FF573}.Checked|x64.ActiveCfg = Debug|Any CPU
- {33684F81-6E4B-4E90-A3B5-7C1BC02FF573}.Checked|x64.Build.0 = Debug|Any CPU
{33684F81-6E4B-4E90-A3B5-7C1BC02FF573}.Checked|x86.ActiveCfg = Debug|Any CPU
- {33684F81-6E4B-4E90-A3B5-7C1BC02FF573}.Checked|x86.Build.0 = Debug|Any CPU
{5093FB10-520B-45A1-942B-82AC0BC4FB3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5093FB10-520B-45A1-942B-82AC0BC4FB3F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5093FB10-520B-45A1-942B-82AC0BC4FB3F}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -257,11 +244,8 @@ Global
{5093FB10-520B-45A1-942B-82AC0BC4FB3F}.Release|x86.ActiveCfg = Release|Any CPU
{5093FB10-520B-45A1-942B-82AC0BC4FB3F}.Release|x86.Build.0 = Release|Any CPU
{5093FB10-520B-45A1-942B-82AC0BC4FB3F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {5093FB10-520B-45A1-942B-82AC0BC4FB3F}.Checked|Any CPU.Build.0 = Debug|Any CPU
{5093FB10-520B-45A1-942B-82AC0BC4FB3F}.Checked|x64.ActiveCfg = Debug|Any CPU
- {5093FB10-520B-45A1-942B-82AC0BC4FB3F}.Checked|x64.Build.0 = Debug|Any CPU
{5093FB10-520B-45A1-942B-82AC0BC4FB3F}.Checked|x86.ActiveCfg = Debug|Any CPU
- {5093FB10-520B-45A1-942B-82AC0BC4FB3F}.Checked|x86.Build.0 = Debug|Any CPU
{EDC3F7A0-3C48-4962-9D28-4EC6B7560F32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EDC3F7A0-3C48-4962-9D28-4EC6B7560F32}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EDC3F7A0-3C48-4962-9D28-4EC6B7560F32}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -275,11 +259,8 @@ Global
{EDC3F7A0-3C48-4962-9D28-4EC6B7560F32}.Release|x86.ActiveCfg = Release|Any CPU
{EDC3F7A0-3C48-4962-9D28-4EC6B7560F32}.Release|x86.Build.0 = Release|Any CPU
{EDC3F7A0-3C48-4962-9D28-4EC6B7560F32}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {EDC3F7A0-3C48-4962-9D28-4EC6B7560F32}.Checked|Any CPU.Build.0 = Debug|Any CPU
{EDC3F7A0-3C48-4962-9D28-4EC6B7560F32}.Checked|x64.ActiveCfg = Debug|Any CPU
- {EDC3F7A0-3C48-4962-9D28-4EC6B7560F32}.Checked|x64.Build.0 = Debug|Any CPU
{EDC3F7A0-3C48-4962-9D28-4EC6B7560F32}.Checked|x86.ActiveCfg = Debug|Any CPU
- {EDC3F7A0-3C48-4962-9D28-4EC6B7560F32}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -295,6 +276,7 @@ Global
{566DB44F-5EF1-4421-B09A-F202E76935A9} = {5B2563E3-FF5B-4DAD-A3B0-5E99B5054508}
{B61C780A-7952-4981-842B-4771E7724F63} = {5B2563E3-FF5B-4DAD-A3B0-5E99B5054508}
{678A6F6C-BFF2-46BC-B512-745F32C229F6} = {5B2563E3-FF5B-4DAD-A3B0-5E99B5054508}
+ {2747DCC0-980A-4679-8D41-AC1DA06D2BD6} = {CC8272C5-AC82-4A51-B88C-018FF4284B25}
{793E2BF9-9E41-49A4-ACED-9FF37AEFACBE} = {CC8272C5-AC82-4A51-B88C-018FF4284B25}
{AD5C441F-05EA-452D-B3D2-514B304AA673} = {CC8272C5-AC82-4A51-B88C-018FF4284B25}
{EDC3F7A0-3C48-4962-9D28-4EC6B7560F32} = {CC8272C5-AC82-4A51-B88C-018FF4284B25}
diff --git a/src/libraries/System.Threading.ThreadPool/System.Threading.ThreadPool.sln b/src/libraries/System.Threading.ThreadPool/System.Threading.ThreadPool.sln
index 84703f85c2c..037f900dcc5 100644
--- a/src/libraries/System.Threading.ThreadPool/System.Threading.ThreadPool.sln
+++ b/src/libraries/System.Threading.ThreadPool/System.Threading.ThreadPool.sln
@@ -5,6 +5,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{54E0AB0F-EB35-49AB-9A38-7C09FD7EC373}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{3156246A-939D-4232-90B3-FDE03A14BA90}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{B5732A3E-15DB-4BAA-A44C-41A7C29C68F0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{3A5BA59D-C1B6-492F-BF2C-FDE2C274E9B3}"
@@ -71,11 +73,8 @@ Global
{CD477FC8-AF27-46A2-A451-4A2D4C11600D}.Release|x86.ActiveCfg = Release|Any CPU
{CD477FC8-AF27-46A2-A451-4A2D4C11600D}.Release|x86.Build.0 = Release|Any CPU
{CD477FC8-AF27-46A2-A451-4A2D4C11600D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {CD477FC8-AF27-46A2-A451-4A2D4C11600D}.Checked|Any CPU.Build.0 = Debug|Any CPU
{CD477FC8-AF27-46A2-A451-4A2D4C11600D}.Checked|x64.ActiveCfg = Debug|Any CPU
- {CD477FC8-AF27-46A2-A451-4A2D4C11600D}.Checked|x64.Build.0 = Debug|Any CPU
{CD477FC8-AF27-46A2-A451-4A2D4C11600D}.Checked|x86.ActiveCfg = Debug|Any CPU
- {CD477FC8-AF27-46A2-A451-4A2D4C11600D}.Checked|x86.Build.0 = Debug|Any CPU
{54E0AB0F-EB35-49AB-9A38-7C09FD7EC373}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{54E0AB0F-EB35-49AB-9A38-7C09FD7EC373}.Debug|Any CPU.Build.0 = Debug|Any CPU
{54E0AB0F-EB35-49AB-9A38-7C09FD7EC373}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -89,11 +88,23 @@ Global
{54E0AB0F-EB35-49AB-9A38-7C09FD7EC373}.Release|x86.ActiveCfg = Release|Any CPU
{54E0AB0F-EB35-49AB-9A38-7C09FD7EC373}.Release|x86.Build.0 = Release|Any CPU
{54E0AB0F-EB35-49AB-9A38-7C09FD7EC373}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {54E0AB0F-EB35-49AB-9A38-7C09FD7EC373}.Checked|Any CPU.Build.0 = Debug|Any CPU
{54E0AB0F-EB35-49AB-9A38-7C09FD7EC373}.Checked|x64.ActiveCfg = Debug|Any CPU
- {54E0AB0F-EB35-49AB-9A38-7C09FD7EC373}.Checked|x64.Build.0 = Debug|Any CPU
{54E0AB0F-EB35-49AB-9A38-7C09FD7EC373}.Checked|x86.ActiveCfg = Debug|Any CPU
- {54E0AB0F-EB35-49AB-9A38-7C09FD7EC373}.Checked|x86.Build.0 = Debug|Any CPU
+ {3156246A-939D-4232-90B3-FDE03A14BA90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3156246A-939D-4232-90B3-FDE03A14BA90}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3156246A-939D-4232-90B3-FDE03A14BA90}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {3156246A-939D-4232-90B3-FDE03A14BA90}.Debug|x64.Build.0 = Debug|Any CPU
+ {3156246A-939D-4232-90B3-FDE03A14BA90}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {3156246A-939D-4232-90B3-FDE03A14BA90}.Debug|x86.Build.0 = Debug|Any CPU
+ {3156246A-939D-4232-90B3-FDE03A14BA90}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3156246A-939D-4232-90B3-FDE03A14BA90}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3156246A-939D-4232-90B3-FDE03A14BA90}.Release|x64.ActiveCfg = Release|Any CPU
+ {3156246A-939D-4232-90B3-FDE03A14BA90}.Release|x64.Build.0 = Release|Any CPU
+ {3156246A-939D-4232-90B3-FDE03A14BA90}.Release|x86.ActiveCfg = Release|Any CPU
+ {3156246A-939D-4232-90B3-FDE03A14BA90}.Release|x86.Build.0 = Release|Any CPU
+ {3156246A-939D-4232-90B3-FDE03A14BA90}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {3156246A-939D-4232-90B3-FDE03A14BA90}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {3156246A-939D-4232-90B3-FDE03A14BA90}.Checked|x86.ActiveCfg = Debug|Any CPU
{B5732A3E-15DB-4BAA-A44C-41A7C29C68F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B5732A3E-15DB-4BAA-A44C-41A7C29C68F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B5732A3E-15DB-4BAA-A44C-41A7C29C68F0}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -107,11 +118,8 @@ Global
{B5732A3E-15DB-4BAA-A44C-41A7C29C68F0}.Release|x86.ActiveCfg = Release|Any CPU
{B5732A3E-15DB-4BAA-A44C-41A7C29C68F0}.Release|x86.Build.0 = Release|Any CPU
{B5732A3E-15DB-4BAA-A44C-41A7C29C68F0}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {B5732A3E-15DB-4BAA-A44C-41A7C29C68F0}.Checked|Any CPU.Build.0 = Debug|Any CPU
{B5732A3E-15DB-4BAA-A44C-41A7C29C68F0}.Checked|x64.ActiveCfg = Debug|Any CPU
- {B5732A3E-15DB-4BAA-A44C-41A7C29C68F0}.Checked|x64.Build.0 = Debug|Any CPU
{B5732A3E-15DB-4BAA-A44C-41A7C29C68F0}.Checked|x86.ActiveCfg = Debug|Any CPU
- {B5732A3E-15DB-4BAA-A44C-41A7C29C68F0}.Checked|x86.Build.0 = Debug|Any CPU
{3A5BA59D-C1B6-492F-BF2C-FDE2C274E9B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3A5BA59D-C1B6-492F-BF2C-FDE2C274E9B3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3A5BA59D-C1B6-492F-BF2C-FDE2C274E9B3}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -125,11 +133,8 @@ Global
{3A5BA59D-C1B6-492F-BF2C-FDE2C274E9B3}.Release|x86.ActiveCfg = Release|Any CPU
{3A5BA59D-C1B6-492F-BF2C-FDE2C274E9B3}.Release|x86.Build.0 = Release|Any CPU
{3A5BA59D-C1B6-492F-BF2C-FDE2C274E9B3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {3A5BA59D-C1B6-492F-BF2C-FDE2C274E9B3}.Checked|Any CPU.Build.0 = Debug|Any CPU
{3A5BA59D-C1B6-492F-BF2C-FDE2C274E9B3}.Checked|x64.ActiveCfg = Debug|Any CPU
- {3A5BA59D-C1B6-492F-BF2C-FDE2C274E9B3}.Checked|x64.Build.0 = Debug|Any CPU
{3A5BA59D-C1B6-492F-BF2C-FDE2C274E9B3}.Checked|x86.ActiveCfg = Debug|Any CPU
- {3A5BA59D-C1B6-492F-BF2C-FDE2C274E9B3}.Checked|x86.Build.0 = Debug|Any CPU
{E8E31BA1-DC94-40F1-9606-6922941582DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E8E31BA1-DC94-40F1-9606-6922941582DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E8E31BA1-DC94-40F1-9606-6922941582DC}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -143,11 +148,8 @@ Global
{E8E31BA1-DC94-40F1-9606-6922941582DC}.Release|x86.ActiveCfg = Release|Any CPU
{E8E31BA1-DC94-40F1-9606-6922941582DC}.Release|x86.Build.0 = Release|Any CPU
{E8E31BA1-DC94-40F1-9606-6922941582DC}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {E8E31BA1-DC94-40F1-9606-6922941582DC}.Checked|Any CPU.Build.0 = Debug|Any CPU
{E8E31BA1-DC94-40F1-9606-6922941582DC}.Checked|x64.ActiveCfg = Debug|Any CPU
- {E8E31BA1-DC94-40F1-9606-6922941582DC}.Checked|x64.Build.0 = Debug|Any CPU
{E8E31BA1-DC94-40F1-9606-6922941582DC}.Checked|x86.ActiveCfg = Debug|Any CPU
- {E8E31BA1-DC94-40F1-9606-6922941582DC}.Checked|x86.Build.0 = Debug|Any CPU
{08FEC21B-875E-499A-B5CA-7D921B7A484B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{08FEC21B-875E-499A-B5CA-7D921B7A484B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{08FEC21B-875E-499A-B5CA-7D921B7A484B}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -161,11 +163,8 @@ Global
{08FEC21B-875E-499A-B5CA-7D921B7A484B}.Release|x86.ActiveCfg = Release|Any CPU
{08FEC21B-875E-499A-B5CA-7D921B7A484B}.Release|x86.Build.0 = Release|Any CPU
{08FEC21B-875E-499A-B5CA-7D921B7A484B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {08FEC21B-875E-499A-B5CA-7D921B7A484B}.Checked|Any CPU.Build.0 = Debug|Any CPU
{08FEC21B-875E-499A-B5CA-7D921B7A484B}.Checked|x64.ActiveCfg = Debug|Any CPU
- {08FEC21B-875E-499A-B5CA-7D921B7A484B}.Checked|x64.Build.0 = Debug|Any CPU
{08FEC21B-875E-499A-B5CA-7D921B7A484B}.Checked|x86.ActiveCfg = Debug|Any CPU
- {08FEC21B-875E-499A-B5CA-7D921B7A484B}.Checked|x86.Build.0 = Debug|Any CPU
{54134937-585D-48D5-AB60-79493BE2C9E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{54134937-585D-48D5-AB60-79493BE2C9E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{54134937-585D-48D5-AB60-79493BE2C9E7}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -179,11 +178,8 @@ Global
{54134937-585D-48D5-AB60-79493BE2C9E7}.Release|x86.ActiveCfg = Release|Any CPU
{54134937-585D-48D5-AB60-79493BE2C9E7}.Release|x86.Build.0 = Release|Any CPU
{54134937-585D-48D5-AB60-79493BE2C9E7}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {54134937-585D-48D5-AB60-79493BE2C9E7}.Checked|Any CPU.Build.0 = Debug|Any CPU
{54134937-585D-48D5-AB60-79493BE2C9E7}.Checked|x64.ActiveCfg = Debug|Any CPU
- {54134937-585D-48D5-AB60-79493BE2C9E7}.Checked|x64.Build.0 = Debug|Any CPU
{54134937-585D-48D5-AB60-79493BE2C9E7}.Checked|x86.ActiveCfg = Debug|Any CPU
- {54134937-585D-48D5-AB60-79493BE2C9E7}.Checked|x86.Build.0 = Debug|Any CPU
{53A0D29E-8633-4FF8-AB0E-86EF331DD379}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{53A0D29E-8633-4FF8-AB0E-86EF331DD379}.Debug|Any CPU.Build.0 = Debug|Any CPU
{53A0D29E-8633-4FF8-AB0E-86EF331DD379}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -197,11 +193,8 @@ Global
{53A0D29E-8633-4FF8-AB0E-86EF331DD379}.Release|x86.ActiveCfg = Release|Any CPU
{53A0D29E-8633-4FF8-AB0E-86EF331DD379}.Release|x86.Build.0 = Release|Any CPU
{53A0D29E-8633-4FF8-AB0E-86EF331DD379}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {53A0D29E-8633-4FF8-AB0E-86EF331DD379}.Checked|Any CPU.Build.0 = Debug|Any CPU
{53A0D29E-8633-4FF8-AB0E-86EF331DD379}.Checked|x64.ActiveCfg = Debug|Any CPU
- {53A0D29E-8633-4FF8-AB0E-86EF331DD379}.Checked|x64.Build.0 = Debug|Any CPU
{53A0D29E-8633-4FF8-AB0E-86EF331DD379}.Checked|x86.ActiveCfg = Debug|Any CPU
- {53A0D29E-8633-4FF8-AB0E-86EF331DD379}.Checked|x86.Build.0 = Debug|Any CPU
{71ACA28C-A4F1-4A07-A1B3-39DB86C11A75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{71ACA28C-A4F1-4A07-A1B3-39DB86C11A75}.Debug|Any CPU.Build.0 = Debug|Any CPU
{71ACA28C-A4F1-4A07-A1B3-39DB86C11A75}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -215,11 +208,8 @@ Global
{71ACA28C-A4F1-4A07-A1B3-39DB86C11A75}.Release|x86.ActiveCfg = Release|Any CPU
{71ACA28C-A4F1-4A07-A1B3-39DB86C11A75}.Release|x86.Build.0 = Release|Any CPU
{71ACA28C-A4F1-4A07-A1B3-39DB86C11A75}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {71ACA28C-A4F1-4A07-A1B3-39DB86C11A75}.Checked|Any CPU.Build.0 = Debug|Any CPU
{71ACA28C-A4F1-4A07-A1B3-39DB86C11A75}.Checked|x64.ActiveCfg = Debug|Any CPU
- {71ACA28C-A4F1-4A07-A1B3-39DB86C11A75}.Checked|x64.Build.0 = Debug|Any CPU
{71ACA28C-A4F1-4A07-A1B3-39DB86C11A75}.Checked|x86.ActiveCfg = Debug|Any CPU
- {71ACA28C-A4F1-4A07-A1B3-39DB86C11A75}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -232,6 +222,7 @@ Global
{54E0AB0F-EB35-49AB-9A38-7C09FD7EC373} = {1445280F-1F07-45C3-93BC-D4025720B5FE}
{B5732A3E-15DB-4BAA-A44C-41A7C29C68F0} = {1445280F-1F07-45C3-93BC-D4025720B5FE}
{3A5BA59D-C1B6-492F-BF2C-FDE2C274E9B3} = {1445280F-1F07-45C3-93BC-D4025720B5FE}
+ {3156246A-939D-4232-90B3-FDE03A14BA90} = {6A32653B-8FAC-4B01-A0E0-E6379DE90A1A}
{E8E31BA1-DC94-40F1-9606-6922941582DC} = {6A32653B-8FAC-4B01-A0E0-E6379DE90A1A}
{08FEC21B-875E-499A-B5CA-7D921B7A484B} = {6A32653B-8FAC-4B01-A0E0-E6379DE90A1A}
{54134937-585D-48D5-AB60-79493BE2C9E7} = {6A32653B-8FAC-4B01-A0E0-E6379DE90A1A}
diff --git a/src/libraries/System.Threading.Timer/System.Threading.Timer.sln b/src/libraries/System.Threading.Timer/System.Threading.Timer.sln
index 366576e1fed..8a7efd2029f 100644
--- a/src/libraries/System.Threading.Timer/System.Threading.Timer.sln
+++ b/src/libraries/System.Threading.Timer/System.Threading.Timer.sln
@@ -5,6 +5,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{629ACB77-0503-4501-8AD5-E574E3F498E6}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{4B11CB98-03AD-4511-9D62-D5F94B0BBC20}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{379EA015-CA7A-4D4E-BCEE-481CE1704C62}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{1B33BE1F-D914-465A-9E4D-460F22E3CB81}"
@@ -69,11 +71,8 @@ Global
{567E9CC8-5751-4786-BCC6-C2A6C38044DF}.Release|x86.ActiveCfg = Release|Any CPU
{567E9CC8-5751-4786-BCC6-C2A6C38044DF}.Release|x86.Build.0 = Release|Any CPU
{567E9CC8-5751-4786-BCC6-C2A6C38044DF}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {567E9CC8-5751-4786-BCC6-C2A6C38044DF}.Checked|Any CPU.Build.0 = Debug|Any CPU
{567E9CC8-5751-4786-BCC6-C2A6C38044DF}.Checked|x64.ActiveCfg = Debug|Any CPU
- {567E9CC8-5751-4786-BCC6-C2A6C38044DF}.Checked|x64.Build.0 = Debug|Any CPU
{567E9CC8-5751-4786-BCC6-C2A6C38044DF}.Checked|x86.ActiveCfg = Debug|Any CPU
- {567E9CC8-5751-4786-BCC6-C2A6C38044DF}.Checked|x86.Build.0 = Debug|Any CPU
{629ACB77-0503-4501-8AD5-E574E3F498E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{629ACB77-0503-4501-8AD5-E574E3F498E6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{629ACB77-0503-4501-8AD5-E574E3F498E6}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -87,11 +86,23 @@ Global
{629ACB77-0503-4501-8AD5-E574E3F498E6}.Release|x86.ActiveCfg = Release|Any CPU
{629ACB77-0503-4501-8AD5-E574E3F498E6}.Release|x86.Build.0 = Release|Any CPU
{629ACB77-0503-4501-8AD5-E574E3F498E6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {629ACB77-0503-4501-8AD5-E574E3F498E6}.Checked|Any CPU.Build.0 = Debug|Any CPU
{629ACB77-0503-4501-8AD5-E574E3F498E6}.Checked|x64.ActiveCfg = Debug|Any CPU
- {629ACB77-0503-4501-8AD5-E574E3F498E6}.Checked|x64.Build.0 = Debug|Any CPU
{629ACB77-0503-4501-8AD5-E574E3F498E6}.Checked|x86.ActiveCfg = Debug|Any CPU
- {629ACB77-0503-4501-8AD5-E574E3F498E6}.Checked|x86.Build.0 = Debug|Any CPU
+ {4B11CB98-03AD-4511-9D62-D5F94B0BBC20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4B11CB98-03AD-4511-9D62-D5F94B0BBC20}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4B11CB98-03AD-4511-9D62-D5F94B0BBC20}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {4B11CB98-03AD-4511-9D62-D5F94B0BBC20}.Debug|x64.Build.0 = Debug|Any CPU
+ {4B11CB98-03AD-4511-9D62-D5F94B0BBC20}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {4B11CB98-03AD-4511-9D62-D5F94B0BBC20}.Debug|x86.Build.0 = Debug|Any CPU
+ {4B11CB98-03AD-4511-9D62-D5F94B0BBC20}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4B11CB98-03AD-4511-9D62-D5F94B0BBC20}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4B11CB98-03AD-4511-9D62-D5F94B0BBC20}.Release|x64.ActiveCfg = Release|Any CPU
+ {4B11CB98-03AD-4511-9D62-D5F94B0BBC20}.Release|x64.Build.0 = Release|Any CPU
+ {4B11CB98-03AD-4511-9D62-D5F94B0BBC20}.Release|x86.ActiveCfg = Release|Any CPU
+ {4B11CB98-03AD-4511-9D62-D5F94B0BBC20}.Release|x86.Build.0 = Release|Any CPU
+ {4B11CB98-03AD-4511-9D62-D5F94B0BBC20}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {4B11CB98-03AD-4511-9D62-D5F94B0BBC20}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {4B11CB98-03AD-4511-9D62-D5F94B0BBC20}.Checked|x86.ActiveCfg = Debug|Any CPU
{379EA015-CA7A-4D4E-BCEE-481CE1704C62}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{379EA015-CA7A-4D4E-BCEE-481CE1704C62}.Debug|Any CPU.Build.0 = Debug|Any CPU
{379EA015-CA7A-4D4E-BCEE-481CE1704C62}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -105,11 +116,8 @@ Global
{379EA015-CA7A-4D4E-BCEE-481CE1704C62}.Release|x86.ActiveCfg = Release|Any CPU
{379EA015-CA7A-4D4E-BCEE-481CE1704C62}.Release|x86.Build.0 = Release|Any CPU
{379EA015-CA7A-4D4E-BCEE-481CE1704C62}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {379EA015-CA7A-4D4E-BCEE-481CE1704C62}.Checked|Any CPU.Build.0 = Debug|Any CPU
{379EA015-CA7A-4D4E-BCEE-481CE1704C62}.Checked|x64.ActiveCfg = Debug|Any CPU
- {379EA015-CA7A-4D4E-BCEE-481CE1704C62}.Checked|x64.Build.0 = Debug|Any CPU
{379EA015-CA7A-4D4E-BCEE-481CE1704C62}.Checked|x86.ActiveCfg = Debug|Any CPU
- {379EA015-CA7A-4D4E-BCEE-481CE1704C62}.Checked|x86.Build.0 = Debug|Any CPU
{1B33BE1F-D914-465A-9E4D-460F22E3CB81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1B33BE1F-D914-465A-9E4D-460F22E3CB81}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1B33BE1F-D914-465A-9E4D-460F22E3CB81}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -123,11 +131,8 @@ Global
{1B33BE1F-D914-465A-9E4D-460F22E3CB81}.Release|x86.ActiveCfg = Release|Any CPU
{1B33BE1F-D914-465A-9E4D-460F22E3CB81}.Release|x86.Build.0 = Release|Any CPU
{1B33BE1F-D914-465A-9E4D-460F22E3CB81}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {1B33BE1F-D914-465A-9E4D-460F22E3CB81}.Checked|Any CPU.Build.0 = Debug|Any CPU
{1B33BE1F-D914-465A-9E4D-460F22E3CB81}.Checked|x64.ActiveCfg = Debug|Any CPU
- {1B33BE1F-D914-465A-9E4D-460F22E3CB81}.Checked|x64.Build.0 = Debug|Any CPU
{1B33BE1F-D914-465A-9E4D-460F22E3CB81}.Checked|x86.ActiveCfg = Debug|Any CPU
- {1B33BE1F-D914-465A-9E4D-460F22E3CB81}.Checked|x86.Build.0 = Debug|Any CPU
{021CDB1E-9AFA-447F-954C-1F7D8244D70B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{021CDB1E-9AFA-447F-954C-1F7D8244D70B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{021CDB1E-9AFA-447F-954C-1F7D8244D70B}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -141,11 +146,8 @@ Global
{021CDB1E-9AFA-447F-954C-1F7D8244D70B}.Release|x86.ActiveCfg = Release|Any CPU
{021CDB1E-9AFA-447F-954C-1F7D8244D70B}.Release|x86.Build.0 = Release|Any CPU
{021CDB1E-9AFA-447F-954C-1F7D8244D70B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {021CDB1E-9AFA-447F-954C-1F7D8244D70B}.Checked|Any CPU.Build.0 = Debug|Any CPU
{021CDB1E-9AFA-447F-954C-1F7D8244D70B}.Checked|x64.ActiveCfg = Debug|Any CPU
- {021CDB1E-9AFA-447F-954C-1F7D8244D70B}.Checked|x64.Build.0 = Debug|Any CPU
{021CDB1E-9AFA-447F-954C-1F7D8244D70B}.Checked|x86.ActiveCfg = Debug|Any CPU
- {021CDB1E-9AFA-447F-954C-1F7D8244D70B}.Checked|x86.Build.0 = Debug|Any CPU
{CF3D7FED-A927-4611-891F-AB3516B71D44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CF3D7FED-A927-4611-891F-AB3516B71D44}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CF3D7FED-A927-4611-891F-AB3516B71D44}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -159,11 +161,8 @@ Global
{CF3D7FED-A927-4611-891F-AB3516B71D44}.Release|x86.ActiveCfg = Release|Any CPU
{CF3D7FED-A927-4611-891F-AB3516B71D44}.Release|x86.Build.0 = Release|Any CPU
{CF3D7FED-A927-4611-891F-AB3516B71D44}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {CF3D7FED-A927-4611-891F-AB3516B71D44}.Checked|Any CPU.Build.0 = Debug|Any CPU
{CF3D7FED-A927-4611-891F-AB3516B71D44}.Checked|x64.ActiveCfg = Debug|Any CPU
- {CF3D7FED-A927-4611-891F-AB3516B71D44}.Checked|x64.Build.0 = Debug|Any CPU
{CF3D7FED-A927-4611-891F-AB3516B71D44}.Checked|x86.ActiveCfg = Debug|Any CPU
- {CF3D7FED-A927-4611-891F-AB3516B71D44}.Checked|x86.Build.0 = Debug|Any CPU
{2B942D1B-20DE-427E-9D46-F1C513C7FFF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2B942D1B-20DE-427E-9D46-F1C513C7FFF5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2B942D1B-20DE-427E-9D46-F1C513C7FFF5}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -177,11 +176,8 @@ Global
{2B942D1B-20DE-427E-9D46-F1C513C7FFF5}.Release|x86.ActiveCfg = Release|Any CPU
{2B942D1B-20DE-427E-9D46-F1C513C7FFF5}.Release|x86.Build.0 = Release|Any CPU
{2B942D1B-20DE-427E-9D46-F1C513C7FFF5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {2B942D1B-20DE-427E-9D46-F1C513C7FFF5}.Checked|Any CPU.Build.0 = Debug|Any CPU
{2B942D1B-20DE-427E-9D46-F1C513C7FFF5}.Checked|x64.ActiveCfg = Debug|Any CPU
- {2B942D1B-20DE-427E-9D46-F1C513C7FFF5}.Checked|x64.Build.0 = Debug|Any CPU
{2B942D1B-20DE-427E-9D46-F1C513C7FFF5}.Checked|x86.ActiveCfg = Debug|Any CPU
- {2B942D1B-20DE-427E-9D46-F1C513C7FFF5}.Checked|x86.Build.0 = Debug|Any CPU
{DAB761D6-EDD5-4F57-9BDE-E26589057403}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DAB761D6-EDD5-4F57-9BDE-E26589057403}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DAB761D6-EDD5-4F57-9BDE-E26589057403}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -195,11 +191,8 @@ Global
{DAB761D6-EDD5-4F57-9BDE-E26589057403}.Release|x86.ActiveCfg = Release|Any CPU
{DAB761D6-EDD5-4F57-9BDE-E26589057403}.Release|x86.Build.0 = Release|Any CPU
{DAB761D6-EDD5-4F57-9BDE-E26589057403}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {DAB761D6-EDD5-4F57-9BDE-E26589057403}.Checked|Any CPU.Build.0 = Debug|Any CPU
{DAB761D6-EDD5-4F57-9BDE-E26589057403}.Checked|x64.ActiveCfg = Debug|Any CPU
- {DAB761D6-EDD5-4F57-9BDE-E26589057403}.Checked|x64.Build.0 = Debug|Any CPU
{DAB761D6-EDD5-4F57-9BDE-E26589057403}.Checked|x86.ActiveCfg = Debug|Any CPU
- {DAB761D6-EDD5-4F57-9BDE-E26589057403}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -212,6 +205,7 @@ Global
{629ACB77-0503-4501-8AD5-E574E3F498E6} = {F0CC3A5B-3AF1-4351-982F-0EAB2D705A55}
{379EA015-CA7A-4D4E-BCEE-481CE1704C62} = {F0CC3A5B-3AF1-4351-982F-0EAB2D705A55}
{1B33BE1F-D914-465A-9E4D-460F22E3CB81} = {F0CC3A5B-3AF1-4351-982F-0EAB2D705A55}
+ {4B11CB98-03AD-4511-9D62-D5F94B0BBC20} = {CDBD0CE5-05CC-42B7-B111-FA46C0EEB657}
{021CDB1E-9AFA-447F-954C-1F7D8244D70B} = {CDBD0CE5-05CC-42B7-B111-FA46C0EEB657}
{CF3D7FED-A927-4611-891F-AB3516B71D44} = {CDBD0CE5-05CC-42B7-B111-FA46C0EEB657}
EndGlobalSection
diff --git a/src/libraries/System.Threading/System.Threading.sln b/src/libraries/System.Threading/System.Threading.sln
index 8c76a46e3ee..d2f9dc397fb 100644
--- a/src/libraries/System.Threading/System.Threading.sln
+++ b/src/libraries/System.Threading/System.Threading.sln
@@ -5,6 +5,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{AB7F1F45-5C20-40C7-B6DA-192B37012DD8}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{7B40C562-C082-451C-8281-5088EBFE0079}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{80B607B4-4860-4E0E-B9A1-2AD24A9C72DE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{155B2ACA-D7B6-472E-90F9-5F68E62F7432}"
@@ -69,11 +71,8 @@ Global
{387778C0-0405-4FE2-9D85-034254EAAD46}.Release|x86.ActiveCfg = Release|Any CPU
{387778C0-0405-4FE2-9D85-034254EAAD46}.Release|x86.Build.0 = Release|Any CPU
{387778C0-0405-4FE2-9D85-034254EAAD46}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {387778C0-0405-4FE2-9D85-034254EAAD46}.Checked|Any CPU.Build.0 = Debug|Any CPU
{387778C0-0405-4FE2-9D85-034254EAAD46}.Checked|x64.ActiveCfg = Debug|Any CPU
- {387778C0-0405-4FE2-9D85-034254EAAD46}.Checked|x64.Build.0 = Debug|Any CPU
{387778C0-0405-4FE2-9D85-034254EAAD46}.Checked|x86.ActiveCfg = Debug|Any CPU
- {387778C0-0405-4FE2-9D85-034254EAAD46}.Checked|x86.Build.0 = Debug|Any CPU
{AB7F1F45-5C20-40C7-B6DA-192B37012DD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AB7F1F45-5C20-40C7-B6DA-192B37012DD8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AB7F1F45-5C20-40C7-B6DA-192B37012DD8}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -87,11 +86,23 @@ Global
{AB7F1F45-5C20-40C7-B6DA-192B37012DD8}.Release|x86.ActiveCfg = Release|Any CPU
{AB7F1F45-5C20-40C7-B6DA-192B37012DD8}.Release|x86.Build.0 = Release|Any CPU
{AB7F1F45-5C20-40C7-B6DA-192B37012DD8}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {AB7F1F45-5C20-40C7-B6DA-192B37012DD8}.Checked|Any CPU.Build.0 = Debug|Any CPU
{AB7F1F45-5C20-40C7-B6DA-192B37012DD8}.Checked|x64.ActiveCfg = Debug|Any CPU
- {AB7F1F45-5C20-40C7-B6DA-192B37012DD8}.Checked|x64.Build.0 = Debug|Any CPU
{AB7F1F45-5C20-40C7-B6DA-192B37012DD8}.Checked|x86.ActiveCfg = Debug|Any CPU
- {AB7F1F45-5C20-40C7-B6DA-192B37012DD8}.Checked|x86.Build.0 = Debug|Any CPU
+ {7B40C562-C082-451C-8281-5088EBFE0079}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7B40C562-C082-451C-8281-5088EBFE0079}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7B40C562-C082-451C-8281-5088EBFE0079}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {7B40C562-C082-451C-8281-5088EBFE0079}.Debug|x64.Build.0 = Debug|Any CPU
+ {7B40C562-C082-451C-8281-5088EBFE0079}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {7B40C562-C082-451C-8281-5088EBFE0079}.Debug|x86.Build.0 = Debug|Any CPU
+ {7B40C562-C082-451C-8281-5088EBFE0079}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7B40C562-C082-451C-8281-5088EBFE0079}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7B40C562-C082-451C-8281-5088EBFE0079}.Release|x64.ActiveCfg = Release|Any CPU
+ {7B40C562-C082-451C-8281-5088EBFE0079}.Release|x64.Build.0 = Release|Any CPU
+ {7B40C562-C082-451C-8281-5088EBFE0079}.Release|x86.ActiveCfg = Release|Any CPU
+ {7B40C562-C082-451C-8281-5088EBFE0079}.Release|x86.Build.0 = Release|Any CPU
+ {7B40C562-C082-451C-8281-5088EBFE0079}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+ {7B40C562-C082-451C-8281-5088EBFE0079}.Checked|x64.ActiveCfg = Debug|Any CPU
+ {7B40C562-C082-451C-8281-5088EBFE0079}.Checked|x86.ActiveCfg = Debug|Any CPU
{80B607B4-4860-4E0E-B9A1-2AD24A9C72DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{80B607B4-4860-4E0E-B9A1-2AD24A9C72DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{80B607B4-4860-4E0E-B9A1-2AD24A9C72DE}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -105,11 +116,8 @@ Global
{80B607B4-4860-4E0E-B9A1-2AD24A9C72DE}.Release|x86.ActiveCfg = Release|Any CPU
{80B607B4-4860-4E0E-B9A1-2AD24A9C72DE}.Release|x86.Build.0 = Release|Any CPU
{80B607B4-4860-4E0E-B9A1-2AD24A9C72DE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {80B607B4-4860-4E0E-B9A1-2AD24A9C72DE}.Checked|Any CPU.Build.0 = Debug|Any CPU
{80B607B4-4860-4E0E-B9A1-2AD24A9C72DE}.Checked|x64.ActiveCfg = Debug|Any CPU
- {80B607B4-4860-4E0E-B9A1-2AD24A9C72DE}.Checked|x64.Build.0 = Debug|Any CPU
{80B607B4-4860-4E0E-B9A1-2AD24A9C72DE}.Checked|x86.ActiveCfg = Debug|Any CPU
- {80B607B4-4860-4E0E-B9A1-2AD24A9C72DE}.Checked|x86.Build.0 = Debug|Any CPU
{155B2ACA-D7B6-472E-90F9-5F68E62F7432}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{155B2ACA-D7B6-472E-90F9-5F68E62F7432}.Debug|Any CPU.Build.0 = Debug|Any CPU
{155B2ACA-D7B6-472E-90F9-5F68E62F7432}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -123,11 +131,8 @@ Global
{155B2ACA-D7B6-472E-90F9-5F68E62F7432}.Release|x86.ActiveCfg = Release|Any CPU
{155B2ACA-D7B6-472E-90F9-5F68E62F7432}.Release|x86.Build.0 = Release|Any CPU
{155B2ACA-D7B6-472E-90F9-5F68E62F7432}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {155B2ACA-D7B6-472E-90F9-5F68E62F7432}.Checked|Any CPU.Build.0 = Debug|Any CPU
{155B2ACA-D7B6-472E-90F9-5F68E62F7432}.Checked|x64.ActiveCfg = Debug|Any CPU
- {155B2ACA-D7B6-472E-90F9-5F68E62F7432}.Checked|x64.Build.0 = Debug|Any CPU
{155B2ACA-D7B6-472E-90F9-5F68E62F7432}.Checked|x86.ActiveCfg = Debug|Any CPU
- {155B2ACA-D7B6-472E-90F9-5F68E62F7432}.Checked|x86.Build.0 = Debug|Any CPU
{C6F7ADFF-7D13-4773-B886-48F51809F73E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C6F7ADFF-7D13-4773-B886-48F51809F73E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C6F7ADFF-7D13-4773-B886-48F51809F73E}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -141,11 +146,8 @@ Global
{C6F7ADFF-7D13-4773-B886-48F51809F73E}.Release|x86.ActiveCfg = Release|Any CPU
{C6F7ADFF-7D13-4773-B886-48F51809F73E}.Release|x86.Build.0 = Release|Any CPU
{C6F7ADFF-7D13-4773-B886-48F51809F73E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {C6F7ADFF-7D13-4773-B886-48F51809F73E}.Checked|Any CPU.Build.0 = Debug|Any CPU
{C6F7ADFF-7D13-4773-B886-48F51809F73E}.Checked|x64.ActiveCfg = Debug|Any CPU
- {C6F7ADFF-7D13-4773-B886-48F51809F73E}.Checked|x64.Build.0 = Debug|Any CPU
{C6F7ADFF-7D13-4773-B886-48F51809F73E}.Checked|x86.ActiveCfg = Debug|Any CPU
- {C6F7ADFF-7D13-4773-B886-48F51809F73E}.Checked|x86.Build.0 = Debug|Any CPU
{0B7B0E9C-6B63-42F2-ABFF-DB46EE7EAD49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0B7B0E9C-6B63-42F2-ABFF-DB46EE7EAD49}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0B7B0E9C-6B63-42F2-ABFF-DB46EE7EAD49}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -159,11 +161,8 @@ Global
{0B7B0E9C-6B63-42F2-ABFF-DB46EE7EAD49}.Release|x86.ActiveCfg = Release|Any CPU
{0B7B0E9C-6B63-42F2-ABFF-DB46EE7EAD49}.Release|x86.Build.0 = Release|Any CPU
{0B7B0E9C-6B63-42F2-ABFF-DB46EE7EAD49}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {0B7B0E9C-6B63-42F2-ABFF-DB46EE7EAD49}.Checked|Any CPU.Build.0 = Debug|Any CPU
{0B7B0E9C-6B63-42F2-ABFF-DB46EE7EAD49}.Checked|x64.ActiveCfg = Debug|Any CPU
- {0B7B0E9C-6B63-42F2-ABFF-DB46EE7EAD49}.Checked|x64.Build.0 = Debug|Any CPU
{0B7B0E9C-6B63-42F2-ABFF-DB46EE7EAD49}.Checked|x86.ActiveCfg = Debug|Any CPU
- {0B7B0E9C-6B63-42F2-ABFF-DB46EE7EAD49}.Checked|x86.Build.0 = Debug|Any CPU
{F4D0710C-6A53-44F9-A28B-63F008FEF808}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F4D0710C-6A53-44F9-A28B-63F008FEF808}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F4D0710C-6A53-44F9-A28B-63F008FEF808}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -177,11 +176,8 @@ Global
{F4D0710C-6A53-44F9-A28B-63F008FEF808}.Release|x86.ActiveCfg = Release|Any CPU
{F4D0710C-6A53-44F9-A28B-63F008FEF808}.Release|x86.Build.0 = Release|Any CPU
{F4D0710C-6A53-44F9-A28B-63F008FEF808}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {F4D0710C-6A53-44F9-A28B-63F008FEF808}.Checked|Any CPU.Build.0 = Debug|Any CPU
{F4D0710C-6A53-44F9-A28B-63F008FEF808}.Checked|x64.ActiveCfg = Debug|Any CPU
- {F4D0710C-6A53-44F9-A28B-63F008FEF808}.Checked|x64.Build.0 = Debug|Any CPU
{F4D0710C-6A53-44F9-A28B-63F008FEF808}.Checked|x86.ActiveCfg = Debug|Any CPU
- {F4D0710C-6A53-44F9-A28B-63F008FEF808}.Checked|x86.Build.0 = Debug|Any CPU
{3DD929D8-346F-4CF3-B157-22E052F73A91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3DD929D8-346F-4CF3-B157-22E052F73A91}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3DD929D8-346F-4CF3-B157-22E052F73A91}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -195,11 +191,8 @@ Global
{3DD929D8-346F-4CF3-B157-22E052F73A91}.Release|x86.ActiveCfg = Release|Any CPU
{3DD929D8-346F-4CF3-B157-22E052F73A91}.Release|x86.Build.0 = Release|Any CPU
{3DD929D8-346F-4CF3-B157-22E052F73A91}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
- {3DD929D8-346F-4CF3-B157-22E052F73A91}.Checked|Any CPU.Build.0 = Debug|Any CPU
{3DD929D8-346F-4CF3-B157-22E052F73A91}.Checked|x64.ActiveCfg = Debug|Any CPU
- {3DD929D8-346F-4CF3-B157-22E052F73A91}.Checked|x64.Build.0 = Debug|Any CPU
{3DD929D8-346F-4CF3-B157-22E052F73A91}.Checked|x86.ActiveCfg = Debug|Any CPU
- {3DD929D8-346F-4CF3-B157-22E052F73A91}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -212,6 +205,7 @@ Global
{AB7F1F45-5C20-40C7-B6DA-192B37012DD8} = {A928B9C7-28EC-4D20-9A63-87221C52EC87}
{80B607B4-4860-4E0E-B9A1-2AD24A9C72DE} = {A928B9C7-28EC-4D20-9A63-87221C52EC87}
{155B2ACA-D7B6-472E-90F9-5F68E62F7432} = {A928B9C7-28EC-4D20-9A63-87221C52EC87}
+ {7B40C562-C082-451C-8281-5088EBFE0079} = {BEFD8C2C-3355-40A5-8C06-3CE0BFB66C36}
{C6F7ADFF-7D13-4773-B886-48F51809F73E} = {BEFD8C2C-3355-40A5-8C06-3CE0BFB66C36}
{0B7B0E9C-6B63-42F2-ABFF-DB46EE7EAD49} = {BEFD8C2C-3355-40A5-8C06-3CE0BFB66C36}
EndGlobalSection
diff --git a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcProxyShimFactory.cs b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcProxyShimFactory.cs
index 0a65a8a72a1..35454d05ada 100644
--- a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcProxyShimFactory.cs
+++ b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcProxyShimFactory.cs
@@ -30,6 +30,8 @@ internal sealed class DtcProxyShimFactory
private readonly ConcurrentQueue<ITransactionTransmitter> _cachedTransmitters = new();
private readonly ConcurrentQueue<ITransactionReceiver> _cachedReceivers = new();
+ private static readonly int s_maxCachedInterfaces = Environment.ProcessorCount * 2;
+
private readonly EventWaitHandle _eventHandle;
private ITransactionDispenser _transactionDispenser = null!; // Late-initialized in ConnectToProxy
@@ -350,7 +352,13 @@ internal sealed class DtcProxyShimFactory
}
internal void ReturnCachedTransmitter(ITransactionTransmitter transmitter)
- => _cachedTransmitters.Enqueue(transmitter);
+ {
+ if (_cachedTransmitters.Count < s_maxCachedInterfaces)
+ {
+ transmitter.Reset();
+ _cachedTransmitters.Enqueue(transmitter);
+ }
+ }
internal ITransactionReceiver GetCachedReceiver()
{
@@ -366,5 +374,11 @@ internal sealed class DtcProxyShimFactory
}
internal void ReturnCachedReceiver(ITransactionReceiver receiver)
- => _cachedReceivers.Enqueue(receiver);
+ {
+ if (_cachedReceivers.Count < s_maxCachedInterfaces)
+ {
+ receiver.Reset();
+ _cachedReceivers.Enqueue(receiver);
+ }
+ }
}
diff --git a/src/libraries/System.Transactions.Local/src/System/Transactions/TransactionState.cs b/src/libraries/System.Transactions.Local/src/System/Transactions/TransactionState.cs
index 331e679db04..1e0cdd68ff1 100644
--- a/src/libraries/System.Transactions.Local/src/System/Transactions/TransactionState.cs
+++ b/src/libraries/System.Transactions.Local/src/System/Transactions/TransactionState.cs
@@ -1867,7 +1867,6 @@ namespace System.Transactions
return false;
}
-
internal override void CompleteBlockingClone(InternalTransaction tx)
{
// First try to complete one of the internal blocking clones
@@ -1900,17 +1899,23 @@ namespace System.Transactions
Monitor.Exit(tx);
try
{
- dtx.Complete();
+ try
+ {
+ dtx.Complete();
+ }
+ finally
+ {
+ dtx.Dispose();
+ }
}
finally
{
- dtx.Dispose();
+ Monitor.Enter(tx);
}
}
}
}
-
internal override void CompleteAbortingClone(InternalTransaction tx)
{
// If we have a phase1Volatile.VolatileDemux, we have a phase1 volatile enlistment
@@ -1937,11 +1942,18 @@ namespace System.Transactions
Monitor.Exit(tx);
try
{
- dtx.Complete();
+ try
+ {
+ dtx.Complete();
+ }
+ finally
+ {
+ dtx.Dispose();
+ }
}
finally
{
- dtx.Dispose();
+ Monitor.Enter(tx);
}
}
}
diff --git a/src/libraries/System.Transactions.Local/tests/OleTxTests.cs b/src/libraries/System.Transactions.Local/tests/OleTxTests.cs
index 71893a29f98..739ca93afeb 100644
--- a/src/libraries/System.Transactions.Local/tests/OleTxTests.cs
+++ b/src/libraries/System.Transactions.Local/tests/OleTxTests.cs
@@ -109,6 +109,17 @@ public class OleTxTests : IClassFixture<OleTxTests.OleTxFixture>
[ConditionalFact(nameof(IsRemoteExecutorSupportedAndNotNano))]
public void Promotion()
+ => PromotionCore();
+
+ // #76010
+ [ConditionalFact(nameof(IsRemoteExecutorSupportedAndNotNano))]
+ public void Promotion_twice()
+ {
+ PromotionCore();
+ PromotionCore();
+ }
+
+ private void PromotionCore()
{
Test(() =>
{
@@ -203,28 +214,30 @@ public class OleTxTests : IClassFixture<OleTxTests.OleTxFixture>
static void Remote1(string propagationTokenFilePath)
=> Test(() =>
{
- using var tx = new CommittableTransaction();
-
var outcomeEvent = new AutoResetEvent(false);
- var enlistment = new TestEnlistment(Phase1Vote.Prepared, EnlistmentOutcome.Committed, outcomeReceived: outcomeEvent);
- tx.EnlistDurable(Guid.NewGuid(), enlistment, EnlistmentOptions.None);
- // We now have an OleTx transaction. Save its propagation token to disk so that the main process can read it when promoting.
- byte[] propagationToken = TransactionInterop.GetTransmitterPropagationToken(tx);
- File.WriteAllBytes(propagationTokenFilePath, propagationToken);
+ using (var tx = new CommittableTransaction())
+ {
+ var enlistment = new TestEnlistment(Phase1Vote.Prepared, EnlistmentOutcome.Committed, outcomeReceived: outcomeEvent);
+ tx.EnlistDurable(Guid.NewGuid(), enlistment, EnlistmentOptions.None);
- // Signal to the main process that the propagation token is ready to be read
- using var waitHandle1 = new EventWaitHandle(initialState: false, EventResetMode.ManualReset, "System.Transactions.Tests.OleTxTests.Promotion1");
- waitHandle1.Set();
+ // We now have an OleTx transaction. Save its propagation token to disk so that the main process can read it when promoting.
+ byte[] propagationToken = TransactionInterop.GetTransmitterPropagationToken(tx);
+ File.WriteAllBytes(propagationTokenFilePath, propagationToken);
- // The main process will now import our transaction via the propagation token, and propagate it to a 2nd process.
- // In the main process the transaction is delegated; we're the one who started it, and so we're the one who need to Commit.
- // When Commit() is called in the main process, that will trigger a SinglePhaseCommit on the PSPE which represents us. In SQL Server this
- // contacts the DB to actually commit the transaction with MSDTC. In this simulation we'll just use the wait handle again to trigger this.
- using var waitHandle3 = new EventWaitHandle(initialState: false, EventResetMode.ManualReset, "System.Transactions.Tests.OleTxTests.Promotion3");
- Assert.True(waitHandle3.WaitOne(Timeout));
+ // Signal to the main process that the propagation token is ready to be read
+ using var waitHandle1 = new EventWaitHandle(initialState: false, EventResetMode.ManualReset, "System.Transactions.Tests.OleTxTests.Promotion1");
+ waitHandle1.Set();
- tx.Commit();
+ // The main process will now import our transaction via the propagation token, and propagate it to a 2nd process.
+ // In the main process the transaction is delegated; we're the one who started it, and so we're the one who need to Commit.
+ // When Commit() is called in the main process, that will trigger a SinglePhaseCommit on the PSPE which represents us. In SQL Server this
+ // contacts the DB to actually commit the transaction with MSDTC. In this simulation we'll just use the wait handle again to trigger this.
+ using var waitHandle3 = new EventWaitHandle(initialState: false, EventResetMode.ManualReset, "System.Transactions.Tests.OleTxTests.Promotion3");
+ Assert.True(waitHandle3.WaitOne(Timeout));
+
+ tx.Commit();
+ }
// Wait for the commit to occur on our enlistment, then exit successfully.
Assert.True(outcomeEvent.WaitOne(Timeout));
@@ -234,18 +247,20 @@ public class OleTxTests : IClassFixture<OleTxTests.OleTxFixture>
static void Remote2(string exportCookieFilePath)
=> Test(() =>
{
+ var outcomeEvent = new AutoResetEvent(false);
+
// Load the export cookie and enlist durably
byte[] exportCookie = File.ReadAllBytes(exportCookieFilePath);
- using var tx = TransactionInterop.GetTransactionFromExportCookie(exportCookie);
-
- // Now enlist durably. This triggers promotion of the first PSPE, reading the propagation token.
- var outcomeEvent = new AutoResetEvent(false);
- var enlistment = new TestEnlistment(Phase1Vote.Prepared, EnlistmentOutcome.Committed, outcomeReceived: outcomeEvent);
- tx.EnlistDurable(Guid.NewGuid(), enlistment, EnlistmentOptions.None);
+ using (var tx = TransactionInterop.GetTransactionFromExportCookie(exportCookie))
+ {
+ // Now enlist durably. This triggers promotion of the first PSPE, reading the propagation token.
+ var enlistment = new TestEnlistment(Phase1Vote.Prepared, EnlistmentOutcome.Committed, outcomeReceived: outcomeEvent);
+ tx.EnlistDurable(Guid.NewGuid(), enlistment, EnlistmentOptions.None);
- // Signal to the main process that we're enlisted and ready to commit
- using var waitHandle = new EventWaitHandle(initialState: false, EventResetMode.ManualReset, "System.Transactions.Tests.OleTxTests.Promotion2");
- waitHandle.Set();
+ // Signal to the main process that we're enlisted and ready to commit
+ using var waitHandle = new EventWaitHandle(initialState: false, EventResetMode.ManualReset, "System.Transactions.Tests.OleTxTests.Promotion2");
+ waitHandle.Set();
+ }
// Wait for the main process to commit the transaction
Assert.True(outcomeEvent.WaitOne(Timeout));
@@ -414,6 +429,22 @@ public class OleTxTests : IClassFixture<OleTxTests.OleTxFixture>
Assert.Equal(tx.TransactionInformation.DistributedIdentifier, tx2.TransactionInformation.DistributedIdentifier);
});
+ // #76010
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
+ public void TransactionScope_with_DependentTransaction()
+ => Test(() =>
+ {
+ using var committableTransaction = new CommittableTransaction();
+ var propagationToken = TransactionInterop.GetTransmitterPropagationToken(committableTransaction);
+
+ var dependentTransaction = TransactionInterop.GetTransactionFromTransmitterPropagationToken(propagationToken);
+
+ using (var scope = new TransactionScope(dependentTransaction))
+ {
+ scope.Complete();
+ }
+ });
+
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
public void GetExportCookie()
=> Test(() =>
@@ -472,7 +503,7 @@ public class OleTxTests : IClassFixture<OleTxTests.OleTxFixture>
// In CI, we sometimes get XACT_E_TMNOTAVAILABLE; when it happens, it's typically on the very first
// attempt to connect to MSDTC (flaky/slow on-demand startup of MSDTC), though not only.
// This catches that error and retries.
- int nRetries = 5;
+ int nRetries = 60;
while (true)
{
diff --git a/src/libraries/oob-all.proj b/src/libraries/oob-all.proj
index f84c5b40502..9164a5846ce 100644
--- a/src/libraries/oob-all.proj
+++ b/src/libraries/oob-all.proj
@@ -16,8 +16,7 @@
<!-- Build these packages in the allconfigurations leg only. -->
<ProjectReference Remove="Microsoft.Internal.Runtime.AspNetCore.Transport\src\Microsoft.Internal.Runtime.AspNetCore.Transport.proj;
Microsoft.Internal.Runtime.WindowsDesktop.Transport\src\Microsoft.Internal.Runtime.WindowsDesktop.Transport.proj;
- Microsoft.Windows.Compatibility\src\Microsoft.Windows.Compatibility.csproj;
- Microsoft.NETCore.Platforms\src\Microsoft.NETCore.Platforms.csproj"
+ Microsoft.Windows.Compatibility\src\Microsoft.Windows.Compatibility.csproj"
Condition="'$(BuildAllConfigurations)' != 'true'" />
<!-- Skip these projects during source-build as they rely on external prebuilts. -->
diff --git a/src/libraries/oob-src.proj b/src/libraries/oob-src.proj
index 2cbfdf9bb3c..472a2dfb5e7 100644
--- a/src/libraries/oob-src.proj
+++ b/src/libraries/oob-src.proj
@@ -21,8 +21,7 @@
('$(BuildAllConfigurations)' != 'true' and '$(RuntimeFlavor)' == '$(PrimaryRuntimeFlavor)')" />
<!-- Don't build task and tools project in the NetCoreAppCurrent vertical. -->
- <ProjectReference Remove="Microsoft.NETCore.Platforms\src\Microsoft.NETCore.Platforms.csproj;
- Microsoft.XmlSerializer.Generator\src\Microsoft.XmlSerializer.Generator.csproj" />
+ <ProjectReference Remove="Microsoft.XmlSerializer.Generator\src\Microsoft.XmlSerializer.Generator.csproj" />
<!-- Don't build meta-projects in the NetCoreAppCurrent vertical. -->
<ProjectReference Remove="Microsoft.Internal.Runtime.AspNetCore.Transport\src\Microsoft.Internal.Runtime.AspNetCore.Transport.proj;
diff --git a/src/libraries/pretest.proj b/src/libraries/pretest.proj
index b6e9721ca79..ac4f3c9021c 100644
--- a/src/libraries/pretest.proj
+++ b/src/libraries/pretest.proj
@@ -94,7 +94,7 @@
Condition="'$(BuildTargetFramework)' == '$(NetCoreAppCurrent)' or '$(BuildTargetFramework)' == ''">
<!-- Shared framework deps file generation. Produces a test shared-framework deps file. -->
<GenerateTestSharedFrameworkDepsFile SharedFrameworkDirectory="$(NetCoreAppCurrentTestHostSharedFrameworkPath)"
- RuntimeGraphFiles="$(RuntimeIdGraphDefinitionFile)"
+ RuntimeGraphFiles="$(BundledRuntimeIdentifierGraphFile)"
TargetRuntimeIdentifier="$(PackageRID)" />
</Target>
diff --git a/src/libraries/sendtohelixhelp.proj b/src/libraries/sendtohelixhelp.proj
index 83138adec2a..61a21bfe413 100644
--- a/src/libraries/sendtohelixhelp.proj
+++ b/src/libraries/sendtohelixhelp.proj
@@ -252,7 +252,7 @@
</ItemGroup>
<ItemGroup>
- <HelixCorrelationPayload Include="openssl" Uri="https://netcorenativeassets.blob.core.windows.net/resource-packages/external/android/openssl-1.1.1l-beta-1.zip" Destination="openssl" />
+ <HelixCorrelationPayload Condition="$(TargetRuntimeIdentifier.ToLowerInvariant().StartsWith('linux-bionic'))" Include="openssl" Uri="https://netcorenativeassets.blob.core.windows.net/resource-packages/external/android/openssl-1.1.1l-beta-1.zip" Destination="openssl" />
</ItemGroup>
<ItemGroup Condition="'$(EnableDefaultBuildHelixWorkItems)' == 'true'">
diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj
index 6ea3f13a220..60c91226387 100644
--- a/src/libraries/tests.proj
+++ b/src/libraries/tests.proj
@@ -4,7 +4,7 @@
<!-- Build for NetCoreAppCurrent by default if no BuildTargetFramework is supplied or if not all configurations are built. -->
<TargetFramework>$([MSBuild]::ValueOrDefault('$(BuildTargetFramework)', '$(NetCoreAppCurrent)'))-$(TargetOS)</TargetFramework>
<!-- Filter ProjectReferences to build the best matching target framework only. -->
- <FilterTraversalProjectReferences Condition="'$(TestTrimming)' != 'true'">true</FilterTraversalProjectReferences>
+ <FilterTraversalProjectReferences Condition="'$(TestTrimming)' != 'true' and '$(RunNativeAotTestApps)' != 'true'">true</FilterTraversalProjectReferences>
</PropertyGroup>
<PropertyGroup>
@@ -18,6 +18,7 @@
<TestAssemblies Condition="'$(TestAssemblies)' == ''">true</TestAssemblies>
<TestPackages Condition="'$(TestPackages)' == ''">false</TestPackages>
<TestTrimming Condition="'$(TestTrimming)' == ''">false</TestTrimming>
+ <RunNativeAotTestApps Condition="'$(RunNativeAotTestApps)' == ''">false</RunNativeAotTestApps>
<RunHighAOTResourceRequiringTestsOnly Condition="'$(RunHighAOTResourceRequiringTestsOnly)' == ''">false</RunHighAOTResourceRequiringTestsOnly>
@@ -27,20 +28,10 @@
<ItemGroup Condition="'$(TargetOS)' == 'Browser'">
<!-- https://github.com/dotnet/runtime/issues/65356 - OOM while linking -->
- <HighAOTResourceRequiringProject Include="$(MSBuildThisFileDirectory)System.Text.Json\tests\System.Text.Json.SourceGeneration.Tests\System.Text.Json.SourceGeneration.Roslyn3.11.Tests.csproj" />
<HighAOTResourceRequiringProject Include="$(MSBuildThisFileDirectory)System.Text.RegularExpressions\tests\FunctionalTests\System.Text.RegularExpressions.Tests.csproj" />
- <!-- https://github.com/dotnet/runtime/issues/65411 - possible OOM when compiling
- System.Text.Json.SourceGeneration.Roslyn4.0.Tests.dll.bc -> .o -->
- <HighAOTResourceRequiringProject Include="$(MSBuildThisFileDirectory)System.Text.Json\tests\System.Text.Json.SourceGeneration.Tests\System.Text.Json.SourceGeneration.Roslyn4.0.Tests.csproj" />
-
<!-- https://github.com/dotnet/runtime/issues/61524 - OOM while linking -->
<HighAOTResourceRequiringProject Include="$(MSBuildThisFileDirectory)System.Text.Json\tests\System.Text.Json.Tests\System.Text.Json.Tests.csproj" />
-
- <!-- https://github.com/dotnet/runtime/issues/66647 -->
- <HighAOTResourceRequiringProject Include="$(MSBuildThisFileDirectory)Microsoft.Extensions.Logging.Abstractions\tests\Microsoft.Extensions.Logging.Generators.Tests\Microsoft.Extensions.Logging.Generators.Roslyn3.11.Tests.csproj" />
-
- <HighAOTResourceRequiringProject Include="$(MSBuildThisFileDirectory)Microsoft.Extensions.Logging.Abstractions\tests\Microsoft.Extensions.Logging.Generators.Tests\Microsoft.Extensions.Logging.Generators.Roslyn4.0.Tests.csproj" />
</ItemGroup>
<!-- Samples which are too complex for CI -->
@@ -93,6 +84,17 @@
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Runtime.InteropServices\tests\LibraryImportGenerator.Tests\LibraryImportGenerator.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Runtime.InteropServices\tests\LibraryImportGenerator.UnitTests\LibraryImportGenerator.Unit.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Runtime.InteropServices.JavaScript\tests\JSImportGenerator.UnitTest\JSImportGenerator.Unit.Tests.csproj" />
+
+ <!--
+ Source generator tests aren't necessary on mobile
+ https://github.com/dotnet/runtime/issues/72836
+ -->
+ <ProjectExclusions Include="$(MSBuildThisFileDirectory)Microsoft.Extensions.Logging.Abstractions\tests\Microsoft.Extensions.Logging.Generators.Tests\Microsoft.Extensions.Logging.Generators.Roslyn3.11.Tests.csproj" />
+ <ProjectExclusions Include="$(MSBuildThisFileDirectory)Microsoft.Extensions.Logging.Abstractions\tests\Microsoft.Extensions.Logging.Generators.Tests\Microsoft.Extensions.Logging.Generators.Roslyn4.0.Tests.csproj" />
+ <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Text.Json\tests\System.Text.Json.SourceGeneration.Unit.Tests\System.Text.Json.SourceGeneration.Roslyn3.11.Unit.Tests.csproj" />
+ <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Text.Json\tests\System.Text.Json.SourceGeneration.Unit.Tests\System.Text.Json.SourceGeneration.Roslyn4.0.Unit.Tests.csproj" />
+ <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Text.Json\tests\System.Text.Json.SourceGeneration.Tests\System.Text.Json.SourceGeneration.Roslyn3.11.Tests.csproj" />
+ <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Text.Json\tests\System.Text.Json.SourceGeneration.Tests\System.Text.Json.SourceGeneration.Roslyn4.0.Tests.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetOS)' == 'windows' and '$(TargetArchitecture)' == 'arm'">
@@ -193,7 +195,6 @@
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Net.Primitives/tests/FunctionalTests/System.Net.Primitives.Functional.Tests.csproj" />
<!-- Crashes on CI (possibly flakey) -->
- <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Private.Xml/tests/Misc/System.Xml.Misc.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Dynamic.Runtime/tests/System.Dynamic.Runtime.Tests.csproj"/>
<!-- gRPC tests should be run only manually -->
@@ -216,8 +217,6 @@
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Net.NameResolution/tests/PalTests/System.Net.NameResolution.Pal.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Net.WebClient/tests/System.Net.WebClient.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Numerics.Tensors/tests/System.Numerics.Tensors.Tests.csproj" />
- <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Private.Xml/tests/XmlReader/Tests/System.Xml.RW.XmlReader.Tests.csproj" />
- <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Private.Xml/tests/XPath/XPathDocument/System.Xml.XPath.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Private.Uri/tests/ExtendedFunctionalTests/System.Private.Uri.ExtendedFunctional.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Reflection.DispatchProxy/tests/System.Reflection.DispatchProxy.Tests.csproj" />
</ItemGroup>
@@ -245,9 +244,6 @@
<ItemGroup Condition="'$(TargetOS)' == 'iOS' and '$(RunDisablediOSTests)' != 'true'">
<ProjectExclusions Include="$(MSBuildThisFileDirectory)*\tests\**\*.Tests.csproj" />
- <!-- Ref.Emit in XSLCompiledTransform -->
- <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Private.Xml\tests\Xslt\XslCompiledTransformApi\System.Xml.Xsl.XslCompiledTransformApi.Tests.csproj" />
-
<!-- Functional tests on devices have problems with return codes from mlaunch -->
<ProjectExclusions Include="$(RepoRoot)\src\tests\FunctionalTests\$(TargetOS)\Device\**\*.Test.csproj" />
</ItemGroup>
@@ -258,8 +254,6 @@
</ItemGroup>
<ItemGroup Condition="'$(TargetOS)' == 'tvOS' and '$(RunDisablediOSTests)' != 'true'">
- <!-- Ref.Emit in XSLCompiledTransform -->
- <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Private.Xml\tests\Xslt\XslCompiledTransformApi\System.Xml.Xsl.XslCompiledTransformApi.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Reflection\tests\System.Reflection.Emit.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Reflection.Emit.ILGeneration/tests/System.Reflection.Emit.ILGeneration.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Reflection.Emit.Lightweight/tests/System.Reflection.Emit.Lightweight.Tests.csproj" />
@@ -292,16 +286,6 @@
-->
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Text.RegularExpressions\tests\UnitTests\System.Text.RegularExpressions.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Text.RegularExpressions\tests\FunctionalTests\System.Text.RegularExpressions.Tests.csproj" />
-
- <!--
- Source generator tests aren't necessary on mobile
- https://github.com/dotnet/runtime/issues/72836
- -->
- <ProjectExclusions Include="$(MSBuildThisFileDirectory)Microsoft.Extensions.Logging.Abstractions\tests\Microsoft.Extensions.Logging.Generators.Tests\Microsoft.Extensions.Logging.Generators.Roslyn3.11.Tests.csproj" />
- <ProjectExclusions Include="$(MSBuildThisFileDirectory)Microsoft.Extensions.Logging.Abstractions\tests\Microsoft.Extensions.Logging.Generators.Tests\Microsoft.Extensions.Logging.Generators.Roslyn4.0.Tests.csproj" />
- <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Text.Json\tests\System.Text.Json.SourceGeneration.Unit.Tests\System.Text.Json.SourceGeneration.Roslyn4.0.Unit.Tests.csproj" />
- <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Text.Json\tests\System.Text.Json.SourceGeneration.Tests\System.Text.Json.SourceGeneration.Roslyn3.11.Tests.csproj" />
- <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Text.Json\tests\System.Text.Json.SourceGeneration.Tests\System.Text.Json.SourceGeneration.Roslyn4.0.Tests.csproj" />
<!-- Functional tests on devices have problems with return codes from mlaunch -->
<ProjectExclusions Include="$(RepoRoot)\src\tests\FunctionalTests\$(TargetOS)\Device\**\*.Test.csproj" />
@@ -379,8 +363,6 @@
<ItemGroup Condition="'$(TargetOS)' == 'Browser' and '$(WasmEnableThreads)' == 'true' and '$(RunDisabledWasmTests)' != 'true'">
<!-- Issue: https://github.com/dotnet/runtime/issues/72101 -->
- <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Text.Json\tests\System.Text.Json.SourceGeneration.Tests\System.Text.Json.SourceGeneration.Roslyn3.11.Tests.csproj" />
- <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Text.Json\tests\System.Text.Json.SourceGeneration.Tests\System.Text.Json.SourceGeneration.Roslyn4.0.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Text.Json\tests\System.Text.Json.Tests\System.Text.Json.Tests.csproj" />
<!-- Issue: https://github.com/dotnet/runtime/issues/74411 -->
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj" />
@@ -439,9 +421,6 @@
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.IO.Ports\tests\System.IO.Ports.Tests.csproj"
Condition="'$(TargetOS)' != 'windows'" />
- <!-- https://github.com/dotnet/runtime/issues/73145 -->
- <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Runtime.InteropServices\tests\System.Runtime.InteropServices.UnitTests\System.Runtime.InteropServices.Tests.csproj" />
-
<!-- Not applicable to NativeAOT -->
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Reflection\tests\InvokeEmit\System.Reflection.InvokeEmit.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Reflection\tests\InvokeInterpreted\System.Reflection.InvokeInterpreted.Tests.csproj" />
@@ -475,7 +454,6 @@
<!-- Many test failures due to trimming and MakeGeneric. XmlSerializer is not currently supported with NativeAOT. Low priority -->
<ProjectExclusions Include="$(MSBuildThisFileDirectory)Microsoft.XmlSerializer.Generator\tests\Microsoft.XmlSerializer.Generator.Tests.csproj" />
- <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Private.Xml\tests\XmlSerializer\System.Xml.XmlSerializer.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.ServiceModel.Syndication\tests\System.ServiceModel.Syndication.Tests.csproj" />
<!-- Not supported with trimming. Low priority -->
@@ -494,17 +472,6 @@
<!-- More than two thirds of tests failing due to ref emit -->
<ProjectExclusions Include="$(MSBuildThisFileDirectory)Microsoft.Extensions.DependencyInjection\tests\DI.Tests\Microsoft.Extensions.DependencyInjection.Tests.csproj" />
- <!-- Xslt is ref.emit -->
- <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Private.Xml\tests\Xslt\XslCompiledTransformApi\System.Xml.Xsl.XslCompiledTransformApi.Tests.csproj" />
-
- <!-- These are failing in localized runs due to satellite assembly reflection in the test. Work fine otherwise. -->
- <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Private.Xml\tests\XmlSchema\XmlSchemaValidatorApi\System.Xml.XmlSchema.XmlSchemaValidatorApi.Tests.csproj"
- Condition="'$(TargetOS)' == 'windows'"/>
- <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Private.Xml\tests\Xslt\XslTransformApi\System.Xml.Xsl.XslTransformApi.Tests.csproj"
- Condition="'$(TargetOS)' == 'windows'"/>
-
- <!--This test fails on Windows.10.Amd64.Server2022 -->
- <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.IO.FileSystem\tests\System.IO.FileSystem.Tests.csproj" />
<!--Needs work to get these tests to pass -->
<!--These tests have failures-->
<!-- Looks like our xunit runner doesn't respect tests that don't want to be multithreaded -->
@@ -567,6 +534,7 @@
<SmokeTestProject Include="$(MSBuildThisFileDirectory)System.IO.FileSystem\tests\System.IO.FileSystem.Tests.csproj" />
<SmokeTestProject Include="$(MSBuildThisFileDirectory)System.Threading\tests\System.Threading.Tests.csproj" />
<SmokeTestProject Include="$(MSBuildThisFileDirectory)System.Linq.Expressions\tests\System.Linq.Expressions.Tests.csproj" />
+ <SmokeTestProject Include="$(MSBuildThisFileDirectory)System.Runtime.InteropServices\tests\System.Runtime.InteropServices.UnitTests\System.Runtime.InteropServices.Tests.csproj" />
</ItemGroup>
<ItemGroup>
@@ -590,6 +558,11 @@
Condition="'$(TestTrimming)' == 'true'"
AdditionalProperties="%(AdditionalProperties);SkipTrimmingProjectsRestore=true" />
<ProjectReference Include="@(TrimmingTestProjects)" />
+ <NativeAotTestAppProjects Include="$(MSBuildThisFileDirectory)*\tests\**\*.NativeAotTests.proj"
+ Exclude="@(ProjectExclusions)"
+ Condition="'$(RunNativeAotTestApps)' == 'true'"
+ AdditionalProperties="%(AdditionalProperties);SkipTrimmingProjectsRestore=true" />
+ <ProjectReference Include="@(NativeAotTestAppProjects)" />
<!-- wasm.build.tests are run on _WasmBuildTests job on CI, and with library tests locally. -->
<ProjectReference Include="$(RepoRoot)\src\mono\wasm\Wasm.Build.Tests\*.Tests.csproj"
@@ -760,17 +733,17 @@
Directories="$(AppBundleRoot)" />
</Target>
- <!-- Restoring all trimming test projects upfront in one single call to RestoreTrimmingProjects
+ <!-- Restoring all trimming/NativeAot test app projects upfront in one single call to RestorePublishedAppTestProjects
so as to avoid possible race conditions that could happen if we restore each individually. -->
- <Target Name="RestoreTrimmingProjects"
+ <Target Name="RestorePublishedAppTestProjects"
BeforeTargets="Build"
- Condition="'$(TestTrimming)' == 'true'">
- <MSBuild Projects="@(TrimmingTestProjects)"
+ Condition="'$(TestTrimming)' == 'true' or '$(RunNativeAotTestApps)' == 'true'">
+ <MSBuild Projects="@(TrimmingTestProjects);@(NativeAotTestAppProjects)"
Targets="GetTrimmingProjectsToRestore">
- <Output TaskParameter="TargetOutputs" ItemName="_TrimmingProjectsToRestore" />
+ <Output TaskParameter="TargetOutputs" ItemName="_PublishedAppTestProjectsToRestore" />
</MSBuild>
- <MSBuild Projects="@(_TrimmingProjectsToRestore)"
+ <MSBuild Projects="@(_PublishedAppTestProjectsToRestore)"
Targets="Restore"
Properties="MSBuildRestoreSessionId=$([System.Guid]::NewGuid());Configuration=$(Configuration)" />
</Target>
diff --git a/src/mono/System.Private.CoreLib/MatchingRefApiCompatBaseline.txt b/src/mono/System.Private.CoreLib/MatchingRefApiCompatBaseline.txt
index baf962e85e9..99b72c1b439 100644
--- a/src/mono/System.Private.CoreLib/MatchingRefApiCompatBaseline.txt
+++ b/src/mono/System.Private.CoreLib/MatchingRefApiCompatBaseline.txt
@@ -1,29 +1,5 @@
Compat issues with assembly System.Private.CoreLib:
TypesMustExist : Type 'Internal.Console' does not exist in the reference but it does exist in the implementation.
-TypesMustExist : Type 'Internal.Runtime.InteropServices.ComponentActivator' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.add_FirstChanceException(System.EventHandler<System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs>)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.add_ProcessExit(System.EventHandler)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.add_UnhandledException(System.UnhandledExceptionEventHandler)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.remove_FirstChanceException(System.EventHandler<System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs>)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.remove_ProcessExit(System.EventHandler)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.remove_UnhandledException(System.UnhandledExceptionEventHandler)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.Environment.FailFast(System.String, System.Exception, System.String)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'protected void System.Diagnostics.Tracing.EventCounter.Flush()' does not exist in the reference but it does exist in the implementation.
-CannotMakeTypeAbstract : Type 'System.Diagnostics.Tracing.EventListener' is abstract in the reference but is not abstract in the implementation.
-CannotMakeMoreVisible : Visibility of member 'System.Diagnostics.Tracing.EventListener..ctor()' is 'protected' in the reference but 'public' in the implementation.
-CannotMakeMoreVisible : Visibility of member 'System.Diagnostics.Tracing.EventListener.EventSourceIndex(System.Diagnostics.Tracing.EventSource)' is 'protected' in the reference but 'public' in the implementation.
-TypesMustExist : Type 'System.Diagnostics.Tracing.TraceLoggingEventTypes' does not exist in the reference but it does exist in the implementation.
-CannotMakeMemberAbstract : Member 'public System.Boolean System.IO.FileSystemInfo.Exists' is abstract in the reference but is not abstract in the implementation.
-CannotMakeMemberAbstract : Member 'public System.String System.IO.FileSystemInfo.Name' is abstract in the reference but is not abstract in the implementation.
-CannotMakeMemberAbstract : Member 'public System.Boolean System.IO.FileSystemInfo.Exists.get()' is abstract in the reference but is not abstract in the implementation.
-CannotMakeMemberAbstract : Member 'public System.String System.IO.FileSystemInfo.Name.get()' is abstract in the reference but is not abstract in the implementation.
-MembersMustExist : Member 'protected System.ModuleHandle System.Reflection.Module.GetModuleHandleImpl()' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'protected System.ModuleHandle System.Reflection.Emit.ModuleBuilder.GetModuleHandleImpl()' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'protected System.String System.String System.Resources.ResourceManager.BaseNameField' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'protected System.Resources.IResourceReader System.Resources.IResourceReader System.Resources.ResourceSet.Reader' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Runtime.CompilerServices.ICastable' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute..ctor()' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public System.Boolean System.Runtime.Serialization.SerializationInfo.DeserializationInProgress.get()' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.Runtime.Serialization.SerializationInfo.ThrowIfDeserializationInProgress()' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.Runtime.Serialization.SerializationInfo.ThrowIfDeserializationInProgress(System.String, System.Int32)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.Runtime.Serialization.SerializationInfo.UpdateValue(System.String, System.Object, System.Type)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'protected System.Resources.IResourceReader System.Resources.IResourceReader System.Resources.ResourceSet.Reader' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'protected System.String System.String System.Resources.ResourceManager.BaseNameField' does not exist in the reference but it does exist in the implementation. \ No newline at end of file
diff --git a/src/mono/System.Private.CoreLib/System.Private.CoreLib.csproj b/src/mono/System.Private.CoreLib/System.Private.CoreLib.csproj
index 9dd362f4289..a13b828242e 100644
--- a/src/mono/System.Private.CoreLib/System.Private.CoreLib.csproj
+++ b/src/mono/System.Private.CoreLib/System.Private.CoreLib.csproj
@@ -1,4 +1,4 @@
-<Project Sdk="Microsoft.NET.Sdk">
+<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<EnableDefaultItems>false</EnableDefaultItems>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
@@ -197,8 +197,6 @@
<Compile Include="$(BclSourcesRoot)\System\TypeLoadException.Mono.cs" />
<Compile Include="$(BclSourcesRoot)\System\TypeNameParser.cs" />
<Compile Include="$(BclSourcesRoot)\System\ValueType.cs" />
- <Compile Include="$(BclSourcesRoot)\System\WeakReference.Mono.cs" />
- <Compile Include="$(BclSourcesRoot)\System\WeakReference.T.Mono.cs" />
<Compile Include="$(BclSourcesRoot)\System\__ComObject.cs" />
<Compile Include="$(BclSourcesRoot)\System\Collections\Generic\ArraySortHelper.Mono.cs" />
<Compile Include="$(BclSourcesRoot)\System\Collections\Generic\Comparer.Mono.cs" />
@@ -234,8 +232,7 @@
<Compile Include="$(BclSourcesRoot)\System\Reflection\Emit\CustomAttributeBuilder.Mono.cs" />
<Compile Include="$(BclSourcesRoot)\System\Reflection\Emit\DerivedTypes.Mono.cs" />
<Compile Include="$(BclSourcesRoot)\System\Reflection\Emit\DynamicILInfo.cs" />
- <Compile Include="$(BclSourcesRoot)\System\Reflection\Emit\DynamicMethod.cs" />
- <Compile Include="$(BclSourcesRoot)\System\Reflection\Emit\DynamicMethod.notsupported.cs" />
+ <Compile Include="$(BclSourcesRoot)\System\Reflection\Emit\DynamicMethod.Mono.cs" />
<Compile Include="$(BclSourcesRoot)\System\Reflection\Emit\EnumBuilder.Mono.cs" />
<Compile Include="$(BclSourcesRoot)\System\Reflection\Emit\EventBuilder.Mono.cs" />
<Compile Include="$(BclSourcesRoot)\System\Reflection\Emit\EventOnTypeBuilderInst.cs" />
diff --git a/src/mono/System.Private.CoreLib/src/System/Delegate.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Delegate.Mono.cs
index 08c73983ddb..68d4552e54f 100644
--- a/src/mono/System.Private.CoreLib/src/System/Delegate.Mono.cs
+++ b/src/mono/System.Private.CoreLib/src/System/Delegate.Mono.cs
@@ -210,7 +210,7 @@ namespace System
if (invoke is null)
return null;
- ParameterInfo[] delargs = invoke.GetParametersInternal();
+ ParameterInfo[] delargs = invoke.GetParametersNoCopy();
Type[] delargtypes = new Type[delargs.Length];
for (int i = 0; i < delargs.Length; i++)
@@ -250,8 +250,8 @@ namespace System
return false;
}
- ParameterInfo[] delargs = invoke.GetParametersInternal();
- ParameterInfo[] args = method.GetParametersInternal();
+ ParameterInfo[] delargs = invoke.GetParametersNoCopy();
+ ParameterInfo[] args = method.GetParametersNoCopy();
bool argLengthMatch;
diff --git a/src/mono/System.Private.CoreLib/src/System/Environment.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Environment.Mono.cs
index 43350fe683f..e7303f9129f 100644
--- a/src/mono/System.Private.CoreLib/src/System/Environment.Mono.cs
+++ b/src/mono/System.Private.CoreLib/src/System/Environment.Mono.cs
@@ -57,6 +57,6 @@ namespace System
[MethodImplAttribute(MethodImplOptions.InternalCall)]
[DoesNotReturn]
- public static extern void FailFast(string? message, Exception? exception, string? errorSource);
+ internal static extern void FailFast(string? message, Exception? exception, string? errorSource);
}
}
diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/CustomAttribute.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/CustomAttribute.cs
index 9ae8182b6f6..049a06bd081 100644
--- a/src/mono/System.Private.CoreLib/src/System/Reflection/CustomAttribute.cs
+++ b/src/mono/System.Private.CoreLib/src/System/Reflection/CustomAttribute.cs
@@ -741,6 +741,42 @@ namespace System.Reflection
return usageAttribute;
}
+ internal static object[] CreateAttributeArrayHelper(RuntimeType caType, int elementCount)
+ {
+ bool useAttributeArray = false;
+ bool useObjectArray = false;
+
+ if (caType == typeof(Attribute))
+ {
+ useAttributeArray = true;
+ }
+ else if (caType.IsValueType)
+ {
+ useObjectArray = true;
+ }
+ else if (caType.ContainsGenericParameters)
+ {
+ if (caType.IsSubclassOf(typeof(Attribute)))
+ {
+ useAttributeArray = true;
+ }
+ else
+ {
+ useObjectArray = true;
+ }
+ }
+
+ if (useAttributeArray)
+ {
+ return elementCount == 0 ? Array.Empty<Attribute>() : new Attribute[elementCount];
+ }
+ if (useObjectArray)
+ {
+ return elementCount == 0 ? Array.Empty<object>() : new object[elementCount];
+ }
+ return /*elementCount == 0 ? caType.GetEmptyArray() :*/ (object[])Array.CreateInstance(caType, elementCount);
+ }
+
private static readonly AttributeUsageAttribute DefaultAttributeUsage =
new AttributeUsageAttribute(AttributeTargets.All);
diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/AssemblyBuilder.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/AssemblyBuilder.Mono.cs
index 82f55db360e..7583cbad8e3 100644
--- a/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/AssemblyBuilder.Mono.cs
+++ b/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/AssemblyBuilder.Mono.cs
@@ -33,13 +33,14 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if MONO_FEATURE_SRE
using System.Collections.Generic;
+using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.IO;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
+using System.Runtime.Loader;
namespace System.Reflection.Emit
{
@@ -269,6 +270,17 @@ namespace System.Reflection.Emit
return manifest_module;
}
+ internal static AssemblyBuilder InternalDefineDynamicAssembly(
+ AssemblyName name,
+ AssemblyBuilderAccess access,
+ Assembly? callingAssembly,
+ AssemblyLoadContext? assemblyLoadContext,
+ IEnumerable<CustomAttributeBuilder>? assemblyAttributes)
+ {
+ Debug.Assert(assemblyLoadContext is null);
+ return DefineDynamicAssembly(name, access, assemblyAttributes);
+ }
+
public ModuleBuilder? GetDynamicModule(string name)
{
ArgumentException.ThrowIfNullOrEmpty(name);
@@ -387,4 +399,3 @@ namespace System.Reflection.Emit
public override IList<CustomAttributeData> GetCustomAttributesData() => CustomAttribute.GetCustomAttributesData(this);
}
}
-#endif
diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.Mono.cs
new file mode 100644
index 00000000000..0e399afedbd
--- /dev/null
+++ b/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.Mono.cs
@@ -0,0 +1,178 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Globalization;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace System.Reflection.Emit
+{
+ [StructLayout(LayoutKind.Sequential)]
+ public sealed partial class DynamicMethod : MethodInfo
+ {
+#region Sync with MonoReflectionDynamicMethod in object-internals.h
+ private RuntimeMethodHandle _mhandle;
+ private RuntimeType _returnType;
+ private RuntimeType[] _parameterTypes;
+ private Module _module;
+ private bool _skipVisibility;
+ private bool _restrictedSkipVisibility;
+ private bool _initLocals;
+ private ILGenerator? _ilGenerator;
+ private int _nrefs;
+ private object?[]? _refs;
+ private IntPtr _referencedBy;
+ private RuntimeType? _typeOwner;
+#endregion
+ // We want the creator of the DynamicMethod to control who has access to the
+ // DynamicMethod (just like we do for delegates). However, a user can get to
+ // the corresponding RTDynamicMethod using Exception.TargetSite, StackFrame.GetMethod, etc.
+ // If we allowed use of RTDynamicMethod, the creator of the DynamicMethod would
+ // not be able to bound access to the DynamicMethod. Hence, we need to ensure that
+ // we do not allow direct use of RTDynamicMethod.
+ private RTDynamicMethod _dynMethod;
+
+ private Delegate? _deleg;
+ private RuntimeMethodInfo? _method;
+ private bool _creating;
+ private DynamicILInfo? _dynamicILInfo;
+
+ private object? _methodHandle; // unused
+
+ public sealed override Delegate CreateDelegate(Type delegateType)
+ {
+ ArgumentNullException.ThrowIfNull(delegateType);
+ if (_deleg is not null)
+ return _deleg;
+
+ CreateDynMethod();
+
+ return _deleg = Delegate.CreateDelegate(delegateType, null, this);
+ }
+
+ public sealed override Delegate CreateDelegate(Type delegateType, object? target)
+ {
+ ArgumentNullException.ThrowIfNull(delegateType);
+
+ CreateDynMethod();
+
+ /* Can't cache the delegate since it is different for each target */
+ return Delegate.CreateDelegate(delegateType, target, this);
+ }
+
+ public DynamicILInfo GetDynamicILInfo() => _dynamicILInfo ??= new DynamicILInfo(this);
+
+ public ILGenerator GetILGenerator(int streamSize) =>
+ _ilGenerator ??= new ILGenerator(Module, new DynamicMethodTokenGenerator(this), streamSize);
+
+ public override object? Invoke(object? obj, BindingFlags invokeAttr, Binder? binder, object?[]? parameters, CultureInfo? culture)
+ {
+ if ((CallingConvention & CallingConventions.VarArgs) == CallingConventions.VarArgs)
+ throw new NotSupportedException(SR.NotSupported_CallToVarArg);
+
+ try
+ {
+ CreateDynMethod();
+ _method ??= new RuntimeMethodInfo(_mhandle);
+
+ return _method.Invoke(obj, invokeAttr, binder, parameters, culture);
+ }
+ catch (MethodAccessException mae)
+ {
+ throw new TargetInvocationException("Method cannot be invoked.", mae);
+ }
+ }
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ private static extern void create_dynamic_method(DynamicMethod m, string name, MethodAttributes attributes, CallingConventions callingConvention);
+
+ private void CreateDynMethod()
+ {
+ // Clearing of ilgen in create_dynamic_method is not yet synchronized for multiple threads
+ lock (this)
+ {
+ if (_mhandle.Value == IntPtr.Zero)
+ {
+ if (_ilGenerator == null || _ilGenerator.ILOffset == 0)
+ throw new InvalidOperationException(SR.Format(SR.InvalidOperation_BadEmptyMethodBody, Name));
+
+ _ilGenerator.label_fixup(this);
+
+ // Have to create all DynamicMethods referenced by this one
+ try
+ {
+ // Used to avoid cycles
+ _creating = true;
+ if (_refs != null)
+ {
+ for (int i = 0; i < _refs.Length; ++i)
+ {
+ if (_refs[i] is DynamicMethod m)
+ {
+ if (!m._creating)
+ m.CreateDynMethod();
+ }
+ }
+ }
+ }
+ finally
+ {
+ _creating = false;
+ }
+ create_dynamic_method(this, Name, Attributes, CallingConvention);
+ _ilGenerator = null;
+ }
+ }
+ }
+
+ private int AddRef(object reference)
+ {
+ _refs ??= new object?[4];
+ if (_nrefs >= _refs.Length - 1)
+ {
+ object[] new_refs = new object[_refs.Length * 2];
+ Array.Copy(_refs, new_refs, _refs.Length);
+ _refs = new_refs;
+ }
+ _refs[_nrefs] = reference;
+ /* Reserved by the runtime */
+ _refs[_nrefs + 1] = null;
+ _nrefs += 2;
+ return _nrefs - 1;
+ }
+
+ internal override ParameterInfo[] GetParametersNoCopy() => _dynMethod.GetParametersNoCopy();
+
+ internal override int GetParametersCount() => GetParametersNoCopy().Length;
+
+ private sealed class DynamicMethodTokenGenerator : ITokenGenerator
+ {
+ private readonly DynamicMethod _m;
+
+ public DynamicMethodTokenGenerator(DynamicMethod m)
+ {
+ _m = m;
+ }
+
+ public int GetToken(string str)
+ {
+ return _m.AddRef(str);
+ }
+
+ public int GetToken(MethodBase method, Type[] opt_paratypes)
+ {
+ throw new InvalidOperationException();
+ }
+
+ public int GetToken(MemberInfo member, bool create_open_instance)
+ {
+ return _m.AddRef(member);
+ }
+
+ public int GetToken(SignatureHelper helper)
+ {
+ return _m.AddRef(helper);
+ }
+ }
+ }
+}
diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.cs
deleted file mode 100644
index eeb3a377299..00000000000
--- a/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.cs
+++ /dev/null
@@ -1,523 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-//
-// System.Reflection.Emit.DynamicMethod.cs
-//
-// Author:
-// Paolo Molaro (lupus@ximian.com)
-// Zoltan Varga (vargaz@freemail.hu)
-//
-// (C) 2003 Ximian, Inc. http://www.ximian.com
-//
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-#if MONO_FEATURE_SRE
-
-using System.Text;
-using System.Globalization;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Diagnostics.CodeAnalysis;
-
-namespace System.Reflection.Emit
-{
-
- [ComVisible(true)]
- [StructLayout(LayoutKind.Sequential)]
- public sealed class DynamicMethod : MethodInfo
- {
-#region Sync with MonoReflectionDynamicMethod in object-internals.h
- private RuntimeMethodHandle mhandle;
- private string name;
- private Type returnType;
- private Type[]? parameters;
- private MethodAttributes attributes;
- private CallingConventions callingConvention;
- private Module module;
- private bool skipVisibility;
- private bool init_locals = true;
- private ILGenerator? ilgen;
- private int nrefs;
- private object?[]? refs;
- private IntPtr referenced_by;
- private Type? owner;
-#endregion
-
- private Delegate? deleg;
- private RuntimeMethodInfo? method;
- private ParameterBuilder[]? pinfo;
- internal bool creating;
- private DynamicILInfo? il_info;
-
- [RequiresDynamicCode("Creating a DynamicMethod requires dynamic code.")]
- public DynamicMethod(string name, Type? returnType, Type[]? parameterTypes, Module m) : this(name, returnType, parameterTypes, m, false)
- {
- }
-
- [RequiresDynamicCode("Creating a DynamicMethod requires dynamic code.")]
- public DynamicMethod(string name, Type? returnType, Type[]? parameterTypes, Type owner) : this(name, returnType, parameterTypes, owner, false)
- {
- }
-
- [RequiresDynamicCode("Creating a DynamicMethod requires dynamic code.")]
- public DynamicMethod(string name, Type? returnType, Type[]? parameterTypes, Module m, bool skipVisibility) : this(name, MethodAttributes.Public | MethodAttributes.Static, CallingConventions.Standard, returnType, parameterTypes, m, skipVisibility)
- {
- }
-
- [RequiresDynamicCode("Creating a DynamicMethod requires dynamic code.")]
- public DynamicMethod(string name, Type? returnType, Type[]? parameterTypes, Type owner, bool skipVisibility) : this(name, MethodAttributes.Public | MethodAttributes.Static, CallingConventions.Standard, returnType, parameterTypes, owner, skipVisibility)
- {
- }
-
- [RequiresDynamicCode("Creating a DynamicMethod requires dynamic code.")]
- public DynamicMethod(string name, MethodAttributes attributes, CallingConventions callingConvention, Type? returnType, Type[]? parameterTypes, Type owner, bool skipVisibility) : this(name, attributes, callingConvention, returnType, parameterTypes, owner, owner?.Module, skipVisibility, false, true)
- {
- }
-
- [RequiresDynamicCode("Creating a DynamicMethod requires dynamic code.")]
- public DynamicMethod(string name, MethodAttributes attributes, CallingConventions callingConvention, Type? returnType, Type[]? parameterTypes, Module m, bool skipVisibility) : this(name, attributes, callingConvention, returnType, parameterTypes, null, m, skipVisibility, false, false)
- {
- }
-
- [RequiresDynamicCode("Creating a DynamicMethod requires dynamic code.")]
- public DynamicMethod(string name, Type? returnType, Type[]? parameterTypes) : this(name, returnType, parameterTypes, false)
- {
- }
-
- // FIXME: "Visibility is not restricted"
- [RequiresDynamicCode("Creating a DynamicMethod requires dynamic code.")]
- public DynamicMethod(string name, Type? returnType, Type[]? parameterTypes, bool restrictedSkipVisibility)
- : this(name, MethodAttributes.Public | MethodAttributes.Static, CallingConventions.Standard, returnType, parameterTypes, null, null, restrictedSkipVisibility, true, false)
- {
- }
-
- [RequiresDynamicCode("Creating a DynamicMethod requires dynamic code.")]
- [DynamicDependency(nameof(owner))] // Automatically keeps all previous fields too due to StructLayout
- private DynamicMethod(string name, MethodAttributes attributes, CallingConventions callingConvention, Type? returnType, Type[]? parameterTypes, Type? owner, Module? m, bool skipVisibility, bool anonHosted, bool typeOwner)
- {
- ArgumentNullException.ThrowIfNull(name);
- returnType ??= typeof(void);
- if (typeOwner)
- ArgumentNullException.ThrowIfNull(owner);
- if (!anonHosted)
- ArgumentNullException.ThrowIfNull(m);
- if (parameterTypes != null)
- {
- for (int i = 0; i < parameterTypes.Length; ++i)
- if (parameterTypes[i] == null)
- throw new ArgumentException($"Parameter {i} is null");
- }
- if (owner != null && (owner.IsArray || owner.IsInterface))
- {
- throw new ArgumentException("Owner can't be an array or an interface.");
- }
-
- m ??= AnonHostModuleHolder.AnonHostModule;
-
- this.name = name;
- this.attributes = attributes | MethodAttributes.Static;
- this.callingConvention = callingConvention;
- this.returnType = returnType;
- this.parameters = parameterTypes;
- this.owner = owner;
- this.module = m;
- this.skipVisibility = skipVisibility;
- }
-
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- private static extern void create_dynamic_method(DynamicMethod m);
-
- private void CreateDynMethod()
- {
- // Clearing of ilgen in create_dynamic_method is not yet synchronized for multiple threads
- lock (this)
- {
- if (mhandle.Value == IntPtr.Zero)
- {
- if (ilgen == null || ilgen.ILOffset == 0)
- throw new InvalidOperationException("Method '" + name + "' does not have a method body.");
-
- ilgen.label_fixup(this);
-
- // Have to create all DynamicMethods referenced by this one
- try
- {
- // Used to avoid cycles
- creating = true;
- if (refs != null)
- {
- for (int i = 0; i < refs.Length; ++i)
- {
- if (refs[i] is DynamicMethod m)
- {
- if (!m.creating)
- m.CreateDynMethod();
- }
- }
- }
- }
- finally
- {
- creating = false;
- }
- create_dynamic_method(this);
- ilgen = null;
- }
- }
- }
-
- public sealed override Delegate CreateDelegate(Type delegateType)
- {
- ArgumentNullException.ThrowIfNull(delegateType);
- if (deleg != null)
- return deleg;
-
- CreateDynMethod();
-
- deleg = Delegate.CreateDelegate(delegateType, null, this);
- return deleg;
- }
-
- public sealed override Delegate CreateDelegate(Type delegateType, object? target)
- {
- ArgumentNullException.ThrowIfNull(delegateType);
-
- CreateDynMethod();
-
- /* Can't cache the delegate since it is different for each target */
- return Delegate.CreateDelegate(delegateType, target, this);
- }
-
- public ParameterBuilder? DefineParameter(int position, ParameterAttributes attributes, string? parameterName)
- {
- //
- // Extension: Mono allows position == 0 for the return attribute
- //
- if ((position < 0) || (position > parameters!.Length))
- throw new ArgumentOutOfRangeException(nameof(position));
-
- RejectIfCreated();
-
- ParameterBuilder pb = new ParameterBuilder(this, position, attributes, parameterName);
- pinfo ??= new ParameterBuilder[parameters.Length + 1];
- pinfo[position] = pb;
- return pb;
- }
-
- public override MethodInfo GetBaseDefinition()
- {
- return this;
- }
-
- public override object[] GetCustomAttributes(bool inherit)
- {
- // support for MethodImplAttribute PCA
- return new object[] { new MethodImplAttribute((MethodImplOptions)GetMethodImplementationFlags()) };
- }
-
- public override object[] GetCustomAttributes(Type attributeType, bool inherit)
- {
- ArgumentNullException.ThrowIfNull(attributeType);
-
- if (attributeType.IsAssignableFrom(typeof(MethodImplAttribute)))
- {
- // avoid calling CreateInstance() in the common case where the type is Attribute
- object[] result = attributeType == typeof(Attribute) ? new Attribute[1] : (object[])Array.CreateInstance(attributeType, 1);
- result[0] = new MethodImplAttribute((MethodImplOptions)GetMethodImplementationFlags());
- return result;
- }
-
- return (object[])Array.CreateInstance(attributeType.IsValueType || attributeType.ContainsGenericParameters ? typeof(object) : attributeType, 0);
- }
-
- public DynamicILInfo GetDynamicILInfo() => il_info ??= new DynamicILInfo(this);
-
- public ILGenerator GetILGenerator()
- {
- return GetILGenerator(64);
- }
-
- public ILGenerator GetILGenerator(int streamSize)
- {
- if (((GetMethodImplementationFlags() & MethodImplAttributes.CodeTypeMask) !=
- MethodImplAttributes.IL) ||
- ((GetMethodImplementationFlags() & MethodImplAttributes.ManagedMask) !=
- MethodImplAttributes.Managed))
- throw new InvalidOperationException("Method body should not exist.");
- if (ilgen != null)
- return ilgen;
- ilgen = new ILGenerator(Module, new DynamicMethodTokenGenerator(this), streamSize);
- return ilgen;
- }
-
- public override MethodImplAttributes GetMethodImplementationFlags()
- {
- return MethodImplAttributes.IL | MethodImplAttributes.Managed | MethodImplAttributes.NoInlining;
- }
-
- public override ParameterInfo[] GetParameters()
- {
- return GetParametersInternal();
- }
-
- internal override ParameterInfo[] GetParametersInternal()
- {
- if (parameters == null)
- return Array.Empty<ParameterInfo>();
-
- ParameterInfo[] retval = new ParameterInfo[parameters.Length];
- for (int i = 0; i < parameters.Length; i++)
- {
- retval[i] = RuntimeParameterInfo.New(pinfo?[i + 1], parameters[i], this, i + 1);
- }
- return retval;
- }
-
- internal override int GetParametersCount()
- {
- return parameters == null ? 0 : parameters.Length;
- }
-
- internal override Type GetParameterType(int pos)
- {
- return parameters![pos];
- }
-
- /*
- public override object Invoke (object obj, object[] parameters) {
- CreateDynMethod ();
- method ??= new RuntimeMethodInfo (mhandle);
- return method.Invoke (obj, parameters);
- }
- */
-
- public override object? Invoke(object? obj, BindingFlags invokeAttr,
- Binder? binder, object?[]? parameters,
- CultureInfo? culture)
- {
- try
- {
- CreateDynMethod();
- method ??= new RuntimeMethodInfo(mhandle);
-
- return method.Invoke(obj, invokeAttr, binder, parameters, culture);
- }
- catch (MethodAccessException mae)
- {
- throw new TargetInvocationException("Method cannot be invoked.", mae);
- }
- }
-
- public override bool IsDefined(Type attributeType, bool inherit)
- {
- ArgumentNullException.ThrowIfNull(attributeType);
-
- if (attributeType.IsAssignableFrom(typeof(MethodImplAttribute)))
- return true;
- else
- return false;
- }
-
- public override string ToString()
- {
- var sbName = new ValueStringBuilder(MethodNameBufferSize);
- sbName.Append(ReturnType.FormatTypeName());
- sbName.Append(' ');
- sbName.Append(Name);
- sbName.Append('(');
- AppendParameters(ref sbName, parameters ?? Type.EmptyTypes, CallingConvention);
- sbName.Append(')');
- return sbName.ToString();
- }
-
- public override MethodAttributes Attributes
- {
- get
- {
- return attributes;
- }
- }
-
- public override CallingConventions CallingConvention
- {
- get
- {
- return callingConvention;
- }
- }
-
- public override Type? DeclaringType
- {
- get
- {
- return null;
- }
- }
-
- public bool InitLocals
- {
- get
- {
- return init_locals;
- }
- set
- {
- init_locals = value;
- }
- }
-
- public override RuntimeMethodHandle MethodHandle
- {
- get
- {
- return mhandle;
- }
- }
-
- public override Module Module
- {
- get
- {
- return module;
- }
- }
-
- public override string Name
- {
- get
- {
- return name;
- }
- }
-
- public override Type? ReflectedType
- {
- get
- {
- return null;
- }
- }
-
- public override ParameterInfo ReturnParameter
- {
- get
- {
- if (deleg == null)
- {
- return new RuntimeParameterInfo((ParameterBuilder?)null, returnType, this, -1);
- }
- return deleg.Method.ReturnParameter;
- }
- }
-
- public override Type ReturnType
- {
- get
- {
- return returnType;
- }
- }
-
- public override ICustomAttributeProvider ReturnTypeCustomAttributes => new EmptyCAHolder();
-
- /*
- public override int MetadataToken {
- get {
- return 0;
- }
- }
- */
-
- private void RejectIfCreated()
- {
- if (mhandle.Value != IntPtr.Zero)
- throw new InvalidOperationException("Type definition of the method is complete.");
- }
-
- internal int AddRef(object reference)
- {
- refs ??= new object?[4];
- if (nrefs >= refs.Length - 1)
- {
- object[] new_refs = new object[refs.Length * 2];
- Array.Copy(refs, new_refs, refs.Length);
- refs = new_refs;
- }
- refs[nrefs] = reference;
- /* Reserved by the runtime */
- refs[nrefs + 1] = null;
- nrefs += 2;
- return nrefs - 1;
- }
-
- // This class takes care of constructing the module in a thread safe manner
- private static class AnonHostModuleHolder
- {
- public static readonly Module anon_host_module = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName() { Name = "Anonymously Hosted DynamicMethods Assembly" }, AssemblyBuilderAccess.Run).ManifestModule;
-
- public static Module AnonHostModule
- {
- get
- {
- return anon_host_module;
- }
- }
- }
- }
-
- internal sealed class DynamicMethodTokenGenerator : ITokenGenerator
- {
-
- private DynamicMethod m;
-
- public DynamicMethodTokenGenerator(DynamicMethod m)
- {
- this.m = m;
- }
-
- public int GetToken(string str)
- {
- return m.AddRef(str);
- }
-
- public int GetToken(MethodBase method, Type[] opt_param_types)
- {
- throw new InvalidOperationException();
- }
-
- public int GetToken(MemberInfo member, bool create_open_instance)
- {
- return m.AddRef(member);
- }
-
- public int GetToken(SignatureHelper helper)
- {
- return m.AddRef(helper);
- }
- }
-}
-
-#endif
diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.notsupported.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.notsupported.cs
deleted file mode 100644
index e74c5397065..00000000000
--- a/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.notsupported.cs
+++ /dev/null
@@ -1,157 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-//
-// DynamicMethod.cs
-//
-// Authors:
-// Marek Safar (marek.safar@gmail.com)
-//
-// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-#if !MONO_FEATURE_SRE
-
-using System.Globalization;
-
-namespace System.Reflection.Emit
-{
- public sealed class DynamicMethod : MethodInfo
- {
- public DynamicMethod (string name, Type? returnType, Type[]? parameterTypes)
- {
- throw new PlatformNotSupportedException ();
- }
-
- public DynamicMethod (string name, Type? returnType, Type[]? parameterTypes, bool restrictedSkipVisibility)
- {
- throw new PlatformNotSupportedException ();
- }
-
- public DynamicMethod (string name, Type? returnType, Type[]? parameterTypes, Module m)
- {
- throw new PlatformNotSupportedException ();
- }
-
- public DynamicMethod (string name, Type? returnType, Type[]? parameterTypes, Type owner)
- {
- throw new PlatformNotSupportedException ();
- }
-
- public DynamicMethod (string name, Type? returnType, Type[]? parameterTypes, Module m, bool skipVisibility)
- {
- throw new PlatformNotSupportedException ();
- }
-
- public DynamicMethod (string name, Type? returnType, Type[]? parameterTypes, Type owner, bool skipVisibility)
- {
- throw new PlatformNotSupportedException ();
- }
-
- public DynamicMethod (string name, MethodAttributes attributes, CallingConventions callingConvention, Type? returnType, Type[]? parameterTypes, Module m, bool skipVisibility)
- {
- throw new PlatformNotSupportedException ();
- }
-
- public DynamicMethod (string name, MethodAttributes attributes, CallingConventions callingConvention, Type? returnType, Type[]? parameterTypes, Type owner, bool skipVisibility)
- {
- throw new PlatformNotSupportedException ();
- }
-
- public override MethodAttributes Attributes {
- get {
- throw new PlatformNotSupportedException ();
- }
- }
-
- public override CallingConventions CallingConvention {
- get {
- throw new PlatformNotSupportedException ();
- }
- }
-
- public override Type? DeclaringType {
- get {
- throw new PlatformNotSupportedException ();
- }
- }
-
- public bool InitLocals { get; set; }
-
- public override MethodImplAttributes MethodImplementationFlags {
- get {
- throw new PlatformNotSupportedException ();
- }
- }
-
- public override string Name {
- get {
- throw new PlatformNotSupportedException ();
- }
- }
-
- public override ParameterInfo ReturnParameter {
- get {
- throw new PlatformNotSupportedException ();
- }
- }
-
- public override Type? ReturnType {
- get {
- throw new PlatformNotSupportedException ();
- }
- }
-
- public ILGenerator GetILGenerator ()
- {
- throw new PlatformNotSupportedException ();
- }
-
- public ILGenerator GetILGenerator (int streamSize)
- {
- throw new PlatformNotSupportedException ();
- }
-
- public override ParameterInfo[] GetParameters ()
- {
- throw new PlatformNotSupportedException ();
- }
-
- public override RuntimeMethodHandle MethodHandle { get { throw new PlatformNotSupportedException (); } }
- public override Type ReflectedType { get { throw new PlatformNotSupportedException (); } }
- public override ICustomAttributeProvider ReturnTypeCustomAttributes { get { throw new PlatformNotSupportedException (); } }
-
- public override object[] GetCustomAttributes (bool inherit) { throw new PlatformNotSupportedException (); }
- public override object[] GetCustomAttributes (Type attributeType, bool inherit) { throw new PlatformNotSupportedException (); }
- public override MethodImplAttributes GetMethodImplementationFlags () { throw new PlatformNotSupportedException (); }
- public override MethodInfo GetBaseDefinition () { throw new PlatformNotSupportedException (); }
-
- public override object? Invoke (object? obj, BindingFlags invokeAttr, Binder? binder, object?[]? parameters, CultureInfo? culture) { throw new PlatformNotSupportedException (); }
-
- public override bool IsDefined (Type attributeType, bool inherit) { throw new PlatformNotSupportedException (); }
-
- public ParameterBuilder? DefineParameter (int position, ParameterAttributes attributes, string? parameterName) => throw new PlatformNotSupportedException ();
- public DynamicILInfo GetDynamicILInfo () => throw new PlatformNotSupportedException ();
- }
-}
-
-#endif
diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilder.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilder.Mono.cs
index b226076a031..67b975b658a 100644
--- a/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilder.Mono.cs
+++ b/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilder.Mono.cs
@@ -33,8 +33,8 @@
// (C) 2001 Ximian, Inc. http://www.ximian.com
//
-#if MONO_FEATURE_SRE
using System.Collections.Generic;
+using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -48,7 +48,7 @@ namespace System.Reflection.Emit
{
#region Sync with MonoReflectionModuleBuilder in object-internals.h
-#region This class inherits from Module, but the runtime expects it to have the same layout as MonoModule
+#region This class inherits from Module, but the runtime expects it to have the same layout as RuntimeModule
internal IntPtr _impl; /* a pointer to a MonoImage */
internal Assembly assembly;
internal string fqname;
@@ -507,6 +507,17 @@ namespace System.Reflection.Emit
return field.MetadataToken;
}
+ internal static Module GetRuntimeModuleFromModule(Module? m)
+ {
+ if (m is ModuleBuilder)
+ {
+ // TODO: Should return RuntimeModule
+ return m;
+ }
+
+ return (m as RuntimeModule)!;
+ }
+
// FIXME:
internal int GetSignatureToken(byte[] sigBytes, int sigLength)
{
@@ -777,7 +788,7 @@ namespace System.Reflection.Emit
internal IntPtr GetUnderlyingNativeHandle() { return _impl; }
- protected override ModuleHandle GetModuleHandleImpl() => new ModuleHandle(_impl);
+ private protected override ModuleHandle GetModuleHandleImpl() => new ModuleHandle(_impl);
[RequiresUnreferencedCode("Methods might be removed")]
protected override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers)
@@ -951,5 +962,3 @@ namespace System.Reflection.Emit
}
}
}
-
-#endif
diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeModule.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeModule.cs
index 19aa452fe5f..a4ee059ee16 100644
--- a/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeModule.cs
+++ b/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeModule.cs
@@ -394,7 +394,7 @@ namespace System.Reflection
internal IntPtr GetUnderlyingNativeHandle() { return _impl; }
- protected override ModuleHandle GetModuleHandleImpl() => new ModuleHandle(_impl);
+ private protected override ModuleHandle GetModuleHandleImpl() => new ModuleHandle(_impl);
// This calls ves_icall_reflection_get_token, so needs a Module argument
[MethodImplAttribute(MethodImplOptions.InternalCall)]
diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeParameterInfo.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeParameterInfo.cs
index ded562df410..32f798e1bec 100644
--- a/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeParameterInfo.cs
+++ b/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeParameterInfo.cs
@@ -121,6 +121,16 @@ namespace System.Reflection
this.marshalAs = marshalAs;
}
+ // ctor for no metadata MethodInfo in the DynamicMethod and RuntimeMethodInfo cases
+ internal RuntimeParameterInfo(MethodInfo owner, string? name, Type parameterType, int position)
+ {
+ MemberImpl = owner;
+ NameImpl = name;
+ ClassImpl = parameterType;
+ PositionImpl = position;
+ AttrsImpl = ParameterAttributes.None;
+ }
+
public override
object? DefaultValue
{
@@ -218,7 +228,8 @@ namespace System.Reflection
[MethodImplAttribute(MethodImplOptions.InternalCall)]
internal extern int GetMetadataToken();
- public override Type[] GetOptionalCustomModifiers() => GetCustomModifiers(true);
+ public override Type[] GetOptionalCustomModifiers() =>
+ MemberImpl is DynamicMethod.RTDynamicMethod ? Type.EmptyTypes : GetCustomModifiers(true);
internal object[]? GetPseudoCustomAttributes()
{
@@ -289,7 +300,8 @@ namespace System.Reflection
return attrsData;
}
- public override Type[] GetRequiredCustomModifiers() => GetCustomModifiers(false);
+ public override Type[] GetRequiredCustomModifiers() =>
+ MemberImpl is DynamicMethod.RTDynamicMethod ? Type.EmptyTypes : GetCustomModifiers(false);
public override bool HasDefaultValue
{
@@ -324,6 +336,16 @@ namespace System.Reflection
return new RuntimeParameterInfo(type, member, marshalAs);
}
+ internal void SetName(string? name)
+ {
+ NameImpl = name;
+ }
+
+ internal void SetAttributes(ParameterAttributes attributes)
+ {
+ AttrsImpl = attributes;
+ }
+
private Type[] GetCustomModifiers(bool optional) => GetTypeModifiers(ParameterType, Member, Position, optional) ?? Type.EmptyTypes;
}
}
diff --git a/src/mono/System.Private.CoreLib/src/System/Runtime/InteropServices/GCHandle.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Runtime/InteropServices/GCHandle.Mono.cs
index 0944da824d8..610065f1e65 100644
--- a/src/mono/System.Private.CoreLib/src/System/Runtime/InteropServices/GCHandle.Mono.cs
+++ b/src/mono/System.Private.CoreLib/src/System/Runtime/InteropServices/GCHandle.Mono.cs
@@ -8,15 +8,15 @@ namespace System.Runtime.InteropServices
public partial struct GCHandle
{
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- private static extern IntPtr InternalAlloc(object? value, GCHandleType type);
+ internal static extern IntPtr InternalAlloc(object? value, GCHandleType type);
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- private static extern void InternalFree(IntPtr handle);
+ internal static extern void InternalFree(IntPtr handle);
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- private static extern object? InternalGet(IntPtr handle);
+ internal static extern object? InternalGet(IntPtr handle);
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- private static extern void InternalSet(IntPtr handle, object? value);
+ internal static extern void InternalSet(IntPtr handle, object? value);
}
}
diff --git a/src/mono/System.Private.CoreLib/src/System/WeakReference.Mono.cs b/src/mono/System.Private.CoreLib/src/System/WeakReference.Mono.cs
deleted file mode 100644
index 6b2de1512a0..00000000000
--- a/src/mono/System.Private.CoreLib/src/System/WeakReference.Mono.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.Runtime.InteropServices;
-
-namespace System
-{
- public partial class WeakReference
- {
- private bool trackResurrection;
- private GCHandle handle;
-
- public virtual bool IsAlive => Target != null;
-
- public virtual object? Target
- {
- get
- {
- if (!handle.IsAllocated)
- return null;
- return handle.Target;
- }
- set
- {
- handle.Target = value;
- }
- }
-
- ~WeakReference()
- {
- handle.Free();
- }
-
- private void Create(object? target, bool trackResurrection)
- {
- if (trackResurrection)
- {
- this.trackResurrection = true;
- handle = GCHandle.Alloc(target, GCHandleType.WeakTrackResurrection);
- }
- else
- {
- handle = GCHandle.Alloc(target, GCHandleType.Weak);
- }
- }
-
- private bool IsTrackResurrection() => trackResurrection;
- }
-}
diff --git a/src/mono/System.Private.CoreLib/src/System/WeakReference.T.Mono.cs b/src/mono/System.Private.CoreLib/src/System/WeakReference.T.Mono.cs
deleted file mode 100644
index 73011f68122..00000000000
--- a/src/mono/System.Private.CoreLib/src/System/WeakReference.T.Mono.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.Diagnostics.CodeAnalysis;
-using System.Runtime.InteropServices;
-
-namespace System
-{
- public partial class WeakReference<T>
- {
- private GCHandle handle;
- private bool trackResurrection;
-
- private T? Target
- {
- get
- {
- GCHandle h = handle;
- return h.IsAllocated ? (T?)h.Target : null;
- }
- }
-
- ~WeakReference()
- {
- handle.Free();
- }
-
- private void Create(T target, bool trackResurrection)
- {
- if (trackResurrection)
- {
- this.trackResurrection = true;
- handle = GCHandle.Alloc(target, GCHandleType.WeakTrackResurrection);
- }
- else
- {
- handle = GCHandle.Alloc(target, GCHandleType.Weak);
- }
- }
-
- public void SetTarget(T target)
- {
- handle.Target = target;
- }
-
- private bool IsTrackResurrection() => trackResurrection;
- }
-}
diff --git a/src/mono/cmake/config.h.in b/src/mono/cmake/config.h.in
index 4ac722c9d92..71753f1d47e 100644
--- a/src/mono/cmake/config.h.in
+++ b/src/mono/cmake/config.h.in
@@ -612,6 +612,9 @@
/* Define to 1 if `st_atimespec' is a member of `struct stat'. */
#cmakedefine HAVE_STRUCT_STAT_ST_ATIMESPEC 1
+/* Define to 1 if `super_class' is a member of `struct objc_super'. */
+#cmakedefine HAVE_OBJC_SUPER_SUPER_CLASS 1
+
/* Define to 1 if you have the <sys/time.h> header file. */
#cmakedefine HAVE_SYS_TIME_H 1
diff --git a/src/mono/cmake/configure.cmake b/src/mono/cmake/configure.cmake
index 51cb315d6dc..ae55fd112b3 100644
--- a/src/mono/cmake/configure.cmake
+++ b/src/mono/cmake/configure.cmake
@@ -129,6 +129,10 @@ check_struct_has_member("struct sockaddr_in6" sin6_len "netinet/in.h" HAVE_SOCKA
check_struct_has_member("struct stat" st_atim "sys/types.h;sys/stat.h;unistd.h" HAVE_STRUCT_STAT_ST_ATIM)
check_struct_has_member("struct stat" st_atimespec "sys/types.h;sys/stat.h;unistd.h" HAVE_STRUCT_STAT_ST_ATIMESPEC)
+if (HOST_DARWIN)
+ check_struct_has_member("struct objc_super" super_class "objc/runtime.h;objc/message.h" HAVE_OBJC_SUPER_SUPER_CLASS)
+endif()
+
check_type_size("int" SIZEOF_INT)
check_type_size("void*" SIZEOF_VOID_P)
check_type_size("long" SIZEOF_LONG)
diff --git a/src/mono/dlls/mscordbi/cordb-assembly.cpp b/src/mono/dlls/mscordbi/cordb-assembly.cpp
index 16123d1ddd6..79ec72a16c4 100644
--- a/src/mono/dlls/mscordbi/cordb-assembly.cpp
+++ b/src/mono/dlls/mscordbi/cordb-assembly.cpp
@@ -21,7 +21,6 @@
#include <metamodelrw.h>
#include "mdlog.h"
-#include "mdperf.h"
#include "regmeta.h"
#include "ex.h"
diff --git a/src/mono/mono/component/debugger-agent.c b/src/mono/mono/component/debugger-agent.c
index edbbada76af..0d155aed44e 100644
--- a/src/mono/mono/component/debugger-agent.c
+++ b/src/mono/mono/component/debugger-agent.c
@@ -5078,6 +5078,8 @@ buffer_add_value_full (Buffer *buf, MonoType *t, void *addr, MonoDomain *domain,
/* This can happen with compiler generated locals */
//PRINT_MSG ("%s\n", mono_type_full_name (t));
buffer_add_byte (buf, VALUE_TYPE_ID_NULL);
+ if (CHECK_PROTOCOL_VERSION (2, 59))
+ buffer_add_info_for_null_value (buf, t, domain);
return;
}
g_assert (*(void**)addr);
@@ -5231,6 +5233,8 @@ buffer_add_value_full (Buffer *buf, MonoType *t, void *addr, MonoDomain *domain,
} else {
/* The client can't handle PARENT_VTYPE */
buffer_add_byte (buf, VALUE_TYPE_ID_NULL);
+ if (CHECK_PROTOCOL_VERSION (2, 59))
+ buffer_add_info_for_null_value (buf, t, domain);
}
break;
} else {
@@ -5613,6 +5617,11 @@ decode_value (MonoType *t, MonoDomain *domain, gpointer void_addr, gpointer void
ErrorCode err;
int type = decode_byte (buf, &buf, limit);
+ if (m_type_is_byref (t)) {
+ *(guint8**)addr = (guint8 *)g_malloc (sizeof (void*)); //when the object will be deleted it will delete this memory allocated here together?
+ addr = *(guint8**)addr;
+ }
+
if (t->type == MONO_TYPE_GENERICINST && mono_class_is_nullable (mono_class_from_mono_type_internal (t))) {
MonoType *targ = t->data.generic_class->context.class_inst->type_argv [0];
guint8 *nullable_buf;
@@ -6082,7 +6091,7 @@ mono_do_invoke_method (DebuggerTlsData *tls, Buffer *buf, InvokeData *invoke, gu
}
} else {
if (!(m->flags & METHOD_ATTRIBUTE_STATIC) || (m->flags & METHOD_ATTRIBUTE_STATIC && !CHECK_PROTOCOL_VERSION (2, 59))) { //on icordbg I couldn't find an object when invoking a static method maybe I can change this later
- err = decode_value(m_class_get_byval_arg(m->klass), domain, this_buf, p, &p, end, FALSE);
+ err = decode_value (m_class_get_byval_arg (m->klass), domain, this_buf, p, &p, end, FALSE);
if (err != ERR_NONE)
return err;
}
diff --git a/src/mono/mono/eventpipe/ep-rt-mono.c b/src/mono/mono/eventpipe/ep-rt-mono.c
index ad5d7c67ba9..2be10d51cbb 100644
--- a/src/mono/mono/eventpipe/ep-rt-mono.c
+++ b/src/mono/mono/eventpipe/ep-rt-mono.c
@@ -2120,13 +2120,13 @@ ep_rt_mono_rand_try_get_bytes (
}
char *
-ep_rt_mono_get_managed_cmd_line ()
+ep_rt_mono_get_managed_cmd_line (void)
{
return mono_runtime_get_managed_cmd_line ();
}
char *
-ep_rt_mono_get_os_cmd_line ()
+ep_rt_mono_get_os_cmd_line (void)
{
MONO_REQ_GC_NEUTRAL_MODE;
@@ -3084,7 +3084,7 @@ struct _BulkTypeEventLogger {
static
BulkTypeEventLogger*
-ep_rt_bulk_type_event_logger_alloc ()
+ep_rt_bulk_type_event_logger_alloc (void)
{
BulkTypeEventLogger *type_logger = g_malloc0 (sizeof (BulkTypeEventLogger));
type_logger->bulk_type_event_buffer = g_malloc0 (sizeof (uint8_t) * MAX_SIZE_OF_EVENT_BUFFER);
diff --git a/src/mono/mono/eventpipe/ep-rt-mono.h b/src/mono/mono/eventpipe/ep-rt-mono.h
index 348c7cbd352..2e3bdabac80 100644
--- a/src/mono/mono/eventpipe/ep-rt-mono.h
+++ b/src/mono/mono/eventpipe/ep-rt-mono.h
@@ -1362,6 +1362,14 @@ ep_rt_thread_create (
static
inline
void
+ep_rt_set_server_name(void)
+{
+ mono_native_thread_set_name(mono_native_thread_id_get(), ".NET EventPipe");
+}
+
+static
+inline
+void
ep_rt_thread_sleep (uint64_t ns)
{
MONO_REQ_GC_UNSAFE_MODE;
@@ -1955,7 +1963,7 @@ ep_rt_runtime_version_get_utf8 (void)
static
inline
void
-ep_rt_thread_setup ()
+ep_rt_thread_setup (void)
{
ep_rt_mono_thread_setup (false);
}
diff --git a/src/mono/mono/metadata/appdomain.c b/src/mono/mono/metadata/appdomain.c
index 389beae290f..686ec7e0ed5 100644
--- a/src/mono/mono/metadata/appdomain.c
+++ b/src/mono/mono/metadata/appdomain.c
@@ -977,7 +977,7 @@ runtimeconfig_json_read_props (const char *ptr, const char **endp, int nprops, g
}
void
-mono_security_enable_core_clr ()
+mono_security_enable_core_clr (void)
{
// no-op
}
diff --git a/src/mono/mono/metadata/assembly.c b/src/mono/mono/metadata/assembly.c
index 43826b5a923..07023d85f49 100644
--- a/src/mono/mono/metadata/assembly.c
+++ b/src/mono/mono/metadata/assembly.c
@@ -2680,7 +2680,7 @@ mono_assembly_load_with_partial_name_internal (const char *name, MonoAssemblyLoa
}
MonoAssembly*
-mono_assembly_load_corlib ()
+mono_assembly_load_corlib (void)
{
MonoAssemblyName *aname;
MonoAssemblyOpenRequest req;
diff --git a/src/mono/mono/metadata/boehm-gc.c b/src/mono/mono/metadata/boehm-gc.c
index 718849dfc10..879aadfa1af 100644
--- a/src/mono/mono/metadata/boehm-gc.c
+++ b/src/mono/mono/metadata/boehm-gc.c
@@ -1097,12 +1097,12 @@ mono_gc_set_stack_end (void *stack_end)
{
}
-void GC_start_blocking ()
+void GC_start_blocking (void)
{
}
-void GC_end_blocking ()
+void GC_end_blocking (void)
{
}
diff --git a/src/mono/mono/metadata/class-init.c b/src/mono/mono/metadata/class-init.c
index ad3eee64e68..32576a730d6 100644
--- a/src/mono/mono/metadata/class-init.c
+++ b/src/mono/mono/metadata/class-init.c
@@ -2553,13 +2553,13 @@ initialize_object_slots (MonoClass *klass)
}
int
-mono_class_get_object_finalize_slot ()
+mono_class_get_object_finalize_slot (void)
{
return finalize_slot;
}
MonoMethod *
-mono_class_get_default_finalize_method ()
+mono_class_get_default_finalize_method (void)
{
int const i = finalize_slot;
return (i < 0) ? NULL : mono_defaults.object_class->vtable [i];
diff --git a/src/mono/mono/metadata/class-internals.h b/src/mono/mono/metadata/class-internals.h
index d0158da21a6..68a21cdf9d4 100644
--- a/src/mono/mono/metadata/class-internals.h
+++ b/src/mono/mono/metadata/class-internals.h
@@ -921,6 +921,8 @@ typedef struct {
MonoClass *generic_ienumerator_class;
MonoClass *alc_class;
MonoClass *appcontext_class;
+ MonoClass *weakreference_class;
+ MonoClass *generic_weakreference_class;
} MonoDefaults;
/* If you need a MonoType, use one of the mono_get_*_type () functions in class-inlines.h */
diff --git a/src/mono/mono/metadata/class-setup-vtable.c b/src/mono/mono/metadata/class-setup-vtable.c
index bc949189a3c..e9dc6997d89 100644
--- a/src/mono/mono/metadata/class-setup-vtable.c
+++ b/src/mono/mono/metadata/class-setup-vtable.c
@@ -1656,6 +1656,10 @@ check_vtable_covariant_override_impls (MonoClass *klass, MonoMethod **vtable, in
break;
MonoMethod *prev_impl = cur_class->vtable[slot];
+ // if the current class re-abstracted the method, it may not be there.
+ if (!prev_impl)
+ continue;
+
if (prev_impl != last_checked_prev_override) {
/*
* the new impl should be subsumed by the prior one, ie this
diff --git a/src/mono/mono/metadata/domain.c b/src/mono/mono/metadata/domain.c
index ce643bd129c..94d1de3be33 100644
--- a/src/mono/mono/metadata/domain.c
+++ b/src/mono/mono/metadata/domain.c
@@ -290,6 +290,11 @@ mono_init_internal (const char *root_domain_name)
mono_defaults.alc_class = mono_class_get_assembly_load_context_class ();
mono_defaults.appcontext_class = mono_class_try_load_from_name (mono_defaults.corlib, "System", "AppContext");
+ mono_defaults.weakreference_class = mono_class_try_load_from_name (
+ mono_defaults.corlib, "System", "WeakReference");
+ mono_defaults.generic_weakreference_class = mono_class_try_load_from_name (
+ mono_defaults.corlib, "System", "WeakReference`1");
+
// in the past we got a filename as the root_domain_name so try to get the basename
domain->friendly_name = g_path_get_basename (root_domain_name);
@@ -380,7 +385,7 @@ mono_get_root_domain (void)
* \returns the current domain
*/
MonoDomain *
-mono_domain_get ()
+mono_domain_get (void)
{
return GET_APPDOMAIN ();
}
diff --git a/src/mono/mono/metadata/exception.c b/src/mono/mono/metadata/exception.c
index 0e3a9efaabf..0095d8766b9 100644
--- a/src/mono/mono/metadata/exception.c
+++ b/src/mono/mono/metadata/exception.c
@@ -464,7 +464,7 @@ mono_get_exception_serialization (const char *msg)
* \returns a new instance of the \c System.InvalidCastException
*/
MonoException *
-mono_get_exception_invalid_cast ()
+mono_get_exception_invalid_cast (void)
{
return mono_exception_from_name (mono_get_corlib (), "System", "InvalidCastException");
}
@@ -493,7 +493,7 @@ mono_exception_new_invalid_operation (const char *msg, MonoError *error)
* \returns a new instance of the \c System.IndexOutOfRangeException
*/
MonoException *
-mono_get_exception_index_out_of_range ()
+mono_get_exception_index_out_of_range (void)
{
return mono_exception_from_name (mono_get_corlib (), "System",
"IndexOutOfRangeException");
diff --git a/src/mono/mono/metadata/icall-def.h b/src/mono/mono/metadata/icall-def.h
index 073590ef5a9..5e95dcfdcaf 100644
--- a/src/mono/mono/metadata/icall-def.h
+++ b/src/mono/mono/metadata/icall-def.h
@@ -303,7 +303,7 @@ HANDLES(CATTRB_1, "GetBlob", ves_icall_CustomAttributeBuilder_GetBlob, MonoArray
#endif
ICALL_TYPE(DYNM, "System.Reflection.Emit.DynamicMethod", DYNM_1)
-HANDLES(DYNM_1, "create_dynamic_method", ves_icall_DynamicMethod_create_dynamic_method, void, 1, (MonoReflectionDynamicMethod))
+HANDLES(DYNM_1, "create_dynamic_method", ves_icall_DynamicMethod_create_dynamic_method, void, 4, (MonoReflectionDynamicMethod, MonoString, guint32, guint32))
ICALL_TYPE(ENUMB, "System.Reflection.Emit.EnumBuilder", ENUMB_1)
HANDLES(ENUMB_1, "setup_enum_type", ves_icall_EnumBuilder_setup_enum_type, void, 2, (MonoReflectionType, MonoReflectionType))
diff --git a/src/mono/mono/metadata/icall.c b/src/mono/mono/metadata/icall.c
index c8b16f7f400..6c9b9b8424f 100644
--- a/src/mono/mono/metadata/icall.c
+++ b/src/mono/mono/metadata/icall.c
@@ -6390,12 +6390,6 @@ ves_icall_RuntimeParameterInfo_GetTypeModifiers (MonoReflectionTypeHandle rt, Mo
if (!(method = prop->get))
method = prop->set;
g_assert (method);
- } else if (strcmp (m_class_get_name (member_class), "DynamicMethod") == 0 && strcmp (m_class_get_name_space (member_class), "System.Reflection.Emit") == 0) {
- MonoArrayHandle params = MONO_HANDLE_NEW_GET (MonoArray, MONO_HANDLE_CAST (MonoReflectionDynamicMethod, member), parameters);
- MonoReflectionTypeHandle t = MONO_HANDLE_NEW (MonoReflectionType, NULL);
- MONO_HANDLE_ARRAY_GETREF (t, params, pos);
- type = mono_reflection_type_handle_mono_type (t, error);
- return type_array_from_modifiers (type, optional, error);
} else {
char *type_name = mono_type_get_full_name (member_class);
mono_error_set_not_supported (error, "Custom modifiers on a ParamInfo with member %s are not supported", type_name);
diff --git a/src/mono/mono/metadata/loader.c b/src/mono/mono/metadata/loader.c
index 86b60c0a6e3..932b2fa8708 100644
--- a/src/mono/mono/metadata/loader.c
+++ b/src/mono/mono/metadata/loader.c
@@ -79,7 +79,7 @@ static gint32 methods_size;
static gint32 signatures_size;
void
-mono_loader_init ()
+mono_loader_init (void)
{
static gboolean inited;
diff --git a/src/mono/mono/metadata/object-internals.h b/src/mono/mono/metadata/object-internals.h
index 4494828c382..7725b259463 100644
--- a/src/mono/mono/metadata/object-internals.h
+++ b/src/mono/mono/metadata/object-internals.h
@@ -651,6 +651,11 @@ typedef struct {
guint32 intType;
} MonoClassInterfaceAttribute;
+typedef struct {
+ MonoObject object;
+ gsize handleAndKind;
+} MonoWeakReference;
+
/* Safely access System.Delegate from native code */
TYPED_HANDLE_DECL (MonoDelegate);
@@ -1327,13 +1332,11 @@ typedef struct {
typedef struct {
MonoObject object;
MonoMethod *mhandle;
- MonoString *name;
MonoReflectionType *rtype;
MonoArray *parameters;
- guint32 attrs;
- guint32 call_conv;
MonoReflectionModule *module;
MonoBoolean skip_visibility;
+ MonoBoolean restricted_skip_visibility;
MonoBoolean init_locals;
MonoReflectionILGen *ilgen;
gint32 nrefs;
diff --git a/src/mono/mono/metadata/sgen-mono.c b/src/mono/mono/metadata/sgen-mono.c
index 44dfc42f2d3..64f8bda2b27 100644
--- a/src/mono/mono/metadata/sgen-mono.c
+++ b/src/mono/mono/metadata/sgen-mono.c
@@ -454,6 +454,21 @@ is_finalization_aware (MonoObject *obj)
return (vt->gc_bits & SGEN_GC_BIT_FINALIZER_AWARE) == SGEN_GC_BIT_FINALIZER_AWARE;
}
+gboolean
+sgen_client_object_finalize_eagerly (GCObject *obj)
+{
+ if (obj->vtable->klass == mono_defaults.weakreference_class ||
+ obj->vtable->klass == mono_defaults.generic_weakreference_class) {
+ MonoWeakReference *wr = (MonoWeakReference*)obj;
+ MonoGCHandle gc_handle = (MonoGCHandle)(wr->handleAndKind & ~(gsize)1);
+ mono_gchandle_free_internal (gc_handle);
+ wr->handleAndKind &= (gsize)1;
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
void
sgen_client_object_queued_for_finalization (GCObject *obj)
{
@@ -2133,7 +2148,7 @@ mono_gc_set_gc_callbacks (MonoGCCallbacks *callbacks)
}
MonoGCCallbacks *
-mono_gc_get_gc_callbacks ()
+mono_gc_get_gc_callbacks (void)
{
return &gc_callbacks;
}
diff --git a/src/mono/mono/metadata/sgen-stw.c b/src/mono/mono/metadata/sgen-stw.c
index 3a93bec6bbf..29a19aef06a 100644
--- a/src/mono/mono/metadata/sgen-stw.c
+++ b/src/mono/mono/metadata/sgen-stw.c
@@ -44,7 +44,7 @@ static void unified_suspend_stop_world (MonoThreadInfoFlags flags, unified_suspe
static TV_DECLARE (end_of_last_stw);
-guint64 mono_time_since_last_stw ()
+guint64 mono_time_since_last_stw (void)
{
if (end_of_last_stw == 0)
return 0;
diff --git a/src/mono/mono/metadata/sre.c b/src/mono/mono/metadata/sre.c
index 717e67bafed..36a58f012a6 100644
--- a/src/mono/mono/metadata/sre.c
+++ b/src/mono/mono/metadata/sre.c
@@ -74,7 +74,7 @@ static char* string_to_utf8_image_raw (MonoImage *image, MonoString *s, MonoErro
#ifndef DISABLE_REFLECTION_EMIT
static guint32 mono_image_get_sighelper_token (MonoDynamicImage *assembly, MonoReflectionSigHelperHandle helper, MonoError *error);
static gboolean ensure_runtime_vtable (MonoClass *klass, MonoError *error);
-static void reflection_methodbuilder_from_dynamic_method (ReflectionMethodBuilder *rmb, MonoReflectionDynamicMethod *mb);
+static void reflection_methodbuilder_from_dynamic_method (ReflectionMethodBuilder *rmb, MonoReflectionDynamicMethod *mb, MonoStringHandle name, guint32 attrs, guint32 call_conv);
static gboolean reflection_setup_internal_class (MonoReflectionTypeBuilderHandle tb, MonoError *error);
static gboolean reflection_init_generic_class (MonoReflectionTypeBuilderHandle tb, MonoError *error);
static gboolean reflection_setup_class_hierarchy (GHashTable *unparented, MonoError *error);
@@ -589,7 +589,7 @@ mono_reflection_methodbuilder_from_ctor_builder (ReflectionMethodBuilder *rmb, M
}
static void
-reflection_methodbuilder_from_dynamic_method (ReflectionMethodBuilder *rmb, MonoReflectionDynamicMethod *mb)
+reflection_methodbuilder_from_dynamic_method (ReflectionMethodBuilder *rmb, MonoReflectionDynamicMethod *mb, MonoStringHandle name, guint32 attrs, guint32 call_conv)
{
MONO_REQ_GC_UNSAFE_MODE;
@@ -605,17 +605,17 @@ reflection_methodbuilder_from_dynamic_method (ReflectionMethodBuilder *rmb, Mono
rmb->generic_container = NULL;
rmb->opt_types = NULL;
rmb->pinfo = NULL;
- rmb->attrs = mb->attrs;
+ rmb->attrs = attrs;
rmb->iattrs = 0;
- rmb->call_conv = mb->call_conv;
+ rmb->call_conv = call_conv;
rmb->code = NULL;
rmb->type = (MonoObject *) mb->owner;
MONO_HANDLE_PIN (rmb->type);
- rmb->name = mb->name;
+ rmb->name = MONO_HANDLE_RAW (name);
MONO_HANDLE_PIN (rmb->name);
rmb->table_idx = NULL;
rmb->init_locals = mb->init_locals;
- rmb->skip_visibility = mb->skip_visibility;
+ rmb->skip_visibility = mb->skip_visibility | mb->restricted_skip_visibility;
rmb->return_modreq = NULL;
rmb->return_modopt = NULL;
rmb->param_modreq = NULL;
@@ -1839,7 +1839,7 @@ method_builder_to_signature (MonoImage *image, MonoReflectionMethodBuilderHandle
}
static MonoMethodSignature*
-dynamic_method_to_signature (MonoReflectionDynamicMethodHandle method, MonoError *error)
+dynamic_method_to_signature (MonoReflectionDynamicMethodHandle method, guint32 attrs, MonoError *error)
{
HANDLE_FUNCTION_ENTER ();
MonoMethodSignature *sig = NULL;
@@ -1849,7 +1849,7 @@ dynamic_method_to_signature (MonoReflectionDynamicMethodHandle method, MonoError
sig = parameters_to_signature (NULL, MONO_HANDLE_NEW_GET (MonoArray, method, parameters),
MONO_HANDLE_CAST (MonoArray, NULL_HANDLE), MONO_HANDLE_CAST (MonoArray, NULL_HANDLE), error);
goto_if_nok (error, leave);
- sig->hasthis = MONO_HANDLE_GETVAL (method, attrs) & METHOD_ATTRIBUTE_STATIC? 0: 1;
+ sig->hasthis = attrs & METHOD_ATTRIBUTE_STATIC? 0: 1;
MonoReflectionTypeHandle rtype;
rtype = MONO_HANDLE_NEW_GET (MonoReflectionType, method, rtype);
if (!MONO_HANDLE_IS_NULL (rtype)) {
@@ -3935,7 +3935,7 @@ free_dynamic_method (void *dynamic_method)
}
static gboolean
-reflection_create_dynamic_method (MonoReflectionDynamicMethodHandle ref_mb, MonoError *error)
+reflection_create_dynamic_method (MonoReflectionDynamicMethodHandle ref_mb, MonoStringHandle name, guint32 attrs, guint32 call_conv, MonoError *error)
{
/* We need to clear handles for rmb fields created in reflection_methodbuilder_from_dynamic_method */
HANDLE_FUNCTION_ENTER ();
@@ -3959,11 +3959,11 @@ reflection_create_dynamic_method (MonoReflectionDynamicMethodHandle ref_mb, Mono
mono_loader_unlock ();
}
- sig = dynamic_method_to_signature (ref_mb, error);
+ sig = dynamic_method_to_signature (ref_mb, attrs, error);
goto_if_nok (error, exit_false);
mb = MONO_HANDLE_RAW (ref_mb); /* FIXME convert reflection_create_dynamic_method to use handles */
- reflection_methodbuilder_from_dynamic_method (&rmb, mb);
+ reflection_methodbuilder_from_dynamic_method (&rmb, mb, name, attrs, call_conv);
/*
* Resolve references.
@@ -4070,9 +4070,9 @@ exit:
}
void
-ves_icall_DynamicMethod_create_dynamic_method (MonoReflectionDynamicMethodHandle mb, MonoError *error)
+ves_icall_DynamicMethod_create_dynamic_method (MonoReflectionDynamicMethodHandle mb, MonoStringHandle name, guint32 attrs, guint32 call_conv, MonoError *error)
{
- (void) reflection_create_dynamic_method (mb, error);
+ (void) reflection_create_dynamic_method (mb, name, attrs, call_conv, error);
}
#endif /* DISABLE_REFLECTION_EMIT */
@@ -4385,7 +4385,7 @@ ves_icall_TypeBuilder_create_runtime_class (MonoReflectionTypeBuilderHandle tb,
}
void
-ves_icall_DynamicMethod_create_dynamic_method (MonoReflectionDynamicMethodHandle mb, MonoError *error)
+ves_icall_DynamicMethod_create_dynamic_method (MonoReflectionDynamicMethodHandle mb, MonoStringHandle name, guint32 attrs, guint32 call_conv, MonoError *error)
{
error_init (error);
}
diff --git a/src/mono/mono/mini/aot-compiler.c b/src/mono/mono/mini/aot-compiler.c
index 39d73d02e46..005298f0fab 100644
--- a/src/mono/mono/mini/aot-compiler.c
+++ b/src/mono/mono/mini/aot-compiler.c
@@ -396,6 +396,10 @@ typedef struct MonoAotCompile {
GList *profile_data;
GHashTable *profile_methods;
GHashTable *blob_hash;
+ /* Maps MonoMethod*->GPtrArray* */
+ GHashTable *gshared_instances;
+ /* Hash of gshared methods where specific instances are preferred */
+ GHashTable *prefer_instances;
#ifdef EMIT_WIN32_UNWIND_INFO
GList *unwind_info_section_cache;
#endif
@@ -4302,8 +4306,23 @@ mono_dedup_cache_method (MonoAotCompile *acfg, MonoMethod *method)
g_hash_table_insert (acfg->dedup_stats, stats_name, GUINT_TO_POINTER (count));
}
+static gboolean
+is_open_method (MonoMethod *method)
+{
+ MonoGenericContext *context;
+
+ if (!method->is_inflated)
+ return FALSE;
+ context = mono_method_get_context (method);
+ if (context->class_inst && context->class_inst->is_open)
+ return TRUE;
+ if (context->method_inst && context->method_inst->is_open)
+ return TRUE;
+ return FALSE;
+}
+
static void
-add_extra_method_with_depth (MonoAotCompile *acfg, MonoMethod *method, int depth)
+add_extra_method_full (MonoAotCompile *acfg, MonoMethod *method, gboolean prefer_gshared, int depth)
{
ERROR_DECL (error);
@@ -4315,7 +4334,7 @@ add_extra_method_with_depth (MonoAotCompile *acfg, MonoMethod *method, int depth
return;
}
- if (mono_method_is_generic_sharable_full (method, TRUE, TRUE, FALSE)) {
+ if (prefer_gshared && mono_method_is_generic_sharable_full (method, TRUE, TRUE, FALSE)) {
MonoMethod *orig = method;
method = mini_get_shared_method_full (method, SHARE_MODE_NONE, error);
@@ -4325,10 +4344,23 @@ add_extra_method_with_depth (MonoAotCompile *acfg, MonoMethod *method, int depth
return;
}
+ if (g_hash_table_lookup (acfg->prefer_instances, method))
+ /* Compile an instance as well */
+ add_extra_method_full (acfg, orig, FALSE, depth);
+
/* Add it to profile_methods so its not skipped later */
if (acfg->aot_opts.profile_only && g_hash_table_lookup (acfg->profile_methods, orig))
g_hash_table_insert (acfg->profile_methods, method, method);
- } else if ((acfg->jit_opts & MONO_OPT_GSHAREDVT) && prefer_gsharedvt_method (acfg, method) && mono_method_is_generic_sharable_full (method, FALSE, FALSE, TRUE)) {
+
+ if (!is_open_method (orig) && !mono_method_is_generic_sharable_full (orig, TRUE, FALSE, FALSE)) {
+ GPtrArray *instances = g_hash_table_lookup (acfg->gshared_instances, method);
+ if (!instances) {
+ instances = g_ptr_array_new ();
+ g_hash_table_insert (acfg->gshared_instances, method, instances);
+ }
+ g_ptr_array_add (instances, orig);
+ }
+ } else if ((acfg->jit_opts & MONO_OPT_GSHAREDVT) && prefer_gshared && prefer_gsharedvt_method (acfg, method) && mono_method_is_generic_sharable_full (method, FALSE, FALSE, TRUE)) {
/* Use the gsharedvt version */
method = mini_get_shared_method_full (method, SHARE_MODE_GSHAREDVT, error);
mono_error_assert_ok (error);
@@ -4348,6 +4380,12 @@ add_extra_method_with_depth (MonoAotCompile *acfg, MonoMethod *method, int depth
}
static void
+add_extra_method_with_depth (MonoAotCompile *acfg, MonoMethod *method, int depth)
+{
+ add_extra_method_full (acfg, method, TRUE, depth);
+}
+
+static void
add_extra_method (MonoAotCompile *acfg, MonoMethod *method)
{
add_extra_method_with_depth (acfg, method, 0);
@@ -9051,6 +9089,14 @@ compile_method (MonoAotCompile *acfg, MonoMethod *method)
case WRAPPER_SUBTYPE_PTR_TO_STRUCTURE:
case WRAPPER_SUBTYPE_STRUCTURE_TO_PTR:
break;
+ case WRAPPER_SUBTYPE_ICALL_WRAPPER: {
+ MonoJumpInfo *tmp_ji = mono_mempool_alloc0 (acfg->mempool, sizeof (MonoJumpInfo));
+ tmp_ji->type = MONO_PATCH_INFO_METHOD;
+ tmp_ji->data.method = method;
+ get_got_offset (acfg, TRUE, tmp_ji);
+ keep = TRUE;
+ break;
+ }
default:
keep = TRUE;
break;
@@ -9209,6 +9255,22 @@ compile_method (MonoAotCompile *acfg, MonoMethod *method)
printf ("%s ### %d\n", mono_method_get_full_name (method), cfg->code_size);
}
+ if (cfg->prefer_instances) {
+ /*
+ * Compile the original specific instances in addition to the gshared method
+ * for performance reasons, since gshared methods cannot implement some
+ * features like static virtual methods efficiently.
+ */
+ g_hash_table_insert (acfg->prefer_instances, method, method);
+ GPtrArray *instances = g_hash_table_lookup (acfg->gshared_instances, method);
+ if (instances) {
+ for (guint i = 0; i < instances->len; ++i) {
+ MonoMethod *instance = (MonoMethod*)g_ptr_array_index (instances, i);
+ add_extra_method_full (acfg, instance, FALSE, 0);
+ }
+ }
+ }
+
/* Adds generic instances referenced by this method */
/*
* The depth is used to avoid infinite loops when generic virtual recursion is
@@ -13631,6 +13693,8 @@ acfg_create (MonoAssembly *ass, guint32 jit_opts)
acfg->gsharedvt_in_signatures = g_hash_table_new ((GHashFunc)mono_signature_hash, (GEqualFunc)mono_metadata_signature_equal);
acfg->gsharedvt_out_signatures = g_hash_table_new ((GHashFunc)mono_signature_hash, (GEqualFunc)mono_metadata_signature_equal);
acfg->profile_methods = g_hash_table_new (NULL, NULL);
+ acfg->gshared_instances = g_hash_table_new (NULL, NULL);
+ acfg->prefer_instances = g_hash_table_new (NULL, NULL);
mono_os_mutex_init_recursive (&acfg->mutex);
init_got_info (&acfg->got_info);
diff --git a/src/mono/mono/mini/exceptions-amd64.c b/src/mono/mono/mini/exceptions-amd64.c
index 5faa2e08596..2b0ceb5b0b5 100644
--- a/src/mono/mono/mini/exceptions-amd64.c
+++ b/src/mono/mono/mini/exceptions-amd64.c
@@ -195,7 +195,7 @@ static LONG CALLBACK seh_vectored_exception_handler(EXCEPTION_POINTERS* ep)
return res;
}
-void win32_seh_init()
+void win32_seh_init(void)
{
if (!mono_aot_only)
restore_stack = (void (*) (void))get_win32_restore_stack ();
@@ -204,7 +204,7 @@ void win32_seh_init()
mono_win_vectored_exception_handle = AddVectoredExceptionHandler (1, seh_vectored_exception_handler);
}
-void win32_seh_cleanup()
+void win32_seh_cleanup(void)
{
guint32 ret = 0;
diff --git a/src/mono/mono/mini/exceptions-x86.c b/src/mono/mono/mini/exceptions-x86.c
index 9403faba01f..e838fe7fc8d 100644
--- a/src/mono/mono/mini/exceptions-x86.c
+++ b/src/mono/mono/mini/exceptions-x86.c
@@ -243,7 +243,7 @@ static LONG CALLBACK seh_vectored_exception_handler(EXCEPTION_POINTERS* ep)
return res;
}
-void win32_seh_init()
+void win32_seh_init(void)
{
/* install restore stack helper */
if (!restore_stack)
@@ -253,7 +253,7 @@ void win32_seh_init()
mono_win_vectored_exception_handle = AddVectoredExceptionHandler (1, seh_vectored_exception_handler);
}
-void win32_seh_cleanup()
+void win32_seh_cleanup(void)
{
if (mono_old_win_toplevel_exception_filter)
SetUnhandledExceptionFilter(mono_old_win_toplevel_exception_filter);
diff --git a/src/mono/mono/mini/interp/interp-internals.h b/src/mono/mono/mini/interp/interp-internals.h
index e6121e727f1..e2ec36b82bd 100644
--- a/src/mono/mono/mini/interp/interp-internals.h
+++ b/src/mono/mono/mini/interp/interp-internals.h
@@ -20,6 +20,7 @@
#define MINT_TYPE_R8 7
#define MINT_TYPE_O 8
#define MINT_TYPE_VT 9
+#define MINT_TYPE_VOID 10
#define INLINED_METHOD_FLAG 0xffff
#define TRACING_FLAG 0x1
@@ -346,6 +347,8 @@ enum_type:
case MONO_TYPE_GENERICINST:
type = m_class_get_byval_arg (type->data.generic_class->container_class);
goto enum_type;
+ case MONO_TYPE_VOID:
+ return MINT_TYPE_VOID;
default:
g_warning ("got type 0x%02x", type->type);
g_assert_not_reached ();
diff --git a/src/mono/mono/mini/interp/interp.c b/src/mono/mono/mini/interp/interp.c
index b89f8a7a181..1c0ce0a9c11 100644
--- a/src/mono/mono/mini/interp/interp.c
+++ b/src/mono/mono/mini/interp/interp.c
@@ -4092,6 +4092,18 @@ call:
MINT_IN_CASE(MINT_RET)
frame->retval [0] = LOCAL_VAR (ip [1], stackval);
goto exit_frame;
+ MINT_IN_CASE(MINT_RET_I1)
+ frame->retval [0].data.i = (gint8) LOCAL_VAR (ip [1], gint32);
+ goto exit_frame;
+ MINT_IN_CASE(MINT_RET_U1)
+ frame->retval [0].data.i = (guint8) LOCAL_VAR (ip [1], gint32);
+ goto exit_frame;
+ MINT_IN_CASE(MINT_RET_I2)
+ frame->retval [0].data.i = (gint16) LOCAL_VAR (ip [1], gint32);
+ goto exit_frame;
+ MINT_IN_CASE(MINT_RET_U2)
+ frame->retval [0].data.i = (guint16) LOCAL_VAR (ip [1], gint32);
+ goto exit_frame;
MINT_IN_CASE(MINT_RET_I4_IMM)
frame->retval [0].data.i = (gint16)ip [1];
goto exit_frame;
diff --git a/src/mono/mono/mini/interp/mintops.def b/src/mono/mono/mini/interp/mintops.def
index b237b7a32d0..c46e562243a 100644
--- a/src/mono/mono/mini/interp/mintops.def
+++ b/src/mono/mono/mini/interp/mintops.def
@@ -24,6 +24,11 @@ OPDEF(MINT_RET_LOCALLOC, "ret.localloc", 2, 0, 1, MintOpNoArgs)
OPDEF(MINT_RET_VOID_LOCALLOC, "ret.void.localloc", 1, 0, 0, MintOpNoArgs)
OPDEF(MINT_RET_VT_LOCALLOC, "ret.vt.localloc", 3, 0, 1, MintOpShortInt)
+OPDEF(MINT_RET_I1, "ret.i1", 2, 0, 1, MintOpNoArgs)
+OPDEF(MINT_RET_U1, "ret.u1", 2, 0, 1, MintOpNoArgs)
+OPDEF(MINT_RET_I2, "ret.i2", 2, 0, 1, MintOpNoArgs)
+OPDEF(MINT_RET_U2, "ret.u2", 2, 0, 1, MintOpNoArgs)
+
OPDEF(MINT_LDC_I4_M1, "ldc.i4.m1", 2, 1, 0, MintOpNoArgs)
OPDEF(MINT_LDC_I4_0, "ldc.i4.0", 2, 1, 0, MintOpNoArgs)
OPDEF(MINT_LDC_I4_1, "ldc.i4.1", 2, 1, 0, MintOpNoArgs)
diff --git a/src/mono/mono/mini/interp/transform.c b/src/mono/mono/mini/interp/transform.c
index d76a5c121b7..be92f413051 100644
--- a/src/mono/mono/mini/interp/transform.c
+++ b/src/mono/mono/mini/interp/transform.c
@@ -2470,6 +2470,16 @@ interp_handle_intrinsics (TransformData *td, MonoMethod *target_method, MonoClas
(!strncmp ("System.Runtime.Intrinsics.Arm", klass_name_space, 29) ||
!strncmp ("System.Runtime.Intrinsics.X86", klass_name_space, 29))) {
interp_generate_void_throw (td, MONO_JIT_ICALL_mono_throw_platform_not_supported);
+ } else if (in_corlib &&
+ (!strncmp ("System.Numerics", klass_name_space, 15) &&
+ !strcmp ("Vector", klass_name) &&
+ !strcmp (tm, "get_IsHardwareAccelerated"))) {
+ *op = MINT_LDC_I4_0;
+ } else if (in_corlib &&
+ (!strncmp ("System.Runtime.Intrinsics", klass_name_space, 25) &&
+ !strncmp ("Vector", klass_name, 6) &&
+ !strcmp (tm, "get_IsHardwareAccelerated"))) {
+ *op = MINT_LDC_I4_0;
}
return FALSE;
@@ -4870,7 +4880,8 @@ generate_code (TransformData *td, MonoMethod *method, MonoMethodHeader *header,
case CEE_RET: {
link_bblocks = FALSE;
MonoType *ult = mini_type_get_underlying_type (signature->ret);
- if (ult->type != MONO_TYPE_VOID) {
+ mt = mint_type (ult);
+ if (mt != MINT_TYPE_VOID) {
// Convert stack contents to return type if necessary
CHECK_STACK (td, 1);
emit_convert (td, td->sp - 1, ult);
@@ -4891,9 +4902,9 @@ generate_code (TransformData *td, MonoMethod *method, MonoMethodHeader *header,
}
int vt_size = 0;
- if (ult->type != MONO_TYPE_VOID) {
+ if (mt != MINT_TYPE_VOID) {
--td->sp;
- if (mint_type (ult) == MINT_TYPE_VT)
+ if (mt == MINT_TYPE_VT)
vt_size = mono_class_value_size (mono_class_from_mono_type_internal (ult), NULL);
}
if (td->sp > td->stack) {
@@ -4913,7 +4924,7 @@ generate_code (TransformData *td, MonoMethod *method, MonoMethodHeader *header,
exit_profiling |= PROFILING_FLAG;
if (exit_profiling) {
/* This does the return as well */
- gboolean is_void = ult->type == MONO_TYPE_VOID;
+ gboolean is_void = mt == MINT_TYPE_VOID;
interp_add_ins (td, is_void ? MINT_PROF_EXIT_VOID : MINT_PROF_EXIT);
td->last_ins->data [0] = exit_profiling;
if (!is_void) {
@@ -4922,10 +4933,19 @@ generate_code (TransformData *td, MonoMethod *method, MonoMethodHeader *header,
}
} else {
if (vt_size == 0) {
- if (ult->type == MONO_TYPE_VOID) {
+ if (mt == MINT_TYPE_VOID) {
interp_add_ins (td, MINT_RET_VOID);
} else {
- interp_add_ins (td, MINT_RET);
+ if (mt == MINT_TYPE_I1)
+ interp_add_ins (td, MINT_RET_I1);
+ else if (mt == MINT_TYPE_U1)
+ interp_add_ins (td, MINT_RET_U1);
+ else if (mt == MINT_TYPE_I2)
+ interp_add_ins (td, MINT_RET_I2);
+ else if (mt == MINT_TYPE_U2)
+ interp_add_ins (td, MINT_RET_U2);
+ else
+ interp_add_ins (td, MINT_RET);
interp_ins_set_sreg (td->last_ins, td->sp [0].local);
}
} else {
@@ -8169,12 +8189,6 @@ interp_fold_unop (TransformData *td, LocalValue *local_defs, InterpInst *ins)
INTERP_FOLD_UNOP (MINT_NOT_I8, LOCAL_VALUE_I8, l, ~);
INTERP_FOLD_UNOP (MINT_CEQ0_I4, LOCAL_VALUE_I4, i, 0 ==);
- // MOV's are just a copy, if the contents of sreg are known
- INTERP_FOLD_CONV (MINT_MOV_I1, LOCAL_VALUE_I4, i, LOCAL_VALUE_I4, i, gint32);
- INTERP_FOLD_CONV (MINT_MOV_U1, LOCAL_VALUE_I4, i, LOCAL_VALUE_I4, i, gint32);
- INTERP_FOLD_CONV (MINT_MOV_I2, LOCAL_VALUE_I4, i, LOCAL_VALUE_I4, i, gint32);
- INTERP_FOLD_CONV (MINT_MOV_U2, LOCAL_VALUE_I4, i, LOCAL_VALUE_I4, i, gint32);
-
INTERP_FOLD_CONV (MINT_CONV_I1_I4, LOCAL_VALUE_I4, i, LOCAL_VALUE_I4, i, gint8);
INTERP_FOLD_CONV (MINT_CONV_I1_I8, LOCAL_VALUE_I4, i, LOCAL_VALUE_I8, l, gint8);
INTERP_FOLD_CONV (MINT_CONV_U1_I4, LOCAL_VALUE_I4, i, LOCAL_VALUE_I4, i, guint8);
@@ -8587,6 +8601,13 @@ retry:
local_defs [dreg].def_index = ins_index;
}
+ // We always store to the full i4, except as part of STIND opcodes. These opcodes can be
+ // applied to a local var only if that var has LDLOCA applied to it
+ if ((opcode >= MINT_MOV_I1 && opcode <= MINT_MOV_U2) && !td->locals [sregs [0]].indirects) {
+ ins->opcode = MINT_MOV_4;
+ opcode = MINT_MOV_4;
+ }
+
if (opcode == MINT_MOV_4 || opcode == MINT_MOV_8 || opcode == MINT_MOV_VT) {
int sreg = sregs [0];
if (dreg == sreg) {
@@ -8674,7 +8695,7 @@ retry:
local_defs [dreg].type = LOCAL_VALUE_I4;
local_defs [dreg].i = (gint32)td->data_items [ins->data [0]];
#endif
- } else if (MINT_IS_UNOP (opcode) || (opcode >= MINT_MOV_I1 && opcode <= MINT_MOV_U2)) {
+ } else if (MINT_IS_UNOP (opcode)) {
ins = interp_fold_unop (td, local_defs, ins);
} else if (MINT_IS_UNOP_CONDITIONAL_BRANCH (opcode)) {
ins = interp_fold_unop_cond_br (td, bb, local_defs, ins);
@@ -8827,7 +8848,7 @@ mono_test_interp_cprop (TransformData *td)
}
static gboolean
-get_sreg_imm (TransformData *td, int sreg, gint16 *imm)
+get_sreg_imm (TransformData *td, int sreg, gint16 *imm, int result_mt)
{
InterpInst *def = td->locals [sreg].def;
if (def != NULL && td->local_ref_count [sreg] == 1) {
@@ -8838,7 +8859,31 @@ get_sreg_imm (TransformData *td, int sreg, gint16 *imm)
ct = interp_get_const_from_ldc_i8 (def);
else
return FALSE;
- if (ct >= G_MININT16 && ct <= G_MAXINT16) {
+ gint64 min_val, max_val;
+ // We only propagate the immediate only if it fits into the desired type,
+ // so we don't accidentaly handle conversions wrong
+ switch (result_mt) {
+ case MINT_TYPE_I1:
+ min_val = G_MININT8;
+ max_val = G_MAXINT8;
+ break;
+ case MINT_TYPE_I2:
+ min_val = G_MININT16;
+ max_val = G_MAXINT16;
+ break;
+ case MINT_TYPE_U1:
+ min_val = 0;
+ max_val = G_MAXUINT8;
+ break;
+ case MINT_TYPE_U2:
+ min_val = 0;
+ max_val = G_MAXINT16;
+ break;
+ default:
+ g_assert_not_reached ();
+
+ }
+ if (ct >= min_val && ct <= max_val) {
*imm = (gint16)ct;
mono_interp_stats.super_instructions++;
return TRUE;
@@ -8938,11 +8983,11 @@ interp_super_instructions (TransformData *td)
if (mono_interp_op_dregs [opcode] && !(td->locals [ins->dreg].flags & INTERP_LOCAL_FLAG_GLOBAL))
td->locals [ins->dreg].def = ins;
- if (opcode == MINT_RET) {
+ if (opcode == MINT_RET || (opcode >= MINT_RET_I1 && opcode <= MINT_RET_U2)) {
// ldc + ret -> ret.imm
int sreg = ins->sregs [0];
gint16 imm;
- if (get_sreg_imm (td, sreg, &imm)) {
+ if (get_sreg_imm (td, sreg, &imm, (opcode == MINT_RET) ? MINT_TYPE_I2 : opcode - MINT_RET_I1)) {
InterpInst *def = td->locals [sreg].def;
int ret_op = MINT_IS_LDC_I4 (def->opcode) ? MINT_RET_I4_IMM : MINT_RET_I8_IMM;
InterpInst *new_inst = interp_insert_ins (td, ins, ret_op);
@@ -8961,10 +9006,10 @@ interp_super_instructions (TransformData *td)
int sreg = -1;
int sreg_imm = -1;
gint16 imm;
- if (get_sreg_imm (td, ins->sregs [0], &imm)) {
+ if (get_sreg_imm (td, ins->sregs [0], &imm, MINT_TYPE_I2)) {
sreg = ins->sregs [1];
sreg_imm = ins->sregs [0];
- } else if (get_sreg_imm (td, ins->sregs [1], &imm)) {
+ } else if (get_sreg_imm (td, ins->sregs [1], &imm, MINT_TYPE_I2)) {
sreg = ins->sregs [0];
sreg_imm = ins->sregs [1];
}
@@ -8993,7 +9038,7 @@ interp_super_instructions (TransformData *td)
// ldc + sub -> add.-imm
gint16 imm;
int sreg_imm = ins->sregs [1];
- if (get_sreg_imm (td, sreg_imm, &imm) && imm != G_MININT16) {
+ if (get_sreg_imm (td, sreg_imm, &imm, MINT_TYPE_I2) && imm != G_MININT16) {
int add_op = opcode == MINT_SUB_I4 ? MINT_ADD_I4_IMM : MINT_ADD_I8_IMM;
InterpInst *new_inst = interp_insert_ins (td, ins, add_op);
new_inst->dreg = ins->dreg;
@@ -9011,7 +9056,7 @@ interp_super_instructions (TransformData *td)
// ldc + sh -> sh.imm
gint16 imm;
int sreg_imm = ins->sregs [1];
- if (get_sreg_imm (td, sreg_imm, &imm)) {
+ if (get_sreg_imm (td, sreg_imm, &imm, MINT_TYPE_I2)) {
int shift_op = MINT_SHR_UN_I4_IMM + (opcode - MINT_SHR_UN_I4);
InterpInst *new_inst = interp_insert_ins (td, ins, shift_op);
new_inst->dreg = ins->dreg;
@@ -9104,7 +9149,7 @@ interp_super_instructions (TransformData *td)
} else if (MINT_IS_BINOP_CONDITIONAL_BRANCH (opcode) && is_short_offset (noe, ins->info.target_bb->native_offset_estimate)) {
gint16 imm;
int sreg_imm = ins->sregs [1];
- if (get_sreg_imm (td, sreg_imm, &imm)) {
+ if (get_sreg_imm (td, sreg_imm, &imm, MINT_TYPE_I2)) {
int condbr_op = get_binop_condbr_imm_sp (opcode);
if (condbr_op != MINT_NOP) {
InterpInst *prev_ins = interp_prev_ins (ins);
@@ -9637,8 +9682,30 @@ interp_fix_localloc_ret (TransformData *td)
for (InterpBasicBlock *bb = td->entry_bb; bb != NULL; bb = bb->next_bb) {
InterpInst *ins = bb->first_ins;
while (ins) {
- if (ins->opcode >= MINT_RET && ins->opcode <= MINT_RET_VT)
+ if (ins->opcode >= MINT_RET && ins->opcode <= MINT_RET_VT) {
ins->opcode += MINT_RET_LOCALLOC - MINT_RET;
+ } else if (ins->opcode >= MINT_RET_I1 && ins->opcode <= MINT_RET_U2) {
+ int mt = ins->opcode - MINT_RET_I1;
+ int var = ins->sregs [0];
+ int opcode;
+ switch (mt) {
+ case MINT_TYPE_I1: opcode = MINT_CONV_I1_I4; break;
+ case MINT_TYPE_U1: opcode = MINT_CONV_U1_I4; break;
+ case MINT_TYPE_I2: opcode = MINT_CONV_I2_I4; break;
+ case MINT_TYPE_U2: opcode = MINT_CONV_U2_I4; break;
+ default: g_assert_not_reached ();
+ }
+ // This path should be rare enough not to bother with specific opcodes
+ // Add implicit conversion and then return
+ interp_clear_ins (ins);
+ ins = interp_insert_ins (td, ins, opcode);
+ interp_ins_set_dreg (ins, var);
+ interp_ins_set_sreg (ins, var);
+
+ ins = interp_insert_ins (td, ins, MINT_RET_LOCALLOC);
+ interp_ins_set_dreg (ins, var);
+ interp_ins_set_sreg (ins, var);
+ }
ins = ins->next;
}
}
@@ -10001,9 +10068,6 @@ mono_interp_transform_method (InterpMethod *imethod, ThreadContext *context, Mon
return_if_nok (error);
}
- g_assert ((signature->param_count + signature->hasthis) < 1000);
- // g_printerr ("TRANSFORM(0x%016lx): end %s::%s\n", mono_thread_current (), method->klass->name, method->name);
-
/* Make modifications to a copy of imethod, copy them back inside the lock */
real_imethod = imethod;
memcpy (&tmp_imethod, imethod, sizeof (InterpMethod));
diff --git a/src/mono/mono/mini/jit-icalls.c b/src/mono/mono/mini/jit-icalls.c
index 3bb146b4dc2..b68c4e4a8cc 100644
--- a/src/mono/mono/mini/jit-icalls.c
+++ b/src/mono/mono/mini/jit-icalls.c
@@ -1626,7 +1626,7 @@ mono_throw_method_access (MonoMethod *caller, MonoMethod *callee)
}
void
-mono_throw_bad_image ()
+mono_throw_bad_image (void)
{
ERROR_DECL (error);
mono_error_set_generic_error (error, "System", "BadImageFormatException", "Bad IL format.");
@@ -1634,7 +1634,7 @@ mono_throw_bad_image ()
}
void
-mono_throw_not_supported ()
+mono_throw_not_supported (void)
{
ERROR_DECL (error);
mono_error_set_generic_error (error, "System", "NotSupportedException", "");
@@ -1642,7 +1642,7 @@ mono_throw_not_supported ()
}
void
-mono_throw_platform_not_supported ()
+mono_throw_platform_not_supported (void)
{
ERROR_DECL (error);
mono_error_set_generic_error (error, "System", "PlatformNotSupportedException", "");
diff --git a/src/mono/mono/mini/llvm-intrinsics.h b/src/mono/mono/mini/llvm-intrinsics.h
index ce6e4ef7ac5..de9b4ef074c 100644
--- a/src/mono/mono/mini/llvm-intrinsics.h
+++ b/src/mono/mono/mini/llvm-intrinsics.h
@@ -258,7 +258,7 @@ INTRINS_OVR(WASM_ANYTRUE_V8, wasm_anytrue, Wasm, sse_i2_t)
INTRINS_OVR(WASM_ANYTRUE_V4, wasm_anytrue, Wasm, sse_i4_t)
INTRINS_OVR(WASM_ANYTRUE_V2, wasm_anytrue, Wasm, sse_i8_t)
INTRINS_OVR(WASM_BITMASK_V16, wasm_bitmask, Wasm, sse_i1_t)
-INTRINS_OVR(WASM_BITMASK_V8, wasm_bitmask, Wasm, sse_i1_t)
+INTRINS_OVR(WASM_BITMASK_V8, wasm_bitmask, Wasm, sse_i2_t)
INTRINS_OVR(WASM_BITMASK_V4, wasm_bitmask, Wasm, sse_i4_t)
INTRINS_OVR(WASM_BITMASK_V2, wasm_bitmask, Wasm, sse_i8_t)
INTRINS(WASM_SHUFFLE, wasm_shuffle, Wasm)
diff --git a/src/mono/mono/mini/llvm-jit.cpp b/src/mono/mono/mini/llvm-jit.cpp
index 4f1411258e6..3caa3ef2de9 100644
--- a/src/mono/mono/mini/llvm-jit.cpp
+++ b/src/mono/mono/mini/llvm-jit.cpp
@@ -362,7 +362,7 @@ init_passes_and_options ()
}
void
-mono_llvm_jit_init ()
+mono_llvm_jit_init (void)
{
if (jit != nullptr) return;
@@ -466,7 +466,7 @@ mono_llvm_set_unhandled_exception_handler (void)
}
void
-mono_llvm_jit_init ()
+mono_llvm_jit_init (void)
{
}
diff --git a/src/mono/mono/mini/method-to-ir.c b/src/mono/mono/mini/method-to-ir.c
index 12fa5bbf1a4..d174481eaf2 100644
--- a/src/mono/mono/mini/method-to-ir.c
+++ b/src/mono/mono/mini/method-to-ir.c
@@ -2982,13 +2982,17 @@ mini_emit_get_gsharedvt_info_klass (MonoCompile *cfg, MonoClass *klass, MonoRgct
* On return the caller must check @klass for load errors.
*/
static void
-emit_class_init (MonoCompile *cfg, MonoClass *klass)
+emit_class_init (MonoCompile *cfg, MonoClass *klass, gboolean for_field_access)
{
MonoInst *vtable_arg;
int context_used;
context_used = mini_class_check_context_used (cfg, klass);
+ if (cfg->compile_aot && !for_field_access && mono_class_is_before_field_init (klass))
+ /* Only field accesses trigger initialization */
+ return;
+
if (context_used) {
vtable_arg = mini_emit_get_rgctx_klass (cfg, context_used,
klass, MONO_RGCTX_INFO_VTABLE);
@@ -6747,7 +6751,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
/* FIXME: Is there a better way to do this?
We need the variable live for the duration
of the whole method. */
- if (!cfg->llvm_only)
+ if (!COMPILE_LLVM (cfg))
cfg->args [0]->flags |= MONO_INST_VOLATILE;
}
}
@@ -6855,9 +6859,8 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
* Methods with AggressiveInline flag could be inlined even if the class has a cctor.
* This might create a branch so emit it in the first code bblock instead of into initlocals_bb.
*/
- if (ip - header->code == 0 && cfg->method != method && cfg->compile_aot && (method->iflags & METHOD_IMPL_ATTRIBUTE_AGGRESSIVE_INLINING) && mono_class_needs_cctor_run (method->klass, method)) {
- emit_class_init (cfg, method->klass);
- }
+ if (ip - header->code == 0 && cfg->method != method && cfg->compile_aot && (method->iflags & METHOD_IMPL_ATTRIBUTE_AGGRESSIVE_INLINING) && mono_class_needs_cctor_run (method->klass, method))
+ emit_class_init (cfg, method->klass, FALSE);
if (skip_dead_blocks) {
int ip_offset = GPTRDIFF_TO_INT (ip - header->code);
@@ -7493,10 +7496,14 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
if (constrained_class) {
if (m_method_is_static (cil_method) && mini_class_check_context_used (cfg, constrained_class)) {
/* get_constrained_method () doesn't work on the gparams used by generic sharing */
- // FIXME: Other configurations
- //if (!cfg->gsharedvt)
- // GENERIC_SHARING_FAILURE (CEE_CALL);
gshared_static_virtual = TRUE;
+ if (!cfg->gsharedvt)
+ /*
+ * We can't resolve these calls at compile time, and they are used in
+ * perf-sensitive code in the BCL, so ask the AOT compiler to try to use specific instances
+ * instead of this gshared method.
+ */
+ cfg->prefer_instances = TRUE;
} else {
cmethod = get_constrained_method (cfg, image, token, cil_method, constrained_class, generic_context);
CHECK_CFG_ERROR;
@@ -7719,7 +7726,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
* might not get called after the call was patched.
*/
if (cfg->gshared && cmethod->klass != method->klass && mono_class_is_ginst (cmethod->klass) && mono_method_is_generic_sharable (cmethod, TRUE) && mono_class_needs_cctor_run (cmethod->klass, method)) {
- emit_class_init (cfg, cmethod->klass);
+ emit_class_init (cfg, cmethod->klass, FALSE);
CHECK_TYPELOAD (cmethod->klass);
}
@@ -9050,7 +9057,7 @@ calli_end:
}
if (cfg->gshared && cmethod && cmethod->klass != method->klass && mono_class_is_ginst (cmethod->klass) && mono_method_is_generic_sharable (cmethod, TRUE) && mono_class_needs_cctor_run (cmethod->klass, method)) {
- emit_class_init (cfg, cmethod->klass);
+ emit_class_init (cfg, cmethod->klass, FALSE);
CHECK_TYPELOAD (cmethod->klass);
}
@@ -9217,7 +9224,7 @@ calli_end:
* As a workaround, we call class cctors before allocating objects.
*/
if (mini_field_access_needs_cctor_run (cfg, method, cmethod->klass, vtable) && !(g_slist_find (class_inits, cmethod->klass))) {
- emit_class_init (cfg, cmethod->klass);
+ emit_class_init (cfg, cmethod->klass, TRUE);
if (cfg->verbose_level > 2)
printf ("class %s.%s needs init call for ctor\n", m_class_get_name_space (cmethod->klass), m_class_get_name (cmethod->klass));
class_inits = g_slist_prepend (class_inits, cmethod->klass);
@@ -10048,7 +10055,7 @@ calli_end:
*/
if (mono_class_needs_cctor_run (klass, method))
- emit_class_init (cfg, klass);
+ emit_class_init (cfg, klass, TRUE);
/*
* The pointer we're computing here is
@@ -10089,7 +10096,7 @@ calli_end:
if (!addr) {
if (mini_field_access_needs_cctor_run (cfg, method, klass, vtable)) {
if (!(g_slist_find (class_inits, klass))) {
- emit_class_init (cfg, klass);
+ emit_class_init (cfg, klass, TRUE);
if (cfg->verbose_level > 2)
printf ("class %s.%s needs init call for %s\n", m_class_get_name_space (klass), m_class_get_name (klass), mono_field_get_name (field));
class_inits = g_slist_prepend (class_inits, klass);
diff --git a/src/mono/mono/mini/mini-llvm.c b/src/mono/mono/mini/mini-llvm.c
index 991c5a4f28e..c2d9dd6a31d 100644
--- a/src/mono/mono/mini/mini-llvm.c
+++ b/src/mono/mono/mini/mini-llvm.c
@@ -4131,7 +4131,7 @@ emit_entry_bb (EmitContext *ctx, LLVMBuilderRef builder)
*/
this_alloc = mono_llvm_build_alloca (builder, ThisType (), const_int32 (1), 0, "");
/* This volatile store will keep the alloca alive */
- emit_store (builder, ctx->values [cfg->args [0]->dreg], this_alloc, TRUE);
+ emit_store (builder, convert (ctx, ctx->values [cfg->args [0]->dreg], ThisType ()), this_alloc, TRUE);
set_metadata_flag (this_alloc, "mono.this");
}
@@ -9958,14 +9958,6 @@ MONO_RESTORE_WARNING
values [ins->dreg] = immediate_unroll_end (&ictx, &cbb);
break;
}
- case OP_ARM64_MVN: {
- LLVMTypeRef ret_t = LLVMTypeOf (lhs);
- LLVMValueRef result = bitcast_to_integral (ctx, lhs);
- result = LLVMBuildNot (builder, result, "arm64_mvn");
- result = convert (ctx, result, ret_t);
- values [ins->dreg] = result;
- break;
- }
case OP_ARM64_BIC: {
LLVMTypeRef ret_t = LLVMTypeOf (lhs);
LLVMValueRef result = bitcast_to_integral (ctx, lhs);
@@ -9976,18 +9968,6 @@ MONO_RESTORE_WARNING
values [ins->dreg] = result;
break;
}
- case OP_ARM64_BSL: {
- LLVMTypeRef ret_t = LLVMTypeOf (rhs);
- LLVMValueRef select = bitcast_to_integral (ctx, lhs);
- LLVMValueRef left = bitcast_to_integral (ctx, rhs);
- LLVMValueRef right = bitcast_to_integral (ctx, arg3);
- LLVMValueRef result1 = LLVMBuildAnd (builder, select, left, "arm64_bsl");
- LLVMValueRef result2 = LLVMBuildAnd (builder, LLVMBuildNot (builder, select, ""), right, "");
- LLVMValueRef result = LLVMBuildOr (builder, result1, result2, "");
- result = convert (ctx, result, ret_t);
- values [ins->dreg] = result;
- break;
- }
case OP_ARM64_CMTST: {
LLVMTypeRef ret_t = simd_class_to_llvm_type (ctx, ins->klass);
LLVMValueRef l = bitcast_to_integral (ctx, lhs);
@@ -10539,25 +10519,6 @@ MONO_RESTORE_WARNING
values [ins->dreg] = result;
break;
}
- case OP_ARM64_XNEG:
- case OP_ARM64_XNEG_SCALAR: {
- gboolean scalar = ins->opcode == OP_ARM64_XNEG_SCALAR;
- gboolean is_float = FALSE;
- switch (inst_c1_type (ins)) {
- case MONO_TYPE_R4: case MONO_TYPE_R8: is_float = TRUE;
- }
- LLVMValueRef result = lhs;
- if (scalar)
- result = scalar_from_vector (ctx, result);
- if (is_float)
- result = LLVMBuildFNeg (builder, result, "arm64_xneg");
- else
- result = LLVMBuildNeg (builder, result, "arm64_xneg");
- if (scalar)
- result = vector_from_scalar (ctx, LLVMTypeOf (lhs), result);
- values [ins->dreg] = result;
- break;
- }
case OP_ARM64_PMULL:
case OP_ARM64_PMULL2: {
gboolean high = ins->opcode == OP_ARM64_PMULL2;
@@ -11301,7 +11262,45 @@ MONO_RESTORE_WARNING
break;
}
#endif
+#if defined(TARGET_ARM64) || defined(TARGET_AMD64)
+ case OP_BSL: {
+ LLVMTypeRef ret_t = LLVMTypeOf (rhs);
+ LLVMValueRef select = bitcast_to_integral (ctx, lhs);
+ LLVMValueRef left = bitcast_to_integral (ctx, rhs);
+ LLVMValueRef right = bitcast_to_integral (ctx, arg3);
+ LLVMValueRef result1 = LLVMBuildAnd (builder, select, left, "bit_select");
+ LLVMValueRef result2 = LLVMBuildAnd (builder, LLVMBuildNot (builder, select, ""), right, "");
+ LLVMValueRef result = LLVMBuildOr (builder, result1, result2, "");
+ result = convert (ctx, result, ret_t);
+ values [ins->dreg] = result;
+ break;
+ }
+ case OP_NEGATION:
+ case OP_NEGATION_SCALAR: {
+ gboolean scalar = ins->opcode == OP_NEGATION_SCALAR;
+ gboolean is_float = (ins->inst_c1 == MONO_TYPE_R4 || ins->inst_c1 == MONO_TYPE_R8);
+ LLVMValueRef result = lhs;
+ if (scalar)
+ result = scalar_from_vector (ctx, result);
+ if (is_float)
+ result = LLVMBuildFNeg (builder, result, "");
+ else
+ result = LLVMBuildNeg (builder, result, "");
+ if (scalar)
+ result = vector_from_scalar (ctx, LLVMTypeOf (lhs), result);
+ values [ins->dreg] = result;
+ break;
+ }
+ case OP_ONES_COMPLEMENT: {
+ LLVMTypeRef ret_t = LLVMTypeOf (lhs);
+ LLVMValueRef result = bitcast_to_integral (ctx, lhs);
+ result = LLVMBuildNot (builder, result, "");
+ result = convert (ctx, result, ret_t);
+ values [ins->dreg] = result;
+ break;
+ }
+#endif
case OP_DUMMY_USE:
break;
diff --git a/src/mono/mono/mini/mini-ops.h b/src/mono/mono/mini/mini-ops.h
index 7e17f88030b..4a64e6a5985 100644
--- a/src/mono/mono/mini/mini-ops.h
+++ b/src/mono/mono/mini/mini-ops.h
@@ -1627,9 +1627,6 @@ MINI_OP(OP_ARM64_REVN, "arm64_revn", XREG, XREG, NONE)
MINI_OP(OP_ARM64_PMULL, "arm64_pmull", XREG, XREG, XREG)
MINI_OP(OP_ARM64_PMULL2, "arm64_pmull2", XREG, XREG, XREG)
-MINI_OP(OP_ARM64_XNEG, "arm64_xneg", XREG, XREG, NONE)
-MINI_OP(OP_ARM64_XNEG_SCALAR, "arm64_xneg_scalar", XREG, XREG, NONE)
-
MINI_OP(OP_ARM64_SMULL, "arm64_smull", XREG, XREG, XREG)
MINI_OP(OP_ARM64_SMULL_SCALAR, "arm64_smull_scalar", XREG, XREG, XREG)
MINI_OP(OP_ARM64_SMULL2, "arm64_smull2", XREG, XREG, XREG)
@@ -1719,11 +1716,8 @@ MINI_OP(OP_ARM64_FCVTL2, "arm64_fcvtl2", XREG, XREG, NONE)
MINI_OP(OP_ARM64_CMTST, "arm64_cmtst", XREG, XREG, XREG)
-MINI_OP3(OP_ARM64_BSL, "arm64_bsl", XREG, XREG, XREG, XREG)
MINI_OP(OP_ARM64_BIC, "arm64_bic", XREG, XREG, XREG)
-MINI_OP(OP_ARM64_MVN, "arm64_mvn", XREG, XREG, NONE)
-
MINI_OP(OP_ARM64_SADD, "arm64_sadd", XREG, XREG, XREG)
MINI_OP(OP_ARM64_SADD2, "arm64_sadd2", XREG, XREG, XREG)
MINI_OP(OP_ARM64_UADD, "arm64_uadd", XREG, XREG, XREG)
@@ -1777,3 +1771,10 @@ MINI_OP3(OP_ARM64_SQRDMLSH_SCALAR, "arm64_sqrdmlsh_scalar", XREG, XREG, XREG, XR
#if defined(TARGET_WASM)
MINI_OP(OP_WASM_ONESCOMPLEMENT, "wasm_onescomplement", XREG, XREG, NONE)
#endif
+
+#if defined(TARGET_ARM64) || defined(TARGET_AMD64)
+MINI_OP3(OP_BSL, "bitwise_select", XREG, XREG, XREG, XREG)
+MINI_OP(OP_NEGATION, "negate", XREG, XREG, NONE)
+MINI_OP(OP_NEGATION_SCALAR, "negate_scalar", XREG, XREG, NONE)
+MINI_OP(OP_ONES_COMPLEMENT, "ones_complement", XREG, XREG, NONE)
+#endif // TARGET_ARM64 || TARGET_AMD64
diff --git a/src/mono/mono/mini/mini-runtime.c b/src/mono/mono/mini/mini-runtime.c
index 5aa0502bc08..c66a227a242 100644
--- a/src/mono/mono/mini/mini-runtime.c
+++ b/src/mono/mono/mini/mini-runtime.c
@@ -5206,7 +5206,7 @@ mono_precompile_assembly (MonoAssembly *ass, void *user_data)
}
}
-void mono_precompile_assemblies ()
+void mono_precompile_assemblies (void)
{
GHashTable *assemblies = g_hash_table_new (NULL, NULL);
diff --git a/src/mono/mono/mini/mini.c b/src/mono/mono/mini/mini.c
index 168d3d3a3c0..6d66a06a554 100644
--- a/src/mono/mono/mini/mini.c
+++ b/src/mono/mono/mini/mini.c
@@ -4050,7 +4050,7 @@ mono_cfg_set_exception_invalid_program (MonoCompile *cfg, const char *msg)
#endif /* DISABLE_JIT */
-gint64 mono_time_track_start ()
+gint64 mono_time_track_start (void)
{
return mono_100ns_ticks ();
}
diff --git a/src/mono/mono/mini/mini.h b/src/mono/mono/mini/mini.h
index 3d02bd18a02..5a6a061b9ff 100644
--- a/src/mono/mono/mini/mini.h
+++ b/src/mono/mono/mini/mini.h
@@ -1492,6 +1492,7 @@ typedef struct {
guint after_method_to_ir : 1;
guint disable_inline_rgctx_fetch : 1;
guint deopt : 1;
+ guint prefer_instances : 1;
guint8 uses_simd_intrinsics;
int r4_stack_type;
gpointer debug_info;
diff --git a/src/mono/mono/mini/simd-intrinsics.c b/src/mono/mono/mini/simd-intrinsics.c
index eced0f73e35..63e6b52f91d 100644
--- a/src/mono/mono/mini/simd-intrinsics.c
+++ b/src/mono/mono/mini/simd-intrinsics.c
@@ -161,6 +161,12 @@ has_intrinsic_cattr (MonoMethod *method)
return res;
}
+static gboolean
+is_SIMD_feature_supported(MonoCompile *cfg, MonoCPUFeatures feature)
+{
+ return mini_get_cpu_features (cfg) & feature;
+}
+
static G_GNUC_UNUSED void
check_no_intrinsic_cattr (MonoMethod *method)
{
@@ -377,16 +383,16 @@ emit_simd_ins_for_binary_op (MonoCompile *cfg, MonoClass *klass, MonoMethodSigna
static MonoInst*
emit_simd_ins_for_unary_op (MonoCompile *cfg, MonoClass *klass, MonoMethodSignature *fsig, MonoInst **args, MonoTypeEnum arg_type, int id)
{
-#ifdef TARGET_ARM64
+#if defined(TARGET_ARM64) || defined(TARGET_AMD64)
int op = -1;
switch (id){
case SN_Negate:
case SN_op_UnaryNegation:
- op = OP_ARM64_XNEG;
+ op = OP_NEGATION;
break;
case SN_OnesComplement:
case SN_op_OnesComplement:
- op = OP_ARM64_MVN;
+ op = OP_ONES_COMPLEMENT;
break;
default:
g_assert_not_reached ();
@@ -545,6 +551,92 @@ emit_sum_vector (MonoCompile *cfg, MonoType *vector_type, MonoTypeEnum element_t
}
#endif
+#ifdef TARGET_AMD64
+static int type_to_extract_op (MonoTypeEnum type);
+static const int fast_log2 [] = { -1, -1, 1, -1, 2, -1, -1, -1, 3 };
+
+static MonoInst*
+extract_first_element (MonoCompile *cfg, MonoClass *klass, MonoTypeEnum element_type, int sreg)
+{
+ int extract_op = type_to_extract_op (element_type);
+ MonoInst *ins = emit_simd_ins (cfg, klass, extract_op, sreg, -1);
+ ins->inst_c0 = 0;
+ ins->inst_c1 = element_type;
+
+ return ins;
+}
+
+static MonoInst*
+emit_sum_vector (MonoCompile *cfg, MonoClass *klass, MonoMethodSignature *fsig, MonoTypeEnum element_type, MonoInst **args)
+{
+ MonoClass *arg_class = mono_class_from_mono_type_internal (fsig->params [0]);
+ int size = mono_class_value_size (arg_class, NULL);
+ if (size != 16) // Works only with Vector128
+ return NULL;
+
+ int instc0 = -1;
+ switch (element_type) {
+ case MONO_TYPE_R4:
+ instc0 = INTRINS_SSE_HADDPS;
+ break;
+ case MONO_TYPE_R8:
+ instc0 = INTRINS_SSE_HADDPD;
+ break;
+ case MONO_TYPE_I1:
+ case MONO_TYPE_U1:
+ // byte, sbyte not supported yet
+ return NULL;
+ case MONO_TYPE_I2:
+ case MONO_TYPE_U2:
+ instc0 = INTRINS_SSE_PHADDW;
+ break;
+ case MONO_TYPE_I4:
+ case MONO_TYPE_U4:
+ instc0 = INTRINS_SSE_PHADDD;
+ break;
+ case MONO_TYPE_I8:
+ case MONO_TYPE_U8: {
+ // Ssse3 doesn't have support for HorizontalAdd on i64
+ MonoInst *lower = emit_simd_ins_for_sig (cfg, klass, OP_XLOWER, 0, element_type, fsig, args);
+ MonoInst *upper = emit_simd_ins_for_sig (cfg, klass, OP_XUPPER, 0, element_type, fsig, args);
+
+ // Sum lower and upper i64
+ args[0] = lower;
+ args[1] = upper;
+ fsig->param_count = 2;
+ MonoInst* ins = emit_simd_ins_for_sig (cfg, klass, OP_XBINOP, OP_IADD, element_type, fsig, args);
+
+ return extract_first_element (cfg, klass, element_type, ins->dreg);
+ }
+ default: {
+ return NULL;
+ }
+ }
+
+ // Check if necessary SIMD intrinsics are supported on the current machine
+ MonoCPUFeatures feature = type_enum_is_float (element_type) ? MONO_CPU_X86_SSE3 : MONO_CPU_X86_SSSE3;
+ if (!is_SIMD_feature_supported (cfg, feature))
+ return NULL;
+
+ MonoType *etype = mono_class_get_context (arg_class)->class_inst->type_argv [0];
+ int elem_size = mono_class_value_size (mono_class_from_mono_type_internal (etype), NULL);
+ int num_elems = size / elem_size;
+ int num_rounds = fast_log2[num_elems];
+
+ MonoInst *tmp = emit_xzero (cfg, arg_class);
+ MonoInst *ins = NULL;
+ args[1] = tmp;
+ fsig->param_count = 2;
+ // HorizontalAdds over vector log2(num_elems) times
+ for (int i = 0; i < num_rounds; ++i) {
+ ins = emit_simd_ins_for_sig (cfg, klass, OP_XOP_X_X_X, instc0, element_type, fsig, args);
+ args[0] = ins;
+ }
+
+ return extract_first_element (cfg, klass, element_type, ins->dreg);
+}
+#endif
+
static gboolean
is_intrinsics_vector_type (MonoType *vector_type)
{
@@ -915,6 +1007,7 @@ static guint16 sri_vector_methods [] = {
SN_Equals,
SN_EqualsAll,
SN_EqualsAny,
+ SN_ExtractMostSignificantBits,
SN_Floor,
SN_GetElement,
SN_GetLower,
@@ -1047,14 +1140,28 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
if (!is_element_type_primitive (fsig->params [0]))
return NULL;
return emit_simd_ins_for_binary_op (cfg, klass, fsig, args, arg0_type, id);
- case SN_AndNot:
-#ifdef TARGET_ARM64
- if (!is_element_type_primitive (fsig->params [0]))
+ case SN_AndNot: {
+ if (!is_element_type_primitive (fsig->params [0]))
return NULL;
+#ifdef TARGET_ARM64
return emit_simd_ins_for_sig (cfg, klass, OP_ARM64_BIC, -1, arg0_type, fsig, args);
+#elif defined(TARGET_AMD64)
+ MonoClass* arg_class = mono_class_from_mono_type_internal (fsig->params [0]);
+ int size = mono_class_value_size (arg_class, NULL);
+ if (size != 16) // Works only with Vector128
+ return NULL;
+
+ /* Swap lhs and rhs because Vector128 needs lhs & !rhs
+ whereas SSE2 does !lhs & rhs */
+ MonoInst *tmp = args[0];
+ args[0] = args[1];
+ args[1] = tmp;
+
+ return emit_simd_ins_for_sig (cfg, klass, OP_SSE_ANDN, -1, arg0_type, fsig, args);
#else
return NULL;
#endif
+ }
case SN_As:
case SN_AsByte:
case SN_AsDouble:
@@ -1077,12 +1184,15 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
#ifdef TARGET_ARM64
int ceil_or_floor = id == SN_Ceiling ? INTRINS_AARCH64_ADV_SIMD_FRINTP : INTRINS_AARCH64_ADV_SIMD_FRINTM;
return emit_simd_ins_for_sig (cfg, klass, OP_XOP_OVR_X_X, ceil_or_floor, arg0_type, fsig, args);
-#elif TARGET_AMD64
+#elif defined(TARGET_AMD64)
MonoClass* arg_class = mono_class_from_mono_type_internal (fsig->params [0]);
int size = mono_class_value_size (arg_class, NULL);
if (size != 16) // Supported only on Vector128
return NULL;
+ if (!is_SIMD_feature_supported (cfg, MONO_CPU_X86_SSE41))
+ return NULL;
+
int ceil_or_floor = id == SN_Ceiling ? 10 : 9;
return emit_simd_ins_for_sig (cfg, klass, OP_SSE41_ROUNDP, ceil_or_floor, arg0_type, fsig, args);
#else
@@ -1090,10 +1200,10 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
#endif
}
case SN_ConditionalSelect: {
-#ifdef TARGET_ARM64
+#if defined(TARGET_ARM64) || defined(TARGET_AMD64)
if (!is_element_type_primitive (fsig->params [0]))
return NULL;
- return emit_simd_ins_for_sig (cfg, klass, OP_ARM64_BSL, -1, arg0_type, fsig, args);
+ return emit_simd_ins_for_sig (cfg, klass, OP_BSL, -1, arg0_type, fsig, args);
#else
return NULL;
#endif
@@ -1200,6 +1310,15 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
default: g_assert_not_reached ();
}
}
+ case SN_ExtractMostSignificantBits: {
+ if (!is_element_type_primitive (fsig->params [0]) || type_enum_is_float (arg0_type))
+ return NULL;
+#ifdef TARGET_WASM
+ return emit_simd_ins_for_sig (cfg, klass, OP_WASM_SIMD_BITMASK, -1, -1, fsig, args);
+#else
+ return NULL;
+#endif
+ }
case SN_GetElement: {
if (!is_element_type_primitive (fsig->params [0]))
return NULL;
@@ -1389,10 +1508,12 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
#endif
}
case SN_Sum: {
-#ifdef TARGET_ARM64
if (!is_element_type_primitive (fsig->params [0]))
return NULL;
- return emit_sum_vector (cfg, fsig->params [0], arg0_type, args [0]);
+#ifdef TARGET_ARM64
+ return emit_sum_vector (cfg, fsig->params [0], arg0_type, args [0]);
+#elif defined(TARGET_AMD64)
+ return emit_sum_vector(cfg, klass, fsig, arg0_type, args);
#else
return NULL;
#endif
@@ -1404,10 +1525,10 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
return NULL;
#ifdef TARGET_ARM64
return emit_simd_ins_for_sig (cfg, klass, OP_XOP_OVR_X_X, INTRINS_AARCH64_ADV_SIMD_FSQRT, arg0_type, fsig, args);
-#elif TARGET_AMD64
+#elif defined(TARGET_AMD64)
MonoClass *arg_class = mono_class_from_mono_type_internal (fsig->params [0]);
int size = mono_class_value_size (arg_class, NULL);
- if ( size != 16 ) // Only works with Vector128
+ if (size != 16) // Only works with Vector128
return NULL;
int instc0 = arg0_type == MONO_TYPE_R4 ? INTRINS_SSE_SQRT_PS : INTRINS_SSE_SQRT_PD;
@@ -2311,7 +2432,7 @@ static SimdIntrinsic advsimd_methods [] = {
{SN_AddWideningUpper, OP_ARM64_SADD2, None, OP_ARM64_UADD2},
{SN_And, OP_XBINOP_FORCEINT, XBINOP_FORCEINT_AND},
{SN_BitwiseClear, OP_ARM64_BIC},
- {SN_BitwiseSelect, OP_ARM64_BSL},
+ {SN_BitwiseSelect, OP_BSL},
{SN_Ceiling, OP_XOP_OVR_X_X, INTRINS_AARCH64_ADV_SIMD_FRINTP},
{SN_CeilingScalar, OP_XOP_OVR_SCALAR_X_X, INTRINS_AARCH64_ADV_SIMD_FRINTP},
{SN_CompareEqual, OP_XCOMPARE, CMP_EQ, OP_XCOMPARE, CMP_EQ, OP_XCOMPARE_FP, CMP_EQ},
@@ -2507,11 +2628,11 @@ static SimdIntrinsic advsimd_methods [] = {
{SN_MultiplyWideningUpper, OP_ARM64_SMULL2, None, OP_ARM64_UMULL2},
{SN_MultiplyWideningUpperAndAdd, OP_ARM64_SMLAL2, None, OP_ARM64_UMLAL2},
{SN_MultiplyWideningUpperAndSubtract, OP_ARM64_SMLSL2, None, OP_ARM64_UMLSL2},
- {SN_Negate, OP_ARM64_XNEG},
+ {SN_Negate, OP_NEGATION},
{SN_NegateSaturate, OP_XOP_OVR_X_X, INTRINS_AARCH64_ADV_SIMD_SQNEG},
{SN_NegateSaturateScalar, OP_XOP_OVR_SCALAR_X_X, INTRINS_AARCH64_ADV_SIMD_SQNEG},
- {SN_NegateScalar, OP_ARM64_XNEG_SCALAR},
- {SN_Not, OP_ARM64_MVN},
+ {SN_NegateScalar, OP_NEGATION_SCALAR},
+ {SN_Not, OP_ONES_COMPLEMENT},
{SN_Or, OP_XBINOP_FORCEINT, XBINOP_FORCEINT_OR},
{SN_OrNot, OP_XBINOP_FORCEINT, XBINOP_FORCEINT_ORNOT},
{SN_PolynomialMultiply, OP_XOP_OVR_X_X_X, INTRINS_AARCH64_ADV_SIMD_PMUL},
@@ -4139,7 +4260,7 @@ arch_emit_simd_intrinsics (const char *class_ns, const char *class_name, MonoCom
return NULL;
}
-#elif TARGET_AMD64
+#elif defined(TARGET_AMD64)
// TODO: test and enable for x86 too
static
MonoInst*
@@ -4166,7 +4287,7 @@ arch_emit_simd_intrinsics (const char *class_ns, const char *class_name, MonoCom
cfg->uses_simd_intrinsics |= MONO_CFG_USES_SIMD_INTRINSICS;
return simd_inst;
}
-#elif TARGET_WASM
+#elif defined(TARGET_WASM)
static
MonoInst*
arch_emit_simd_intrinsics (const char *class_ns, const char *class_name, MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsig, MonoInst **args)
diff --git a/src/mono/mono/mini/simd-methods.h b/src/mono/mono/mini/simd-methods.h
index 98073ca2de8..1a6a429137e 100644
--- a/src/mono/mono/mini/simd-methods.h
+++ b/src/mono/mono/mini/simd-methods.h
@@ -77,6 +77,7 @@ METHOD(ConditionalSelect)
METHOD(Dot)
METHOD(EqualsAll)
METHOD(EqualsAny)
+METHOD(ExtractMostSignificantBits)
METHOD(GetElement)
METHOD(GetLower)
METHOD(GetUpper)
diff --git a/src/mono/mono/mini/trace.c b/src/mono/mono/mini/trace.c
index ee25dad0e75..4237103c2c8 100644
--- a/src/mono/mono/mini/trace.c
+++ b/src/mono/mono/mini/trace.c
@@ -482,7 +482,7 @@ mono_trace_enable (gboolean enable)
}
gboolean
-mono_trace_is_enabled ()
+mono_trace_is_enabled (void)
{
return trace_spec.enabled;
}
diff --git a/src/mono/mono/sgen/sgen-client.h b/src/mono/mono/sgen/sgen-client.h
index f21ba5f2a30..d4dfb4a3984 100644
--- a/src/mono/mono/sgen/sgen-client.h
+++ b/src/mono/mono/sgen/sgen-client.h
@@ -47,6 +47,12 @@ gboolean sgen_client_object_is_array_fill (GCObject *o);
gboolean sgen_client_object_has_critical_finalizer (GCObject *obj);
/*
+ * Called when object is ready for finalization. Returns whether the object was finalized
+ * eagerly. Otherwise `sgen_client_object_queued_for_finalization` is called.
+ */
+gboolean sgen_client_object_finalize_eagerly (GCObject *obj);
+
+/*
* Called after an object is enqueued for finalization. This is a very low-level callback.
* It should almost certainly be a NOP.
*
diff --git a/src/mono/mono/sgen/sgen-fin-weak-hash.c b/src/mono/mono/sgen/sgen-fin-weak-hash.c
index e1a85926950..b523c786164 100644
--- a/src/mono/mono/sgen/sgen-fin-weak-hash.c
+++ b/src/mono/mono/sgen/sgen-fin-weak-hash.c
@@ -188,6 +188,13 @@ sgen_finalize_in_range (int generation, ScanCopyContext ctx)
object = tagged_object_get_object (object);
if (!sgen_major_collector.is_object_live (object)) {
gboolean is_fin_ready = sgen_gc_is_object_ready_for_finalization (object);
+ if (is_fin_ready && sgen_client_object_finalize_eagerly (object)) {
+ /* just remove an eagerly finalized object */
+ SGEN_HASH_TABLE_FOREACH_REMOVE (TRUE);
+
+ SGEN_LOG (5, "Eagerly finalized object: %p (%s) (was at %p)", object, sgen_client_vtable_get_name (SGEN_LOAD_VTABLE (object)), object);
+ continue;
+ }
GCObject *copy = object;
copy_func (&copy, queue);
if (is_fin_ready) {
diff --git a/src/mono/mono/sgen/sgen-gc.c b/src/mono/mono/sgen/sgen-gc.c
index ea3102c9832..fcb1acce709 100644
--- a/src/mono/mono/sgen/sgen-gc.c
+++ b/src/mono/mono/sgen/sgen-gc.c
@@ -3920,7 +3920,7 @@ sgen_gc_init (void)
}
gboolean
-sgen_gc_initialized ()
+sgen_gc_initialized (void)
{
return gc_initialized > 0;
}
diff --git a/src/mono/mono/utils/mach-support-amd64.c b/src/mono/mono/utils/mach-support-amd64.c
index efb7460da9e..711e1c15749 100644
--- a/src/mono/mono/utils/mach-support-amd64.c
+++ b/src/mono/mono/utils/mach-support-amd64.c
@@ -23,7 +23,7 @@
#include <mono/arch/amd64/amd64-codegen.h>
int
-mono_mach_arch_get_mcontext_size ()
+mono_mach_arch_get_mcontext_size (void)
{
return sizeof (struct __darwin_mcontext64);
}
@@ -89,13 +89,13 @@ mono_mach_arch_thread_states_to_mono_context (thread_state_t state, thread_state
}
int
-mono_mach_arch_get_thread_state_size ()
+mono_mach_arch_get_thread_state_size (void)
{
return sizeof (x86_thread_state64_t);
}
int
-mono_mach_arch_get_thread_fpstate_size ()
+mono_mach_arch_get_thread_fpstate_size (void)
{
return sizeof (x86_float_state64_t);
}
diff --git a/src/mono/mono/utils/mach-support-arm.c b/src/mono/mono/utils/mach-support-arm.c
index f877fa70500..e08ab58452a 100644
--- a/src/mono/mono/utils/mach-support-arm.c
+++ b/src/mono/mono/utils/mach-support-arm.c
@@ -26,7 +26,7 @@
#endif
int
-mono_mach_arch_get_mcontext_size ()
+mono_mach_arch_get_mcontext_size (void)
{
return sizeof (struct __darwin_mcontext);
}
@@ -64,13 +64,13 @@ mono_mach_arch_thread_states_to_mono_context (thread_state_t state, thread_state
}
int
-mono_mach_arch_get_thread_state_size ()
+mono_mach_arch_get_thread_state_size (void)
{
return sizeof (arm_thread_state_t);
}
int
-mono_mach_arch_get_thread_fpstate_size ()
+mono_mach_arch_get_thread_fpstate_size (void)
{
return sizeof (arm_neon_state_t);
}
diff --git a/src/mono/mono/utils/mach-support-arm64.c b/src/mono/mono/utils/mach-support-arm64.c
index c2e6319052d..97391f9bdb5 100644
--- a/src/mono/mono/utils/mach-support-arm64.c
+++ b/src/mono/mono/utils/mach-support-arm64.c
@@ -26,7 +26,7 @@
#endif
int
-mono_mach_arch_get_mcontext_size ()
+mono_mach_arch_get_mcontext_size (void)
{
return sizeof (struct __darwin_mcontext64);
}
@@ -81,13 +81,13 @@ mono_mach_arch_thread_states_to_mono_context (thread_state_t state, thread_state
}
int
-mono_mach_arch_get_thread_state_size ()
+mono_mach_arch_get_thread_state_size (void)
{
return sizeof (arm_unified_thread_state_t);
}
int
-mono_mach_arch_get_thread_fpstate_size ()
+mono_mach_arch_get_thread_fpstate_size (void)
{
return sizeof (arm_neon_state64_t);
}
diff --git a/src/mono/mono/utils/mach-support-unknown.c b/src/mono/mono/utils/mach-support-unknown.c
index e2fc332191c..b0ff16d387b 100644
--- a/src/mono/mono/utils/mach-support-unknown.c
+++ b/src/mono/mono/utils/mach-support-unknown.c
@@ -18,7 +18,7 @@
#include "mach-support.h"
int
-mono_mach_arch_get_mcontext_size ()
+mono_mach_arch_get_mcontext_size (void)
{
g_assert_not_reached ();
}
@@ -42,13 +42,13 @@ mono_mach_arch_thread_states_to_mono_context (thread_state_t state, thread_state
}
int
-mono_mach_arch_get_thread_state_size ()
+mono_mach_arch_get_thread_state_size (void)
{
g_assert_not_reached ();
}
int
-mono_mach_arch_get_thread_fpstate_size ()
+mono_mach_arch_get_thread_fpstate_size (void)
{
g_assert_not_reached ();
}
diff --git a/src/mono/mono/utils/mach-support-x86.c b/src/mono/mono/utils/mach-support-x86.c
index 7810d39f42b..389a8b6ae92 100644
--- a/src/mono/mono/utils/mach-support-x86.c
+++ b/src/mono/mono/utils/mach-support-x86.c
@@ -21,7 +21,7 @@
#include <mono/arch/amd64/amd64-codegen.h>
int
-mono_mach_arch_get_mcontext_size ()
+mono_mach_arch_get_mcontext_size (void)
{
return sizeof (struct __darwin_mcontext32);
}
@@ -71,13 +71,13 @@ mono_mach_arch_thread_states_to_mono_context (thread_state_t state, thread_state
}
int
-mono_mach_arch_get_thread_state_size ()
+mono_mach_arch_get_thread_state_size (void)
{
return sizeof (x86_thread_state32_t);
}
int
-mono_mach_arch_get_thread_fpstate_size ()
+mono_mach_arch_get_thread_fpstate_size (void)
{
return sizeof (x86_float_state32_t);
}
diff --git a/src/mono/mono/utils/mono-cgroup.c b/src/mono/mono/utils/mono-cgroup.c
index 337abbe38b2..0a6c9667887 100644
--- a/src/mono/mono/utils/mono-cgroup.c
+++ b/src/mono/mono/utils/mono-cgroup.c
@@ -96,7 +96,7 @@ static long pageSize;
*
*/
static void
-initialize()
+initialize(void)
{
s_cgroup_version = findCGroupVersion ();
s_memory_cgroup_path = findCGroupPath (s_cgroup_version == 1 ? &isCGroup1MemorySubsystem : NULL);
@@ -202,7 +202,7 @@ getPhysicalMemoryUsage(size_t *val)
*
*/
static int
-findCGroupVersion()
+findCGroupVersion(void)
{
// It is possible to have both cgroup v1 and v2 enabled on a system.
// Most non-bleeding-edge Linux distributions fall in this group. We
@@ -606,7 +606,7 @@ getCGroupMemoryUsage(size_t *val, const char *filename, const char *inactiveFile
* Zero represents no limit.
*/
size_t
-mono_get_restricted_memory_limit()
+mono_get_restricted_memory_limit(void)
{
size_t physical_memory_limit = 0;
@@ -718,7 +718,7 @@ mono_get_memory_used(size_t *val)
*
*/
size_t
-mono_get_memory_avail()
+mono_get_memory_avail(void)
{
size_t max, used, avail, sysAvail;
#ifdef _SC_AVPHYS_PAGES // If this isn't defined then we don't get called
diff --git a/src/mono/mono/utils/mono-log-android.c b/src/mono/mono/utils/mono-log-android.c
index 4a4c4b1932f..fa4f78ec322 100644
--- a/src/mono/mono/utils/mono-log-android.c
+++ b/src/mono/mono/utils/mono-log-android.c
@@ -82,7 +82,7 @@ mono_log_write_logcat (const char *log_domain, GLogLevelFlags level, mono_bool h
* Close access to Android logcat (no-op)
*/
void
-mono_log_close_logcat ()
+mono_log_close_logcat (void)
{
/* No-op on Android */
}
diff --git a/src/mono/mono/utils/mono-log-common.c b/src/mono/mono/utils/mono-log-common.c
index c6f0a4946b1..605df83d4d0 100644
--- a/src/mono/mono/utils/mono-log-common.c
+++ b/src/mono/mono/utils/mono-log-common.c
@@ -151,7 +151,7 @@ mono_log_write_logfile (const char *log_domain, GLogLevelFlags level, mono_bool
* Close the log file
*/
void
-mono_log_close_logfile()
+mono_log_close_logfile(void)
{
if (logFile) {
if (logFile != stdout)
diff --git a/src/mono/mono/utils/mono-log-darwin.c b/src/mono/mono/utils/mono-log-darwin.c
index 039dc8e79d1..ccf8b564e1b 100644
--- a/src/mono/mono/utils/mono-log-darwin.c
+++ b/src/mono/mono/utils/mono-log-darwin.c
@@ -59,7 +59,7 @@ mono_log_write_os_log (const char *log_domain, GLogLevelFlags level, mono_bool h
}
void
-mono_log_close_os_log ()
+mono_log_close_os_log (void)
{
}
diff --git a/src/mono/mono/utils/mono-log-posix.c b/src/mono/mono/utils/mono-log-posix.c
index 98337496c88..267f4a74318 100644
--- a/src/mono/mono/utils/mono-log-posix.c
+++ b/src/mono/mono/utils/mono-log-posix.c
@@ -92,7 +92,7 @@ mono_log_write_syslog(const char *domain, GLogLevelFlags level, mono_bool hdr, c
* Close the log file
*/
void
-mono_log_close_syslog()
+mono_log_close_syslog(void)
{
#ifdef HAVE_CLOSELOG
closelog();
diff --git a/src/mono/mono/utils/mono-log-windows.c b/src/mono/mono/utils/mono-log-windows.c
index cd6e8922d76..a9de83745ac 100644
--- a/src/mono/mono/utils/mono-log-windows.c
+++ b/src/mono/mono/utils/mono-log-windows.c
@@ -113,7 +113,7 @@ mono_log_write_syslog(const char *domain, GLogLevelFlags level, mono_bool hdr, c
* Close the syslog file
*/
void
-mono_log_close_syslog()
+mono_log_close_syslog(void)
{
if (logFile) {
fclose(logFile);
diff --git a/src/mono/mono/utils/mono-proclib.c b/src/mono/mono/utils/mono-proclib.c
index a683e3d9029..2627c5aa059 100644
--- a/src/mono/mono/utils/mono-proclib.c
+++ b/src/mono/mono/utils/mono-proclib.c
@@ -30,7 +30,7 @@
#endif
int
-mono_process_current_pid ()
+mono_process_current_pid (void)
{
#ifdef HOST_WIN32
return (int) GetCurrentProcessId ();
diff --git a/src/mono/mono/utils/mono-signal-handler.c b/src/mono/mono/utils/mono-signal-handler.c
index 8f0d6481bee..71bf2fd56ee 100644
--- a/src/mono/mono/utils/mono-signal-handler.c
+++ b/src/mono/mono/utils/mono-signal-handler.c
@@ -38,7 +38,7 @@ static struct mono_sigpair *sigpair_buf;
static int sigpair_buflen;
void
-mono_load_signames ()
+mono_load_signames (void)
{
if (sigpair_buf)
return;
diff --git a/src/mono/mono/utils/mono-threads-mach-helper.c b/src/mono/mono/utils/mono-threads-mach-helper.c
index 0efe506faf5..64b49ceabef 100644
--- a/src/mono/mono/utils/mono-threads-mach-helper.c
+++ b/src/mono/mono/utils/mono-threads-mach-helper.c
@@ -59,10 +59,10 @@ mono_dead_letter_dealloc (id self, SEL _cmd)
{
struct objc_super super;
super.receiver = self;
-#if !defined(__cplusplus) && !__OBJC2__
- super.class = nsobject;
-#else
+#if defined(__cplusplus) || defined(HAVE_OBJC_SUPER_SUPER_CLASS)
super.super_class = nsobject;
+#else
+ super.class = nsobject;
#endif
void (*objc_msgSendSuper_op)(struct objc_super *, SEL) = (void (*)(struct objc_super *, SEL)) objc_msgSendSuper;
objc_msgSendSuper_op (&super, dealloc);
diff --git a/src/mono/msbuild/apple/build/AppleApp.targets b/src/mono/msbuild/apple/build/AppleApp.targets
index 470a84edecb..fb74aa82bf1 100644
--- a/src/mono/msbuild/apple/build/AppleApp.targets
+++ b/src/mono/msbuild/apple/build/AppleApp.targets
@@ -63,7 +63,7 @@
<MonoAOTCompilerDefaultAotArguments Include="nrgctx-fetch-trampolines=256" />
<MonoAOTCompilerDefaultAotArguments Include="ngsharedvt-trampolines=4400" />
<MonoAOTCompilerDefaultAotArguments Include="nftnptr-arg-trampolines=4000" />
- <MonoAOTCompilerDefaultAotArguments Include="nrgctx-trampolines=31000" />
+ <MonoAOTCompilerDefaultAotArguments Include="nrgctx-trampolines=40000" />
<MonoAOTCompilerDefaultProcessArguments Include="-O=gsharedvt" />
</ItemGroup>
diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/Microsoft.NET.Workload.Mono.Toolchain.Manifest.pkgproj b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/Microsoft.NET.Workload.Mono.Toolchain.Manifest.pkgproj
index 93e177461a6..db40bc020be 100644
--- a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/Microsoft.NET.Workload.Mono.Toolchain.Manifest.pkgproj
+++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/Microsoft.NET.Workload.Mono.Toolchain.Manifest.pkgproj
@@ -38,7 +38,8 @@
<_WorkloadManifestValues Include="WorkloadVersion" Value="$(PackageVersion)" />
<_WorkloadManifestValues Include="PackageVersion" Value="$(PackageVersion)" />
<_WorkloadManifestValues Include="PackageVersionNet6" Value="$(PackageVersionNet6)" />
- <_WorkloadManifestValues Include="PackageVersionNet7" Value="$(PackageVersionNet7)" />
+ <_WorkloadManifestValues Include="PackageVersionNet7" Value="$(PackageVersionNet7)" Condition="'$(PackageVersionNet7)' != ''" />
+ <_WorkloadManifestValues Include="PackageVersionNet7" Value="$(PackageVersion)" Condition="'$(PackageVersionNet7)' == ''" />
<_WorkloadManifestValues Include="NetCoreAppCurrent" Value="$(NetCoreAppCurrent)" />
<_WorkloadManifestValues Include="EmscriptenVersion" Value="$(MicrosoftNETRuntimeEmscriptenVersion)" />
</ItemGroup>
diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/WorkloadManifest.targets.in b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/WorkloadManifest.targets.in
index 51fef4e306b..2e0c2631170 100644
--- a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/WorkloadManifest.targets.in
+++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/WorkloadManifest.targets.in
@@ -7,8 +7,10 @@
<TargetsNet8 Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionEquals('$(TargetFrameworkVersion)', '8.0'))">true</TargetsNet8>
<TargetsNet6 Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionEquals('$(TargetFrameworkVersion)', '6.0'))">true</TargetsNet6>
<TargetsNet7 Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionEquals('$(TargetFrameworkVersion)', '7.0'))">true</TargetsNet7>
-
<TargetsCurrent Condition="'$(TargetsNet8)' == 'true'">true</TargetsCurrent>
+
+ <!-- override WorkloadDetectionWhen net7 == net8 -->
+ <WasmNativeWorkload7 Condition="'${PackageVersionNet7}' == '${PackageVersion}'">$(WasmNativeWorkload8)</WasmNativeWorkload7>
</PropertyGroup>
<PropertyGroup Condition="'$(RuntimeIdentifier)' == 'browser-wasm' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest.pkgproj b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest.pkgproj
index 067e6c3f99e..2d1b508102d 100644
--- a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest.pkgproj
+++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest.pkgproj
@@ -36,7 +36,13 @@
<ItemGroup>
<_WorkloadManifestValues Include="WorkloadVersion" Value="$(PackageVersion)" />
- <_WorkloadManifestValues Include="PackageVersionNet7" Value="$(PackageVersionNet7)" />
+ <_WorkloadManifestValues Include="PackageVersionNet7" Value="$(PackageVersionNet7)" Condition="'$(PackageVersionNet7)' != ''" />
+ <_WorkloadManifestValues Include="PackageVersionNet7" Value="$(PackageVersion)" Condition="'$(PackageVersionNet7)' == ''" />
+
+ <!-- We need to use a different version for net7 templates, to differentiate from net8 ones -->
+ <_WorkloadManifestValues Include="PackageVersionForTemplates7" Value="$(PackageVersionForTemplates7)" Condition="'$(PackageVersionNet7)' == ''" />
+ <_WorkloadManifestValues Include="PackageVersionForTemplates7" Value="$(PackageVersionNet7)" Condition="'$(PackageVersionNet7)' != ''" />
+
<_WorkloadManifestValues Include="EmscriptenVersion" Value="$(MicrosoftNETRuntimeEmscriptenVersion)" />
<_WorkloadManifestValues Include="NetCoreAppCurrent" Value="$(NetCoreAppCurrent)" />
</ItemGroup>
diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/WorkloadManifest.json.in b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/WorkloadManifest.json.in
index de062e613b4..6ce2373bc0c 100644
--- a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/WorkloadManifest.json.in
+++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/WorkloadManifest.json.in
@@ -170,7 +170,7 @@
},
"Microsoft.NET.Runtime.WebAssembly.Templates.net7": {
"kind": "template",
- "version": "${PackageVersionNet7}",
+ "version": "${PackageVersionForTemplates7}",
"alias-to": {
"any": "Microsoft.NET.Runtime.WebAssembly.Templates"
}
diff --git a/src/mono/sample/wasm/Directory.Build.targets b/src/mono/sample/wasm/Directory.Build.targets
index c01bfada90c..8970dc1dc37 100644
--- a/src/mono/sample/wasm/Directory.Build.targets
+++ b/src/mono/sample/wasm/Directory.Build.targets
@@ -7,6 +7,7 @@
<RunScriptInputName Condition="'$(TargetOS)' == 'Browser' and '$(OS)' == 'Windows_NT'">WasmRunnerTemplate.cmd</RunScriptInputName>
<RunScriptOutputPath>$([MSBuild]::NormalizePath('$(WasmAppDir)', '$(RunScriptOutputName)'))</RunScriptOutputPath>
+ <WasmXHarnessArgs Condition="'$(WasmEnableThreads)' == 'true' or '$(WasmEnablePerfTracing)' == 'true' or '$(MonoWasmBuildVariant)' == 'perftrace' or '$(MonoWasmBuildVariant)' == 'multithread'">$(WasmXHarnessArgs) --web-server-use-cop</WasmXHarnessArgs>
</PropertyGroup>
<Target Name="BuildSampleInTree"
diff --git a/src/mono/wasi/README.md b/src/mono/wasi/README.md
index 8b17456eb86..a44f8d5db93 100644
--- a/src/mono/wasi/README.md
+++ b/src/mono/wasi/README.md
@@ -14,7 +14,7 @@ To build the wasi runtime we need the file `wasm_m2n_invoke.g.h` which is genera
```
make -C src/mono/wasm provision-wasm
-export EMDK_PATH=[path_printed_by_provision_wasm]
+export EMSDK_PATH=[path_printed_by_provision_wasm]
./build.sh mono+libs -os browser
```
diff --git a/src/mono/wasi/mono-wasi-driver/driver.c b/src/mono/wasi/mono-wasi-driver/driver.c
index 80a0339a0df..013fe0538f2 100644
--- a/src/mono/wasi/mono-wasi-driver/driver.c
+++ b/src/mono/wasi/mono-wasi-driver/driver.c
@@ -386,7 +386,7 @@ get_native_to_interp (MonoMethod *method, void *extra_arg)
}
void
-mono_wasm_register_bundled_satellite_assemblies ()
+mono_wasm_register_bundled_satellite_assemblies (void)
{
/* In legacy satellite_assembly_count is always false */
if (satellite_assembly_count) {
@@ -795,4 +795,4 @@ MonoMethod* lookup_dotnet_method(const char* assembly_name, const char* namespac
MonoMethod* method = mono_wasm_assembly_find_method (class, method_name, num_params);
assert (method);
return method;
-} \ No newline at end of file
+}
diff --git a/src/mono/wasi/mono-wasi-driver/stubs.c b/src/mono/wasi/mono-wasi-driver/stubs.c
index 6c09722ee99..b5978c9c0e7 100644
--- a/src/mono/wasi/mono-wasi-driver/stubs.c
+++ b/src/mono/wasi/mono-wasi-driver/stubs.c
@@ -14,7 +14,7 @@ int sem_timedwait (int *sem, void *abs_timeout) { assert(0); return 0; }
int __errno_location() { return 0; }
-void mono_log_close_syslog () { assert(0); }
+void mono_log_close_syslog (void) { assert(0); }
void mono_log_open_syslog (const char *a, void *b) { assert(0); }
void mono_log_write_syslog (const char *a, int b, int c, const char *d) { assert(0); }
diff --git a/src/mono/wasm/Makefile b/src/mono/wasm/Makefile
index 494c7fe365e..9188f97550f 100644
--- a/src/mono/wasm/Makefile
+++ b/src/mono/wasm/Makefile
@@ -140,6 +140,8 @@ build-dbg-proxy:
$(DOTNET) build $(TOP)/src/mono/wasm/debugger/BrowserDebugHost $(MSBUILD_ARGS)
build-dbg-testsuite:
$(DOTNET) build $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS)
+build-app-host:
+ $(DOTNET) build $(TOP)/src/mono/wasm/host $(_MSBUILD_WASM_BUILD_ARGS) $(MSBUILD_ARGS)
patch-deterministic:
cd emsdk/upstream/emscripten/ && patch -p1 < ../../../runtime/deterministic.diff
diff --git a/src/mono/wasm/README.md b/src/mono/wasm/README.md
index 221fce0e52b..6be63856cd6 100644
--- a/src/mono/wasm/README.md
+++ b/src/mono/wasm/README.md
@@ -177,7 +177,7 @@ Also check [bench](../sample/wasm/browser-bench/README.md) sample to measure mon
## Templates
-The wasm templates, located in the `templates` directory, are templates for `dotnet new`, VS and VS for Mac. They are packaged and distributed as part of the `wasm-tools` workload. We have 2 templates, `wasmbrowser` and `wasmconsole`, for browser and console WebAssembly applications.
+The wasm templates, located in the `templates` directory, are templates for `dotnet new`, VS and VS for Mac. They are packaged and distributed as part of the `wasm-experimental` workload. We have 2 templates, `wasmbrowser` and `wasmconsole`, for browser and console WebAssembly applications.
For details about using `dotnet new` see the dotnet tool [documentation](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-new).
diff --git a/src/mono/wasm/Wasm.Build.Tests/BrowserRunner.cs b/src/mono/wasm/Wasm.Build.Tests/BrowserRunner.cs
index 13a4ff96ab7..718e7f90a84 100644
--- a/src/mono/wasm/Wasm.Build.Tests/BrowserRunner.cs
+++ b/src/mono/wasm/Wasm.Build.Tests/BrowserRunner.cs
@@ -10,6 +10,7 @@ using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Microsoft.Playwright;
using Wasm.Tests.Internal;
+using Xunit.Abstractions;
namespace Wasm.Build.Tests;
@@ -29,6 +30,9 @@ internal class BrowserRunner : IAsyncDisposable
public Task<CommandResult>? RunTask { get; private set; }
public IList<string> OutputLines { get; private set; } = new List<string>();
private TaskCompletionSource<int> _exited = new();
+ private readonly ITestOutputHelper _testOutput;
+
+ public BrowserRunner(ITestOutputHelper testOutput) => _testOutput = testOutput;
// FIXME: options
public async Task<IPage> RunAsync(ToolCommand cmd, string args, bool headless = true)
@@ -78,7 +82,7 @@ internal class BrowserRunner : IAsyncDisposable
var url = new Uri(urlAvailable.Task.Result);
Playwright = await Microsoft.Playwright.Playwright.CreateAsync();
string[] chromeArgs = new[] { $"--explicitly-allowed-ports={url.Port}" };
- Console.WriteLine($"Launching chrome ('{s_chromePath.Value}') via playwright with args = {string.Join(',', chromeArgs)}");
+ _testOutput.WriteLine($"Launching chrome ('{s_chromePath.Value}') via playwright with args = {string.Join(',', chromeArgs)}");
Browser = await Playwright.Chromium.LaunchAsync(new BrowserTypeLaunchOptions{
ExecutablePath = s_chromePath.Value,
Headless = headless,
@@ -99,7 +103,7 @@ internal class BrowserRunner : IAsyncDisposable
await Task.WhenAny(RunTask!, _exited.Task, Task.Delay(timeout));
if (_exited.Task.IsCompleted)
{
- Console.WriteLine ($"Exited with {await _exited.Task}");
+ _testOutput.WriteLine ($"Exited with {await _exited.Task}");
return;
}
@@ -114,7 +118,7 @@ internal class BrowserRunner : IAsyncDisposable
await Task.WhenAny(RunTask!, _exited.Task, Task.Delay(timeout));
if (RunTask.IsCanceled)
{
- Console.WriteLine ($"Exited with {(await RunTask).ExitCode}");
+ _testOutput.WriteLine ($"Exited with {(await RunTask).ExitCode}");
return;
}
diff --git a/src/mono/wasm/Wasm.Build.Tests/BuildEnvironment.cs b/src/mono/wasm/Wasm.Build.Tests/BuildEnvironment.cs
index d8ec1e5005b..f921b870375 100644
--- a/src/mono/wasm/Wasm.Build.Tests/BuildEnvironment.cs
+++ b/src/mono/wasm/Wasm.Build.Tests/BuildEnvironment.cs
@@ -27,6 +27,7 @@ namespace Wasm.Build.Tests
public static readonly string RelativeTestAssetsPath = @"..\testassets\";
public static readonly string TestAssetsPath = Path.Combine(AppContext.BaseDirectory, "testassets");
public static readonly string TestDataPath = Path.Combine(AppContext.BaseDirectory, "data");
+ public static readonly string TmpPath = Path.Combine(Path.GetTempPath(), "wasmbuildtests");
private static readonly Dictionary<string, string> s_runtimePackVersions = new();
@@ -141,6 +142,10 @@ namespace Wasm.Build.Tests
{
LogRootPath = Environment.CurrentDirectory;
}
+
+ if (Directory.Exists(TmpPath))
+ Directory.Delete(TmpPath, recursive: true);
+ Directory.CreateDirectory(TmpPath);
}
// FIXME: error checks
diff --git a/src/mono/wasm/Wasm.Build.Tests/BuildTestBase.cs b/src/mono/wasm/Wasm.Build.Tests/BuildTestBase.cs
index e34917b2226..f4a73bdbb0f 100644
--- a/src/mono/wasm/Wasm.Build.Tests/BuildTestBase.cs
+++ b/src/mono/wasm/Wasm.Build.Tests/BuildTestBase.cs
@@ -290,13 +290,25 @@ namespace Wasm.Build.Tests
Directory.CreateDirectory(_logPath);
}
- protected static void InitProjectDir(string dir)
+ protected static void InitProjectDir(string dir, bool addNuGetSourceForLocalPackages = false)
{
Directory.CreateDirectory(dir);
File.WriteAllText(Path.Combine(dir, "Directory.Build.props"), s_buildEnv.DirectoryBuildPropsContents);
File.WriteAllText(Path.Combine(dir, "Directory.Build.targets"), s_buildEnv.DirectoryBuildTargetsContents);
- File.Copy(Path.Combine(BuildEnvironment.TestDataPath, NuGetConfigFileNameForDefaultFramework), Path.Combine(dir, "nuget.config"));
+ string targetNuGetConfigPath = Path.Combine(dir, "nuget.config");
+ if (addNuGetSourceForLocalPackages)
+ {
+ File.WriteAllText(targetNuGetConfigPath,
+ GetNuGetConfigWithLocalPackagesPath(
+ Path.Combine(BuildEnvironment.TestDataPath, NuGetConfigFileNameForDefaultFramework),
+ s_buildEnv.BuiltNuGetsPath));
+ }
+ else
+ {
+ File.Copy(Path.Combine(BuildEnvironment.TestDataPath, NuGetConfigFileNameForDefaultFramework),
+ targetNuGetConfigPath);
+ }
Directory.CreateDirectory(Path.Combine(dir, ".nuget"));
}
@@ -444,10 +456,10 @@ namespace Wasm.Build.Tests
return contents.Replace(s_nugetInsertionTag, $@"<add key=""nuget-local"" value=""{localNuGetsPath}"" />");
}
- public string CreateWasmTemplateProject(string id, string template = "wasmbrowser")
+ public string CreateWasmTemplateProject(string id, string template = "wasmbrowser", string extraArgs = "")
{
InitPaths(id);
- InitProjectDir(id);
+ InitProjectDir(id, addNuGetSourceForLocalPackages: true);
File.WriteAllText(Path.Combine(_projectDir, "Directory.Build.props"), "<Project />");
File.WriteAllText(Path.Combine(_projectDir, "Directory.Build.targets"),
@@ -464,7 +476,7 @@ namespace Wasm.Build.Tests
new DotNetCommand(s_buildEnv, _testOutput, useDefaultArgs: false)
.WithWorkingDirectory(_projectDir!)
- .ExecuteWithCapturedOutput($"new {template}")
+ .ExecuteWithCapturedOutput($"new {template} {extraArgs}")
.EnsureSuccessful();
return Path.Combine(_projectDir!, $"{id}.csproj");
diff --git a/src/mono/wasm/Wasm.Build.Tests/DotNetCommand.cs b/src/mono/wasm/Wasm.Build.Tests/DotNetCommand.cs
index 84ccf2fa23a..44f58f5cc45 100644
--- a/src/mono/wasm/Wasm.Build.Tests/DotNetCommand.cs
+++ b/src/mono/wasm/Wasm.Build.Tests/DotNetCommand.cs
@@ -16,6 +16,8 @@ namespace Wasm.Build.Tests
_useDefaultArgs = useDefaultArgs;
if (useDefaultArgs)
WithEnvironmentVariables(buildEnv.EnvVars);
+ // workaround msbuild issue - https://github.com/dotnet/runtime/issues/74328
+ WithEnvironmentVariable("DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER", "1");
}
protected override string GetFullArgs(params string[] args)
diff --git a/src/mono/wasm/Wasm.Build.Tests/RunCommand.cs b/src/mono/wasm/Wasm.Build.Tests/RunCommand.cs
index 01f1e1efacd..33759316d1e 100644
--- a/src/mono/wasm/Wasm.Build.Tests/RunCommand.cs
+++ b/src/mono/wasm/Wasm.Build.Tests/RunCommand.cs
@@ -14,5 +14,7 @@ public class RunCommand : DotNetCommand
WithEnvironmentVariable("DOTNET_INSTALL_DIR", Path.GetDirectoryName(buildEnv.DotNet)!);
WithEnvironmentVariable("DOTNET_MULTILEVEL_LOOKUP", "0");
WithEnvironmentVariable("DOTNET_SKIP_FIRST_TIME_EXPERIENCE", "1");
+ // workaround msbuild issue - https://github.com/dotnet/runtime/issues/74328
+ WithEnvironmentVariable("DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER", "1");
}
}
diff --git a/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj b/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj
index 3941d5dfca1..7a9c16c6a34 100644
--- a/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj
+++ b/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj
@@ -77,7 +77,8 @@
<ItemGroup>
<_RuntimePackVersions Include="$(PackageVersion)" EnvVarName="RUNTIME_PACK_VER8" />
- <_RuntimePackVersions Include="$(PackageVersionNet7)" EnvVarName="RUNTIME_PACK_VER7" />
+ <_RuntimePackVersions Include="$(PackageVersionNet7)" EnvVarName="RUNTIME_PACK_VER7" Condition="'$(PackageVersionNet7)' != ''"/>
+ <_RuntimePackVersions Include="$(PackageVersion)" EnvVarName="RUNTIME_PACK_VER7" Condition="'$(PackageVersionNet7)' == ''"/>
<_RuntimePackVersions Include="$(PackageVersionNet6)" EnvVarName="RUNTIME_PACK_VER6" />
<RunScriptCommands Condition="'$(OS)' != 'Windows_NT'" Include="export %(_RuntimePackVersions.EnvVarName)=&quot;%(_RuntimePackVersions.Identity)&quot;" />
diff --git a/src/mono/wasm/Wasm.Build.Tests/WasmTemplateTests.cs b/src/mono/wasm/Wasm.Build.Tests/WasmTemplateTests.cs
index e96ed8b797e..01ea2a6d9d1 100644
--- a/src/mono/wasm/Wasm.Build.Tests/WasmTemplateTests.cs
+++ b/src/mono/wasm/Wasm.Build.Tests/WasmTemplateTests.cs
@@ -55,8 +55,7 @@ namespace Wasm.Build.Tests
string mainJsContent = File.ReadAllText(mainJsPath);
mainJsContent = mainJsContent
- .Replace(".create()", ".withConsoleForwarding().create()")
- .Replace("[\"dotnet\", \"is\", \"great!\"]", "(await import(/* webpackIgnore: true */\"process\")).argv.slice(2)");
+ .Replace(".create()", ".withConsoleForwarding().create()");
File.WriteAllText(mainJsPath, mainJsContent);
}
@@ -185,10 +184,19 @@ namespace Wasm.Build.Tests
[InlineData("Debug", true)]
[InlineData("Release", false)]
[InlineData("Release", true)]
- public void ConsoleBuildAndRun(string config, bool relinking)
+ public void ConsoleBuildAndRunDefault(string config, bool relinking)
+ => ConsoleBuildAndRun(config, relinking, string.Empty);
+
+ [ConditionalTheory(typeof(BuildTestBase), nameof(IsUsingWorkloads))]
+ [InlineData("Debug", "-f net7.0")]
+ [InlineData("Debug", "-f net8.0")]
+ public void ConsoleBuildAndRunForSpecificTFM(string config, string extraNewArgs)
+ => ConsoleBuildAndRun(config, false, extraNewArgs);
+
+ private void ConsoleBuildAndRun(string config, bool relinking, string extraNewArgs)
{
string id = $"{config}_{Path.GetRandomFileName()}";
- string projectFile = CreateWasmTemplateProject(id, "wasmconsole");
+ string projectFile = CreateWasmTemplateProject(id, "wasmconsole", extraNewArgs);
string projectName = Path.GetFileNameWithoutExtension(projectFile);
UpdateProgramCS();
@@ -214,9 +222,24 @@ namespace Wasm.Build.Tests
(int exitCode, string output) = RunProcess(s_buildEnv.DotNet, _testOutput, args: $"run --no-build -c {config} x y z", workingDir: _projectDir);
Assert.Equal(42, exitCode);
- Assert.Contains("args[0] = x", output);
- Assert.Contains("args[1] = y", output);
- Assert.Contains("args[2] = z", output);
+
+ try
+ {
+ Assert.Contains("args[0] = x", output);
+ Assert.Contains("args[1] = y", output);
+ Assert.Contains("args[2] = z", output);
+ }
+ catch
+ {
+ if (!extraNewArgs.Contains("-f net7.0"))
+ throw;
+
+ // Workaround for https://github.com/dotnet/runtime/issues/76429
+ // till a 7.0 sdk with the fix becomes available
+ Assert.Contains("args[0] = dotnet", output);
+ Assert.Contains("args[1] = is", output);
+ Assert.Contains("args[2] = great!", output);
+ }
}
public static TheoryData<bool, bool, string> TestDataForAppBundleDir()
@@ -234,9 +257,9 @@ namespace Wasm.Build.Tests
//data.Add(runOutsideProjectDirectory, forConsole, string.Empty);
data.Add(runOutsideProjectDirectory, forConsole,
- $"<OutputPath>{Path.Combine(Path.GetTempPath(), Path.GetRandomFileName())}</OutputPath>");
+ $"<OutputPath>{Path.Combine(BuildEnvironment.TmpPath, Path.GetRandomFileName())}</OutputPath>");
data.Add(runOutsideProjectDirectory, forConsole,
- $"<WasmAppDir>{Path.Combine(Path.GetTempPath(), Path.GetRandomFileName())}</WasmAppDir>");
+ $"<WasmAppDir>{Path.Combine(BuildEnvironment.TmpPath, Path.GetRandomFileName())}</WasmAppDir>");
}
return data;
@@ -259,13 +282,13 @@ namespace Wasm.Build.Tests
if (!string.IsNullOrEmpty(extraProperties))
AddItemsPropertiesToProject(projectFile, extraProperties: extraProperties);
- string workingDir = runOutsideProjectDirectory ? Path.GetTempPath() : _projectDir!;
+ string workingDir = runOutsideProjectDirectory ? BuildEnvironment.TmpPath : _projectDir!;
{
using var runCommand = new RunCommand(s_buildEnv, _testOutput)
.WithWorkingDirectory(workingDir);
- await using var runner = new BrowserRunner();
+ await using var runner = new BrowserRunner(_testOutput);
var page = await runner.RunAsync(runCommand, $"run -c {config} --project {projectFile} --forward-console");
await runner.WaitForExitMessageAsync(TimeSpan.FromMinutes(2));
Assert.Contains("Hello, Browser!", string.Join(Environment.NewLine, runner.OutputLines));
@@ -275,7 +298,7 @@ namespace Wasm.Build.Tests
using var runCommand = new RunCommand(s_buildEnv, _testOutput)
.WithWorkingDirectory(workingDir);
- await using var runner = new BrowserRunner();
+ await using var runner = new BrowserRunner(_testOutput);
var page = await runner.RunAsync(runCommand, $"run -c {config} --no-build --project {projectFile} --forward-console");
await runner.WaitForExitMessageAsync(TimeSpan.FromMinutes(2));
Assert.Contains("Hello, Browser!", string.Join(Environment.NewLine, runner.OutputLines));
@@ -293,7 +316,7 @@ namespace Wasm.Build.Tests
if (!string.IsNullOrEmpty(extraProperties))
AddItemsPropertiesToProject(projectFile, extraProperties: extraProperties);
- string workingDir = runOutsideProjectDirectory ? Path.GetTempPath() : _projectDir!;
+ string workingDir = runOutsideProjectDirectory ? BuildEnvironment.TmpPath : _projectDir!;
{
string runArgs = $"run -c {config} --project {projectFile}";
@@ -420,7 +443,7 @@ namespace Wasm.Build.Tests
using var runCommand = new RunCommand(s_buildEnv, _testOutput)
.WithWorkingDirectory(_projectDir!);
- await using var runner = new BrowserRunner();
+ await using var runner = new BrowserRunner(_testOutput);
var page = await runner.RunAsync(runCommand, $"run -c {config} --no-build");
await page.Locator("text=Counter").ClickAsync();
@@ -432,12 +455,15 @@ namespace Wasm.Build.Tests
Assert.Equal("Current count: 1", txt);
}
- [ConditionalFact(typeof(BuildTestBase), nameof(IsUsingWorkloads))]
- public async Task BrowserTest()
+ [ConditionalTheory(typeof(BuildTestBase), nameof(IsUsingWorkloads))]
+ [InlineData("")]
+ [InlineData("-f net7.0")]
+ [InlineData("-f net8.0")]
+ public async Task BrowserBuildAndRun(string extraNewArgs)
{
string config = "Debug";
string id = $"browser_{config}_{Path.GetRandomFileName()}";
- CreateWasmTemplateProject(id, "wasmbrowser");
+ CreateWasmTemplateProject(id, "wasmbrowser", extraNewArgs);
UpdateBrowserMainJs(DefaultTargetFramework);
@@ -449,7 +475,7 @@ namespace Wasm.Build.Tests
using var runCommand = new RunCommand(s_buildEnv, _testOutput)
.WithWorkingDirectory(_projectDir!);
- await using var runner = new BrowserRunner();
+ await using var runner = new BrowserRunner(_testOutput);
var page = await runner.RunAsync(runCommand, $"run -c {config} --no-build -r browser-wasm --forward-console");
await runner.WaitForExitMessageAsync(TimeSpan.FromMinutes(2));
Assert.Contains("Hello, Browser!", string.Join(Environment.NewLine, runner.OutputLines));
diff --git a/src/mono/wasm/build/WasmApp.targets b/src/mono/wasm/build/WasmApp.targets
index 811e858ca83..fbd16363dd9 100644
--- a/src/mono/wasm/build/WasmApp.targets
+++ b/src/mono/wasm/build/WasmApp.targets
@@ -115,6 +115,11 @@
<WasmDebugLevel Condition="('$(WasmDebugLevel)' == '' or '$(WasmDebugLevel)' == '0') and ('$(DebuggerSupport)' == 'true' or '$(Configuration)' == 'Debug')">-1</WasmDebugLevel>
</PropertyGroup>
+ <ItemGroup>
+ <!-- Allow running/debugging from VS -->
+ <ProjectCapability Include="DotNetCoreWeb"/>
+ </ItemGroup>
+
<PropertyGroup Label="Identify app bundle directory to run from">
<!-- Allow running from custom WasmAppDir -->
<_AppBundleDirForRunCommand Condition="'$(WasmAppDir)' != ''">$(WasmAppDir)</_AppBundleDirForRunCommand>
diff --git a/src/mono/wasm/debugger/BrowserDebugHost/DebugProxyHost.cs b/src/mono/wasm/debugger/BrowserDebugHost/DebugProxyHost.cs
index be3095eeffc..b97ffe7ef0f 100644
--- a/src/mono/wasm/debugger/BrowserDebugHost/DebugProxyHost.cs
+++ b/src/mono/wasm/debugger/BrowserDebugHost/DebugProxyHost.cs
@@ -1,7 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.ExceptionServices;
diff --git a/src/mono/wasm/debugger/BrowserDebugProxy/MemberObjectsExplorer.cs b/src/mono/wasm/debugger/BrowserDebugProxy/MemberObjectsExplorer.cs
index 24f4d8522cb..0a854864306 100644
--- a/src/mono/wasm/debugger/BrowserDebugProxy/MemberObjectsExplorer.cs
+++ b/src/mono/wasm/debugger/BrowserDebugProxy/MemberObjectsExplorer.cs
@@ -64,13 +64,8 @@ namespace BrowserDebugProxy
typePropertiesBrowsableInfo.TryGetValue(field.Name, out state);
}
fieldValue["__state"] = state?.ToString();
-
- fieldValue["__section"] = field.Attributes switch
- {
- FieldAttributes.Private => "private",
- FieldAttributes.Public => "result",
- _ => "internal"
- };
+ fieldValue["__section"] = field.Attributes.HasFlag(FieldAttributes.Private)
+ ? "private" : "result";
if (field.IsBackingField)
{
@@ -238,6 +233,9 @@ namespace BrowserDebugProxy
JObject fieldValue = await ReadFieldValue(sdbHelper, retDebuggerCmdReader, field, id.Value, typeInfo, valtype, isOwn, parentTypeId, getCommandOptions, token);
numFieldsRead++;
+ if (typeInfo.Info.IsNonUserCode && getCommandOptions.HasFlag(GetObjectCommandOptions.JustMyCode) && field.Attributes.HasFlag(FieldAttributes.Private))
+ continue;
+
if (!Enum.TryParse(fieldValue["__state"].Value<string>(), out DebuggerBrowsableState fieldState)
|| fieldState == DebuggerBrowsableState.Collapsed)
{
@@ -311,7 +309,7 @@ namespace BrowserDebugProxy
int typeId,
string typeName,
ArraySegment<byte> getterParamsBuffer,
- bool isAutoExpandable,
+ GetObjectCommandOptions getCommandOptions,
DotnetObjectId objectId,
bool isValueType,
bool isOwn,
@@ -347,6 +345,10 @@ namespace BrowserDebugProxy
MethodAttributes getterAttrs = getterInfo.Info.Attributes;
MethodAttributes getterMemberAccessAttrs = getterAttrs & MethodAttributes.MemberAccessMask;
MethodAttributes vtableLayout = getterAttrs & MethodAttributes.VtableLayoutMask;
+
+ if (typeInfo.Info.IsNonUserCode && getCommandOptions.HasFlag(GetObjectCommandOptions.JustMyCode) && getterMemberAccessAttrs == MethodAttributes.Private)
+ continue;
+
bool isNewSlot = (vtableLayout & MethodAttributes.NewSlot) == MethodAttributes.NewSlot;
typePropertiesBrowsableInfo.TryGetValue(propName, out DebuggerBrowsableState? state);
@@ -425,8 +427,7 @@ namespace BrowserDebugProxy
backingField["__section"] = getterMemberAccessAttrs switch
{
MethodAttributes.Private => "private",
- MethodAttributes.Public => "result",
- _ => "internal"
+ _ => "result"
};
backingField["__state"] = state?.ToString();
@@ -454,7 +455,7 @@ namespace BrowserDebugProxy
{
string returnTypeName = await sdbHelper.GetReturnType(getMethodId, token);
JObject propRet = null;
- if (isAutoExpandable || (state is DebuggerBrowsableState.RootHidden && IsACollectionType(returnTypeName)))
+ if (getCommandOptions.HasFlag(GetObjectCommandOptions.AutoExpandable) || getCommandOptions.HasFlag(GetObjectCommandOptions.ForDebuggerProxyAttribute) || (state is DebuggerBrowsableState.RootHidden && IsACollectionType(returnTypeName)))
{
try
{
@@ -474,8 +475,7 @@ namespace BrowserDebugProxy
propRet["__section"] = getterAttrs switch
{
MethodAttributes.Private => "private",
- MethodAttributes.Public => "result",
- _ => "internal"
+ _ => "result"
};
propRet["__state"] = state?.ToString();
if (parentTypeId != -1)
@@ -568,10 +568,6 @@ namespace BrowserDebugProxy
for (int i = 0; i < typeIdsCnt; i++)
{
int typeId = typeIdsIncludingParents[i];
- var typeInfo = await sdbHelper.GetTypeInfo(typeId, token);
-
- if (typeInfo.Info.IsNonUserCode && getCommandType.HasFlag(GetObjectCommandOptions.JustMyCode))
- continue;
int parentTypeId = i + 1 < typeIdsCnt ? typeIdsIncludingParents[i + 1] : -1;
string typeName = await sdbHelper.GetTypeName(typeId, token);
@@ -604,7 +600,7 @@ namespace BrowserDebugProxy
typeId,
typeName,
getPropertiesParamBuffer,
- getCommandType.HasFlag(GetObjectCommandOptions.ForDebuggerProxyAttribute),
+ getCommandType,
id,
isValueType: false,
isOwn,
@@ -656,25 +652,21 @@ namespace BrowserDebugProxy
internal sealed class GetMembersResult
{
- // public:
+ // public / protected / internal:
public JArray Result { get; set; }
// private:
public JArray PrivateMembers { get; set; }
- // protected / internal:
- public JArray OtherMembers { get; set; }
public JObject JObject => JObject.FromObject(new
{
result = Result,
- privateProperties = PrivateMembers,
- internalProperties = OtherMembers
+ privateProperties = PrivateMembers
});
public GetMembersResult()
{
Result = new JArray();
PrivateMembers = new JArray();
- OtherMembers = new JArray();
}
public GetMembersResult(JArray value, bool sortByAccessLevel)
@@ -682,7 +674,6 @@ namespace BrowserDebugProxy
var t = FromValues(value, sortByAccessLevel);
Result = t.Result;
PrivateMembers = t.PrivateMembers;
- OtherMembers = t.OtherMembers;
}
public static GetMembersResult FromValues(IEnumerable<JToken> values, bool splitMembersByAccessLevel = false) =>
@@ -717,9 +708,6 @@ namespace BrowserDebugProxy
case "private":
PrivateMembers.Add(member);
return;
- case "internal":
- OtherMembers.Add(member);
- return;
default:
Result.Add(member);
return;
@@ -730,7 +718,6 @@ namespace BrowserDebugProxy
{
Result = (JArray)Result.DeepClone(),
PrivateMembers = (JArray)PrivateMembers.DeepClone(),
- OtherMembers = (JArray)OtherMembers.DeepClone()
};
public IEnumerable<JToken> Where(Func<JToken, bool> predicate)
@@ -749,26 +736,17 @@ namespace BrowserDebugProxy
yield return item;
}
}
- foreach (var item in OtherMembers)
- {
- if (predicate(item))
- {
- yield return item;
- }
- }
}
internal JToken FirstOrDefault(Func<JToken, bool> p)
=> Result.FirstOrDefault(p)
- ?? PrivateMembers.FirstOrDefault(p)
- ?? OtherMembers.FirstOrDefault(p);
+ ?? PrivateMembers.FirstOrDefault(p);
internal JArray Flatten()
{
var result = new JArray();
result.AddRange(Result);
result.AddRange(PrivateMembers);
- result.AddRange(OtherMembers);
return result;
}
public override string ToString() => $"{JObject}\n";
diff --git a/src/mono/wasm/debugger/BrowserDebugProxy/MonoSDBHelper.cs b/src/mono/wasm/debugger/BrowserDebugProxy/MonoSDBHelper.cs
index cbe0692125b..902d339da85 100644
--- a/src/mono/wasm/debugger/BrowserDebugProxy/MonoSDBHelper.cs
+++ b/src/mono/wasm/debugger/BrowserDebugProxy/MonoSDBHelper.cs
@@ -60,7 +60,8 @@ namespace Microsoft.WebAssembly.Diagnostics
ForDebuggerProxyAttribute = 8,
ForDebuggerDisplayAttribute = 16,
WithProperties = 32,
- JustMyCode = 64
+ JustMyCode = 64,
+ AutoExpandable = 128
}
internal enum CommandSet {
@@ -1608,6 +1609,14 @@ namespace Microsoft.WebAssembly.Diagnostics
{
dispAttrStr = dispAttrStr.Replace(",nq", "");
}
+ if (dispAttrStr.Contains(", raw"))
+ {
+ dispAttrStr = dispAttrStr.Replace(", raw", "");
+ }
+ if (dispAttrStr.Contains(",raw"))
+ {
+ dispAttrStr = dispAttrStr.Replace(",raw", "");
+ }
expr = "$\"" + dispAttrStr + "\"";
JObject retValue = await resolver.Resolve(expr, token);
retValue ??= await ExpressionEvaluator.CompileAndRunTheExpression(expr, resolver, logger, token);
diff --git a/src/mono/wasm/debugger/BrowserDebugProxy/ValueTypeClass.cs b/src/mono/wasm/debugger/BrowserDebugProxy/ValueTypeClass.cs
index ebbcb6c5d3d..865785bf51e 100644
--- a/src/mono/wasm/debugger/BrowserDebugProxy/ValueTypeClass.cs
+++ b/src/mono/wasm/debugger/BrowserDebugProxy/ValueTypeClass.cs
@@ -98,9 +98,7 @@ namespace BrowserDebugProxy
if (isStatic)
fieldValue["name"] = field.Name;
FieldAttributes attr = field.Attributes & FieldAttributes.FieldAccessMask;
- fieldValue["__section"] = attr == FieldAttributes.Public
- ? "public" :
- attr == FieldAttributes.Private ? "private" : "internal";
+ fieldValue["__section"] = attr == FieldAttributes.Private ? "private" : "result";
if (field.IsBackingField)
{
@@ -218,7 +216,6 @@ namespace BrowserDebugProxy
result = _combinedResult.Clone();
RemovePropertiesFrom(result.Result);
RemovePropertiesFrom(result.PrivateMembers);
- RemovePropertiesFrom(result.OtherMembers);
}
// 4 - fields + properties
@@ -290,7 +287,7 @@ namespace BrowserDebugProxy
typeId,
className,
Buffer,
- autoExpand,
+ autoExpand ? GetObjectCommandOptions.AutoExpandable : GetObjectCommandOptions.None,
Id,
isValueType: true,
isOwn: i == 0,
diff --git a/src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestBase.cs b/src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestBase.cs
index 555c0cf744d..b533d39910a 100644
--- a/src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestBase.cs
+++ b/src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestBase.cs
@@ -988,7 +988,7 @@ namespace DebuggerTests
return locals;
}
- internal async Task<(JToken, JToken, JToken)> GetPropertiesSortedByProtectionLevels(string id, JToken fn_args = null, bool? own_properties = null, bool? accessors_only = null, bool expect_ok = true)
+ internal async Task<(JToken, JToken)> GetPropertiesSortedByProtectionLevels(string id, JToken fn_args = null, bool? own_properties = null, bool? accessors_only = null, bool expect_ok = true)
{
if (UseCallFunctionOnBeforeGetProperties && !id.StartsWith("dotnet:scope:"))
{
@@ -1004,7 +1004,7 @@ namespace DebuggerTests
var result = await cli.SendCommand("Runtime.callFunctionOn", cfo_args, token);
AssertEqual(expect_ok, result.IsOk, $"Runtime.getProperties returned {result.IsOk} instead of {expect_ok}, for {cfo_args.ToString()}, with Result: {result}");
if (!result.IsOk)
- return (null, null, null);
+ return (null, null);
id = result.Value["result"]?["objectId"]?.Value<string>();
}
@@ -1024,10 +1024,9 @@ namespace DebuggerTests
var frame_props = await cli.SendCommand("Runtime.getProperties", get_prop_req, token);
AssertEqual(expect_ok, frame_props.IsOk, $"Runtime.getProperties returned {frame_props.IsOk} instead of {expect_ok}, for {get_prop_req}, with Result: {frame_props}");
if (!frame_props.IsOk)
- return (null, null, null);;
+ return (null, null);;
var locals = frame_props.Value["result"];
- var locals_internal = frame_props.Value["internalProperties"];
var locals_private = frame_props.Value["privateProperties"];
// FIXME: Should be done when generating the list in dotnet.es6.lib.js, but not sure yet
@@ -1044,7 +1043,7 @@ namespace DebuggerTests
}
}
- return (locals, locals_internal, locals_private);
+ return (locals, locals_private);
}
internal virtual async Task<(JToken, Result)> EvaluateOnCallFrame(string id, string expression, bool expect_ok = true)
diff --git a/src/mono/wasm/debugger/DebuggerTestSuite/GetPropertiesTests.cs b/src/mono/wasm/debugger/DebuggerTestSuite/GetPropertiesTests.cs
index d9fc2098dc0..3bf376c8954 100644
--- a/src/mono/wasm/debugger/DebuggerTestSuite/GetPropertiesTests.cs
+++ b/src/mono/wasm/debugger/DebuggerTestSuite/GetPropertiesTests.cs
@@ -26,6 +26,7 @@ namespace DebuggerTests
var type_name = "DerivedClass2";
var all_props = new Dictionary<string, (JObject, bool)>()
{
+ // ------------------instance members--------------------------
// own:
// public:
{"BaseBase_PropertyForHidingWithField", (TNumber(210), true)},
@@ -80,6 +81,45 @@ namespace DebuggerTests
{"BaseBase_AutoPropertyForHidingWithAutoProperty (BaseBaseClass2)", (TString("BaseBase#BaseBase_AutoPropertyForHidingWithAutoProperty"), false)},
{"BaseBase_PropertyForVHO (BaseBaseClass2)", (TGetter("BaseBase_PropertyForVHO (BaseBaseClass2)", TString("BaseBase#BaseBase_PropertyForVHO")), false)},
{"BaseBase_AutoPropertyForVHO (BaseBaseClass2)", (TString("BaseBase#BaseBase_AutoPropertyForVHO"), false)},
+
+ // ------------------static members--------------------------
+ // own:
+ // public:
+ {"S_BaseBase_PropertyForHidingWithField", (TNumber(210), true)},
+
+ // protected / internal:
+ {"S_BaseBase_AutoPropertyForHidingWithProperty", (TGetter("S_BaseBase_AutoPropertyForHidingWithProperty", TString("Derived#BaseBase_AutoPropertyForHidingWithProperty")), true)},
+
+ // private:
+ {"S_BaseBase_FieldForHidingWithAutoProperty", (TString(null), true)},
+
+ // inherited from Base:
+ // public:
+ {"S_BaseBase_AutoPropertyForHidingWithField", (TNumber(115), false)},
+ {"S_BaseBase_PropertyForHidingWithProperty", (TGetter("S_BaseBase_PropertyForHidingWithProperty", TString("Base#BaseBase_PropertyForHidingWithProperty")), false)},
+ {"S_BaseBase_FieldForHidingWithAutoProperty (BaseClass2)", (TString(null), false)},
+
+ // protected / internal:
+ {"S_BaseBase_PropertyForHidingWithField (BaseClass2)", (TNumber(110), false)},
+ {"S_BaseBase_FieldForHidingWithProperty", (TGetter("S_BaseBase_FieldForHidingWithProperty", TString("Base#BaseBase_FieldForHidingWithProperty")), false)},
+ {"S_BaseBase_AutoPropertyForHidingWithAutoProperty", (TString(null), false)},
+
+ // private:
+ {"S_BaseBase_FieldForHidingWithField", (TNumber(105), false)},
+ {"S_BaseBase_AutoPropertyForHidingWithProperty (BaseClass2)", (TGetter("S_BaseBase_AutoPropertyForHidingWithProperty (BaseClass2)", TString("Base#BaseBase_AutoPropertyForHidingWithProperty")), false)},
+ {"S_BaseBase_PropertyForHidingWithAutoProperty", (TString(null), false)},
+
+ // inherited from BaseBase:
+ // public:
+ {"S_BaseBase_FieldForHidingWithField (BaseBaseClass2)", (TNumber(5), false)},
+ {"S_BaseBase_PropertyForHidingWithField (BaseBaseClass2)", (TGetter("S_BaseBase_PropertyForHidingWithField (BaseBaseClass2)", TNumber(10)), false)},
+ {"S_BaseBase_AutoPropertyForHidingWithField (BaseBaseClass2)", (TNumber(0), false)},
+ {"S_BaseBase_FieldForHidingWithProperty (BaseBaseClass2)", (TString("BaseBase#BaseBase_FieldForHidingWithProperty"), false)},
+ {"S_BaseBase_PropertyForHidingWithProperty (BaseBaseClass2)", (TGetter("S_BaseBase_PropertyForHidingWithProperty (BaseBaseClass2)", TString("BaseBase#BaseBase_PropertyForHidingWithProperty")), false)},
+ {"S_BaseBase_AutoPropertyForHidingWithProperty (BaseBaseClass2)", (TString(null), false)},
+ {"S_BaseBase_FieldForHidingWithAutoProperty (BaseBaseClass2)", (TString("BaseBase#BaseBase_FieldForHidingWithAutoProperty"), false)},
+ {"S_BaseBase_PropertyForHidingWithAutoProperty (BaseBaseClass2)", (TGetter("S_BaseBase_PropertyForHidingWithAutoProperty (BaseBaseClass2)", TString("BaseBase#BaseBase_PropertyForHidingWithAutoProperty")), false)},
+ {"S_BaseBase_AutoPropertyForHidingWithAutoProperty (BaseBaseClass2)", (TString(null), false)},
};
// default, all properties
@@ -109,6 +149,7 @@ namespace DebuggerTests
"BaseBase_PropertyForVHO",
"BaseBase_PropertyForVOH",
// "BaseBase_PropertyForVOO", // FixMe: Issue #69788
+ "S_BaseBase_AutoPropertyForHidingWithProperty",
"BaseBase_PropertyForHidingWithProperty",
"FirstName",
@@ -116,12 +157,18 @@ namespace DebuggerTests
"BaseBase_FieldForHidingWithProperty",
"BaseBase_AutoPropertyForHidingWithProperty (BaseClass2)",
"BaseBase_PropertyForVOH (BaseClass2)",
+ "S_BaseBase_PropertyForHidingWithProperty",
+ "S_BaseBase_FieldForHidingWithProperty",
+ "S_BaseBase_AutoPropertyForHidingWithProperty (BaseClass2)",
"BaseBase_PropertyForHidingWithField (BaseBaseClass2)",
"BaseBase_PropertyForHidingWithProperty (BaseBaseClass2)",
"BaseBase_PropertyForHidingWithAutoProperty (BaseBaseClass2)",
"Base_VirtualPropertyNotOverriddenOrHidden",
- "BaseBase_PropertyForVHO (BaseBaseClass2)"
+ "BaseBase_PropertyForVHO (BaseBaseClass2)",
+ "S_BaseBase_PropertyForHidingWithField (BaseBaseClass2)",
+ "S_BaseBase_PropertyForHidingWithProperty (BaseBaseClass2)",
+ "S_BaseBase_PropertyForHidingWithAutoProperty (BaseBaseClass2)"
};
var only_own_accessors = new[]
@@ -132,6 +179,7 @@ namespace DebuggerTests
"BaseBase_PropertyForVHO",
"BaseBase_PropertyForVOH",
// "BaseBase_PropertyForVOO", // FixMe: Issue #69788
+ "S_BaseBase_AutoPropertyForHidingWithProperty",
};
// all own, only accessors
@@ -449,12 +497,13 @@ namespace DebuggerTests
throw new XunitException($"missing or unexpected members found");
}
- public static TheoryData<Dictionary<string, JObject>, Dictionary<string, JObject>, Dictionary<string, JObject>, string> GetDataForProtectionLevels()
+ public static TheoryData<Dictionary<string, JObject>, Dictionary<string, JObject>, string> GetDataForProtectionLevels()
{
- var data = new TheoryData<Dictionary<string, JObject>, Dictionary<string, JObject>, Dictionary<string, JObject>, string>();
+ var data = new TheoryData<Dictionary<string, JObject>, Dictionary<string, JObject>, string>();
var public_props = new Dictionary<string, JObject>()
{
+ // --------- public ------------:
// own:
{"BaseBase_PropertyForHidingWithField", TNumber(210)},
{"Base_PropertyForOverridingWithProperty", TGetter("Base_PropertyForOverridingWithProperty", TDateTime(new DateTime(2020, 7, 6, 5, 4, 3)))},
@@ -464,6 +513,7 @@ namespace DebuggerTests
{"BaseBase_AutoPropertyForVHO", TString("Derived#BaseBase_AutoPropertyForVHO")},
{"BaseBase_AutoPropertyForVOH", TString("Derived#BaseBase_AutoPropertyForVOH")},
// {"BaseBase_AutoPropertyForVOO", TString("Derived#BaseBase_AutoPropertyForVOO")}, //FixMe: Issue #69788
+ {"S_BaseBase_PropertyForHidingWithField", TNumber(210)},
// inherited from Base:
{"BaseBase_AutoPropertyForHidingWithField", TNumber(115)},
@@ -474,6 +524,9 @@ namespace DebuggerTests
{"Base_VirtualPropertyNotOverriddenOrHidden", TGetter("Base_VirtualPropertyNotOverriddenOrHidden", TDateTime(new DateTime(2124, 5, 7, 1, 9, 2)))},
{"BaseBase_PropertyForVOH (BaseClass2)", TGetter("BaseBase_PropertyForVOH (BaseClass2)", TString("Base#BaseBase_PropertyForVOH"))},
{"BaseBase_AutoPropertyForVOH (BaseClass2)", TString("Base#BaseBase_AutoPropertyForVOH")},
+ {"S_BaseBase_AutoPropertyForHidingWithField", TNumber(115)},
+ {"S_BaseBase_PropertyForHidingWithProperty", TGetter("S_BaseBase_PropertyForHidingWithProperty", TString("Base#BaseBase_PropertyForHidingWithProperty"))},
+ {"S_BaseBase_FieldForHidingWithAutoProperty (BaseClass2)", TString(null)},
// inherited from BaseBase:
{"BaseBase_FieldForHidingWithField (BaseBaseClass2)", TNumber(5)},
@@ -487,43 +540,57 @@ namespace DebuggerTests
{"BaseBase_AutoPropertyForHidingWithAutoProperty (BaseBaseClass2)", TString("BaseBase#BaseBase_AutoPropertyForHidingWithAutoProperty")},
{"BaseBase_PropertyForVHO (BaseBaseClass2)", TGetter("BaseBase_PropertyForVHO (BaseBaseClass2)", TString("BaseBase#BaseBase_PropertyForVHO"))},
{"BaseBase_AutoPropertyForVHO (BaseBaseClass2)", TString("BaseBase#BaseBase_AutoPropertyForVHO")},
- };
-
- var internal_protected_props = new Dictionary<string, JObject>(){
-
+ {"S_BaseBase_FieldForHidingWithField (BaseBaseClass2)", TNumber(5)},
+ {"S_BaseBase_PropertyForHidingWithField (BaseBaseClass2)", TGetter("S_BaseBase_PropertyForHidingWithField (BaseBaseClass2)", TNumber(10))},
+ {"S_BaseBase_AutoPropertyForHidingWithField (BaseBaseClass2)", TNumber(0)},
+ {"S_BaseBase_FieldForHidingWithProperty (BaseBaseClass2)", TString("BaseBase#BaseBase_FieldForHidingWithProperty")},
+ {"S_BaseBase_PropertyForHidingWithProperty (BaseBaseClass2)", TGetter("S_BaseBase_PropertyForHidingWithProperty (BaseBaseClass2)", TString("BaseBase#BaseBase_PropertyForHidingWithProperty"))},
+ {"S_BaseBase_AutoPropertyForHidingWithProperty (BaseBaseClass2)", TString(null)},
+ {"S_BaseBase_FieldForHidingWithAutoProperty (BaseBaseClass2)", TString("BaseBase#BaseBase_FieldForHidingWithAutoProperty")},
+ {"S_BaseBase_PropertyForHidingWithAutoProperty (BaseBaseClass2)", TGetter("S_BaseBase_PropertyForHidingWithAutoProperty (BaseBaseClass2)", TString("BaseBase#BaseBase_PropertyForHidingWithAutoProperty"))},
+ {"S_BaseBase_AutoPropertyForHidingWithAutoProperty (BaseBaseClass2)",TString(null)},
+
+ // ---- internal / protected ----:
// own:
{"BaseBase_AutoPropertyForHidingWithProperty", TGetter("BaseBase_AutoPropertyForHidingWithProperty", TString("Derived#BaseBase_AutoPropertyForHidingWithProperty"))},
{"Base_PropertyForOverridingWithAutoProperty", TDateTime(new DateTime(2022, 7, 6, 5, 4, 3))},
{"Base_AutoPropertyForOverridingWithAutoProperty", TDateTime(new DateTime(2023, 7, 6, 5, 4, 3))},
{"Base_AutoPropertyForOverridingWithProperty", TGetter("Base_AutoPropertyForOverridingWithProperty", TDateTime(new DateTime(2021, 7, 6, 5, 4, 3)))},
+ {"S_BaseBase_AutoPropertyForHidingWithProperty", TGetter("S_BaseBase_AutoPropertyForHidingWithProperty", TString("Derived#BaseBase_AutoPropertyForHidingWithProperty"))},
// inherited from Base:
{"BaseBase_PropertyForHidingWithField (BaseClass2)", TNumber(110)},
{"BaseBase_FieldForHidingWithProperty", TGetter("BaseBase_FieldForHidingWithProperty", TString("Base#BaseBase_FieldForHidingWithProperty"))},
- {"BaseBase_AutoPropertyForHidingWithAutoProperty", TString("Base#BaseBase_AutoPropertyForHidingWithAutoProperty")}
+ {"BaseBase_AutoPropertyForHidingWithAutoProperty", TString("Base#BaseBase_AutoPropertyForHidingWithAutoProperty")},
+ {"S_BaseBase_PropertyForHidingWithField (BaseClass2)", TNumber(110)},
+ {"S_BaseBase_FieldForHidingWithProperty", TGetter("S_BaseBase_FieldForHidingWithProperty", TString("Base#BaseBase_FieldForHidingWithProperty"))},
+ {"S_BaseBase_AutoPropertyForHidingWithAutoProperty", TString(null)},
};
var private_props = new Dictionary<string, JObject>(){
// own
- {"BaseBase_FieldForHidingWithAutoProperty", TString("Derived#BaseBase_FieldForHidingWithAutoProperty")},
+ {"BaseBase_FieldForHidingWithAutoProperty", TString("Derived#BaseBase_FieldForHidingWithAutoProperty")},
+ {"S_BaseBase_FieldForHidingWithAutoProperty", TString(null)},
// from Base:
- {"BaseBase_FieldForHidingWithField", TNumber(105)},
- {"BaseBase_AutoPropertyForHidingWithProperty (BaseClass2)", TGetter("BaseBase_AutoPropertyForHidingWithProperty (BaseClass2)", TString("Base#BaseBase_AutoPropertyForHidingWithProperty"))},
- {"BaseBase_PropertyForHidingWithAutoProperty", TString("Base#BaseBase_PropertyForHidingWithAutoProperty")},
+ {"BaseBase_FieldForHidingWithField", TNumber(105)},
+ {"BaseBase_AutoPropertyForHidingWithProperty (BaseClass2)", TGetter("BaseBase_AutoPropertyForHidingWithProperty (BaseClass2)", TString("Base#BaseBase_AutoPropertyForHidingWithProperty"))},
+ {"BaseBase_PropertyForHidingWithAutoProperty", TString("Base#BaseBase_PropertyForHidingWithAutoProperty")},
+ {"S_BaseBase_FieldForHidingWithField", TNumber(105)},
+ {"S_BaseBase_AutoPropertyForHidingWithProperty (BaseClass2)",TGetter("S_BaseBase_AutoPropertyForHidingWithProperty (BaseClass2)", TString("Base#BaseBase_AutoPropertyForHidingWithProperty"))},
+ {"S_BaseBase_PropertyForHidingWithAutoProperty", TString(null)},
};
- data.Add(public_props, internal_protected_props, private_props, "DerivedClass2");
+ data.Add(public_props, private_props, "DerivedClass2");
// structure CloneableStruct:
public_props = new Dictionary<string, JObject>()
{
// own
+ // public
{"a", TNumber(4)},
{"DateTime", TGetter("DateTime")},
{"AutoStringProperty", TString("CloneableStruct#AutoStringProperty")},
{"FirstName", TGetter("FirstName")},
- {"LastName", TGetter("LastName")}
- };
- internal_protected_props = new Dictionary<string, JObject>()
- {
+ {"LastName", TGetter("LastName")},
+
// internal
{"b", TBool(true)}
};
@@ -533,14 +600,14 @@ namespace DebuggerTests
{"_dateTime", TDateTime(new DateTime(2020, 7, 6, 5, 4, 3 + 3))},
{"_DTProp", TGetter("_DTProp")}
};
- data.Add(public_props, internal_protected_props, private_props, "CloneableStruct");
+ data.Add(public_props, private_props, "CloneableStruct");
return data;
}
[ConditionalTheory(nameof(RunningOnChrome))]
[MemberData(nameof(GetDataForProtectionLevels))]
public async Task PropertiesSortedByProtectionLevel(
- Dictionary<string, JObject> expectedPublic, Dictionary<string, JObject> expectedProtInter, Dictionary<string, JObject> expectedPriv, string entryMethod) =>
+ Dictionary<string, JObject> expectedPublicInternalAndProtected, Dictionary<string, JObject> expectedPriv, string entryMethod) =>
await CheckInspectLocalsAtBreakpointSite(
$"DebuggerTests.GetPropertiesTests.{entryMethod}", "InstanceMethod", 1, $"DebuggerTests.GetPropertiesTests.{entryMethod}.InstanceMethod",
$"window.setTimeout(function() {{ invoke_static_method ('[debugger-test] DebuggerTests.GetPropertiesTests.{entryMethod}:run'); }})",
@@ -548,14 +615,12 @@ namespace DebuggerTests
{
var id = pause_location["callFrames"][0]["callFrameId"].Value<string>();
var (obj, _) = await EvaluateOnCallFrame(id, "this");
- var (pub, internalAndProtected, priv) = await GetPropertiesSortedByProtectionLevels(obj["objectId"]?.Value<string>());
+ var (pubInternalAndProtected, priv) = await GetPropertiesSortedByProtectionLevels(obj["objectId"]?.Value<string>());
- AssertHasOnlyExpectedProperties(expectedPublic.Keys.ToArray(), pub.Values<JObject>());
- AssertHasOnlyExpectedProperties(expectedProtInter.Keys.ToArray(), internalAndProtected.Values<JObject>());
+ AssertHasOnlyExpectedProperties(expectedPublicInternalAndProtected.Keys.ToArray(), pubInternalAndProtected.Values<JObject>());
AssertHasOnlyExpectedProperties(expectedPriv.Keys.ToArray(), priv.Values<JObject>());
- await CheckProps(pub, expectedPublic, "public");
- await CheckProps(internalAndProtected, expectedProtInter, "internalAndProtected");
+ await CheckProps(pubInternalAndProtected, expectedPublicInternalAndProtected, "result");
await CheckProps(priv, expectedPriv, "private");
});
}
diff --git a/src/mono/wasm/debugger/DebuggerTestSuite/MiscTests.cs b/src/mono/wasm/debugger/DebuggerTestSuite/MiscTests.cs
index 5e1cfda9a92..d0f8be8e660 100644
--- a/src/mono/wasm/debugger/DebuggerTestSuite/MiscTests.cs
+++ b/src/mono/wasm/debugger/DebuggerTestSuite/MiscTests.cs
@@ -1067,7 +1067,11 @@ namespace DebuggerTests
{
myField = TNumber(0),
myField2 = TNumber(0),
- }, "this_props", num_fields: 2);
+ propB = TGetter("propB"),
+ propC = TGetter("propC"),
+ e = TNumber(50),
+ f = TNumber(60),
+ }, "this_props", num_fields: 6);
}
else
{
@@ -1100,5 +1104,30 @@ namespace DebuggerTests
bp.Value["locations"][0]["columnNumber"].Value<int>(),
$"DebuggerTests.CheckChineseCharacterInPath.Evaluate");
}
+
+ [Fact]
+ public async Task InspectReadOnlySpan()
+ {
+ var expression = $"{{ invoke_static_method('[debugger-test] ReadOnlySpanTest:Run'); }}";
+
+ await EvaluateAndCheck(
+ "window.setTimeout(function() {" + expression + "; }, 1);",
+ "dotnet://debugger-test.dll/debugger-test.cs", 1371, 8,
+ "ReadOnlySpanTest.CheckArguments",
+ wait_for_event_fn: async (pause_location) =>
+ {
+ var id = pause_location["callFrames"][0]["callFrameId"].Value<string>();
+ await EvaluateOnCallFrameAndCheck(id,
+ ("parameters.ToString()", TString("System.ReadOnlySpan<Object>[1]"))
+ );
+ }
+ );
+ await StepAndCheck(StepKind.Resume, "dotnet://debugger-test.dll/debugger-test.cs", 1363, 8, "ReadOnlySpanTest.Run",
+ locals_fn: async (locals) =>
+ {
+ await CheckValueType(locals, "var1", "System.ReadOnlySpan<object>", description: "System.ReadOnlySpan<Object>[0]");
+ }
+ );
+ }
}
}
diff --git a/src/mono/wasm/debugger/tests/debugger-test-with-non-user-code-class/test.cs b/src/mono/wasm/debugger/tests/debugger-test-with-non-user-code-class/test.cs
index af11a6329d0..1626d47d5d4 100644
--- a/src/mono/wasm/debugger/tests/debugger-test-with-non-user-code-class/test.cs
+++ b/src/mono/wasm/debugger/tests/debugger-test-with-non-user-code-class/test.cs
@@ -16,11 +16,11 @@ namespace DebuggerTests
private int d;
public int e;
protected int f;
- public int G
+ private int G
{
get {return f + 1;}
}
- public int H => f;
+ private int H => f;
public ClassNonUserCodeToInheritThatInheritsFromNormalClass()
{
diff --git a/src/mono/wasm/debugger/tests/debugger-test-without-debug-symbols-to-load/test.cs b/src/mono/wasm/debugger/tests/debugger-test-without-debug-symbols-to-load/test.cs
index 5dcdc29f93f..4899b8869ef 100644
--- a/src/mono/wasm/debugger/tests/debugger-test-without-debug-symbols-to-load/test.cs
+++ b/src/mono/wasm/debugger/tests/debugger-test-without-debug-symbols-to-load/test.cs
@@ -10,11 +10,11 @@ namespace DebuggerTests
private int d;
public int e;
protected int f;
- public int G
+ private int G
{
get {return f + 1;}
}
- public int H => f;
+ private int H => f;
public ClassWithoutDebugSymbolsToInherit()
{
diff --git a/src/mono/wasm/debugger/tests/debugger-test/debugger-get-properties-test.cs b/src/mono/wasm/debugger/tests/debugger-test/debugger-get-properties-test.cs
index e7359ee8c33..dc02bbdfb79 100644
--- a/src/mono/wasm/debugger/tests/debugger-test/debugger-get-properties-test.cs
+++ b/src/mono/wasm/debugger/tests/debugger-test/debugger-get-properties-test.cs
@@ -140,9 +140,25 @@ namespace DebuggerTests.GetPropertiesTests
public virtual string BaseBase_AutoPropertyForVHO { get; set; }
// public virtual string BaseBase_AutoPropertyForVOO { get; set; } // FixMe: Issue #69788
+ // -----------------static members--------------
+ // for new-hidding with a field:
+ public static int S_BaseBase_FieldForHidingWithField = 5;
+ public static int S_BaseBase_PropertyForHidingWithField => 10;
+ public static int S_BaseBase_AutoPropertyForHidingWithField { get; set; }
+
+ // for new-hidding with a property:
+ public static string S_BaseBase_FieldForHidingWithProperty = "BaseBase#BaseBase_FieldForHidingWithProperty";
+ public static string S_BaseBase_PropertyForHidingWithProperty => "BaseBase#BaseBase_PropertyForHidingWithProperty";
+ public static string S_BaseBase_AutoPropertyForHidingWithProperty { get; set; }
+
+ // for new-hidding with an auto-property:
+ public static string S_BaseBase_FieldForHidingWithAutoProperty = "BaseBase#BaseBase_FieldForHidingWithAutoProperty";
+ public static string S_BaseBase_PropertyForHidingWithAutoProperty => "BaseBase#BaseBase_PropertyForHidingWithAutoProperty";
+ public static string S_BaseBase_AutoPropertyForHidingWithAutoProperty { get; set; }
+
public BaseBaseClass2()
{
- BaseBase_AutoPropertyForHidingWithField = 15;
+ BaseBase_AutoPropertyForHidingWithField = 10 + S_BaseBase_FieldForHidingWithField; // = 15; suppressing non-used variable warnings
BaseBase_AutoPropertyForHidingWithProperty = "BaseBase#BaseBase_AutoPropertyForHidingWithProperty";
BaseBase_AutoPropertyForHidingWithAutoProperty = "BaseBase#BaseBase_AutoPropertyForHidingWithAutoProperty";
@@ -192,8 +208,25 @@ namespace DebuggerTests.GetPropertiesTests
public new virtual string BaseBase_AutoPropertyForVHO { get; set; }
// public override string BaseBase_AutoPropertyForVOO { get; set; }// FixMe: Issue #69788
+ // -----------------static members--------------
+ // hiding with a field:
+ private static new int S_BaseBase_FieldForHidingWithField = 105;
+ protected static new int S_BaseBase_PropertyForHidingWithField = 110;
+ public static new int S_BaseBase_AutoPropertyForHidingWithField = 115;
+
+ // hiding with a property:
+ protected static new string S_BaseBase_FieldForHidingWithProperty => "Base#BaseBase_FieldForHidingWithProperty";
+ public static new string S_BaseBase_PropertyForHidingWithProperty => "Base#BaseBase_PropertyForHidingWithProperty";
+ private static new string S_BaseBase_AutoPropertyForHidingWithProperty => "Base#BaseBase_AutoPropertyForHidingWithProperty";
+
+ // hiding with an auto-property:
+ public static new string S_BaseBase_FieldForHidingWithAutoProperty { get; set; }
+ private static new string S_BaseBase_PropertyForHidingWithAutoProperty { get; set; }
+ protected static new string S_BaseBase_AutoPropertyForHidingWithAutoProperty { get; set; }
+
public BaseClass2()
{
+ S_BaseBase_PropertyForHidingWithField = S_BaseBase_FieldForHidingWithField + 5; // suppressing non-used variable warning
BaseBase_PropertyForHidingWithField = BaseBase_FieldForHidingWithField + 5; // suppressing non-used variable warning
BaseBase_FieldForHidingWithAutoProperty = "Base#BaseBase_FieldForHidingWithAutoProperty";
BaseBase_PropertyForHidingWithAutoProperty = "Base#BaseBase_PropertyForHidingWithAutoProperty";
@@ -230,6 +263,12 @@ namespace DebuggerTests.GetPropertiesTests
public override string BaseBase_AutoPropertyForVHO { get; set; }
// public override string BaseBase_AutoPropertyForVOO { get; set; } // FixMe: Issue #69788
+ // -----------------static members--------------
+ // hiding sample members from BaseBase:
+ public static new int S_BaseBase_PropertyForHidingWithField = 210;
+ protected static new string S_BaseBase_AutoPropertyForHidingWithProperty => "Derived#BaseBase_AutoPropertyForHidingWithProperty";
+ private static new string S_BaseBase_FieldForHidingWithAutoProperty { get; set; }
+
public DerivedClass2()
{
Base_PropertyForOverridingWithAutoProperty = new (2022, 7, 6, 5, 4, 3);
diff --git a/src/mono/wasm/debugger/tests/debugger-test/debugger-test.cs b/src/mono/wasm/debugger/tests/debugger-test/debugger-test.cs
index b8f52c788f0..5e30c999b33 100644
--- a/src/mono/wasm/debugger/tests/debugger-test/debugger-test.cs
+++ b/src/mono/wasm/debugger/tests/debugger-test/debugger-test.cs
@@ -1300,11 +1300,11 @@ public class ClassNonUserCodeToInherit
private int d;
public int e;
protected int f;
- public int G
+ private int G
{
get {return f + 1;}
}
- public int H => f;
+ private int H => f;
public ClassNonUserCodeToInherit()
{
@@ -1354,4 +1354,21 @@ public class ClassInheritsFromNonUserCodeClassThatInheritsFromNormalClass : Debu
}
public int myField;
+}
+public class ReadOnlySpanTest
+{
+ public static void Run()
+ {
+ Invoke(new string[] {"TEST"});
+ ReadOnlySpan<object> var1 = new ReadOnlySpan<object>();
+ System.Diagnostics.Debugger.Break();
+ }
+ public static void Invoke(object[] parameters)
+ {
+ CheckArguments(parameters);
+ }
+ public static void CheckArguments(ReadOnlySpan<object> parameters)
+ {
+ System.Diagnostics.Debugger.Break();
+ }
} \ No newline at end of file
diff --git a/src/mono/wasm/host/BrowserHost.cs b/src/mono/wasm/host/BrowserHost.cs
index bccca9ff4f1..a592ca7386f 100644
--- a/src/mono/wasm/host/BrowserHost.cs
+++ b/src/mono/wasm/host/BrowserHost.cs
@@ -71,9 +71,13 @@ internal sealed class BrowserHost
debugging: _args.CommonConfig.Debugging);
runArgsJson.Save(Path.Combine(_args.CommonConfig.AppPath, "runArgs.json"));
+ string[] urls = envVars.TryGetValue("ASPNETCORE_URLS", out string? aspnetUrls)
+ ? aspnetUrls.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries)
+ : new string[] { $"http://127.0.0.1:{_args.CommonConfig.HostProperties.WebServerPort}", "https://127.0.0.1:0" };
+
(ServerURLs serverURLs, IWebHost host) = await StartWebServerAsync(_args.CommonConfig.AppPath,
_args.ForwardConsoleOutput ?? false,
- _args.CommonConfig.HostProperties.WebServerPort,
+ urls,
token);
string[] fullUrls = BuildUrls(serverURLs, _args.AppArgs);
@@ -84,7 +88,7 @@ internal sealed class BrowserHost
await host.WaitForShutdownAsync(token);
}
- private async Task<(ServerURLs, IWebHost)> StartWebServerAsync(string appPath, bool forwardConsole, int port, CancellationToken token)
+ private async Task<(ServerURLs, IWebHost)> StartWebServerAsync(string appPath, bool forwardConsole, string[] urls, CancellationToken token)
{
WasmTestMessagesProcessor? logProcessor = null;
if (forwardConsole)
@@ -100,7 +104,7 @@ internal sealed class BrowserHost
ContentRootPath: Path.GetFullPath(appPath),
WebServerUseCors: true,
WebServerUseCrossOriginPolicy: true,
- Port: port
+ Urls: urls
);
(ServerURLs serverURLs, IWebHost host) = await WebServer.StartAsync(options, _logger, token);
diff --git a/src/mono/wasm/host/WebServer.cs b/src/mono/wasm/host/WebServer.cs
index 51bda607167..44d02432002 100644
--- a/src/mono/wasm/host/WebServer.cs
+++ b/src/mono/wasm/host/WebServer.cs
@@ -1,13 +1,9 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-using System;
-using System.Collections.Generic;
-using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
-using Microsoft.AspNetCore.Hosting.Server.Features;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
@@ -20,7 +16,7 @@ public class WebServer
{
internal static async Task<(ServerURLs, IWebHost)> StartAsync(WebServerOptions options, ILogger logger, CancellationToken token)
{
- string[]? urls = new string[] { $"http://127.0.0.1:{options.Port}", "https://127.0.0.1:0" };
+ TaskCompletionSource<ServerURLs> realUrlsAvailableTcs = new();
IWebHostBuilder builder = new WebHostBuilder()
.UseKestrel()
@@ -43,9 +39,10 @@ public class WebServer
}
services.AddSingleton(logger);
services.AddSingleton(Options.Create(options));
+ services.AddSingleton(realUrlsAvailableTcs);
services.AddRouting();
})
- .UseUrls(urls);
+ .UseUrls(options.Urls);
if (options.ContentRootPath != null)
builder.UseContentRoot(options.ContentRootPath);
@@ -53,27 +50,11 @@ public class WebServer
IWebHost? host = builder.Build();
await host.StartAsync(token);
- ICollection<string>? addresses = host.ServerFeatures
- .Get<IServerAddressesFeature>()?
- .Addresses;
+ if (token.CanBeCanceled)
+ token.Register(async () => await host.StopAsync());
- string? ipAddress =
- addresses?
- .Where(a => a.StartsWith("http:", StringComparison.InvariantCultureIgnoreCase))
- .Select(a => new Uri(a))
- .Select(uri => uri.ToString())
- .FirstOrDefault();
-
- string? ipAddressSecure =
- addresses?
- .Where(a => a.StartsWith("https:", StringComparison.OrdinalIgnoreCase))
- .Select(a => new Uri(a))
- .Select(uri => uri.ToString())
- .FirstOrDefault();
-
- return ipAddress == null || ipAddressSecure == null
- ? throw new InvalidOperationException("Failed to determine web server's IP address or port")
- : (new ServerURLs(ipAddress, ipAddressSecure), host);
+ ServerURLs serverUrls = await realUrlsAvailableTcs.Task;
+ return (serverUrls, host);
}
}
diff --git a/src/mono/wasm/host/WebServerOptions.cs b/src/mono/wasm/host/WebServerOptions.cs
index bc8b5f2acee..43e05c10b7c 100644
--- a/src/mono/wasm/host/WebServerOptions.cs
+++ b/src/mono/wasm/host/WebServerOptions.cs
@@ -15,6 +15,6 @@ internal sealed record WebServerOptions
string? ContentRootPath,
bool WebServerUseCors,
bool WebServerUseCrossOriginPolicy,
- int Port,
+ string [] Urls,
string DefaultFileName = "index.html"
);
diff --git a/src/mono/wasm/host/WebServerStartup.cs b/src/mono/wasm/host/WebServerStartup.cs
index ae5e906c518..64bf9e7cccb 100644
--- a/src/mono/wasm/host/WebServerStartup.cs
+++ b/src/mono/wasm/host/WebServerStartup.cs
@@ -1,12 +1,23 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
using System.Net.WebSockets;
+using System.Runtime.InteropServices;
+using System.Threading.Tasks;
+using System.Web;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
+using Microsoft.AspNetCore.Hosting.Server.Features;
using Microsoft.AspNetCore.Routing;
using Microsoft.AspNetCore.StaticFiles;
using Microsoft.Extensions.FileProviders;
+using Microsoft.Extensions.Hosting;
+using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
#nullable enable
@@ -16,11 +27,40 @@ namespace Microsoft.WebAssembly.AppHost;
internal sealed class WebServerStartup
{
private readonly IWebHostEnvironment _hostingEnvironment;
-
+ private static readonly object LaunchLock = new object();
+ private static string LaunchedDebugProxyUrl = "";
+ private ILogger? _logger;
public WebServerStartup(IWebHostEnvironment hostingEnvironment) => _hostingEnvironment = hostingEnvironment;
- public void Configure(IApplicationBuilder app, IOptions<WebServerOptions> optionsContainer)
+ public static int StartDebugProxy(string devToolsHost)
+ {
+ //we need to start another process, otherwise it will be running the BrowserDebugProxy in the same process that will be debugged, so pausing in a breakpoint
+ //on managed code will freeze because it will not be able to continue executing the BrowserDebugProxy to get the locals value
+ var executablePath = Path.Combine(System.AppContext.BaseDirectory, "BrowserDebugHost.dll");
+ var ownerPid = Environment.ProcessId;
+ var generateRandomPort = new Random().Next(5000, 5300);
+ var processStartInfo = new ProcessStartInfo
+ {
+ FileName = "dotnet" + (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".exe" : ""),
+ Arguments = $"exec \"{executablePath}\" --OwnerPid {ownerPid} --DevToolsUrl {devToolsHost} --DevToolsProxyPort {generateRandomPort}",
+ UseShellExecute = false,
+ RedirectStandardOutput = true,
+ };
+ var debugProxyProcess = Process.Start(processStartInfo);
+ if (debugProxyProcess is null)
+ {
+ throw new InvalidOperationException("Unable to start debug proxy process.");
+ }
+ return generateRandomPort;
+ }
+
+ public void Configure(IApplicationBuilder app,
+ IOptions<WebServerOptions> optionsContainer,
+ TaskCompletionSource<ServerURLs> realUrlsAvailableTcs,
+ ILogger logger,
+ IHostApplicationLifetime applicationLifetime)
{
+ _logger = logger;
var provider = new FileExtensionContentTypeProvider();
provider.Mappings[".wasm"] = "application/wasm";
provider.Mappings[".cjs"] = "text/javascript";
@@ -73,9 +113,81 @@ internal sealed class WebServerStartup
});
}
- // app.UseEndpoints(endpoints =>
- // {
- // endpoints.MapFallbackToFile(options.DefaultFileName);
- // });
+ app.Map("/debug", app =>
+ {
+ app.Run(async (context) =>
+ {
+ //debug from VS
+ var queryParams = HttpUtility.ParseQueryString(context.Request.QueryString.Value!);
+ var browserParam = queryParams.Get("browser");
+ Uri? browserUrl = null;
+ var devToolsHost = "http://localhost:9222";
+ if (browserParam != null)
+ {
+ browserUrl = new Uri(browserParam);
+ devToolsHost = $"http://{browserUrl.Host}:{browserUrl.Port}";
+ }
+ lock (LaunchLock)
+ {
+ if (LaunchedDebugProxyUrl == "")
+ {
+ LaunchedDebugProxyUrl = $"http://localhost:{StartDebugProxy(devToolsHost)}";
+ }
+ }
+ var requestPath = context.Request.Path.ToString();
+ if (requestPath == string.Empty)
+ {
+ requestPath = "/";
+ }
+ context.Response.Redirect($"{LaunchedDebugProxyUrl}{browserUrl!.PathAndQuery}");
+ await Task.FromResult(0);
+ });
+ });
+ app.UseEndpoints(endpoints =>
+ {
+ endpoints.MapGet("/", context =>
+ {
+ context.Response.Redirect("index.html", permanent: false);
+ return Task.CompletedTask;
+ });
+ });
+
+
+ applicationLifetime.ApplicationStarted.Register(() =>
+ {
+ TaskCompletionSource<ServerURLs> tcs = realUrlsAvailableTcs;
+ try
+ {
+ ICollection<string>? addresses = app.ServerFeatures
+ .Get<IServerAddressesFeature>()
+ ?.Addresses;
+
+ string? ipAddress = null;
+ string? ipAddressSecure = null;
+ if (addresses is not null)
+ {
+ ipAddress = GetHttpServerAddress(addresses, secure: false);
+ ipAddressSecure = GetHttpServerAddress(addresses, secure: true);
+ }
+
+ if (ipAddress == null)
+ tcs.SetException(new InvalidOperationException("Failed to determine web server's IP address or port"));
+ else
+ tcs.SetResult(new ServerURLs(ipAddress, ipAddressSecure));
+ }
+ catch (Exception ex)
+ {
+ _logger?.LogError($"Failed to get urls for the webserver: {ex}");
+ tcs.TrySetException(ex);
+ throw;
+ }
+
+ static string? GetHttpServerAddress(ICollection<string> addresses, bool secure)
+ => addresses?
+ .Where(a => a.StartsWith(secure ? "https:" : "http:", StringComparison.InvariantCultureIgnoreCase))
+ .Select(a => new Uri(a))
+ .Select(uri => uri.ToString())
+ .FirstOrDefault();
+ });
}
}
diff --git a/src/mono/wasm/runtime/corebindings.c b/src/mono/wasm/runtime/corebindings.c
index c9ebdc01abd..d1b5a9e6842 100644
--- a/src/mono/wasm/runtime/corebindings.c
+++ b/src/mono/wasm/runtime/corebindings.c
@@ -35,7 +35,7 @@ extern void mono_wasm_bind_cs_function(MonoString **fully_qualified_name, int si
extern void mono_wasm_marshal_promise(void *data);
-void core_initialize_internals ()
+void core_initialize_internals (void)
{
mono_add_internal_call ("Interop/Runtime::InvokeJSWithArgsRef", mono_wasm_invoke_js_with_args_ref);
mono_add_internal_call ("Interop/Runtime::GetObjectPropertyRef", mono_wasm_get_object_property_ref);
diff --git a/src/mono/wasm/runtime/driver.c b/src/mono/wasm/runtime/driver.c
index e2db123f7ab..b14e341f6c8 100644
--- a/src/mono/wasm/runtime/driver.c
+++ b/src/mono/wasm/runtime/driver.c
@@ -452,7 +452,7 @@ get_native_to_interp (MonoMethod *method, void *extra_arg)
typedef void (*background_job_cb)(void);
void mono_threads_schedule_background_job (background_job_cb cb);
-void mono_initialize_internals ()
+void mono_initialize_internals (void)
{
// Blazor specific custom routines - see dotnet_support.js for backing code
mono_add_internal_call ("WebAssembly.JSInterop.InternalCalls::InvokeJS", mono_wasm_invoke_js_blazor);
@@ -465,7 +465,7 @@ void mono_initialize_internals ()
}
EMSCRIPTEN_KEEPALIVE void
-mono_wasm_register_bundled_satellite_assemblies ()
+mono_wasm_register_bundled_satellite_assemblies (void)
{
/* In legacy satellite_assembly_count is always false */
if (satellite_assembly_count) {
@@ -641,7 +641,7 @@ mono_wasm_assembly_load (const char *name)
}
EMSCRIPTEN_KEEPALIVE MonoAssembly*
-mono_wasm_get_corlib ()
+mono_wasm_get_corlib (void)
{
MonoAssembly* result;
MONO_ENTER_GC_UNSAFE;
@@ -912,7 +912,7 @@ _get_uri_class(MonoException** exc)
}
static void
-_ensure_classes_resolved ()
+_ensure_classes_resolved (void)
{
MONO_ENTER_GC_UNSAFE;
if (!datetime_class && !resolved_datetime_class) {
diff --git a/src/mono/wasm/runtime/logging.ts b/src/mono/wasm/runtime/logging.ts
index 2d40d7c4d20..cdb2d00dba7 100644
--- a/src/mono/wasm/runtime/logging.ts
+++ b/src/mono/wasm/runtime/logging.ts
@@ -62,8 +62,9 @@ export function mono_wasm_symbolicate_string(message: string): string {
export function mono_wasm_stringify_as_error_with_stack(err: Error | string): string {
let errObj: any = err;
- if (!(err instanceof Error))
- errObj = new Error(err);
+ if (!(errObj instanceof Error)) {
+ errObj = new Error(errObj);
+ }
// Error
return mono_wasm_symbolicate_string(errObj.stack);
diff --git a/src/mono/wasm/runtime/managed-exports.ts b/src/mono/wasm/runtime/managed-exports.ts
index 09f6d9a33d0..65186e4c0b2 100644
--- a/src/mono/wasm/runtime/managed-exports.ts
+++ b/src/mono/wasm/runtime/managed-exports.ts
@@ -7,7 +7,7 @@ import { Module, runtimeHelpers, ENVIRONMENT_IS_PTHREAD } from "./imports";
import { alloc_stack_frame, get_arg, get_arg_gc_handle, MarshalerType, set_arg_type, set_gc_handle } from "./marshal";
import { invoke_method_and_handle_exception } from "./invoke-cs";
import { marshal_array_to_cs_impl, marshal_exception_to_cs, marshal_intptr_to_cs } from "./marshal-to-cs";
-import { marshal_int32_to_js, marshal_task_to_js } from "./marshal-to-js";
+import { marshal_int32_to_js, marshal_string_to_js, marshal_task_to_js } from "./marshal-to-js";
export function init_managed_exports(): void {
const anyModule = Module as any;
@@ -34,6 +34,9 @@ export function init_managed_exports(): void {
mono_assert(complete_task_method, "Can't find CompleteTask method");
const call_delegate_method = get_method("CallDelegate");
mono_assert(call_delegate_method, "Can't find CallDelegate method");
+ const get_managed_stack_trace_method = get_method("GetManagedStackTrace");
+ mono_assert(get_managed_stack_trace_method, "Can't find GetManagedStackTrace method");
+
runtimeHelpers.javaScriptExports.call_entry_point = (entry_point: MonoMethod, program_args?: string[]) => {
const sp = anyModule.stackSave();
try {
@@ -134,6 +137,22 @@ export function init_managed_exports(): void {
anyModule.stackRestore(sp);
}
};
+ runtimeHelpers.javaScriptExports.get_managed_stack_trace = (exception_gc_handle: GCHandle) => {
+ const sp = anyModule.stackSave();
+ try {
+ const args = alloc_stack_frame(3);
+
+ const arg1 = get_arg(args, 2);
+ set_arg_type(arg1, MarshalerType.Exception);
+ set_gc_handle(arg1, exception_gc_handle);
+
+ invoke_method_and_handle_exception(get_managed_stack_trace_method, args);
+ const res = get_arg(args, 1);
+ return marshal_string_to_js(res);
+ } finally {
+ anyModule.stackRestore(sp);
+ }
+ };
if (install_sync_context) {
runtimeHelpers.javaScriptExports.install_synchronization_context = () => {
diff --git a/src/mono/wasm/runtime/marshal-to-js.ts b/src/mono/wasm/runtime/marshal-to-js.ts
index b3f469fc05f..a26de6dc147 100644
--- a/src/mono/wasm/runtime/marshal-to-js.ts
+++ b/src/mono/wasm/runtime/marshal-to-js.ts
@@ -33,7 +33,7 @@ export function initialize_marshalers_to_js(): void {
cs_to_js_marshalers.set(MarshalerType.Single, _marshal_float_to_js);
cs_to_js_marshalers.set(MarshalerType.IntPtr, _marshal_intptr_to_js);
cs_to_js_marshalers.set(MarshalerType.Double, _marshal_double_to_js);
- cs_to_js_marshalers.set(MarshalerType.String, _marshal_string_to_js);
+ cs_to_js_marshalers.set(MarshalerType.String, marshal_string_to_js);
cs_to_js_marshalers.set(MarshalerType.Exception, marshal_exception_to_js);
cs_to_js_marshalers.set(MarshalerType.JSException, marshal_exception_to_js);
cs_to_js_marshalers.set(MarshalerType.JSObject, _marshal_js_object_to_js);
@@ -296,7 +296,7 @@ export function mono_wasm_marshal_promise(args: JSMarshalerArguments): void {
set_arg_type(exc, MarshalerType.None);
}
-function _marshal_string_to_js(arg: JSMarshalerArgument): string | null {
+export function marshal_string_to_js(arg: JSMarshalerArgument): string | null {
const type = get_arg_type(arg);
if (type == MarshalerType.None) {
return null;
@@ -326,7 +326,7 @@ export function marshal_exception_to_js(arg: JSMarshalerArgument): Error | null
let result = _lookup_js_owned_object(gc_handle);
if (result === null || result === undefined) {
// this will create new ManagedError
- const message = _marshal_string_to_js(arg);
+ const message = marshal_string_to_js(arg);
result = new ManagedError(message!);
setup_managed_proxy(result, gc_handle);
@@ -405,7 +405,7 @@ function _marshal_array_to_js_impl(arg: JSMarshalerArgument, element_type: Marsh
result = new Array(length);
for (let index = 0; index < length; index++) {
const element_arg = get_arg(<any>buffer_ptr, index);
- result[index] = _marshal_string_to_js(element_arg);
+ result[index] = marshal_string_to_js(element_arg);
}
cwraps.mono_wasm_deregister_root(<any>buffer_ptr);
}
diff --git a/src/mono/wasm/runtime/marshal.ts b/src/mono/wasm/runtime/marshal.ts
index 591f3976292..c1e7e35535d 100644
--- a/src/mono/wasm/runtime/marshal.ts
+++ b/src/mono/wasm/runtime/marshal.ts
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
import { js_owned_gc_handle_symbol, teardown_managed_proxy } from "./gc-handles";
-import { Module } from "./imports";
+import { Module, runtimeHelpers } from "./imports";
import { getF32, getF64, getI16, getI32, getI64Big, getU16, getU32, getU8, setF32, setF64, setI16, setI32, setI64Big, setU16, setU32, setU8 } from "./memory";
import { mono_wasm_new_external_root } from "./roots";
import { mono_assert, GCHandle, JSHandle, MonoObject, MonoString, GCHandleNull, JSMarshalerArguments, JSFunctionSignature, JSMarshalerType, JSMarshalerArgument, MarshalerToJs, MarshalerToCs, WasmRoot } from "./types";
@@ -317,13 +317,31 @@ export class ManagedObject implements IDisposable {
}
export class ManagedError extends Error implements IDisposable {
+ private superStack: any;
constructor(message: string) {
super(message);
+ this.superStack = Object.getOwnPropertyDescriptor(this, "stack"); // this works on Chrome
+ Object.defineProperty(this, "stack", {
+ get: this.getManageStack,
+ });
}
- get stack(): string | undefined {
- //todo implement lazy managed stack strace from this[js_owned_gc_handle_symbol]!
- return super.stack;
+ getSuperStack() {
+ if (this.superStack) {
+ return this.superStack.value;
+ }
+ return super.stack; // this works on FF
+ }
+
+ getManageStack() {
+ const gc_handle = (<any>this)[js_owned_gc_handle_symbol];
+ if (gc_handle) {
+ const managed_stack = runtimeHelpers.javaScriptExports.get_managed_stack_trace(gc_handle);
+ if (managed_stack) {
+ return managed_stack + "\n" + this.getSuperStack();
+ }
+ }
+ return this.getSuperStack();
}
dispose(): void {
@@ -333,10 +351,6 @@ export class ManagedError extends Error implements IDisposable {
get isDisposed(): boolean {
return (<any>this)[js_owned_gc_handle_symbol] === GCHandleNull;
}
-
- toString(): string {
- return `ManagedError(gc_handle: ${(<any>this)[js_owned_gc_handle_symbol]})`;
- }
}
export function get_signature_marshaler(signature: JSFunctionSignature, index: number): JSHandle {
diff --git a/src/mono/wasm/runtime/types.ts b/src/mono/wasm/runtime/types.ts
index ba56005ef2d..ca914585d1d 100644
--- a/src/mono/wasm/runtime/types.ts
+++ b/src/mono/wasm/runtime/types.ts
@@ -414,6 +414,9 @@ export interface JavaScriptExports {
// the marshaled signature is: void InstallSynchronizationContext()
install_synchronization_context(): void;
+
+ // the marshaled signature is: string GetManagedStackTrace(GCHandle exception)
+ get_managed_stack_trace(exception_gc_handle: GCHandle): string | null
}
export type MarshalerToJs = (arg: JSMarshalerArgument, sig?: JSMarshalerType, res_converter?: MarshalerToJs, arg1_converter?: MarshalerToCs, arg2_converter?: MarshalerToCs, arg3_converter?: MarshalerToCs) => any;
diff --git a/src/mono/wasm/templates/templates/browser/.template.config/template.json b/src/mono/wasm/templates/templates/browser/.template.config/template.json
index 8051e4c6aab..7fc4f155519 100644
--- a/src/mono/wasm/templates/templates/browser/.template.config/template.json
+++ b/src/mono/wasm/templates/templates/browser/.template.config/template.json
@@ -2,13 +2,52 @@
"$schema": "http://json.schemastore.org/template",
"author": "Microsoft",
"classifications": [ "Web", "WebAssembly", "Browser" ],
- "identity": "WebAssembly.Browser",
+ "generatorVersions": "[1.0.0.0-*)",
+ "groupIdentity": "WebAssembly.Browser",
+ "precedence": 8000,
+ "identity": "WebAssembly.Browser.8.0",
+ "description": "WebAssembly Browser App",
"name": "WebAssembly Browser App",
+ "description": "A project template for creating a .NET app that runs on WebAssembly in a browser",
"shortName": "wasmbrowser",
"sourceName": "browser.0",
"preferNameDirectory": true,
"tags": {
"language": "C#",
"type": "project"
+ },
+ "symbols": {
+ "kestrelHttpPortGenerated": {
+ "type": "generated",
+ "generator": "port",
+ "parameters": {
+ "low": 5000,
+ "high": 5300
+ },
+ "replaces": "5000"
+ },
+ "kestrelHttpsPortGenerated": {
+ "type": "generated",
+ "generator": "port",
+ "parameters": {
+ "low": 7000,
+ "high": 7300
+ },
+ "replaces": "5001"
+ },
+ "framework": {
+ "type": "parameter",
+ "description": "The target framework for the project.",
+ "datatype": "choice",
+ "choices": [
+ {
+ "choice": "net8.0",
+ "description": "Target net8.0",
+ "displayName": ".NET 8.0"
+ }
+ ],
+ "defaultValue": "net8.0",
+ "displayName": "framework"
+ }
}
}
diff --git a/src/mono/wasm/templates/templates/browser/Properties/launchSettings.json b/src/mono/wasm/templates/templates/browser/Properties/launchSettings.json
new file mode 100644
index 00000000000..4807594b8f5
--- /dev/null
+++ b/src/mono/wasm/templates/templates/browser/Properties/launchSettings.json
@@ -0,0 +1,13 @@
+{
+ "profiles": {
+ "browser.0": {
+ "commandName": "Project",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ },
+ "applicationUrl": "https://localhost:5001;http://localhost:5000",
+ "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/debug?browser={browserInspectUri}"
+ }
+ }
+}
diff --git a/src/mono/wasm/templates/templates/browser/main.js b/src/mono/wasm/templates/templates/browser/main.js
index 32c1599749d..6d9bd43f7eb 100644
--- a/src/mono/wasm/templates/templates/browser/main.js
+++ b/src/mono/wasm/templates/templates/browser/main.js
@@ -3,15 +3,12 @@
import { dotnet } from './dotnet.js'
-const is_browser = typeof window != "undefined";
-if (!is_browser) throw new Error(`Expected to be running in a browser`);
-
-const { setModuleImports, getAssemblyExports, getConfig, runMainAndExit } = await dotnet
+const { setModuleImports, getAssemblyExports, getConfig } = await dotnet
.withDiagnosticTracing(false)
.withApplicationArgumentsFromQuery()
.create();
-setModuleImports("main.js", {
+setModuleImports('main.js', {
window: {
location: {
href: () => globalThis.window.location.href
@@ -24,5 +21,5 @@ const exports = await getAssemblyExports(config.mainAssemblyName);
const text = exports.MyClass.Greeting();
console.log(text);
-document.getElementById("out").innerHTML = `${text}`;
-await runMainAndExit(config.mainAssemblyName, ["dotnet", "is", "great!"]); \ No newline at end of file
+document.getElementById('out').innerHTML = text;
+await dotnet.run(); \ No newline at end of file
diff --git a/src/mono/wasm/templates/templates/console/.template.config/template.json b/src/mono/wasm/templates/templates/console/.template.config/template.json
index 8ead39edc0f..0ea523824ae 100644
--- a/src/mono/wasm/templates/templates/console/.template.config/template.json
+++ b/src/mono/wasm/templates/templates/console/.template.config/template.json
@@ -2,13 +2,33 @@
"$schema": "http://json.schemastore.org/template",
"author": "Microsoft",
"classifications": [ "Web", "WebAssembly", "Console" ],
- "identity": "WebAssembly.Console",
+ "groupIdentity": "WebAssembly.Console",
+ "precedence": 8000,
+ "identity": "WebAssembly.Console.8.0",
+ "description": "WebAssembly Console App",
"name": "WebAssembly Console App",
+ "description": "A project template for creating a .NET app that runs on WebAssembly on Node JS or V8",
"shortName": "wasmconsole",
"sourceName": "console.0",
"preferNameDirectory": true,
"tags": {
"language": "C#",
"type": "project"
+ },
+ "symbols": {
+ "framework": {
+ "type": "parameter",
+ "description": "The target framework for the project.",
+ "datatype": "choice",
+ "choices": [
+ {
+ "choice": "net8.0",
+ "description": "Target net8.0",
+ "displayName": ".NET 8.0"
+ }
+ ],
+ "defaultValue": "net8.0",
+ "displayName": "framework"
+ }
}
}
diff --git a/src/mono/wasm/templates/templates/console/main.mjs b/src/mono/wasm/templates/templates/console/main.mjs
index 1072711c59c..6dd163a3741 100644
--- a/src/mono/wasm/templates/templates/console/main.mjs
+++ b/src/mono/wasm/templates/templates/console/main.mjs
@@ -3,14 +3,11 @@
import { dotnet } from './dotnet.js'
-const is_node = typeof process === 'object' && typeof process.versions === 'object' && typeof process.versions.node === 'string';
-if (!is_node) throw new Error(`This file only supports nodejs`);
-
-const { setModuleImports, getAssemblyExports, getConfig, runMainAndExit } = await dotnet
+const { setModuleImports, getAssemblyExports, getConfig } = await dotnet
.withDiagnosticTracing(false)
.create();
-setModuleImports("main.mjs", {
+setModuleImports('main.mjs', {
node: {
process: {
version: () => globalThis.process.version
@@ -23,4 +20,4 @@ const exports = await getAssemblyExports(config.mainAssemblyName);
const text = exports.MyClass.Greeting();
console.log(text);
-await runMainAndExit(config.mainAssemblyName, ["dotnet", "is", "great!"]);
+await dotnet.run();
diff --git a/src/mono/wasm/wasm.proj b/src/mono/wasm/wasm.proj
index cac849c5818..1a8fd0bf0fa 100644
--- a/src/mono/wasm/wasm.proj
+++ b/src/mono/wasm/wasm.proj
@@ -332,6 +332,9 @@
<!-- npm install is faster on dev machine as it doesn't wipe node_modules folder -->
<RunWithEmSdkEnv Condition="'$(ContinuousIntegrationBuild)' != 'true'" Command="npm install" EmSdkPath="$(EMSDK_PATH)" IgnoreStandardErrorWarningFormat="true" WorkingDirectory="$(MonoProjectRoot)wasm/runtime/"/>
+ <!-- Delete malformed package.json used for tests, it confuses Component Governance tooling -->
+ <Delete Files="$(MonoProjectRoot)wasm/runtime/node_modules/resolve/test/resolver/malformed_package_json/package.json" ContinueOnError="true" />
+
<Touch Files="$(MonoProjectRoot)wasm/runtime/node_modules/.npm-stamp" AlwaysCreate="true" />
</Target>
diff --git a/src/native/corehost/build.sh b/src/native/corehost/build.sh
index ae44091c548..f300b10f672 100755
--- a/src/native/corehost/build.sh
+++ b/src/native/corehost/build.sh
@@ -74,14 +74,13 @@ __LogsDir="$__RootBinDir/log"
__MsbuildDebugLogsDir="$__LogsDir/MsbuildDebugLogs"
# Set the remaining variables based upon the determined build configuration
-__DistroRidLower="$(echo $__DistroRid | tr '[:upper:]' '[:lower:]')"
-__BinDir="$__RootBinDir/bin/$__DistroRidLower.$__BuildType"
-__IntermediatesDir="$__RootBinDir/obj/$__DistroRidLower.$__BuildType"
+__BinDir="$__RootBinDir/bin/$__OutputRid.$__BuildType"
+__IntermediatesDir="$__RootBinDir/obj/$__OutputRid.$__BuildType"
export __BinDir __IntermediatesDir __RuntimeFlavor
__CMakeArgs="-DCLI_CMAKE_HOST_VER=\"$__host_ver\" -DCLI_CMAKE_COMMON_HOST_VER=\"$__apphost_ver\" -DCLI_CMAKE_HOST_FXR_VER=\"$__fxr_ver\" $__CMakeArgs"
-__CMakeArgs="-DCLI_CMAKE_HOST_POLICY_VER=\"$__policy_ver\" -DCLI_CMAKE_PKG_RID=\"$__DistroRid\" -DCLI_CMAKE_COMMIT_HASH=\"$__commit_hash\" $__CMakeArgs"
+__CMakeArgs="-DCLI_CMAKE_HOST_POLICY_VER=\"$__policy_ver\" -DCLI_CMAKE_PKG_RID=\"$__OutputRid\" -DCLI_CMAKE_COMMIT_HASH=\"$__commit_hash\" $__CMakeArgs"
__CMakeArgs="-DRUNTIME_FLAVOR=\"$__RuntimeFlavor\" $__CMakeArgs"
__CMakeArgs="-DFEATURE_DISTRO_AGNOSTIC_SSL=$__PortableBuild $__CMakeArgs"
diff --git a/src/native/corehost/corehost.proj b/src/native/corehost/corehost.proj
index a706b6e9427..372d508b13b 100644
--- a/src/native/corehost/corehost.proj
+++ b/src/native/corehost/corehost.proj
@@ -81,6 +81,7 @@
<BuildArgs Condition="'$(Ninja)' == 'true'">$(BuildArgs) -ninja</BuildArgs>
<BuildArgs>$(BuildArgs) -runtimeflavor $(RuntimeFlavor)</BuildArgs>
<BuildArgs Condition="'$(OfficialBuildId)' != ''">$(BuildArgs) /p:OfficialBuildId="$(OfficialBuildId)"</BuildArgs>
+ <BuildArgs>$(BuildArgs) -outputrid $(OutputRid)</BuildArgs>
</PropertyGroup>
<!--
diff --git a/src/native/corehost/fxr/hostfxr.cpp b/src/native/corehost/fxr/hostfxr.cpp
index 96f8b047611..40e20f0ad10 100644
--- a/src/native/corehost/fxr/hostfxr.cpp
+++ b/src/native/corehost/fxr/hostfxr.cpp
@@ -344,41 +344,6 @@ SHARED_API int32_t HOSTFXR_CALLTYPE hostfxr_get_available_sdks(
return StatusCode::Success;
}
-//
-// Returns available SDKs and frameworks.
-//
-// Resolves the existing SDKs and frameworks from a dotnet root directory (if
-// any), or the global default location. If multi-level lookup is enabled and
-// the dotnet root location is different than the global location, the SDKs and
-// frameworks will be enumerated from both locations.
-//
-// The SDKs are sorted in ascending order by version, multi-level lookup
-// locations are put before private ones.
-//
-// The frameworks are sorted in ascending order by name followed by version,
-// multi-level lookup locations are put before private ones.
-//
-// Parameters:
-// dotnet_root
-// The path to a directory containing a dotnet executable.
-//
-// reserved
-// Reserved for future parameters.
-//
-// result
-// Callback invoke to return the list of SDKs and frameworks.
-// Structs and their elements are valid for the duration of the call.
-//
-// result_context
-// Additional context passed to the result callback.
-//
-// Return value:
-// 0 on success, otherwise failure.
-//
-// String encoding:
-// Windows - UTF-16 (pal::char_t is 2 byte wchar_t)
-// Unix - UTF-8 (pal::char_t is 1 byte char)
-//
SHARED_API int32_t HOSTFXR_CALLTYPE hostfxr_get_dotnet_environment_info(
const pal::char_t* dotnet_root,
void* reserved,
diff --git a/src/native/corehost/hostfxr.h b/src/native/corehost/hostfxr.h
index 591a8ebbea5..0eb54aa4427 100644
--- a/src/native/corehost/hostfxr.h
+++ b/src/native/corehost/hostfxr.h
@@ -320,4 +320,45 @@ struct hostfxr_dotnet_environment_info
const struct hostfxr_dotnet_environment_framework_info* frameworks;
};
+//
+// Returns available SDKs and frameworks.
+//
+// Resolves the existing SDKs and frameworks from a dotnet root directory (if
+// any), or the global default location. If multi-level lookup is enabled and
+// the dotnet root location is different than the global location, the SDKs and
+// frameworks will be enumerated from both locations.
+//
+// The SDKs are sorted in ascending order by version, multi-level lookup
+// locations are put before private ones.
+//
+// The frameworks are sorted in ascending order by name followed by version,
+// multi-level lookup locations are put before private ones.
+//
+// Parameters:
+// dotnet_root
+// The path to a directory containing a dotnet executable.
+//
+// reserved
+// Reserved for future parameters.
+//
+// result
+// Callback invoke to return the list of SDKs and frameworks.
+// Structs and their elements are valid for the duration of the call.
+//
+// result_context
+// Additional context passed to the result callback.
+//
+// Return value:
+// 0 on success, otherwise failure.
+//
+// String encoding:
+// Windows - UTF-16 (pal::char_t is 2 byte wchar_t)
+// Unix - UTF-8 (pal::char_t is 1 byte char)
+//
+typedef int32_t(HOSTFXR_CALLTYPE* hostfxr_get_dotnet_environment_info_fn)(
+ const char_t* dotnet_root,
+ void* reserved,
+ hostfxr_get_dotnet_environment_info_result_fn result,
+ void* result_context);
+
#endif //__HOSTFXR_H__
diff --git a/src/native/eventpipe/ds-server.c b/src/native/eventpipe/ds-server.c
index 5185bc09f49..b3cf9f3b27e 100644
--- a/src/native/eventpipe/ds-server.c
+++ b/src/native/eventpipe/ds-server.c
@@ -116,6 +116,8 @@ EP_RT_DEFINE_THREAD_FUNC (server_thread)
{
EP_ASSERT (server_volatile_load_shutting_down_state () || ds_ipc_stream_factory_has_active_ports ());
+ ep_rt_set_server_name();
+
if (!ds_ipc_stream_factory_has_active_ports ()) {
#ifndef DS_IPC_DISABLE_LISTEN_PORTS
DS_LOG_ERROR_0 ("Diagnostics IPC listener was undefined");
@@ -256,7 +258,7 @@ ds_server_shutdown (void)
void
ds_server_pause_for_diagnostics_monitor (void)
{
- _is_paused_for_startup = true;
+ _is_paused_for_startup = true;
if (ds_ipc_stream_factory_any_suspended_ports ()) {
EP_ASSERT (ep_rt_wait_event_is_valid (&_server_resume_runtime_startup_event));
@@ -278,7 +280,7 @@ ds_server_resume_runtime_startup (void)
ds_ipc_stream_factory_resume_current_port ();
if (!ds_ipc_stream_factory_any_suspended_ports () && ep_rt_wait_event_is_valid (&_server_resume_runtime_startup_event)) {
ep_rt_wait_event_set (&_server_resume_runtime_startup_event);
- _is_paused_for_startup = false;
+ _is_paused_for_startup = false;
}
}
diff --git a/src/native/eventpipe/ep-rt.h b/src/native/eventpipe/ep-rt.h
index 086975834d8..e7d7a12c7d0 100644
--- a/src/native/eventpipe/ep-rt.h
+++ b/src/native/eventpipe/ep-rt.h
@@ -568,6 +568,10 @@ ep_rt_thread_create (
static
void
+ep_rt_set_server_name (void);
+
+static
+void
ep_rt_thread_sleep (uint64_t ns);
static
diff --git a/src/native/external/cgmanifest.json b/src/native/external/cgmanifest.json
index f9c670864af..422a0d93aef 100644
--- a/src/native/external/cgmanifest.json
+++ b/src/native/external/cgmanifest.json
@@ -1,64 +1,65 @@
{
- "Registrations": [
- {
- "Component": {
- "Type": "git",
- "Git": {
- "RepositoryUrl": "https://github.com/google/brotli",
- "CommitHash": "e61745a6b7add50d380cfd7d3883dd6c62fc2c71"
- }
- },
- "DevelopmentDependency": false
- },
- {
- "Component": {
- "Type": "git",
- "Git": {
- "RepositoryUrl": "https://github.com/libunwind/libunwind",
- "CommitHash": "b3ca1b59a795a617877c01fe5d299ab7a07ff29d"
- }
- },
- "DevelopmentDependency": false
- },
- {
- "Component": {
- "Type": "git",
- "Git": {
- "RepositoryUrl": "https://github.com/llvm/llvm-project",
- "CommitHash": "f28c006a5895fc0e329fe15fead81e37457cb1d1"
- }
- },
- "DevelopmentDependency": false
- },
- {
- "Component": {
- "Type": "git",
- "Git": {
- "RepositoryUrl": "https://github.com/Tencent/rapidjson",
- "CommitHash": "d87b698d0fcc10a5f632ecbc80a9cb2a8fa094a5"
- }
- },
- "DevelopmentDependency": false
- },
- {
- "Component": {
- "Type": "git",
- "Git": {
- "RepositoryUrl": "https://github.com/madler/zlib",
- "CommitHash": "21767c654d31d2dccdde4330529775c6c5fd5389"
- }
- },
- "DevelopmentDependency": false
- },
- {
- "Component": {
- "Type": "git",
- "Git": {
- "RepositoryUrl": "https://github.com/jtkukunas/zlib",
- "CommitHash": "bf55d56b068467329f5a6f29bee31bc80d694023"
- }
- },
- "DevelopmentDependency": false
+ "$schema": "https://json.schemastore.org/component-detection-manifest.json",
+ "Registrations": [
+ {
+ "Component": {
+ "Type": "git",
+ "Git": {
+ "RepositoryUrl": "https://github.com/google/brotli",
+ "CommitHash": "e61745a6b7add50d380cfd7d3883dd6c62fc2c71"
}
- ]
-} \ No newline at end of file
+ },
+ "DevelopmentDependency": false
+ },
+ {
+ "Component": {
+ "Type": "git",
+ "Git": {
+ "RepositoryUrl": "https://github.com/libunwind/libunwind",
+ "CommitHash": "b3ca1b59a795a617877c01fe5d299ab7a07ff29d"
+ }
+ },
+ "DevelopmentDependency": false
+ },
+ {
+ "Component": {
+ "Type": "git",
+ "Git": {
+ "RepositoryUrl": "https://github.com/llvm/llvm-project",
+ "CommitHash": "f28c006a5895fc0e329fe15fead81e37457cb1d1"
+ }
+ },
+ "DevelopmentDependency": false
+ },
+ {
+ "Component": {
+ "Type": "git",
+ "Git": {
+ "RepositoryUrl": "https://github.com/Tencent/rapidjson",
+ "CommitHash": "d87b698d0fcc10a5f632ecbc80a9cb2a8fa094a5"
+ }
+ },
+ "DevelopmentDependency": false
+ },
+ {
+ "Component": {
+ "Type": "git",
+ "Git": {
+ "RepositoryUrl": "https://github.com/madler/zlib",
+ "CommitHash": "21767c654d31d2dccdde4330529775c6c5fd5389"
+ }
+ },
+ "DevelopmentDependency": false
+ },
+ {
+ "Component": {
+ "Type": "git",
+ "Git": {
+ "RepositoryUrl": "https://github.com/jtkukunas/zlib",
+ "CommitHash": "bf55d56b068467329f5a6f29bee31bc80d694023"
+ }
+ },
+ "DevelopmentDependency": false
+ }
+ ]
+}
diff --git a/src/native/libs/CMakeLists.txt b/src/native/libs/CMakeLists.txt
index 11d3799129b..26ff71928ff 100644
--- a/src/native/libs/CMakeLists.txt
+++ b/src/native/libs/CMakeLists.txt
@@ -150,7 +150,6 @@ if (CLR_CMAKE_TARGET_UNIX OR CLR_CMAKE_TARGET_BROWSER)
add_compile_options(-Wno-typedef-redefinition)
add_compile_options(-Wno-c11-extensions)
add_compile_options(-Wno-thread-safety-analysis)
- add_compile_options(-Wno-strict-prototypes)
endif ()
add_subdirectory(System.Native)
diff --git a/src/native/libs/System.Globalization.Native/pal_calendarData.c b/src/native/libs/System.Globalization.Native/pal_calendarData.c
index 0b234ac7800..bc47e3326af 100644
--- a/src/native/libs/System.Globalization.Native/pal_calendarData.c
+++ b/src/native/libs/System.Globalization.Native/pal_calendarData.c
@@ -549,7 +549,7 @@ GetLatestJapaneseEra
Gets the latest era in the Japanese calendar.
*/
-int32_t GlobalizationNative_GetLatestJapaneseEra()
+int32_t GlobalizationNative_GetLatestJapaneseEra(void)
{
UErrorCode err = U_ZERO_ERROR;
UCalendar* pCal = ucal_open(NULL, 0, JAPANESE_LOCALE_AND_CALENDAR, UCAL_TRADITIONAL, &err);
diff --git a/src/native/libs/System.Globalization.Native/pal_icushim.c b/src/native/libs/System.Globalization.Native/pal_icushim.c
index d23499c80b1..bfb2a1c52bc 100644
--- a/src/native/libs/System.Globalization.Native/pal_icushim.c
+++ b/src/native/libs/System.Globalization.Native/pal_icushim.c
@@ -95,7 +95,7 @@ static int FindSymbolVersion(int majorVer, int minorVer, int subVer, char* symbo
fn##_ptr = (TYPEOF(fn)*)GetProcAddress((HMODULE)lib, symbolName); \
if (fn##_ptr == NULL && required) { fprintf(stderr, "Cannot get symbol %s from " #lib "\nError: %u\n", symbolName, GetLastError()); abort(); }
-static int FindICULibs()
+static int FindICULibs(void)
{
libicuuc = LoadLibraryExW(L"icu.dll", NULL, LOAD_LIBRARY_SEARCH_SYSTEM32);
if (libicuuc == NULL)
@@ -157,7 +157,7 @@ static int FindSymbolVersion(int majorVer, int minorVer, int subVer, char* symbo
#elif defined(TARGET_OSX)
-static int FindICULibs()
+static int FindICULibs(void)
{
#ifndef OSX_ICU_LIBRARY_PATH
c_static_assert_msg(false, "The ICU Library path is not defined");
@@ -448,7 +448,7 @@ static void InitializeVariableMaxAndTopPointers(char* symbolVersion)
// This method get called from the managed side during the globalization initialization.
// This method shouldn't get called at all if we are running in globalization invariant mode
// return 0 if failed to load ICU and 1 otherwise
-int32_t GlobalizationNative_LoadICU()
+int32_t GlobalizationNative_LoadICU(void)
{
char symbolName[SYMBOL_NAME_SIZE];
char symbolVersion[MaxICUVersionStringLength + 1]="";
@@ -545,7 +545,7 @@ void GlobalizationNative_InitICUFunctions(void* icuuc, void* icuin, const char*
// GlobalizationNative_GetICUVersion
// return the current loaded ICU version
-int32_t GlobalizationNative_GetICUVersion()
+int32_t GlobalizationNative_GetICUVersion(void)
{
if (u_getVersion_ptr == NULL)
return 0;
diff --git a/src/native/libs/System.Globalization.Native/pal_locale.c b/src/native/libs/System.Globalization.Native/pal_locale.c
index 498f713404c..eada9f12ddd 100644
--- a/src/native/libs/System.Globalization.Native/pal_locale.c
+++ b/src/native/libs/System.Globalization.Native/pal_locale.c
@@ -134,7 +134,7 @@ int32_t FixupLocaleName(UChar* value, int32_t valueLength)
// On Apple related platforms (OSX, iOS, tvOS, MacCatalyst), we'll take what the system locale is.
// On all other platforms we'll map this POSIX locale to Invariant instead.
// The reason is POSIX locale collation behavior is not desirable at all because it doesn't support case insensitive string comparisons.
-const char* DetectDefaultLocaleName()
+const char* DetectDefaultLocaleName(void)
{
const char* icuLocale = uloc_getDefault();
diff --git a/src/native/libs/System.Globalization.Native/pal_localeNumberData.c b/src/native/libs/System.Globalization.Native/pal_localeNumberData.c
index 161a1acf3ca..c0996e37331 100644
--- a/src/native/libs/System.Globalization.Native/pal_localeNumberData.c
+++ b/src/native/libs/System.Globalization.Native/pal_localeNumberData.c
@@ -88,12 +88,20 @@ static char* NormalizeNumericPattern(const UChar* srcPattern, int isNegative)
{
int length = (iEnd - iStart) + 2;
destPattern = (char*)calloc((size_t)length, sizeof(char));
+ if (!destPattern)
+ {
+ return NULL;
+ }
destPattern[index++] = '-';
}
else
{
int length = (iEnd - iStart) + 1;
destPattern = (char*)calloc((size_t)length, sizeof(char));
+ if (!destPattern)
+ {
+ return NULL;
+ }
}
for (int i = iStart; i <= iEnd; i++)
@@ -178,6 +186,11 @@ static int GetNumericPattern(const UNumberFormat* pNumberFormat,
free(icuPattern);
+ if (!normalizedPattern)
+ {
+ return U_MEMORY_ALLOCATION_ERROR;
+ }
+
size_t normalizedPatternLength = strlen(normalizedPattern);
assert(normalizedPatternLength > 0);
diff --git a/src/native/libs/System.Globalization.Native/pal_normalization.c b/src/native/libs/System.Globalization.Native/pal_normalization.c
index 9faca845b7d..f421e39809b 100644
--- a/src/native/libs/System.Globalization.Native/pal_normalization.c
+++ b/src/native/libs/System.Globalization.Native/pal_normalization.c
@@ -20,10 +20,10 @@ static const UNormalizer2* GetNormalizerForForm(NormalizationForm normalizationF
return unorm2_getNFKCInstance(pErrorCode);
case FormKD:
return unorm2_getNFKDInstance(pErrorCode);
+ default:
+ *pErrorCode = U_ILLEGAL_ARGUMENT_ERROR;
+ return NULL;
}
-
- *pErrorCode = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
}
/*
diff --git a/src/native/libs/System.IO.Compression.Native/CMakeLists.txt b/src/native/libs/System.IO.Compression.Native/CMakeLists.txt
index f4d2e315f49..ef548406e4d 100644
--- a/src/native/libs/System.IO.Compression.Native/CMakeLists.txt
+++ b/src/native/libs/System.IO.Compression.Native/CMakeLists.txt
@@ -35,12 +35,12 @@ if (CLR_CMAKE_TARGET_UNIX OR CLR_CMAKE_TARGET_BROWSER)
set(NATIVECOMPRESSION_SOURCES ${ZLIB_SOURCES} ${NATIVECOMPRESSION_SOURCES})
endif()
- # Disable implicit fallthrough warning for Brotli
+ # Disable implicit fallthrough warning for Zlib and Brotli
set(FLAGS -Wno-implicit-fallthrough)
- if (CMAKE_C_COMPILER_ID STREQUAL Clang)
- add_compile_options(-Wno-strict-prototypes)
- endif ()
+ # Disable no strict prototypes warning for Zlib
+ # https://github.com/madler/zlib/issues/633
+ set(FLAGS "${FLAGS} -Wno-strict-prototypes")
# Delete this suppression once brotli is upgraded to vNext (current latest v1.0.9
# does not contain upstream fix: https://github.com/google/brotli/commit/0a3944c)
diff --git a/src/native/libs/System.Native/CMakeLists.txt b/src/native/libs/System.Native/CMakeLists.txt
index b4d97039824..a6358bafed4 100644
--- a/src/native/libs/System.Native/CMakeLists.txt
+++ b/src/native/libs/System.Native/CMakeLists.txt
@@ -59,6 +59,11 @@ if (CLR_CMAKE_TARGET_MACCATALYST OR CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVO
set(NATIVE_SOURCES ${NATIVE_SOURCES}
pal_log.m
pal_searchpath.m)
+elseif (CLR_CMAKE_TARGET_OSX)
+ list (APPEND NATIVE_SOURCES
+ pal_searchpath.m
+ pal_console.c
+ pal_log.c)
else ()
list (APPEND NATIVE_SOURCES
pal_searchpath.c
diff --git a/src/native/libs/System.Native/pal_console.c b/src/native/libs/System.Native/pal_console.c
index b8e9051593c..5e13eb7b627 100644
--- a/src/native/libs/System.Native/pal_console.c
+++ b/src/native/libs/System.Native/pal_console.c
@@ -46,7 +46,7 @@ int32_t SystemNative_IsATty(intptr_t fd)
static char* g_keypadXmit = NULL; // string used to enable application mode, from terminfo
-static void WriteKeypadXmit()
+static void WriteKeypadXmit(void)
{
// If a terminfo "application mode" keypad_xmit string has been supplied,
// write it out to the terminal to enter the mode.
@@ -97,7 +97,7 @@ static bool g_hasTty = false; // cache we are not a tty
static volatile bool g_receivedSigTtou = false;
-static void ttou_handler()
+static void ttou_handler(void)
{
g_receivedSigTtou = true;
}
@@ -198,7 +198,7 @@ static bool ConfigureTerminal(bool signalForBreak, bool forChild, uint8_t minCha
return TcSetAttr(&termios, blockIfBackground);
}
-void UninitializeTerminal()
+void UninitializeTerminal(void)
{
// This method is called on SIGQUIT/SIGINT from the signal dispatching thread
// and on atexit.
@@ -232,7 +232,7 @@ void SystemNative_InitializeConsoleBeforeRead(int32_t distinguishNewLines, uint8
}
}
-void SystemNative_UninitializeConsoleAfterRead()
+void SystemNative_UninitializeConsoleAfterRead(void)
{
if (pthread_mutex_lock(&g_lock) == 0)
{
@@ -397,7 +397,7 @@ int32_t SystemNative_ReadStdin(void* buffer, int32_t bufferSize)
return (int32_t)count;
}
-int32_t SystemNative_GetSignalForBreak()
+int32_t SystemNative_GetSignalForBreak(void)
{
return g_signalForBreak;
}
@@ -422,7 +422,7 @@ int32_t SystemNative_SetSignalForBreak(int32_t signalForBreak, int32_t distingui
return rv;
}
-void ReinitializeTerminal()
+void ReinitializeTerminal(void)
{
// Restores the state of the terminal after being suspended.
// pal_signal.cpp calls this on SIGCONT from the signal handling thread.
@@ -443,7 +443,7 @@ void ReinitializeTerminal()
}
}
-static void InitializeTerminalCore()
+static void InitializeTerminalCore(void)
{
bool haveInitTermios = tcgetattr(STDIN_FILENO, &g_initTermios) >= 0;
@@ -462,7 +462,7 @@ static void InitializeTerminalCore()
}
}
-int32_t SystemNative_InitializeTerminalAndSignalHandling()
+int32_t SystemNative_InitializeTerminalAndSignalHandling(void)
{
static int32_t initialized = 0;
diff --git a/src/native/libs/System.Native/pal_datetime.c b/src/native/libs/System.Native/pal_datetime.c
index 3832114b4eb..73c0a2583e4 100644
--- a/src/native/libs/System.Native/pal_datetime.c
+++ b/src/native/libs/System.Native/pal_datetime.c
@@ -23,7 +23,7 @@ static const int64_t TICKS_PER_MICROSECOND = 10; /* 1000 / 100 */
// SystemNative_GetSystemTimeAsTicks return the system time as ticks (100 nanoseconds)
// since 00:00 01 January 1970 UTC (Unix epoch)
//
-int64_t SystemNative_GetSystemTimeAsTicks()
+int64_t SystemNative_GetSystemTimeAsTicks(void)
{
#if HAVE_CLOCK_REALTIME
struct timespec time;
@@ -43,7 +43,7 @@ int64_t SystemNative_GetSystemTimeAsTicks()
}
#if defined(TARGET_ANDROID)
-char* SystemNative_GetDefaultTimeZone()
+char* SystemNative_GetDefaultTimeZone(void)
{
char defaulttimezone[PROP_VALUE_MAX];
if (__system_property_get("persist.sys.timezone", defaulttimezone))
diff --git a/src/native/libs/System.Native/pal_environment.c b/src/native/libs/System.Native/pal_environment.c
index fd9e68f0230..76ad3a807ee 100644
--- a/src/native/libs/System.Native/pal_environment.c
+++ b/src/native/libs/System.Native/pal_environment.c
@@ -15,7 +15,7 @@ char* SystemNative_GetEnv(const char* variable)
return getenv(variable);
}
-char** SystemNative_GetEnviron()
+char** SystemNative_GetEnviron(void)
{
#if HAVE_NSGETENVIRON
return *(_NSGetEnviron());
diff --git a/src/native/libs/System.Native/pal_io.c b/src/native/libs/System.Native/pal_io.c
index 7f775ff8869..9332b46bb28 100644
--- a/src/native/libs/System.Native/pal_io.c
+++ b/src/native/libs/System.Native/pal_io.c
@@ -1215,7 +1215,7 @@ static ssize_t CopyFileRange(int inFd, int outFd, size_t len)
return syscall(__NR_copy_file_range, inFd, NULL, outFd, NULL, len, 0);
}
-static bool SupportsCopyFileRange()
+static bool SupportsCopyFileRange(void)
{
static volatile int s_isSupported = 0;
diff --git a/src/native/libs/System.Native/pal_networkstatistics.c b/src/native/libs/System.Native/pal_networkstatistics.c
index 6066cae821e..987a0a80d81 100644
--- a/src/native/libs/System.Native/pal_networkstatistics.c
+++ b/src/native/libs/System.Native/pal_networkstatistics.c
@@ -341,7 +341,7 @@ int32_t SystemNative_GetIcmpv6GlobalStatistics(Icmpv6GlobalStatistics* retStats)
return 0;
}
-int32_t SystemNative_GetEstimatedTcpConnectionCount()
+int32_t SystemNative_GetEstimatedTcpConnectionCount(void)
{
int32_t count;
size_t oldlenp = sizeof(count);
@@ -455,7 +455,7 @@ int32_t SystemNative_GetActiveTcpConnectionInfos(NativeTcpConnectionInformation*
return 0;
}
-int32_t SystemNative_GetEstimatedUdpListenerCount()
+int32_t SystemNative_GetEstimatedUdpListenerCount(void)
{
int32_t count;
size_t oldlenp = sizeof(count);
@@ -702,7 +702,7 @@ int32_t SystemNative_GetNativeIPInterfaceStatistics(char* interfaceName, NativeI
memset(retStats, 0, sizeof(NativeIPInterfaceStatistics));
return -1;
}
-int32_t SystemNative_GetNumRoutes()
+int32_t SystemNative_GetNumRoutes(void)
{
int32_t count = 0;
#if HAVE_RT_MSGHDR2
diff --git a/src/native/libs/System.Native/pal_process.c b/src/native/libs/System.Native/pal_process.c
index dfb4c6d860e..509049b2fdc 100644
--- a/src/native/libs/System.Native/pal_process.c
+++ b/src/native/libs/System.Native/pal_process.c
@@ -244,23 +244,13 @@ int32_t SystemNative_ForkAndExecProcess(const char* filename,
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &thread_cancel_state);
#endif
- // Validate arguments
- if (NULL == filename || NULL == argv || NULL == envp || NULL == stdinFd || NULL == stdoutFd ||
- NULL == stderrFd || NULL == childPid || (groupsLength > 0 && groups == NULL))
- {
- assert(false && "null argument.");
- errno = EINVAL;
- success = false;
- goto done;
- }
+ assert(NULL != filename && NULL != argv && NULL != envp && NULL != stdinFd &&
+ NULL != stdoutFd && NULL != stderrFd && NULL != childPid &&
+ (groupsLength == 0 || groups != NULL) && "null argument.");
- if ((redirectStdin & ~1) != 0 || (redirectStdout & ~1) != 0 || (redirectStderr & ~1) != 0 || (setCredentials & ~1) != 0)
- {
- assert(false && "Boolean redirect* inputs must be 0 or 1.");
- errno = EINVAL;
- success = false;
- goto done;
- }
+ assert((redirectStdin & ~1) == 0 && (redirectStdout & ~1) == 0 &&
+ (redirectStderr & ~1) == 0 && (setCredentials & ~1) == 0 &&
+ "Boolean redirect* inputs must be 0 or 1.");
if (setCredentials && groupsLength > 0)
{
@@ -670,7 +660,7 @@ int32_t SystemNative_Kill(int32_t pid, int32_t signal)
return kill(pid, signal);
}
-int32_t SystemNative_GetPid()
+int32_t SystemNative_GetPid(void)
{
return getpid();
}
@@ -685,7 +675,7 @@ void SystemNative_SysLog(SysLogPriority priority, const char* message, const cha
syslog((int)(LOG_USER | priority), message, arg1);
}
-int32_t SystemNative_WaitIdAnyExitedNoHangNoWait()
+int32_t SystemNative_WaitIdAnyExitedNoHangNoWait(void)
{
siginfo_t siginfo;
memset(&siginfo, 0, sizeof(siginfo));
@@ -884,7 +874,7 @@ int32_t SystemNative_SchedGetAffinity(int32_t pid, intptr_t* mask)
}
#endif
-char* SystemNative_GetProcessPath()
+char* SystemNative_GetProcessPath(void)
{
return minipal_getexepath();
}
diff --git a/src/native/libs/System.Native/pal_runtimeinformation.c b/src/native/libs/System.Native/pal_runtimeinformation.c
index 24446c9e8e3..aa18e7000d1 100644
--- a/src/native/libs/System.Native/pal_runtimeinformation.c
+++ b/src/native/libs/System.Native/pal_runtimeinformation.c
@@ -16,7 +16,7 @@
#include <sys/systeminfo.h>
#endif
-char* SystemNative_GetUnixRelease()
+char* SystemNative_GetUnixRelease(void)
{
#if defined(TARGET_ANDROID)
// get the Android API level
@@ -68,7 +68,7 @@ enum
ARCH_RISCV64,
};
-int32_t SystemNative_GetOSArchitecture()
+int32_t SystemNative_GetOSArchitecture(void)
{
#ifdef TARGET_WASM
return ARCH_WASM;
diff --git a/src/native/libs/System.Native/pal_searchpath.c b/src/native/libs/System.Native/pal_searchpath.c
index de8037dc1a2..10bf9c77c00 100644
--- a/src/native/libs/System.Native/pal_searchpath.c
+++ b/src/native/libs/System.Native/pal_searchpath.c
@@ -11,7 +11,7 @@ const char* SystemNative_SearchPath(int32_t folderId)
return NULL;
}
-const char* SystemNative_SearchPath_TempDirectory()
+const char* SystemNative_SearchPath_TempDirectory(void)
{
__builtin_unreachable();
return NULL;
diff --git a/src/native/libs/System.Native/pal_signal.c b/src/native/libs/System.Native/pal_signal.c
index 0271f8c216f..257969dc67a 100644
--- a/src/native/libs/System.Native/pal_signal.c
+++ b/src/native/libs/System.Native/pal_signal.c
@@ -40,7 +40,7 @@ static int g_signalPipe[2] = {-1, -1}; // Pipe used between signal handler and w
static pid_t g_pid;
-static int GetSignalMax() // Returns the highest usable signal number.
+static int GetSignalMax(void) // Returns the highest usable signal number.
{
#ifdef SIGRTMAX
return SIGRTMAX;
@@ -313,6 +313,14 @@ static void* SignalHandlerLoop(void* arg)
free(arg);
assert(pipeFd >= 0);
+ char* threadName = ".NET SigHandler";
+#if defined(__linux__) || defined(__FreeBSD__)
+ pthread_setname_np(pthread_self(), threadName);
+#endif
+#if defined(__APPLE__)
+ pthread_setname_np(threadName);
+#endif
+
// Continually read a signal code from the signal pipe and process it,
// until the pipe is closed.
while (true)
@@ -401,7 +409,7 @@ static void* SignalHandlerLoop(void* arg)
}
}
-static void CloseSignalHandlingPipe()
+static void CloseSignalHandlingPipe(void)
{
assert(g_signalPipe[0] >= 0);
assert(g_signalPipe[1] >= 0);
@@ -540,7 +548,7 @@ static bool CreateSignalHandlerThread(int* readFdPtr)
return success;
}
-int32_t InitializeSignalHandlingCore()
+int32_t InitializeSignalHandlingCore(void)
{
size_t signalMax = (size_t)GetSignalMax();
g_origSigHandler = (struct sigaction*)calloc(sizeof(struct sigaction), signalMax);
@@ -692,7 +700,7 @@ void UninstallTTOUHandlerForConsole(void)
#ifndef HAS_CONSOLE_SIGNALS
-int32_t SystemNative_InitializeTerminalAndSignalHandling()
+int32_t SystemNative_InitializeTerminalAndSignalHandling(void)
{
static int32_t initialized = 0;
diff --git a/src/native/libs/System.Native/pal_threading.c b/src/native/libs/System.Native/pal_threading.c
index c8c7148fafc..b524327ef82 100644
--- a/src/native/libs/System.Native/pal_threading.c
+++ b/src/native/libs/System.Native/pal_threading.c
@@ -48,7 +48,7 @@ static void SetIsLocked(LowLevelMonitor* monitor, bool isLocked)
#endif
}
-LowLevelMonitor* SystemNative_LowLevelMonitor_Create()
+LowLevelMonitor* SystemNative_LowLevelMonitor_Create(void)
{
LowLevelMonitor* monitor = (LowLevelMonitor *)malloc(sizeof(LowLevelMonitor));
if (monitor == NULL)
@@ -265,7 +265,7 @@ CreateThreadExit:
return result;
}
-int32_t SystemNative_SchedGetCpu()
+int32_t SystemNative_SchedGetCpu(void)
{
#if HAVE_SCHED_GETCPU
return sched_getcpu();
@@ -281,7 +281,7 @@ void SystemNative_Exit(int32_t exitCode)
}
__attribute__((noreturn))
-void SystemNative_Abort()
+void SystemNative_Abort(void)
{
abort();
}
diff --git a/src/native/libs/System.Native/pal_time.c b/src/native/libs/System.Native/pal_time.c
index 4a7bbeca4d5..04ffd55865d 100644
--- a/src/native/libs/System.Native/pal_time.c
+++ b/src/native/libs/System.Native/pal_time.c
@@ -81,7 +81,7 @@ int32_t SystemNative_FUTimens(intptr_t fd, TimeSpec* times)
return result;
}
-uint64_t SystemNative_GetTimestamp()
+uint64_t SystemNative_GetTimestamp(void)
{
#if HAVE_CLOCK_GETTIME_NSEC_NP
return clock_gettime_nsec_np(CLOCK_UPTIME_RAW);
@@ -96,7 +96,7 @@ uint64_t SystemNative_GetTimestamp()
#endif
}
-int64_t SystemNative_GetBootTimeTicks()
+int64_t SystemNative_GetBootTimeTicks(void)
{
#if defined(TARGET_LINUX) || defined(TARGET_ANDROID)
struct timespec ts;
diff --git a/src/native/libs/System.Native/pal_uid.c b/src/native/libs/System.Native/pal_uid.c
index df921de926a..0f94484cafe 100644
--- a/src/native/libs/System.Native/pal_uid.c
+++ b/src/native/libs/System.Native/pal_uid.c
@@ -88,12 +88,12 @@ int32_t SystemNative_GetPwNamR(const char* name, Passwd* pwd, char* buf, int32_t
return ConvertNativePasswdToPalPasswd(error, &nativePwd, result, pwd);
}
-uint32_t SystemNative_GetEUid()
+uint32_t SystemNative_GetEUid(void)
{
return geteuid();
}
-uint32_t SystemNative_GetEGid()
+uint32_t SystemNative_GetEGid(void)
{
return getegid();
}
diff --git a/src/native/libs/System.Net.Security.Native/pal_gssapi.c b/src/native/libs/System.Net.Security.Native/pal_gssapi.c
index a325b1ac5ae..97888682e43 100644
--- a/src/native/libs/System.Net.Security.Native/pal_gssapi.c
+++ b/src/native/libs/System.Net.Security.Native/pal_gssapi.c
@@ -119,7 +119,7 @@ static void* volatile s_gssLib = NULL;
#define gss_lib_name "libgssapi_krb5.so.2"
-static int32_t ensure_gss_shim_initialized()
+static int32_t ensure_gss_shim_initialized(void)
{
void* lib = dlopen(gss_lib_name, RTLD_LAZY);
if (lib == NULL) { fprintf(stderr, "Cannot load library %s \nError: %s\n", gss_lib_name, dlerror()); return -1; }
@@ -673,7 +673,7 @@ uint32_t NetSecurityNative_InitiateCredWithPassword(uint32_t* minorStatus,
minorStatus, packageType, desiredName, password, passwdLen, GSS_C_INITIATE, outputCredHandle);
}
-uint32_t NetSecurityNative_IsNtlmInstalled()
+uint32_t NetSecurityNative_IsNtlmInstalled(void)
{
#if HAVE_GSS_SPNEGO_MECHANISM
gss_OID ntlmOid = GSS_NTLM_MECHANISM;
@@ -706,7 +706,7 @@ uint32_t NetSecurityNative_IsNtlmInstalled()
return foundNtlm;
}
-int32_t NetSecurityNative_EnsureGssInitialized()
+int32_t NetSecurityNative_EnsureGssInitialized(void)
{
#if defined(GSS_SHIM)
return ensure_gss_shim_initialized();
diff --git a/src/native/libs/System.Security.Cryptography.Native.Android/pal_cipher.c b/src/native/libs/System.Security.Cryptography.Native.Android/pal_cipher.c
index 0b52b0a100a..b09932392ee 100644
--- a/src/native/libs/System.Security.Cryptography.Native.Android/pal_cipher.c
+++ b/src/native/libs/System.Security.Cryptography.Native.Android/pal_cipher.c
@@ -299,6 +299,48 @@ int32_t AndroidCryptoNative_CipherFinalEx(CipherCtx* ctx, uint8_t* outm, int32_t
return CheckJNIExceptions(env) ? FAIL : SUCCESS;
}
+
+int32_t AndroidCryptoNative_AeadCipherFinalEx(CipherCtx* ctx, uint8_t* outm, int32_t* outl, int32_t* authTagMismatch)
+{
+ if (!ctx)
+ return FAIL;
+
+ abort_if_invalid_pointer_argument(outm);
+ abort_if_invalid_pointer_argument(outl);
+ abort_if_invalid_pointer_argument(authTagMismatch);
+
+ JNIEnv* env = GetJNIEnv();
+
+ *outl = 0;
+ *authTagMismatch = 0;
+
+ jbyteArray outBytes = (jbyteArray)(*env)->CallObjectMethod(env, ctx->cipher, g_cipherDoFinalMethod);
+ jthrowable ex = NULL;
+
+ if (TryGetJNIException(env, &ex, false))
+ {
+ if (ex == NULL)
+ {
+ return FAIL;
+ }
+
+ if ((*env)->IsInstanceOf(env, ex, g_AEADBadTagExceptionClass))
+ {
+ *authTagMismatch = 1;
+ }
+
+ (*env)->DeleteLocalRef(env, ex);
+ return FAIL;
+ }
+
+ jsize outBytesLen = (*env)->GetArrayLength(env, outBytes);
+ *outl = outBytesLen;
+ (*env)->GetByteArrayRegion(env, outBytes, 0, outBytesLen, (jbyte*) outm);
+
+ (*env)->DeleteLocalRef(env, outBytes);
+ return CheckJNIExceptions(env) ? FAIL : SUCCESS;
+}
+
int32_t AndroidCryptoNative_CipherCtxSetPadding(CipherCtx* ctx, int32_t padding)
{
if (!ctx)
diff --git a/src/native/libs/System.Security.Cryptography.Native.Android/pal_cipher.h b/src/native/libs/System.Security.Cryptography.Native.Android/pal_cipher.h
index 6b9555967a5..dc1bbe2211d 100644
--- a/src/native/libs/System.Security.Cryptography.Native.Android/pal_cipher.h
+++ b/src/native/libs/System.Security.Cryptography.Native.Android/pal_cipher.h
@@ -36,6 +36,7 @@ PALEXPORT int32_t AndroidCryptoNative_CipherCtxSetPadding(CipherCtx* ctx, int32_
PALEXPORT int32_t AndroidCryptoNative_CipherUpdateAAD(CipherCtx* ctx, uint8_t* in, int32_t inl);
PALEXPORT int32_t AndroidCryptoNative_CipherUpdate(CipherCtx* ctx, uint8_t* out, int32_t* outl, uint8_t* in, int32_t inl);
PALEXPORT int32_t AndroidCryptoNative_CipherFinalEx(CipherCtx* ctx, uint8_t* outm, int32_t* outl);
+PALEXPORT int32_t AndroidCryptoNative_AeadCipherFinalEx(CipherCtx* ctx, uint8_t* outm, int32_t* outl, int32_t* authTagMismatch);
PALEXPORT CipherInfo* AndroidCryptoNative_Aes128Ecb(void);
PALEXPORT CipherInfo* AndroidCryptoNative_Aes128Cbc(void);
PALEXPORT CipherInfo* AndroidCryptoNative_Aes128Cfb8(void);
diff --git a/src/native/libs/System.Security.Cryptography.Native.Android/pal_err.c b/src/native/libs/System.Security.Cryptography.Native.Android/pal_err.c
index 648e22ee6aa..e5f7ed31904 100644
--- a/src/native/libs/System.Security.Cryptography.Native.Android/pal_err.c
+++ b/src/native/libs/System.Security.Cryptography.Native.Android/pal_err.c
@@ -3,7 +3,7 @@
#include "pal_err.h"
-void CryptoNative_ErrClearError()
+void CryptoNative_ErrClearError(void)
{
}
@@ -12,12 +12,12 @@ uint64_t CryptoNative_ErrGetErrorAlloc(int32_t* isAllocFailure)
return 0;
}
-uint64_t CryptoNative_ErrPeekError()
+uint64_t CryptoNative_ErrPeekError(void)
{
return 0;
}
-uint64_t CryptoNative_ErrPeekLastError()
+uint64_t CryptoNative_ErrPeekLastError(void)
{
return 0;
}
diff --git a/src/native/libs/System.Security.Cryptography.Native.Android/pal_evp.c b/src/native/libs/System.Security.Cryptography.Native.Android/pal_evp.c
index 04ff98209b0..03118dfbb64 100644
--- a/src/native/libs/System.Security.Cryptography.Native.Android/pal_evp.c
+++ b/src/native/libs/System.Security.Cryptography.Native.Android/pal_evp.c
@@ -4,11 +4,11 @@
#include "pal_evp.h"
// just some unique IDs
-intptr_t CryptoNative_EvpMd5() { return 101; }
-intptr_t CryptoNative_EvpSha1() { return 102; }
-intptr_t CryptoNative_EvpSha256() { return 103; }
-intptr_t CryptoNative_EvpSha384() { return 104; }
-intptr_t CryptoNative_EvpSha512() { return 105; }
+intptr_t CryptoNative_EvpMd5(void) { return 101; }
+intptr_t CryptoNative_EvpSha1(void) { return 102; }
+intptr_t CryptoNative_EvpSha256(void) { return 103; }
+intptr_t CryptoNative_EvpSha384(void) { return 104; }
+intptr_t CryptoNative_EvpSha512(void) { return 105; }
int32_t CryptoNative_EvpMdSize(intptr_t md)
{
@@ -21,7 +21,7 @@ int32_t CryptoNative_EvpMdSize(intptr_t md)
return -1;
}
-int32_t CryptoNative_GetMaxMdSize()
+int32_t CryptoNative_GetMaxMdSize(void)
{
return EVP_MAX_MD_SIZE;
}
diff --git a/src/native/libs/System.Security.Cryptography.Native.Android/pal_jni.c b/src/native/libs/System.Security.Cryptography.Native.Android/pal_jni.c
index 7aa8b45768b..f61d91060e8 100644
--- a/src/native/libs/System.Security.Cryptography.Native.Android/pal_jni.c
+++ b/src/native/libs/System.Security.Cryptography.Native.Android/pal_jni.c
@@ -88,6 +88,9 @@ jclass g_sslCtxClass;
jmethodID g_sslCtxGetDefaultMethod;
jmethodID g_sslCtxGetDefaultSslParamsMethod;
+// javax/crypto/spec/AEADBadTagException
+jclass g_AEADBadTagExceptionClass;
+
// javax/crypto/spec/GCMParameterSpec
jclass g_GCMParameterSpecClass;
jmethodID g_GCMParameterSpecCtor;
@@ -616,12 +619,12 @@ static pthread_key_t threadLocalEnvKey;
static pthread_once_t threadLocalEnvInitKey = PTHREAD_ONCE_INIT;
static void
-make_key()
+make_key(void)
{
(void) pthread_key_create(&threadLocalEnvKey, &DetachThreadFromJNI);
}
-JNIEnv* GetJNIEnv()
+JNIEnv* GetJNIEnv(void)
{
JNIEnv *env = NULL;
(*gJvm)->GetEnv(gJvm, (void**)&env, JNI_VERSION_1_6);
@@ -704,6 +707,8 @@ JNI_OnLoad(JavaVM *vm, void *reserved)
g_ivPsClass = GetClassGRef(env, "javax/crypto/spec/IvParameterSpec");
g_ivPsCtor = GetMethod(env, false, g_ivPsClass, "<init>", "([B)V");
+ g_AEADBadTagExceptionClass = GetClassGRef(env, "javax/crypto/AEADBadTagException");
+
g_GCMParameterSpecClass = GetClassGRef(env, "javax/crypto/spec/GCMParameterSpec");
g_GCMParameterSpecCtor = GetMethod(env, false, g_GCMParameterSpecClass, "<init>", "(I[B)V");
diff --git a/src/native/libs/System.Security.Cryptography.Native.Android/pal_jni.h b/src/native/libs/System.Security.Cryptography.Native.Android/pal_jni.h
index f8d89e25131..9294c0e13cb 100644
--- a/src/native/libs/System.Security.Cryptography.Native.Android/pal_jni.h
+++ b/src/native/libs/System.Security.Cryptography.Native.Android/pal_jni.h
@@ -71,6 +71,9 @@ extern jmethodID g_cipherInitMethod;
extern jmethodID g_cipherInit2Method;
extern jmethodID g_getBlockSizeMethod;
+// javax/crypto/spec/AEADBadTagException
+extern jclass g_AEADBadTagExceptionClass;
+
// javax/crypto/spec/IvParameterSpec
extern jclass g_ivPsClass;
extern jmethodID g_ivPsCtor;
diff --git a/src/native/libs/System.Security.Cryptography.Native.Android/pal_misc.c b/src/native/libs/System.Security.Cryptography.Native.Android/pal_misc.c
index 4f9e374b8e2..67d3737561e 100644
--- a/src/native/libs/System.Security.Cryptography.Native.Android/pal_misc.c
+++ b/src/native/libs/System.Security.Cryptography.Native.Android/pal_misc.c
@@ -4,7 +4,7 @@
#include "pal_misc.h"
#include "pal_jni.h"
-int32_t CryptoNative_EnsureOpenSslInitialized()
+int32_t CryptoNative_EnsureOpenSslInitialized(void)
{
return 0;
}
diff --git a/src/native/libs/System.Security.Cryptography.Native.Android/pal_rsa.c b/src/native/libs/System.Security.Cryptography.Native.Android/pal_rsa.c
index e212812b2d7..f1fd65f4daf 100644
--- a/src/native/libs/System.Security.Cryptography.Native.Android/pal_rsa.c
+++ b/src/native/libs/System.Security.Cryptography.Native.Android/pal_rsa.c
@@ -54,7 +54,7 @@ static jobject GetRsaOaepPadding(JNIEnv* env, RsaPadding padding)
return CheckJNIExceptions(env) ? FAIL : oaepParameterSpec;
}
-PALEXPORT RSA* AndroidCryptoNative_RsaCreate()
+PALEXPORT RSA* AndroidCryptoNative_RsaCreate(void)
{
RSA* rsa = xcalloc(1, sizeof(RSA));
atomic_init(&rsa->refCount, 1);
diff --git a/src/native/libs/System.Security.Cryptography.Native.Apple/CMakeLists.txt b/src/native/libs/System.Security.Cryptography.Native.Apple/CMakeLists.txt
index 77aa423237c..0c288067d11 100644
--- a/src/native/libs/System.Security.Cryptography.Native.Apple/CMakeLists.txt
+++ b/src/native/libs/System.Security.Cryptography.Native.Apple/CMakeLists.txt
@@ -30,6 +30,7 @@ if (CLR_CMAKE_TARGET_MACCATALYST OR CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVO
else()
set(NATIVECRYPTO_SOURCES
${NATIVECRYPTO_SOURCES}
+ pal_swiftbindings.o
pal_keychain_macos.c
pal_keyderivation_macos.c
pal_seckey_macos.c
@@ -38,6 +39,24 @@ else()
)
endif()
+# As of CMake 3.20.2 support for Swift only works with the Ninja and XCode
+# generators so we cannot rely on it. Even with the Ninja generator it doesn't
+# work in combination with other languages within the same library.
+if (NOT SWIFT_COMPILER_TARGET AND CLR_CMAKE_TARGET_OSX)
+ set(SWIFT_PLATFORM "macosx")
+ set(SWIFT_PLATFORM_SUFFIX "")
+ set(SWIFT_DEPLOYMENT_TARGET ${CMAKE_OSX_DEPLOYMENT_TARGET})
+ set(SWIFT_COMPILER_TARGET "${CMAKE_OSX_ARCHITECTURES}-apple-${SWIFT_PLATFORM}${SWIFT_DEPLOYMENT_TARGET}${SWIFT_PLATFORM_SUFFIX}")
+endif()
+
+add_custom_command(
+ OUTPUT pal_swiftbindings.o
+ COMMAND xcrun swiftc -emit-object -static -parse-as-library -runtime-compatibility-version none -sdk ${CMAKE_OSX_SYSROOT} -target ${SWIFT_COMPILER_TARGET} ${CMAKE_CURRENT_SOURCE_DIR}/pal_swiftbindings.swift -o pal_swiftbindings.o
+ MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/pal_swiftbindings.swift
+ COMMENT "Compiling Swift file pal_swiftbindings.swift"
+)
+set_source_files_properties(pal_swiftbindings.o PROPERTIES EXTERNAL_OBJECT true GENERATED true)
+
if (CLR_CMAKE_TARGET_MACCATALYST)
add_definitions(-DTARGET_MACCATALYST)
endif()
diff --git a/src/native/libs/System.Security.Cryptography.Native.Apple/entrypoints.c b/src/native/libs/System.Security.Cryptography.Native.Apple/entrypoints.c
index 16e1efe9d25..4f013c4cf74 100644
--- a/src/native/libs/System.Security.Cryptography.Native.Apple/entrypoints.c
+++ b/src/native/libs/System.Security.Cryptography.Native.Apple/entrypoints.c
@@ -17,6 +17,7 @@
#include "pal_seckey_macos.h"
#include "pal_signverify.h"
#include "pal_ssl.h"
+#include "pal_swiftbindings.h"
#include "pal_symmetric.h"
#include "pal_trust_macos.h"
#include "pal_x509.h"
@@ -25,6 +26,8 @@
static const Entry s_cryptoAppleNative[] =
{
+ DllImportEntry(AppleCryptoNative_ChaCha20Poly1305Encrypt)
+ DllImportEntry(AppleCryptoNative_ChaCha20Poly1305Decrypt)
DllImportEntry(AppleCryptoNative_DigestFree)
DllImportEntry(AppleCryptoNative_DigestCreate)
DllImportEntry(AppleCryptoNative_DigestUpdate)
diff --git a/src/native/libs/System.Security.Cryptography.Native.Apple/extra_libs.cmake b/src/native/libs/System.Security.Cryptography.Native.Apple/extra_libs.cmake
index 9ed82cd31bc..07b595bd6e4 100644
--- a/src/native/libs/System.Security.Cryptography.Native.Apple/extra_libs.cmake
+++ b/src/native/libs/System.Security.Cryptography.Native.Apple/extra_libs.cmake
@@ -4,4 +4,10 @@ macro(append_extra_cryptography_apple_libs NativeLibsExtra)
find_library(SECURITY_LIBRARY Security)
list(APPEND ${NativeLibsExtra} ${COREFOUNDATION_LIBRARY} ${SECURITY_LIBRARY})
+
+ if (CLR_CMAKE_TARGET_OSX)
+ find_library(CRYPTOKIT_LIBRARY CryptoKit)
+
+ list(APPEND ${NativeLibsExtra} ${CRYPTOKIT_LIBRARY} -L/usr/lib/swift -lobjc -lswiftCore -lswiftFoundation)
+ endif()
endmacro()
diff --git a/src/native/libs/System.Security.Cryptography.Native.Apple/pal_ssl.c b/src/native/libs/System.Security.Cryptography.Native.Apple/pal_ssl.c
index f0adc55eeca..3f43c5c1b78 100644
--- a/src/native/libs/System.Security.Cryptography.Native.Apple/pal_ssl.c
+++ b/src/native/libs/System.Security.Cryptography.Native.Apple/pal_ssl.c
@@ -660,9 +660,9 @@ PALEXPORT int32_t AppleCryptoNative_SslSetCertificateAuthorities(SSLContextRef s
#pragma clang diagnostic pop
}
-__attribute__((constructor)) static void InitializeAppleCryptoSslShim()
+__attribute__((constructor)) static void InitializeAppleCryptoSslShim(void)
{
SSLSetCertificateAuthoritiesPtr = (OSStatus(*)(SSLContextRef, CFArrayRef, int32_t))dlsym(RTLD_DEFAULT, "SSLSetCertificateAuthorities");
SSLSetALPNProtocolsPtr = (OSStatus(*)(SSLContextRef, CFArrayRef))dlsym(RTLD_DEFAULT, "SSLSetALPNProtocols");
SSLCopyALPNProtocolsPtr = (OSStatus(*)(SSLContextRef, CFArrayRef*))dlsym(RTLD_DEFAULT, "SSLCopyALPNProtocols");
-} \ No newline at end of file
+}
diff --git a/src/native/libs/System.Security.Cryptography.Native.Apple/pal_swiftbindings.h b/src/native/libs/System.Security.Cryptography.Native.Apple/pal_swiftbindings.h
new file mode 100644
index 00000000000..42e3c22e7da
--- /dev/null
+++ b/src/native/libs/System.Security.Cryptography.Native.Apple/pal_swiftbindings.h
@@ -0,0 +1,35 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#pragma once
+
+#include "pal_types.h"
+#include "pal_compiler.h"
+
+PALEXPORT int32_t AppleCryptoNative_ChaCha20Poly1305Encrypt(
+ uint8_t* keyPtr,
+ int32_t keyLength,
+ uint8_t* noncePtr,
+ int32_t nonceLength,
+ uint8_t* plaintextPtr,
+ int32_t plaintextLength,
+ uint8_t* ciphertextBuffer,
+ int32_t ciphertextBufferLength,
+ uint8_t* tagBuffer,
+ int32_t tagBufferLength,
+ uint8_t* aadPtr,
+ int32_t aadLength);
+
+PALEXPORT int32_t AppleCryptoNative_ChaCha20Poly1305Decrypt(
+ uint8_t* keyPtr,
+ int32_t keyLength,
+ uint8_t* noncePtr,
+ int32_t nonceLength,
+ uint8_t* ciphertextPtr,
+ int32_t ciphertextLength,
+ uint8_t* tagPtr,
+ int32_t tagLength,
+ uint8_t* plaintextBuffer,
+ int32_t plaintextBufferLength,
+ uint8_t* aadPtr,
+ int32_t aadLength);
diff --git a/src/native/libs/System.Security.Cryptography.Native.Apple/pal_swiftbindings.swift b/src/native/libs/System.Security.Cryptography.Native.Apple/pal_swiftbindings.swift
new file mode 100644
index 00000000000..7d54df744b1
--- /dev/null
+++ b/src/native/libs/System.Security.Cryptography.Native.Apple/pal_swiftbindings.swift
@@ -0,0 +1,88 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+import CryptoKit
+import Foundation
+
+@_cdecl("AppleCryptoNative_ChaCha20Poly1305Encrypt")
+public func AppleCryptoNative_ChaCha20Poly1305Encrypt(
+ keyPtr: UnsafeMutableRawPointer,
+ keyLength: Int32,
+ noncePtr: UnsafeMutableRawPointer,
+ nonceLength: Int32,
+ plaintextPtr: UnsafeMutableRawPointer,
+ plaintextLength: Int32,
+ ciphertextBuffer: UnsafeMutablePointer<UInt8>,
+ ciphertextBufferLength: Int32,
+ tagBuffer: UnsafeMutablePointer<UInt8>,
+ tagBufferLength: Int32,
+ aadPtr: UnsafeMutableRawPointer,
+ aadLength: Int32
+ ) -> Int32 {
+ let nonceData = Data(bytesNoCopy: noncePtr, count: Int(nonceLength), deallocator: Data.Deallocator.none)
+ let key = Data(bytesNoCopy: keyPtr, count: Int(keyLength), deallocator: Data.Deallocator.none)
+ let plaintext = Data(bytesNoCopy: plaintextPtr, count: Int(plaintextLength), deallocator: Data.Deallocator.none)
+ let aad = Data(bytesNoCopy: aadPtr, count: Int(aadLength), deallocator: Data.Deallocator.none)
+ let symmetricKey = SymmetricKey(data: key)
+
+ guard let nonce = try? ChaChaPoly.Nonce(data: nonceData) else {
+ return 0
+ }
+
+ guard let result = try? ChaChaPoly.seal(plaintext, using: symmetricKey, nonce: nonce, authenticating: aad) else {
+ return 0
+ }
+
+ assert(ciphertextBufferLength >= result.ciphertext.count)
+ assert(tagBufferLength >= result.tag.count)
+
+ result.ciphertext.copyBytes(to: ciphertextBuffer, count: result.ciphertext.count)
+ result.tag.copyBytes(to: tagBuffer, count: result.tag.count)
+ return 1
+ }
+
+@_cdecl("AppleCryptoNative_ChaCha20Poly1305Decrypt")
+public func AppleCryptoNative_ChaCha20Poly1305Decrypt(
+ keyPtr: UnsafeMutableRawPointer,
+ keyLength: Int32,
+ noncePtr: UnsafeMutableRawPointer,
+ nonceLength: Int32,
+ ciphertextPtr: UnsafeMutableRawPointer,
+ ciphertextLength: Int32,
+ tagPtr: UnsafeMutableRawPointer,
+ tagLength: Int32,
+ plaintextBuffer: UnsafeMutablePointer<UInt8>,
+ plaintextBufferLength: Int32,
+ aadPtr: UnsafeMutableRawPointer,
+ aadLength: Int32
+) -> Int32
+{
+ let nonceData = Data(bytesNoCopy: noncePtr, count: Int(nonceLength), deallocator: Data.Deallocator.none)
+ let key = Data(bytesNoCopy: keyPtr, count: Int(keyLength), deallocator: Data.Deallocator.none)
+ let ciphertext = Data(bytesNoCopy: ciphertextPtr, count: Int(ciphertextLength), deallocator: Data.Deallocator.none)
+ let aad = Data(bytesNoCopy: aadPtr, count: Int(aadLength), deallocator: Data.Deallocator.none)
+ let tag = Data(bytesNoCopy: tagPtr, count: Int(tagLength), deallocator: Data.Deallocator.none)
+ let symmetricKey = SymmetricKey(data: key)
+
+ guard let nonce = try? ChaChaPoly.Nonce(data: nonceData) else {
+ return 0
+ }
+
+ guard let sealedBoxRestored = try? ChaChaPoly.SealedBox(nonce: nonce, ciphertext: ciphertext, tag: tag) else {
+ return 0
+ }
+
+ do {
+ let result = try ChaChaPoly.open(sealedBoxRestored, using: symmetricKey, authenticating: aad)
+
+ assert(plaintextBufferLength >= result.count)
+ result.copyBytes(to: plaintextBuffer, count: result.count)
+ return 1
+ }
+ catch CryptoKitError.authenticationFailure {
+ return -1
+ }
+ catch {
+ return 0
+ }
+}
diff --git a/src/native/libs/System.Security.Cryptography.Native.Apple/pal_x509.c b/src/native/libs/System.Security.Cryptography.Native.Apple/pal_x509.c
index 0b6d1f889bc..d2d8a11554e 100644
--- a/src/native/libs/System.Security.Cryptography.Native.Apple/pal_x509.c
+++ b/src/native/libs/System.Security.Cryptography.Native.Apple/pal_x509.c
@@ -43,7 +43,7 @@ AppleCryptoNative_X509DemuxAndRetainHandle(CFTypeRef handle, SecCertificateRef*
}
#if !defined(TARGET_MACCATALYST)
-static void InitCertificateCopy()
+static void InitCertificateCopy(void)
{
#if defined(TARGET_IOS) || defined(TARGET_TVOS)
// SecCertificateCopyPublicKey on iOS/tvOS has same function prototype as SecCertificateCopyKey
diff --git a/src/native/libs/System.Security.Cryptography.Native.Apple/pal_x509chain.c b/src/native/libs/System.Security.Cryptography.Native.Apple/pal_x509chain.c
index 06f09cfd9f4..152ed890ed6 100644
--- a/src/native/libs/System.Security.Cryptography.Native.Apple/pal_x509chain.c
+++ b/src/native/libs/System.Security.Cryptography.Native.Apple/pal_x509chain.c
@@ -3,12 +3,12 @@
#include "pal_x509chain.h"
-SecPolicyRef AppleCryptoNative_X509ChainCreateDefaultPolicy()
+SecPolicyRef AppleCryptoNative_X509ChainCreateDefaultPolicy(void)
{
return SecPolicyCreateBasicX509();
}
-SecPolicyRef AppleCryptoNative_X509ChainCreateRevocationPolicy()
+SecPolicyRef AppleCryptoNative_X509ChainCreateRevocationPolicy(void)
{
return SecPolicyCreateRevocation(kSecRevocationUseAnyAvailableMethod | kSecRevocationRequirePositiveResponse);
}
diff --git a/src/native/libs/System.Security.Cryptography.Native/apibridge.c b/src/native/libs/System.Security.Cryptography.Native/apibridge.c
index e6d3c1ff7c0..8077a1e2bb6 100644
--- a/src/native/libs/System.Security.Cryptography.Native/apibridge.c
+++ b/src/native/libs/System.Security.Cryptography.Native/apibridge.c
@@ -182,7 +182,7 @@ int32_t local_X509_NAME_get0_der(X509_NAME* x509Name, const uint8_t** pder, size
return 1;
}
-long local_OpenSSL_version_num()
+long local_OpenSSL_version_num(void)
{
return (long)SSLeay();
}
@@ -325,7 +325,7 @@ int32_t local_EVP_PKEY_up_ref(EVP_PKEY* pkey)
return CRYPTO_add_lock(&pkey->references, 1, CRYPTO_LOCK_EVP_PKEY, __FILE__, __LINE__) > 1;
}
-EVP_CIPHER_CTX* local_EVP_CIPHER_CTX_new()
+EVP_CIPHER_CTX* local_EVP_CIPHER_CTX_new(void)
{
EVP_CIPHER_CTX* ctx = (EVP_CIPHER_CTX*)calloc(1, sizeof(EVP_CIPHER_CTX));
return ctx;
@@ -353,7 +353,7 @@ void local_EVP_CIPHER_CTX_free(EVP_CIPHER_CTX* ctx)
}
}
-HMAC_CTX* local_HMAC_CTX_new()
+HMAC_CTX* local_HMAC_CTX_new(void)
{
HMAC_CTX* ctx = (HMAC_CTX*)calloc(1, sizeof(HMAC_CTX));
diff --git a/src/native/libs/System.Security.Cryptography.Native/openssl.c b/src/native/libs/System.Security.Cryptography.Native/openssl.c
index c0822ab1cb4..ba713b6fdcc 100644
--- a/src/native/libs/System.Security.Cryptography.Native/openssl.c
+++ b/src/native/libs/System.Security.Cryptography.Native/openssl.c
@@ -1048,7 +1048,7 @@ of X509* to OpenSSL.
Return values:
A STACK_OF(X509*) with no comparator.
*/
-STACK_OF(X509) * CryptoNative_NewX509Stack()
+STACK_OF(X509) * CryptoNative_NewX509Stack(void)
{
ERR_clear_error();
return sk_X509_new_null();
@@ -1173,7 +1173,7 @@ Gets the version of openssl library.
Return values:
Version number as MNNFFRBB (major minor fix final beta/patch)
*/
-int64_t CryptoNative_OpenSslVersionNumber()
+int64_t CryptoNative_OpenSslVersionNumber(void)
{
// No error queue impact.
return (int64_t)OpenSSL_version_num();
@@ -1243,7 +1243,7 @@ static int ExDataDup(
return 1;
}
-void CryptoNative_RegisterLegacyAlgorithms()
+void CryptoNative_RegisterLegacyAlgorithms(void)
{
#ifdef NEED_OPENSSL_3_0
if (API_EXISTS(OSSL_PROVIDER_try_load))
@@ -1308,7 +1308,7 @@ Return values:
0 on success
non-zero on failure
*/
-static int32_t EnsureOpenSsl10Initialized()
+static int32_t EnsureOpenSsl10Initialized(void)
{
int ret = 0;
int numLocks = 0;
@@ -1408,7 +1408,7 @@ done:
pthread_mutex_t g_err_mutex = PTHREAD_MUTEX_INITIALIZER;
int volatile g_err_unloaded = 0;
-static void HandleShutdown()
+static void HandleShutdown(void)
{
// Generally, a mutex to set a boolean is overkill, but this lock
// ensures that there are no callers already inside the string table
@@ -1422,7 +1422,7 @@ static void HandleShutdown()
assert(!result && "Releasing the error string table mutex failed.");
}
-static int32_t EnsureOpenSsl11Initialized()
+static int32_t EnsureOpenSsl11Initialized(void)
{
// In OpenSSL 1.0 we call OPENSSL_add_all_algorithms_conf() and ERR_load_crypto_strings(),
// so do the same for 1.1
@@ -1450,7 +1450,7 @@ static int32_t EnsureOpenSsl11Initialized()
#endif
-int32_t CryptoNative_OpenSslAvailable()
+int32_t CryptoNative_OpenSslAvailable(void)
{
#ifdef FEATURE_DISTRO_AGNOSTIC_SSL
// OpenLibrary will attempt to open libssl. DlOpen will handle
@@ -1464,7 +1464,7 @@ int32_t CryptoNative_OpenSslAvailable()
static int32_t g_initStatus = 1;
int g_x509_ocsp_index = -1;
-static int32_t EnsureOpenSslInitializedCore()
+static int32_t EnsureOpenSslInitializedCore(void)
{
int ret = 0;
@@ -1498,14 +1498,14 @@ static int32_t EnsureOpenSslInitializedCore()
return ret;
}
-static void EnsureOpenSslInitializedOnce()
+static void EnsureOpenSslInitializedOnce(void)
{
g_initStatus = EnsureOpenSslInitializedCore();
}
static pthread_once_t g_initializeShim = PTHREAD_ONCE_INIT;
-int32_t CryptoNative_EnsureOpenSslInitialized()
+int32_t CryptoNative_EnsureOpenSslInitialized(void)
{
pthread_once(&g_initializeShim, EnsureOpenSslInitializedOnce);
return g_initStatus;
diff --git a/src/native/libs/System.Security.Cryptography.Native/opensslshim.c b/src/native/libs/System.Security.Cryptography.Native/opensslshim.c
index 35949f4b94e..d21d6273410 100644
--- a/src/native/libs/System.Security.Cryptography.Native/opensslshim.c
+++ b/src/native/libs/System.Security.Cryptography.Native/opensslshim.c
@@ -52,7 +52,7 @@ static void DlOpen(const char* libraryName)
}
}
-static void OpenLibraryOnce()
+static void OpenLibraryOnce(void)
{
// If there is an override of the version specified using the CLR_OPENSSL_VERSION_OVERRIDE
// env variable, try to load that first.
@@ -131,7 +131,7 @@ static void OpenLibraryOnce()
static pthread_once_t g_openLibrary = PTHREAD_ONCE_INIT;
-int OpenLibrary()
+int OpenLibrary(void)
{
pthread_once(&g_openLibrary, OpenLibraryOnce);
diff --git a/src/native/libs/System.Security.Cryptography.Native/pal_asn1.c b/src/native/libs/System.Security.Cryptography.Native/pal_asn1.c
index 32661cf31dc..e47f1c80fac 100644
--- a/src/native/libs/System.Security.Cryptography.Native/pal_asn1.c
+++ b/src/native/libs/System.Security.Cryptography.Native/pal_asn1.c
@@ -78,7 +78,7 @@ void CryptoNative_Asn1BitStringFree(ASN1_STRING* a)
ASN1_BIT_STRING_free(a);
}
-ASN1_OCTET_STRING* CryptoNative_Asn1OctetStringNew()
+ASN1_OCTET_STRING* CryptoNative_Asn1OctetStringNew(void)
{
ERR_clear_error();
return ASN1_OCTET_STRING_new();
diff --git a/src/native/libs/System.Security.Cryptography.Native/pal_bio.c b/src/native/libs/System.Security.Cryptography.Native/pal_bio.c
index 0c349664b23..f0a4ce45d06 100644
--- a/src/native/libs/System.Security.Cryptography.Native/pal_bio.c
+++ b/src/native/libs/System.Security.Cryptography.Native/pal_bio.c
@@ -5,7 +5,7 @@
#include <assert.h>
-BIO* CryptoNative_CreateMemoryBio()
+BIO* CryptoNative_CreateMemoryBio(void)
{
ERR_clear_error();
return BIO_new(BIO_s_mem());
diff --git a/src/native/libs/System.Security.Cryptography.Native/pal_err.c b/src/native/libs/System.Security.Cryptography.Native/pal_err.c
index da0dc6fd2a8..5c197bdecf1 100644
--- a/src/native/libs/System.Security.Cryptography.Native/pal_err.c
+++ b/src/native/libs/System.Security.Cryptography.Native/pal_err.c
@@ -4,7 +4,7 @@
#include "pal_err.h"
#include "pal_utilities.h"
-void CryptoNative_ErrClearError()
+void CryptoNative_ErrClearError(void)
{
ERR_clear_error();
}
@@ -23,12 +23,12 @@ uint64_t CryptoNative_ErrGetExceptionError(int32_t* isAllocFailure)
return err;
}
-uint64_t CryptoNative_ErrPeekError()
+uint64_t CryptoNative_ErrPeekError(void)
{
return ERR_peek_error();
}
-uint64_t CryptoNative_ErrPeekLastError()
+uint64_t CryptoNative_ErrPeekLastError(void)
{
return ERR_peek_last_error();
}
diff --git a/src/native/libs/System.Security.Cryptography.Native/pal_evp.c b/src/native/libs/System.Security.Cryptography.Native/pal_evp.c
index fcdd1aef74f..f4b6b3e0fc1 100644
--- a/src/native/libs/System.Security.Cryptography.Native/pal_evp.c
+++ b/src/native/libs/System.Security.Cryptography.Native/pal_evp.c
@@ -145,37 +145,37 @@ int32_t CryptoNative_EvpMdSize(const EVP_MD* md)
return EVP_MD_get_size(md);
}
-const EVP_MD* CryptoNative_EvpMd5()
+const EVP_MD* CryptoNative_EvpMd5(void)
{
// No error queue impact.
return EVP_md5();
}
-const EVP_MD* CryptoNative_EvpSha1()
+const EVP_MD* CryptoNative_EvpSha1(void)
{
// No error queue impact.
return EVP_sha1();
}
-const EVP_MD* CryptoNative_EvpSha256()
+const EVP_MD* CryptoNative_EvpSha256(void)
{
// No error queue impact.
return EVP_sha256();
}
-const EVP_MD* CryptoNative_EvpSha384()
+const EVP_MD* CryptoNative_EvpSha384(void)
{
// No error queue impact.
return EVP_sha384();
}
-const EVP_MD* CryptoNative_EvpSha512()
+const EVP_MD* CryptoNative_EvpSha512(void)
{
// No error queue impact.
return EVP_sha512();
}
-int32_t CryptoNative_GetMaxMdSize()
+int32_t CryptoNative_GetMaxMdSize(void)
{
// No error queue impact.
return EVP_MAX_MD_SIZE;
diff --git a/src/native/libs/System.Security.Cryptography.Native/pal_evp_cipher.c b/src/native/libs/System.Security.Cryptography.Native/pal_evp_cipher.c
index 672490c5ef4..82e5f8edc76 100644
--- a/src/native/libs/System.Security.Cryptography.Native/pal_evp_cipher.c
+++ b/src/native/libs/System.Security.Cryptography.Native/pal_evp_cipher.c
@@ -233,169 +233,169 @@ int32_t CryptoNative_EvpCipherSetAeadTag(EVP_CIPHER_CTX* ctx, uint8_t* tag, int3
#endif
}
-const EVP_CIPHER* CryptoNative_EvpAes128Ecb()
+const EVP_CIPHER* CryptoNative_EvpAes128Ecb(void)
{
// No error queue impact.
return EVP_aes_128_ecb();
}
-const EVP_CIPHER* CryptoNative_EvpAes128Cbc()
+const EVP_CIPHER* CryptoNative_EvpAes128Cbc(void)
{
// No error queue impact.
return EVP_aes_128_cbc();
}
-const EVP_CIPHER* CryptoNative_EvpAes128Gcm()
+const EVP_CIPHER* CryptoNative_EvpAes128Gcm(void)
{
// No error queue impact.
return EVP_aes_128_gcm();
}
-const EVP_CIPHER* CryptoNative_EvpAes128Cfb128()
+const EVP_CIPHER* CryptoNative_EvpAes128Cfb128(void)
{
// No error queue impact.
return EVP_aes_128_cfb128();
}
-const EVP_CIPHER* CryptoNative_EvpAes128Cfb8()
+const EVP_CIPHER* CryptoNative_EvpAes128Cfb8(void)
{
// No error queue impact.
return EVP_aes_128_cfb8();
}
-const EVP_CIPHER* CryptoNative_EvpAes128Ccm()
+const EVP_CIPHER* CryptoNative_EvpAes128Ccm(void)
{
// No error queue impact.
return EVP_aes_128_ccm();
}
-const EVP_CIPHER* CryptoNative_EvpAes192Ecb()
+const EVP_CIPHER* CryptoNative_EvpAes192Ecb(void)
{
// No error queue impact.
return EVP_aes_192_ecb();
}
-const EVP_CIPHER* CryptoNative_EvpAes192Cfb128()
+const EVP_CIPHER* CryptoNative_EvpAes192Cfb128(void)
{
// No error queue impact.
return EVP_aes_192_cfb128();
}
-const EVP_CIPHER* CryptoNative_EvpAes192Cfb8()
+const EVP_CIPHER* CryptoNative_EvpAes192Cfb8(void)
{
// No error queue impact.
return EVP_aes_192_cfb8();
}
-const EVP_CIPHER* CryptoNative_EvpAes192Cbc()
+const EVP_CIPHER* CryptoNative_EvpAes192Cbc(void)
{
// No error queue impact.
return EVP_aes_192_cbc();
}
-const EVP_CIPHER* CryptoNative_EvpAes192Gcm()
+const EVP_CIPHER* CryptoNative_EvpAes192Gcm(void)
{
// No error queue impact.
return EVP_aes_192_gcm();
}
-const EVP_CIPHER* CryptoNative_EvpAes192Ccm()
+const EVP_CIPHER* CryptoNative_EvpAes192Ccm(void)
{
// No error queue impact.
return EVP_aes_192_ccm();
}
-const EVP_CIPHER* CryptoNative_EvpAes256Ecb()
+const EVP_CIPHER* CryptoNative_EvpAes256Ecb(void)
{
// No error queue impact.
return EVP_aes_256_ecb();
}
-const EVP_CIPHER* CryptoNative_EvpAes256Cfb128()
+const EVP_CIPHER* CryptoNative_EvpAes256Cfb128(void)
{
// No error queue impact.
return EVP_aes_256_cfb128();
}
-const EVP_CIPHER* CryptoNative_EvpAes256Cfb8()
+const EVP_CIPHER* CryptoNative_EvpAes256Cfb8(void)
{
// No error queue impact.
return EVP_aes_256_cfb8();
}
-const EVP_CIPHER* CryptoNative_EvpAes256Cbc()
+const EVP_CIPHER* CryptoNative_EvpAes256Cbc(void)
{
// No error queue impact.
return EVP_aes_256_cbc();
}
-const EVP_CIPHER* CryptoNative_EvpAes256Gcm()
+const EVP_CIPHER* CryptoNative_EvpAes256Gcm(void)
{
// No error queue impact.
return EVP_aes_256_gcm();
}
-const EVP_CIPHER* CryptoNative_EvpAes256Ccm()
+const EVP_CIPHER* CryptoNative_EvpAes256Ccm(void)
{
// No error queue impact.
return EVP_aes_256_ccm();
}
-const EVP_CIPHER* CryptoNative_EvpDesEcb()
+const EVP_CIPHER* CryptoNative_EvpDesEcb(void)
{
// No error queue impact.
return EVP_des_ecb();
}
-const EVP_CIPHER* CryptoNative_EvpDesCfb8()
+const EVP_CIPHER* CryptoNative_EvpDesCfb8(void)
{
// No error queue impact.
return EVP_des_cfb8();
}
-const EVP_CIPHER* CryptoNative_EvpDesCbc()
+const EVP_CIPHER* CryptoNative_EvpDesCbc(void)
{
// No error queue impact.
return EVP_des_cbc();
}
-const EVP_CIPHER* CryptoNative_EvpDes3Ecb()
+const EVP_CIPHER* CryptoNative_EvpDes3Ecb(void)
{
// No error queue impact.
return EVP_des_ede3();
}
-const EVP_CIPHER* CryptoNative_EvpDes3Cfb8()
+const EVP_CIPHER* CryptoNative_EvpDes3Cfb8(void)
{
// No error queue impact.
return EVP_des_ede3_cfb8();
}
-const EVP_CIPHER* CryptoNative_EvpDes3Cfb64()
+const EVP_CIPHER* CryptoNative_EvpDes3Cfb64(void)
{
// No error queue impact.
return EVP_des_ede3_cfb64();
}
-const EVP_CIPHER* CryptoNative_EvpDes3Cbc()
+const EVP_CIPHER* CryptoNative_EvpDes3Cbc(void)
{
// No error queue impact.
return EVP_des_ede3_cbc();
}
-const EVP_CIPHER* CryptoNative_EvpRC2Ecb()
+const EVP_CIPHER* CryptoNative_EvpRC2Ecb(void)
{
// No error queue impact.
return EVP_rc2_ecb();
}
-const EVP_CIPHER* CryptoNative_EvpRC2Cbc()
+const EVP_CIPHER* CryptoNative_EvpRC2Cbc(void)
{
// No error queue impact.
return EVP_rc2_cbc();
}
-const EVP_CIPHER* CryptoNative_EvpChaCha20Poly1305()
+const EVP_CIPHER* CryptoNative_EvpChaCha20Poly1305(void)
{
// No error queue impact.
#if HAVE_OPENSSL_CHACHA20POLY1305
diff --git a/src/native/libs/System.Security.Cryptography.Native/pal_evp_pkey.c b/src/native/libs/System.Security.Cryptography.Native/pal_evp_pkey.c
index 1d60be1c8e8..402903b8781 100644
--- a/src/native/libs/System.Security.Cryptography.Native/pal_evp_pkey.c
+++ b/src/native/libs/System.Security.Cryptography.Native/pal_evp_pkey.c
@@ -4,7 +4,7 @@
#include <assert.h>
#include "pal_evp_pkey.h"
-EVP_PKEY* CryptoNative_EvpPkeyCreate()
+EVP_PKEY* CryptoNative_EvpPkeyCreate(void)
{
ERR_clear_error();
return EVP_PKEY_new();
diff --git a/src/native/libs/System.Security.Cryptography.Native/pal_ssl.c b/src/native/libs/System.Security.Cryptography.Native/pal_ssl.c
index 431c2b8ec06..e21acffd3b2 100644
--- a/src/native/libs/System.Security.Cryptography.Native/pal_ssl.c
+++ b/src/native/libs/System.Security.Cryptography.Native/pal_ssl.c
@@ -34,7 +34,7 @@ c_static_assert(TLSEXT_STATUSTYPE_ocsp == 1);
int32_t CryptoNative_EnsureOpenSslInitialized(void);
#ifdef NEED_OPENSSL_1_0
-static void EnsureLibSsl10Initialized()
+static void EnsureLibSsl10Initialized(void)
{
SSL_library_init();
SSL_load_error_strings();
@@ -91,7 +91,7 @@ static uint64_t SSL_set_options_dynamic(SSL* s, uint64_t options)
static int32_t g_config_specified_ciphersuites = 0;
static char* g_emptyAlpn = "";
-static void DetectCiphersuiteConfiguration()
+static void DetectCiphersuiteConfiguration(void)
{
#ifdef FEATURE_DISTRO_AGNOSTIC_SSL
@@ -173,7 +173,7 @@ static void DetectCiphersuiteConfiguration()
#endif
}
-void CryptoNative_EnsureLibSslInitialized()
+void CryptoNative_EnsureLibSslInitialized(void)
{
CryptoNative_EnsureOpenSslInitialized();
@@ -192,7 +192,7 @@ void CryptoNative_EnsureLibSslInitialized()
DetectCiphersuiteConfiguration();
}
-const SSL_METHOD* CryptoNative_SslV2_3Method()
+const SSL_METHOD* CryptoNative_SslV2_3Method(void)
{
// No error queue impact.
const SSL_METHOD* method = TLS_method();
@@ -909,7 +909,7 @@ const char* CryptoNative_GetOpenSslCipherSuiteName(SSL* ssl, int32_t cipherSuite
#endif
}
-int32_t CryptoNative_Tls13Supported()
+int32_t CryptoNative_Tls13Supported(void)
{
// No error queue impact.
diff --git a/src/native/libs/System.Security.Cryptography.Native/pal_x509.c b/src/native/libs/System.Security.Cryptography.Native/pal_x509.c
index e1060d8241d..5dbd1bdc2e3 100644
--- a/src/native/libs/System.Security.Cryptography.Native/pal_x509.c
+++ b/src/native/libs/System.Security.Cryptography.Native/pal_x509.c
@@ -252,7 +252,7 @@ int32_t CryptoNative_X509StoreSetRevocationFlag(X509_STORE* ctx, X509RevocationF
return X509_STORE_set_flags(ctx, verifyFlags);
}
-X509_STORE_CTX* CryptoNative_X509StoreCtxCreate()
+X509_STORE_CTX* CryptoNative_X509StoreCtxCreate(void)
{
ERR_clear_error();
return X509_STORE_CTX_new();
@@ -452,6 +452,13 @@ static DIR* OpenUserStore(const char* storePath, char** pathTmp, size_t* pathTmp
// Leave one byte for '\0' and one for '/'
size_t allocSize = storePathLen + sizeof(ent->d_name) + 2;
char* tmp = (char*)calloc(allocSize, sizeof(char));
+ if (!tmp)
+ {
+ *pathTmp = NULL;
+ *nextFileWrite = NULL;
+ return NULL;
+ }
+
memcpy_s(tmp, allocSize, storePath, storePathLen);
tmp[storePathLen] = '/';
*pathTmp = tmp;
@@ -604,6 +611,8 @@ int32_t CryptoNative_X509StackAddDirectoryStore(X509Stack* stack, char* storePat
if (tmpStack == NULL)
{
+ free(pathTmp);
+ closedir(storeDir);
return 0;
}
@@ -880,7 +889,7 @@ static OCSP_CERTID* MakeCertId(X509* subject, X509* issuer)
return OCSP_cert_to_id(EVP_sha1(), subject, issuer);
}
-static time_t GetIssuanceWindowStart()
+static time_t GetIssuanceWindowStart(void)
{
// time_t granularity is seconds, so subtract 4 days worth of seconds.
// The 4 day policy is based on the CA/Browser Forum Baseline Requirements
diff --git a/src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs b/src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs
index d8793586273..94e255df990 100644
--- a/src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs
+++ b/src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs
@@ -97,9 +97,14 @@ namespace Microsoft.Workload.Build.Tasks
}
string cachePath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
+ string lastTargetPath = string.Empty;
foreach (InstallWorkloadRequest req in selectedRequests)
{
- Log.LogMessage(MessageImportance.High, $"** Installing workload {req.WorkloadId} in {req.TargetPath} **");
+ if (req.TargetPath != lastTargetPath)
+ Log.LogMessage(MessageImportance.High, $"{Environment.NewLine}** Preparing {req.TargetPath} **");
+ lastTargetPath = req.TargetPath;
+
+ Log.LogMessage(MessageImportance.High, $" - {req.WorkloadId}: Installing workload");
if (!req.Validate(Log))
return false;
@@ -159,11 +164,11 @@ namespace Microsoft.Workload.Build.Tasks
if (manifestsInstalled.Contains(req.ManifestName))
{
- Log.LogMessage(MessageImportance.High, $"{Environment.NewLine}** Manifests for workload {req.WorkloadId} are already installed **{Environment.NewLine}");
+ Log.LogMessage(MessageImportance.High, $"** {req.WorkloadId}: Manifests are already installed **");
continue;
}
- Log.LogMessage(MessageImportance.High, $"{Environment.NewLine}** Installing manifests for workload {req.WorkloadId} **");
+ Log.LogMessage(MessageImportance.High, $"{Environment.NewLine}** {req.WorkloadId}: Installing manifests **");
if (!InstallWorkloadManifest(workload,
req.ManifestName,
req.Version,
@@ -230,13 +235,13 @@ namespace Microsoft.Workload.Build.Tasks
Path.Combine(req.TargetPath, "dotnet"),
$"workload install --skip-manifest-update --no-cache --configfile \"{nugetConfigPath}\" {req.WorkloadId}",
workingDir: Path.GetTempPath(),
- silent: false,
logStdErrAsMessage: req.IgnoreErrors,
- debugMessageImportance: MessageImportance.High);
+ debugMessageImportance: MessageImportance.Normal);
if (exitCode != 0)
{
if (req.IgnoreErrors)
{
+ Log.LogMessage(MessageImportance.High, output);
Log.LogMessage(MessageImportance.High,
$"{Environment.NewLine} ** Ignoring workload installation failure exit code {exitCode}. **{Environment.NewLine}");
}
@@ -245,6 +250,7 @@ namespace Microsoft.Workload.Build.Tasks
Log.LogError($"workload install failed with exit code {exitCode}: {output}");
}
+ Log.LogMessage(MessageImportance.Low, $"List of the relevant paths in {req.TargetPath}");
foreach (string dir in Directory.EnumerateDirectories(Path.Combine(req.TargetPath, "sdk-manifests"), "*", SearchOption.AllDirectories))
Log.LogMessage(MessageImportance.Low, $"\t{Path.Combine(req.TargetPath, "sdk-manifests", dir)}");
@@ -257,7 +263,7 @@ namespace Microsoft.Workload.Build.Tasks
private void UpdateAppRef(string sdkPath, string version)
{
- Log.LogMessage(MessageImportance.High, $"{Environment.NewLine}** Updating Targeting pack **{Environment.NewLine}");
+ Log.LogMessage(MessageImportance.Normal, $" - Updating Targeting pack");
string pkgPath = Path.Combine(LocalNuGetsPath, $"Microsoft.NETCore.App.Ref.{version}.nupkg");
if (!File.Exists(pkgPath))
@@ -291,7 +297,7 @@ namespace Microsoft.Workload.Build.Tasks
private bool InstallWorkloadManifest(ITaskItem workloadId, string name, string version, string sdkDir, string nugetConfigContents, bool stopOnMissing)
{
- Log.LogMessage(MessageImportance.High, $" ** Installing manifest: {name}/{version}");
+ Log.LogMessage(MessageImportance.High, $" - Installing manifest: {name}/{version}");
// Find any existing directory with the manifest name, ignoring the case
// Multiple directories for a manifest, differing only in case causes
diff --git a/src/tests/Common/CLRTest.Execute.Bash.targets b/src/tests/Common/CLRTest.Execute.Bash.targets
index 1c20d1e730c..b892c0d95fc 100644
--- a/src/tests/Common/CLRTest.Execute.Bash.targets
+++ b/src/tests/Common/CLRTest.Execute.Bash.targets
@@ -286,6 +286,9 @@ else
__Command+=" dotnet"
fi
+# workaround msbuild issue - https://github.com/dotnet/runtime/issues/74328
+export DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER=1
+
$__Command msbuild $CORE_ROOT/wasm-test-runner/WasmTestRunner.proj /p:NetCoreAppCurrent=$(NetCoreAppCurrent) /p:TestAssemblyFileName=$(MsBuildProjectName).dll /p:TestBinDir=`pwd` $(CLRTestMSBuildArgs) || exit $?
]]>
@@ -427,8 +430,13 @@ echo /usr/bin/env bash $(InputAssemblyName) %24(printf "'%s' " "${CLRTestExecuti
CLRTestExitCode=$?
CLRTestExpectedExitCode=0
]]></BashCLRTestLaunchCmds>
- </PropertyGroup>
+ <BashCLRTestPostCommands><![CDATA[
+$(BashDisasmCheckPostCommands)
+$(CLRTestBashPostCommands)
+ ]]></BashCLRTestPostCommands>
+
+ </PropertyGroup>
<PropertyGroup>
<BashEnvironmentVariables>
@(CLRTestBashEnvironmentVariable -> '%(Identity)', '%0a')
diff --git a/src/tests/Common/CLRTest.Execute.Batch.targets b/src/tests/Common/CLRTest.Execute.Batch.targets
index 04c9e017d7e..a64b2aee4a1 100644
--- a/src/tests/Common/CLRTest.Execute.Batch.targets
+++ b/src/tests/Common/CLRTest.Execute.Batch.targets
@@ -301,6 +301,7 @@ $(BatchIlrtTestLaunchCmds)
if defined RunCrossGen2 (
call :TakeLock
)
+
ECHO %LAUNCHER% %ExePath% %CLRTestExecutionArguments%
%LAUNCHER% %ExePath% %CLRTestExecutionArguments%
set CLRTestExitCode=!ERRORLEVEL!
@@ -338,6 +339,12 @@ cmd /c $(InputAssemblyName)
set CLRTestExitCode=!ERRORLEVEL!
set CLRTestExpectedExitCode=0
]]></BatchCLRTestLaunchCmds>
+
+ <BatchCLRTestPostCommands><![CDATA[
+$(BatchDisasmCheckPostCommands)
+$(CLRTestBatchPostCommands)
+ ]]></BatchCLRTestPostCommands>
+
</PropertyGroup>
<PropertyGroup>
<BatchEnvironmentVariables>
@@ -445,7 +452,7 @@ $(CLRTestBatchPreCommands)
REM Launch
$(BatchCLRTestLaunchCmds)
REM PostCommands
-$(CLRTestBatchPostCommands)
+$(BatchCLRTestPostCommands)
$(BatchCLRTestExitCodeCheck)
]]></_CLRTestExecutionScriptText>
</PropertyGroup>
diff --git a/src/tests/Common/CLRTest.Jit.targets b/src/tests/Common/CLRTest.Jit.targets
index df93c54cd7e..5689faa7e11 100644
--- a/src/tests/Common/CLRTest.Jit.targets
+++ b/src/tests/Common/CLRTest.Jit.targets
@@ -20,6 +20,11 @@ WARNING: When setting properties based on their current state (for example:
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <BashScriptSnippetGen>$(BashScriptSnippetGen);GetIlasmRoundTripBashScript;GetDisasmCheckBashScript</BashScriptSnippetGen>
+ <BatchScriptSnippetGen>$(BatchScriptSnippetGen);GetIlasmRoundTripBatchScript;GetDisasmCheckBatchScript</BatchScriptSnippetGen>
+ </PropertyGroup>
+
<!--
***********************************************************************************************
ildasm / ilasm round trip testing
@@ -187,6 +192,123 @@ IF NOT DEFINED DoLink (
</PropertyGroup>
</Target>
+ <Target Name="GetDisasmCheckData"
+ Returns="$(HasDisasmCheck);@(DisasmCheckFiles)">
+ <ItemGroup>
+ <DisasmCheckFiles Include="%(Compile.Identity)" Condition="'%(Compile.HasDisasmCheck)' == 'true'" />
+ </ItemGroup>
+ <PropertyGroup>
+ <HasDisasmCheck>false</HasDisasmCheck>
+ <HasDisasmCheck Condition="@(DisasmCheckFiles->Count()) &gt; 0 And '$(CLRTestKind)' == 'BuildAndRun' and '$(RunCrossGen2)' != '1'">true</HasDisasmCheck>
+
+ <GCStressIncompatible Condition="'$(HasDisasmCheck)' == 'true'">true</GCStressIncompatible>
+ <HeapVerifyIncompatible Condition="'$(HasDisasmCheck)' == 'true'">true</HeapVerifyIncompatible>
+ </PropertyGroup>
+ </Target>
+
+ <!--
+ The source code file(s) (specified by HasDisasmCheck in the test's project file) contain
+ the patterns used by FileCheck. They need to be copied to the output directory for the
+ test to be self-contained.
+ -->
+ <Target Name="PropagateHasDisasmCheckToCopy"
+ BeforeTargets="AssignTargetPaths">
+ <ItemGroup>
+ <Compile Update="@(Compile)"
+ Condition="'%(Compile.HasDisasmCheck)' == 'true'"
+ CopyToOutputDirectory="PreserveNewest" />
+ </ItemGroup>
+ </Target>
+
+ <Target Name="GetDisasmCheckBashScript"
+ Returns="$(HasBashDisasmCheck);$(BashDisasmOutputFile);$(BashDisasmCheckPostCommands)"
+ DependsOnTargets="GetDisasmCheckData">
+ <PropertyGroup>
+ <HasBashDisasmCheck>false</HasBashDisasmCheck>
+ <HasBashDisasmCheck Condition="'$(HasDisasmCheck)' == 'true' and '$(RuntimeFlavor)' == 'coreclr' and ('$(TargetOS)' == 'Linux' or '$(TargetOS)' == 'OSX') and ('$(TargetArchitecture)' == 'x64' or '$(TargetArchitecture)' == 'arm64')">true</HasBashDisasmCheck>
+
+ <BashDisasmOutputFile>/dev/null</BashDisasmOutputFile>
+ <BashDisasmOutputFile Condition="'$(HasBashDisasmCheck)' == 'true'">$(scriptPath)__jit_disasm.out</BashDisasmOutputFile>
+
+ <BashDisasmListOutputFile>/dev/null</BashDisasmListOutputFile>
+ <BashDisasmListOutputFile Condition="'$(HasBashDisasmCheck)' == 'true'">$(scriptPath)__jit_disasm_list.out</BashDisasmListOutputFile>
+
+ <BashCLRTestPreCommands Condition="'$(HasBashDisasmCheck)' == 'true'"><![CDATA[
+$(BashCLRTestPreCommands)
+if [[ ( -z "$COMPlus_JitStress" ) && ( -z "$COMPlus_JitStressRegs" ) && ( -z "$COMPlus_TailcallStress" ) && ( "$COMPlus_TieredPGO" != "1" ) && ( -z "$RunCrossGen2" ) ]]; then
+ @(DisasmCheckFiles -> ' dotnet $CORE_ROOT/SuperFileCheck/SuperFileCheck.dll --csharp-list-method-names "%(Identity)" --allow-unused-prefixes --check-prefixes=CHECK,$(TargetArchitecture.ToUpperInvariant()),$(TargetArchitecture.ToUpperInvariant())-$(TargetOS.ToUpperInvariant()) > "$(BashDisasmListOutputFile)"
+ ERRORLEVEL=$?
+ export COMPlus_JitDisasm=`cat $(BashDisasmListOutputFile)`
+ export COMPlus_JitDiffableDasm=1
+ export COMPlus_JitStdOutFile=$(BashDisasmOutputFile)
+ if [[ $ERRORLEVEL -ne 0 ]]
+ then
+ echo EXECUTION OF FILECHECK - FAILED $ERRORLEVEL
+ exit 1
+ fi', '%0a')
+fi
+]]>
+ </BashCLRTestPreCommands>
+
+ <BashDisasmCheckPostCommands></BashDisasmCheckPostCommands>
+ <BashDisasmCheckPostCommands Condition="'$(HasBashDisasmCheck)' == 'true'"><![CDATA[
+if [[ -n $COMPlus_JitDisasm ]]; then
+ @(DisasmCheckFiles -> ' dotnet $CORE_ROOT/SuperFileCheck/SuperFileCheck.dll --csharp "%(Identity)" --allow-unused-prefixes --check-prefixes=CHECK,$(TargetArchitecture.ToUpperInvariant()),$(TargetArchitecture.ToUpperInvariant())-$(TargetOS.ToUpperInvariant()) --dump-input-context 40 --input-file "$(BashDisasmOutputFile)"
+ ERRORLEVEL=$?
+ if [[ $ERRORLEVEL -ne 0 ]]
+ then
+ echo EXECUTION OF FILECHECK - FAILED $ERRORLEVEL
+ exit 1
+ fi', '%0a')
+fi
+]]>
+ </BashDisasmCheckPostCommands>
+ </PropertyGroup>
+ </Target>
+
+ <Target Name="GetDisasmCheckBatchScript"
+ Returns="$(HasBatchDisasmCheck);$(BatchDisasmOutputFile);$(BatchDisasmCheckPostCommands)"
+ DependsOnTargets="GetDisasmCheckData">
+ <PropertyGroup>
+ <HasBatchDisasmCheck>false</HasBatchDisasmCheck>
+ <HasBatchDisasmCheck Condition="'$(HasDisasmCheck)' == 'true' and '$(RuntimeFlavor)' == 'coreclr'">true</HasBatchDisasmCheck>
+
+ <BatchDisasmOutputFile>NUL</BatchDisasmOutputFile>
+ <BatchDisasmOutputFile Condition="'$(HasBatchDisasmCheck)' == 'true'">$(scriptPath)__jit_disasm.out</BatchDisasmOutputFile>
+
+ <BatchDisasmListOutputFile>NUL</BatchDisasmListOutputFile>
+ <BatchDisasmListOutputFile Condition="'$(HasBatchDisasmCheck)' == 'true'">$(scriptPath)__jit_disasm_list.out</BatchDisasmListOutputFile>
+
+ <CLRTestBatchPreCommands Condition="'$(HasBatchDisasmCheck)' == 'true'">
+<![CDATA[
+ $(CLRTestBatchPreCommands)
+IF "%COMPlus_JitStress%"=="" IF "%COMPlus_JitStressRegs%"=="" IF "%COMPlus_TailcallStress%"=="" IF NOT "%COMPlus_TieredPGO%" == "1" IF NOT "%RunCrossGen2%" == "1" (
+ @(DisasmCheckFiles -> ' dotnet %CORE_ROOT%\SuperFileCheck\SuperFileCheck.dll --csharp-list-method-names "%(Identity)" --check-prefixes=CHECK,$(TargetArchitecture.ToUpperInvariant()),$(TargetArchitecture.ToUpperInvariant())-$(TargetOS.ToUpperInvariant()) > "$(BatchDisasmListOutputFile)"
+ IF NOT "!ERRORLEVEL!" == "0" (
+ ECHO EXECUTION OF FILECHECK LISTING METHOD NAMES - FAILED !ERRORLEVEL!
+ Exit /b 1
+ )', '%0d%0a')
+ for /F "delims=" %%g in ($(BatchDisasmListOutputFile)) do set COMPlus_JitDisasm=%%g
+ set COMPlus_JitDiffableDasm=1
+ set COMPlus_JitStdOutFile=$(BatchDisasmOutputFile)
+)
+]]>
+ </CLRTestBatchPreCommands>
+
+ <BatchDisasmCheckPostCommands></BatchDisasmCheckPostCommands>
+ <BatchDisasmCheckPostCommands Condition="'$(HasBatchDisasmCheck)' == 'true'"><![CDATA[
+IF NOT "%COMPlus_JitDisasm%" == "" (
+ @(DisasmCheckFiles -> ' dotnet %CORE_ROOT%\SuperFileCheck\SuperFileCheck.dll --csharp "%(Identity)" --allow-unused-prefixes --check-prefixes=CHECK,$(TargetArchitecture.ToUpperInvariant()),$(TargetArchitecture.ToUpperInvariant())-$(TargetOS.ToUpperInvariant()) --dump-input-context 40 --input-file "$(BatchDisasmOutputFile)"
+ IF NOT "!ERRORLEVEL!" == "0" (
+ ECHO EXECUTION OF FILECHECK - FAILED !ERRORLEVEL!
+ Exit /b 1
+ )', '%0d%0a')
+)
+]]>
+ </BatchDisasmCheckPostCommands>
+ </PropertyGroup>
+ </Target>
+
<!--
***********************************************************************************************
SuperPMI collection of CoreCLR tests
@@ -218,8 +340,7 @@ then
export SuperPMIShimLogPath=$spmi_collect_dir
export SuperPMIShimPath=$spmi_jitlib
export COMPlus_EnableExtraSuperPmiQueries=1
- export COMPlus_JitName=libsuperpmi-shim-collector.$spmi_file_extension
- export COMPlus_JitPath=$CORE_ROOT/$COMPlus_JitName
+ export COMPlus_JitPath=$CORE_ROOT/libsuperpmi-shim-collector.$spmi_file_extension
fi
]]>
</SuperPMICollectionBashScript>
@@ -239,8 +360,7 @@ set spmi_jitlib=%CORE_ROOT%\clrjit.dll
set SuperPMIShimLogPath=%spmi_collect_dir%
set SuperPMIShimPath=%spmi_jitlib%
set COMPlus_EnableExtraSuperPmiQueries=1
-set COMPlus_JitName=superpmi-shim-collector.dll
-set COMPlus_JitPath=%CORE_ROOT%\%COMPlus_JitName%
+set COMPlus_JitPath=%CORE_ROOT%\superpmi-shim-collector.dll
:skip_spmi_enable_collection
]]>
</SuperPMICollectionBatchScript>
diff --git a/src/tests/Common/Directory.Build.targets b/src/tests/Common/Directory.Build.targets
index dde2731e822..6cce4ae19af 100644
--- a/src/tests/Common/Directory.Build.targets
+++ b/src/tests/Common/Directory.Build.targets
@@ -87,6 +87,11 @@
<IncludeSubFolders>True</IncludeSubFolders>
</RunTimeArtifactsIncludeFolders>
+ <!-- Used by disasm output verification tests -->
+ <RunTimeArtifactsIncludeFolders Include="SuperFileCheck/">
+ <IncludeSubFolders>True</IncludeSubFolders>
+ </RunTimeArtifactsIncludeFolders>
+
<!-- XUnit runner harness assemblies that we don't want to mix in with the framework in Core_Root -->
<RunTimeArtifactsIncludeFolders Include="xunit/" />
</ItemGroup>
diff --git a/src/tests/Common/scripts/arm32_ci_script.sh b/src/tests/Common/scripts/arm32_ci_script.sh
deleted file mode 100755
index 08892b0ffb0..00000000000
--- a/src/tests/Common/scripts/arm32_ci_script.sh
+++ /dev/null
@@ -1,611 +0,0 @@
-#!/usr/bin/env bash
-
-#Usage message
-function usage {
- echo 'ARM Emulator Cross Build and Test Script'
- echo 'This script cross builds coreclr source and tests the binaries generated'
- echo ''
- echo 'Typical usage:'
- echo ' coreclr source is at ~/clr'
- echo ' corefx source is at ~/cfx'
- echo ' --testRootDir and --mscorlibDir have been built on Windows/downloaded from dotnet-ci.cloudapp.net'
- echo ' --coreFxNativeBinDir has been built using cross build'
- echo ' --coreFxBinDir has been built on Linux'
- echo '$ cd ~/clr'
- echo '$ ./tests/scripts/arm32_ci_script.sh'
- echo ' --emulatorPath=/opt/linux-arm-emulator'
- echo ' --mountPath=/opt/linux-arm-emulator-root'
- echo ' --buildConfig=Release'
- echo ' --testRootDir=~/Downloads/windows.x64.Release'
- echo ' --mscorlibDir=~/clr/bin/bin/coreclr/Linux.armel.Release'
- echo ' --coreFxNativeBinDir=~/cfx/bin/Linux.armel.Release'
- echo ' --coreFxBinDir="~/cfx/bin/Linux.AnyCPU.Release;~/cfx/bin/Unix.AnyCPU.Release;~/cfx/bin/AnyOS.AnyCPU.Release"'
- echo ' --testDirFile=~/clr/tests/testsRunningInsideARM.txt'
- echo ''
- echo 'Required Arguments:'
- echo ' --emulatorPath=<path> : Path of the emulator folder (without ending /)'
- echo ' <path>/platform/rootfs-t30.ext4 should exist'
- echo ' --mountPath=<path> : The desired path for mounting the emulator rootfs (without ending /)'
- echo ' This path is created if not already present'
- echo ' --buildConfig=<config> : The value of config should be either Debug, Checked or Release'
- echo ' Any other value is not accepted'
- echo 'Optional Arguments:'
- echo ' --mode=<mode> : docker or emulator (default)'
- echo ' --arm : Build using hard ABI'
- echo ' --armel : Build using softfp ABI (default)'
- echo ' --linuxCodeName=<name> : Code name for Linux: For arm, trusty (default) and xenial. For armel, tizen'
- echo ' --skipRootFS : Skip building rootfs'
- echo ' --skipTests : Presenting this option skips testing the generated binaries'
- echo ' If this option is not presented, then tests are run by default'
- echo ' using the other test related options'
- echo ' --skipmscorlib : Skips generating mscorlib.dll on Linux'
- echo ' If tests are run and this option is not used,'
- echo ' then --mscorlibDir option to this script is mandatory'
- echo ' -v --verbose : Build made verbose'
- echo ' -h --help : Prints this usage message and exits'
- echo ''
- echo 'Test related Arguments (mandatory if --skipTests is not used):'
- echo ' --testRootDir=<path> : The root directory of the test build'
- echo ' --mscorlibDir=<path> : The directory containing the mscorlib.dll binary'
- echo ' If provided, then the mscorlib.dll in this directory is'
- echo ' used for tests instead of the built mscorlib.dll'
- echo ' --coreFxNativeBinDir=<path> : The directory of the CoreFX native build'
- echo ' --coreFxBinDir="<path>[;<path>]" : List one or more directories with CoreFX managed build binaries'
- echo ' --testDirFile=<path> : Runs tests only in the directories specified by the file at <path>'
- echo ' The directories are listed in lines in the file at <path>'
- echo ''
- echo 'Any other argument triggers an error and this usage message is displayed'
- exit 1
-}
-
-#Display error message and exit
-function exit_with_error {
- set +x
-
- local errorMessage="$1"
- local printUsage=$2
-
- echo "ERROR: $errorMessage"
- if [[ "$printUsage" == "true" ]]; then
- echo ''
- usage
- fi
- exit 1
-}
-
-#Exit if input string is empty
-function exit_if_empty {
- local inputString="$1"
- local errorMessage="$2"
- local printUsage=$3
-
- if [ -z "$inputString" ]; then
- exit_with_error "$errorMessage" $printUsage
- fi
-}
-
-#Exit if the input path does not exist
-function exit_if_path_absent {
- local path="$1"
- local errorMessage="$2"
- local printUsage=$3
-
- if [ ! -f "$path" -a ! -d "$path" ]; then
- exit_with_error "$errorMessage" $printUsage
- fi
-}
-
-#Check if the git changes were reverted completely
-function check_git_head {
- local currentGitHead=`git rev-parse --verify HEAD`
-
- if [[ "$__initialGitHead" != "$currentGitHead" ]]; then
- exit_with_error "Some changes made to the code history were not completely reverted. Intial Git HEAD: $__initialGitHead, current Git HEAD: $currentGitHead" false
- fi
-}
-
-function unmount_rootfs {
- local rootfsFolder="$1"
-
- #Check if there are any open files in this directory.
- if [ -d $rootfsFolder ]; then
- #If we find information about the file
- if sudo lsof +D $rootfsFolder; then
- (set +x; echo 'See above for lsof information. Continuing with the build.')
- fi
- fi
-
- if mountpoint -q -- "$rootfsFolder"; then
- sudo umount "$rootfsFolder"
- fi
-}
-
-#Clean the previous build files inside the emulator
-function clean_emulator {
- #Remove any previous copies of the coreclr and the corefx directories in the emulator
- sudo rm -rf "$__ARMRootfsCoreclrPath" "$__ARMRootfsCorefxPath"
-}
-
-#Clean the changes made to the environment by the script
-function clean_env {
- #Clean the emulator
- clean_emulator
-
- #Check for revert of git changes
- check_git_head
-
- sudo rm -rf "/mnt/arm32_ci_temp"
-}
-
-#Trap Ctrl-C and handle it
-function handle_ctrl_c {
- set +x
-
- echo 'ERROR: Ctrl-C handled. Script aborted before complete execution.'
-
- exit 1
-}
-trap handle_ctrl_c INT
-
-#Trap Exit and handle it
-function handle_exit {
- set +x
-
- echo 'The script is exited. Cleaning environment..'
-
- if [[ "$__ciMode" == "emulator" ]]; then
- clean_env
- fi
-}
-trap handle_exit EXIT
-
-
-#Mount with checking to be already existed
-function mount_with_checking {
- set +x
- local options="$1"
- local from="$2"
- local rootfsFolder="$3"
-
- if mountpoint -q -- "$rootfsFolder"; then
- (set +x; echo "$rootfsFolder is already mounted.")
- else {
- (set -x; sudo mount $options "$from" "$rootfsFolder")
- }
- fi
-}
-
-#Mount emulator to the target mount path
-function mount_emulator {
- #Check if the mount path exists and create if necessary
- if [ ! -d "$__ARMRootfsMountPath" ]; then
- sudo mkdir "$__ARMRootfsMountPath"
- fi
-
- if [ ! -d "$__ARMEmulRootfs" ]; then
- sudo mkdir "$__ARMEmulRootfs"
- fi
-
- if [ ! -f "$__ARMEmulRootfs/arm-emulator-rootfs.tar" ]; then
- if mountpoint -q -- "$__ARMRootfsMountPath"; then
- sudo umount -l $__ARMRootfsMountPath
- fi
- mount_with_checking "" "$__ARMEmulPath/platform/rootfs-t30.ext4" "$__ARMRootfsMountPath"
-
- cd $__ARMRootfsMountPath
- sudo tar -cf "$__ARMEmulRootfs/arm-emulator-rootfs.tar" *
- cd -
- fi
-
- sudo tar -xf "$__ARMEmulRootfs/arm-emulator-rootfs.tar" -C "$__ARMEmulRootfs"
-
- mount_with_checking "-t proc" "/proc" "$__ARMEmulRootfs/proc"
- mount_with_checking "-o bind" "/dev/" "$__ARMEmulRootfs/dev"
- mount_with_checking "-o bind" "/dev/pts" "$__ARMEmulRootfs/dev/pts"
- mount_with_checking "-t tmpfs" "shm" "$__ARMEmulRootfs/run/shm"
- mount_with_checking "-o bind" "/sys" "$__ARMEmulRootfs/sys"
- if [ ! -d "$__ARMEmulRootfs/bindings/tmp" ]; then
- sudo mkdir -p "$__ARMEmulRootfs/bindings/tmp"
- fi
- mount_with_checking "-o bind" "/mnt" "$__ARMEmulRootfs/bindings/tmp"
-
- if [ ! -d "$__ARMEmulRootfs/$__TempFolder" ]; then
- sudo mkdir "$__ARMEmulRootfs/$__TempFolder"
- fi
-}
-
-#Cross builds coreclr
-function cross_build_coreclr {
-#Export the needed environment variables
- (set +x; echo 'Exporting LINUX_ARM_* environment variable')
- source "$__ARMEmulRootfs"/dotnet/setenv/setenv_incpath.sh "$__ARMEmulRootfs"
-
- #Apply release optimization patch if needed
- if [[ "$__buildConfig" == "Release" ]]; then
- (set +x; echo 'Applying release optimization patch to build in Release mode')
- git am < "$__ARMEmulRootfs"/dotnet/setenv/coreclr_release.patch
- fi
-
- #Cross building for emulator rootfs
- ROOTFS_DIR="$__ARMEmulRootfs" CPLUS_INCLUDE_PATH=$LINUX_ARM_INCPATH CXXFLAGS=$LINUX_ARM_CXXFLAGS ./build.sh $__buildArch cross $__verboseFlag $__skipMscorlib clang3.5 $__buildConfig
-
- #Reset the code to the upstream version
- (set +x; echo 'Rewinding HEAD to main code')
- if [[ "$__buildConfig" == "Release" ]]; then
- git reset --hard HEAD^
- fi
-}
-
-#Cross builds coreclr using Docker
-function cross_build_coreclr_with_docker {
- __currentWorkingDirectory=`pwd`
-
- # Check build configuration and choose Docker image
- __dockerEnvironmentVariables=""
- if [[ "$__buildArch" == "arm" ]]; then
- # TODO: For arm, we are going to embed RootFS inside Docker image.
- case $__linuxCodeName in
- trusty)
- __dockerImage=" mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-14.04-cross-0cd4667-20172211042239"
- __skipRootFS=1
- __dockerEnvironmentVariables+=" -e ROOTFS_DIR=/crossrootfs/arm"
- __runtimeOS="ubuntu.14.04"
- ;;
- xenial)
- __dockerImage=" mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-ef0ac75-20175511035548"
- __skipRootFS=1
- __dockerEnvironmentVariables+=" -e ROOTFS_DIR=/crossrootfs/arm"
- __runtimeOS="ubuntu.16.04"
- ;;
- *)
- exit_with_error "ERROR: $__linuxCodeName is not a supported linux name for $__buildArch" false
- ;;
- esac
- elif [[ "$__buildArch" == "armel" ]]; then
- # For armel Tizen, we are going to construct RootFS on the fly.
- case $__linuxCodeName in
- tizen)
- __dockerImage=" tizendotnet/dotnet-buildtools-prereqs:ubuntu-16.04-cross-e435274-20180426002255-tizen-rootfs-5.0m1"
- __skipRootFS=1
- __dockerEnvironmentVariables+=" -e ROOTFS_DIR=/crossrootfs/armel.tizen.build"
- __runtimeOS="tizen.5.0.0"
- ;;
- *)
- echo "ERROR: $__linuxCodeName is not a supported linux name for $__buildArch"
- exit_with_error "ERROR: $__linuxCodeName is not a supported linux name for $__buildArch" false
- ;;
- esac
- else
- exit_with_error "ERROR: unknown buildArch $__buildArch" false
- fi
- __dockerCmd="sudo docker run ${__dockerEnvironmentVariables} --privileged -i --rm -v $__currentWorkingDirectory:/opt/code -w /opt/code $__dockerImage"
-
- if [[ "$__skipRootFS" == 0 ]]; then
- # Build rootfs
- __buildRootfsCmd="$__RepoRootDir/eng/common/cross/build-rootfs.sh $__buildArch $__linuxCodeName --skipunmount"
-
- (set +x; echo "Build RootFS for $__buildArch $__linuxCodeName")
- $__dockerCmd $__buildRootfsCmd
- sudo chown -R $(id -u -n) $__RepoRootDir/eng/common/cross/rootfs
- fi
-
- __extraArgs=""
- if [[ "$__buildArch" == "armel" && "$__linuxCodeName" == "tizen" ]]; then
- __extraArgs="cmakeargs -DFEATURE_NGEN_RELOCS_OPTIMIZATIONS=true cmakeargs -DFEATURE_GDBJIT=true cmakeargs -DFEATURE_PREJIT=true -PortableBuild=false"
- fi
-
- # Cross building coreclr with rootfs in Docker
- (set +x; echo "Start cross build coreclr for $__buildArch $__linuxCodeName")
- __buildCmd="./build.sh $__buildArch cross $__verboseFlag $__skipMscorlib $__buildConfig $__extraArgs"
- $__dockerCmd $__buildCmd
- sudo chown -R $(id -u -n) ./bin
-}
-
-#Copy the needed files to the emulator to run tests
-function copy_to_emulator {
-
- #Create the coreclr and corefx directories in the emulator
- sudo mkdir -p "$__ARMRootfsCoreclrPath/bin/obj/$__buildDirName"
- sudo mkdir -p "$__ARMRootfsCoreclrPath/bin/Product"
- sudo mkdir "$__ARMRootfsCorefxPath"
-
- #Copy all coreclr files to the coreclr root in the emulator and set the paths accordingly
- local testRootDirBase=`basename "$__testRootDir"`
- sudo cp -R "$__testRootDir" "$__ARMRootfsCoreclrPath/$testRootDirBase"
- __testRootDirBase="$__ARMEmulCoreclr/$testRootDirBase"
-
- sudo cp -R "./$__testNativeBinDirBase" "$__ARMRootfsCoreclrPath/$__testNativeBinDirBase"
- __testNativeBinDirBase="$__ARMEmulCoreclr/$__testNativeBinDirBase"
-
- sudo cp -R "./$__coreClrBinDirBase" "$__ARMRootfsCoreclrPath/$__coreClrBinDirBase"
- __coreClrBinDirBase="$__ARMEmulCoreclr/$__coreClrBinDirBase"
- __mscorlibDirBase="$__coreClrBinDirBase"
-
- local testDirFileBase=`basename "$__testDirFile"`
- sudo cp "$__testDirFile" "$__ARMRootfsCoreclrPath/$testDirFileBase"
- __testDirFileBase="$__ARMEmulCoreclr/$testDirFileBase"
-
- sudo cp -R ./tests "$__ARMRootfsCoreclrPath/"
- sudo cp -R ./.packages "$__ARMRootfsCoreclrPath/"
- sudo cp -R ./Tools "$__ARMRootfsCoreclrPath/"
-
- #Copy corefx binary directories to the corefx root in the emulator (first native and then managed)
- local coreFxNativeBinDirBase=`basename "$__coreFxNativeBinDir"`
- sudo cp -R "$__coreFxNativeBinDir" "$__ARMRootfsCorefxPath/$coreFxNativeBinDirBase"
- __coreFxNativeBinDirBase="$__ARMEmulCorefx/$coreFxNativeBinDirBase"
-
- __coreFxBinDirBase=
- while IFS=';' read -ra coreFxBinDirectories; do
- for currDir in "${coreFxBinDirectories[@]}"; do
- local currDirBase=`basename "$currDir"`
- sudo cp -R "$currDir" "$__ARMRootfsCorefxPath/$currDirBase"
-
- if [ -z "$__coreFxBinDirBase" ]; then
- __coreFxBinDirBase="$__ARMEmulCorefx/$currDirBase"
- else
- __coreFxBinDirBase="$__coreFxBinDirBase;$__ARMEmulCorefx/$currDirBase"
- fi
- done
- done <<< "$__coreFxBinDir"
-}
-
-#Runs tests in an emulated mode
-function run_tests {
- sudo chroot $__ARMEmulRootfs /bin/bash -x <<EOF
- cd "$__ARMEmulCoreclr"
- ./bringup_runtest.sh --sequential\
- --testRootDir=$__testRootDirBase \
- --mscorlibDir=$__mscorlibDirBase \
- --coreFxNativeBinDir=$__coreFxNativeBinDirBase \
- --coreFxBinDir="$__coreFxBinDirBase" \
- --testDirFile=$__testDirFileBase \
- --testNativeBinDir=$__testNativeBinDirBase \
- --coreClrBinDir=$__coreClrBinDirBase
-EOF
-}
-
-function run_tests_using_docker {
- __currentWorkingDirectory=`pwd`
-
- # Configure docker
- __dockerEnvironmentVariables=""
- if [[ "$__buildArch" == "arm" ]]; then
- case $__linuxCodeName in
- trusty)
- __dockerImage=" mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu1404_cross_prereqs_v3"
- __skipRootFS=1
- __dockerEnvironmentVariables=" -e ROOTFS_DIR=/crossrootfs/arm"
- ;;
- xenial)
- __dockerImage=" mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu1604_cross_prereqs_v3"
- __skipRootFS=1
- __dockerEnvironmentVariables=" -e ROOTFS_DIR=/crossrootfs/arm"
- ;;
- *)
- exit_with_error "ERROR: $__linuxCodeName is not a supported linux name for $__buildArch" false
- ;;
- esac
- elif [[ "$__buildArch" == "armel" ]]; then
- case $__linuxCodeName in
- tizen)
- __dockerImage=" tizendotnet/dotnet-buildtools-prereqs:ubuntu-16.04-cross-e435274-20180426002255-tizen-rootfs-5.0m1"
- __skipRootFS=1
- __dockerEnvironmentVariables=" -e ROOTFS_DIR=/crossrootfs/armel.tizen.test"
- ;;
- *)
- exit_with_error "ERROR: $__linuxCodeName is not a supported linux name for $__buildArch" false
- ;;
- esac
- else
- exit_with_error "ERROR: unknown buildArch $__buildArch" false
- fi
- __dockerCmd="sudo docker run ${__dockerEnvironmentVariables} --privileged -i --rm -v $__currentWorkingDirectory:/opt/code -w /opt/code $__dockerImage"
- __testCmd="./tests/scripts/arm32_ci_test.sh --abi=${__buildArch} --buildConfig=${__buildConfig}"
-
- $__dockerCmd $__testCmd
-}
-
-__RepoRootDir=./../..
-
-#Define script variables
-__ciMode="emulator"
-__ARMEmulRootfs=/mnt/arm-emulator-rootfs
-__ARMEmulPath=
-__ARMRootfsMountPath=
-__buildConfig=
-__skipTests=0
-__skipMscorlib=
-__testRootDir=
-__mscorlibDir=
-__coreFxNativeBinDir=
-__coreFxBinDir=
-__testDirFile=
-__verboseFlag=
-__targetOS="Linux"
-__buildArch="armel"
-__linuxCodeName="tizen"
-__skipRootFS=0
-__buildDirName=
-__initialGitHead=`git rev-parse --verify HEAD`
-
-#Parse command line arguments
-for arg in "$@"
-do
- case $arg in
- --emulatorPath=*)
- __ARMEmulPath=${arg#*=}
- ;;
- --mountPath=*)
- __ARMRootfsMountPath=${arg#*=}
- ;;
- --buildConfig=*)
- __buildConfig="$(echo ${arg#*=} | tr "[:upper:]" "[:lower:]")"
- if [[ "$__buildConfig" != "debug" && "$__buildConfig" != "release" && "$__buildConfig" != "checked" ]]; then
- exit_with_error "--buildConfig can be Debug, Checked or Release" true
- fi
- ;;
- --mode=*)
- __ciMode=${arg#*=}
- ;;
- --skipTests)
- __skipTests=1
- ;;
- --skipmscorlib)
- __skipMscorlib="skipmscorlib"
- ;;
- -v|--verbose)
- __verboseFlag="verbose"
- ;;
- --testRootDir=*)
- __testRootDir=${arg#*=}
- ;;
- --mscorlibDir=*)
- __mscorlibDir=${arg#*=}
- ;;
- --coreFxNativeBinDir=*)
- __coreFxNativeBinDir=${arg#*=}
- ;;
- --coreFxBinDir=*)
- __coreFxBinDir=${arg#*=}
- ;;
- --testDirFile=*)
- __testDirFile=${arg#*=}
- ;;
- --arm)
- __buildArch="arm"
- ;;
- --armel)
- __buildArch="armel"
- __linuxCodeName="tizen"
- ;;
- --linuxCodeName=*)
- __linuxCodeName=${arg#*=}
- ;;
- --skipRootFS)
- __skipRootFS=1
- ;;
- -h|--help)
- usage
- ;;
- *)
- exit_with_error "$arg not a recognized argument" true
- ;;
- esac
-done
-
-#Check if there are any uncommitted changes in the source directory as git adds and removes patches
-if [[ -n $(git status -s) ]]; then
- echo 'ERROR: There are some uncommitted changes. To avoid losing these changes commit them and try again.'
- echo ''
- git status
- exit 1
-fi
-
-exit_if_empty "$__buildConfig" "--buildConfig is a mandatory argument, not provided" true
-if [[ "$__ciMode" == "emulator" ]]; then
- #Check if the compulsory arguments have been presented to the script and if the input paths exist
- exit_if_empty "$__ARMEmulPath" "--emulatorPath is a mandatory argument, not provided" true
- exit_if_empty "$__ARMRootfsMountPath" "--mountPath is a mandatory argument, not provided" true
- exit_if_path_absent "$__ARMEmulPath/platform/rootfs-t30.ext4" "Path specified in --emulatorPath does not have the rootfs" false
- # Test is not available in emulator mode.
- __skipTests=1
-fi
-
-__coreFxBinDir="./bin/CoreFxBinDir" # TODO-cleanup: Just for testing....
-#Check if the optional arguments are present in the case that testing is to be done
-if [[ "$__skipTests" == 0 ]]; then
- exit_if_empty "$__testRootDir" "Testing requested, but --testRootDir not provided" true
- exit_if_path_absent "$__testRootDir" "Path specified in --testRootDir does not exist" false
-
- exit_if_empty "$__coreFxBinDir" "Testing requested, but --coreFxBinDir not provided" true
- exit_if_path_absent "$__coreFxBinDir" "Path specified in --coreFxBinDir does not exist" false
-
- exit_if_empty "$__testDirFile" "Testing requested, but --testDirFile not provided" true
- exit_if_path_absent "$__testDirFile" "Path specified in --testDirFile does not exist" false
-
- if [[ -n "$__skipMscorlib" ]]; then
- exit_if_empty "$__mscorlibDir" "Testing and skipmscorlib requested, but --mscorlibDir not provided" true
- fi
- if [[ -n "$__mscorlibDir" ]]; then
- echo '--mscorlibDir provided; will be using this path for running tests and ignoring the generated mscorlib.dll'
- exit_if_path_absent "$__mscorlibDir/mscorlib.dll" "Path specified in --mscorlibDir does not contain mscorlib.dll"
- fi
-fi
-
-#Change build configuration to the capitalized form to create build product paths correctly
-if [[ "$__buildConfig" == "release" ]]; then
- __buildConfig="Release"
-elif [[ "$__buildConfig" == "checked" ]]; then
- __buildConfig="Checked"
-else
- __buildConfig="Debug"
-fi
-__buildDirName="$__targetOS.$__buildArch.$__buildConfig"
-
-#Define emulator paths
-__TempFolder="bindings/tmp/arm32_ci_temp"
-__ARMRootfsCoreclrPath="$__ARMEmulRootfs/$__TempFolder/coreclr"
-__ARMRootfsCorefxPath="$__ARMEmulRootfs/$__TempFolder/corefx"
-__ARMEmulCoreclr="/$__TempFolder/coreclr"
-__ARMEmulCorefx="/$__TempFolder/corefx"
-__testRootDirBase=
-__mscorlibDirBase=
-__coreFxNativeBinDirBase=
-__coreFxBinDirBase=
-__testDirFileBase=
-__testNativeBinDirBase="bin/obj/$__buildDirName/tests"
-__coreClrBinDirBase="bin/bin/coreclr/$__buildDirName"
-
-set -x
-set -e
-
-## Begin cross build
-(set +x; echo "Git HEAD @ $__initialGitHead")
-
-if [[ "$__ciMode" == "docker" ]]; then
- # Complete the cross build using Docker
- (set +x; echo 'Building coreclr...')
- cross_build_coreclr_with_docker
-else
- #Mount the emulator
- (set +x; echo 'Mounting emulator...')
- mount_emulator
-
- #Clean the emulator
- (set +x; echo 'Cleaning emulator...')
- clean_emulator
-
- #Complete the cross build
- (set +x; echo 'Building coreclr...')
- cross_build_coreclr
-fi
-
-#If tests are to be skipped end the script here, else continue
-if [[ "$__skipTests" == 1 ]]; then
- exit 0
-fi
-
-__unittestResult=0
-## Begin CoreCLR test
-if [[ "$__ciMode" == "docker" ]]; then
- run_tests_using_docker
- __unittestResult=$?
-else
- ## Tests are going to be performed in an emulated environment
-
- #Copy the needed files to the emulator before entering the emulated environment
- (set +x; echo 'Setting up emulator to run tests...')
- copy_to_emulator
-
- #Enter the emulated mode and run the tests
- (set +x; echo 'Running tests...')
- run_tests
- __unittestResult=$?
-
- #Clean the environment
- (set +x; echo 'Cleaning environment...')
- clean_env
-fi
-
-(set +x; echo 'Build and test complete')
-exit $__unittestResult
diff --git a/src/tests/Common/scripts/arm32_ci_test.sh b/src/tests/Common/scripts/arm32_ci_test.sh
deleted file mode 100755
index 07ccf89a163..00000000000
--- a/src/tests/Common/scripts/arm32_ci_test.sh
+++ /dev/null
@@ -1,115 +0,0 @@
-#!/usr/bin/env bash
-
-set -x
-
-function usage {
- echo 'ARM Test Script'
- echo '$ ./tests/scripts/arm32_ci_test.sh'
- echo ' --abi=arm'
- echo ' --buildConfig=Release'
- echo 'Required Arguments:'
- echo ' --abi=<abi> : arm (default) or armel'
- echo ' --buildConfig=<config> : Release (default) Checked, or Debug'
-}
-
-# Display error message and exit
-function exit_with_error {
- set +x
-
- local errorMessage="$1"
- local printUsage=$2
-
- echo "ERROR: $errorMessage"
- if [[ "$printUsage" == "true" ]]; then
- echo ''
- usage
- fi
- exit 1
-}
-
-# Exit if the input path does not exist
-function exit_if_path_absent {
- local path="$1"
- local errorMessage="$2"
- local printUsage=$3
-
- if [ ! -f "$path" -a ! -d "$path" ]; then
- exit_with_error "$errorMessage" $printUsage
- fi
-}
-
-__abi="arm"
-__buildConfig="Release"
-
-# Parse command line arguments
-for arg in "$@"
-do
- case $arg in
- --abi=*)
- __abi=${arg#*=}
- if [[ "$__abi" != "arm" && "$__abi" != "armel" ]]; then
- exit_with_error "--abi can be either arm or armel" true
- fi
- ;;
- --buildConfig=*)
- __buildConfig=${arg#*=}
- if [[ "$__buildConfig" != "Debug" && "$__buildConfig" != "Release" && "$__buildConfig" != "Checked" ]]; then
- exit_with_error "--buildConfig can be Debug, Checked or Release" true
- fi
- ;;
- -v|--verbose)
- __verboseFlag="verbose"
- ;;
- -h|--help)
- usage
- exit 0
- ;;
- *)
- exit_with_error "$arg not a recognized argument" true
- ;;
- esac
-done
-__buildDirName="Linux.${__abi}.${__buildConfig}"
-
-CORECLR_DIR=/opt/code
-ARM_CHROOT_HOME_DIR=/home/coreclr
-
-if [ -z "${ROOTFS_DIR}" ]; then
- __ROOTFS_DIR=${CORECLR_DIR}/eng/common/cross/rootfs/${__abi}
-else
- __ROOTFS_DIR=${ROOTFS_DIR}
-fi
-
-if [[ "$__abi" == "armel" ]]; then
- # Prepare armel emulation environment
- pushd ${CORECLR_DIR}/eng/common/cross/armel/tizen
- apt-get update
- apt-get -y -qq --force-yes --reinstall install qemu binfmt-support qemu-user-static
- __qemuARM=$(which qemu-arm-static)
- cp $__qemuARM ${__ROOTFS_DIR}/usr/bin/
- popd
-fi
-
-# Mount
-mkdir -p ${__ROOTFS_DIR}${ARM_CHROOT_HOME_DIR}
-mount -t proc /proc ${__ROOTFS_DIR}/proc
-mount -o bind /dev ${__ROOTFS_DIR}/dev
-mount -o bind /dev/pts ${__ROOTFS_DIR}/dev/pts
-mount -o bind /sys ${__ROOTFS_DIR}/sys
-mount -o bind ${CORECLR_DIR} ${__ROOTFS_DIR}${ARM_CHROOT_HOME_DIR}
-
-# Test environment emulation using docker and qemu has some problem to use lttng library.
-# We should remove libcoreclrtraceptprovider.so to avoid test hang.
-rm -f -v ${__ROOTFS_DIR}${ARM_CHROOT_HOME_DIR}/bin/bin/coreclr/${__buildDirName}/libcoreclrtraceptprovider.so
-rm -f -v ${__ROOTFS_DIR}${ARM_CHROOT_HOME_DIR}/bin/CoreFxBinDir/libcoreclrtraceptprovider.so
-
-chroot ${__ROOTFS_DIR} /bin/bash -x <<EOF
- cd ${ARM_CHROOT_HOME_DIR}
- ./bringup_runtest.sh --sequential\
- --coreClrBinDir=${ARM_CHROOT_HOME_DIR}/artifacts/bin/coreclr/${__buildDirName} \
- --mscorlibDir=${ARM_CHROOT_HOME_DIR}/artifacts/bin/coreclr/${__buildDirName} \
- --testNativeBinDir=${ARM_CHROOT_HOME_DIR}/artifacts/obj/coreclr/${__buildDirName}/tests \
- --coreFxBinDir=${ARM_CHROOT_HOME_DIR}/bin/CoreFxBinDir \
- --testRootDir=${ARM_CHROOT_HOME_DIR}/bin/tests/windows.x64.${__buildConfig} \
- --testDirFile=${ARM_CHROOT_HOME_DIR}/tests/testsRunningInsideARM.txt
-EOF
diff --git a/src/tests/Common/scripts/run-pmi-diffs.py b/src/tests/Common/scripts/run-pmi-diffs.py
deleted file mode 100755
index f711030e9cb..00000000000
--- a/src/tests/Common/scripts/run-pmi-diffs.py
+++ /dev/null
@@ -1,719 +0,0 @@
-#!/usr/bin/env python
-#
-# Licensed to the .NET Foundation under one or more agreements.
-# The .NET Foundation licenses this file to you under the MIT license.
-#
-##
-# Title :run-pmi-diffs.py
-#
-# Notes:
-#
-# TODO: Instead of downloading and extracting the dotnet CLI, can we convert
-# to using init-tools.cmd/sh and the Tools/dotnetcli "last known good"
-# version? (This maybe should be done for format.py as well.)
-#
-# Script to automate running PMI diffs on a pull request
-#
-##########################################################################
-##########################################################################
-
-import argparse
-import distutils.dir_util
-import os
-import re
-import shutil
-import subprocess
-import urllib
-import sys
-import tarfile
-import zipfile
-
-# Version specific imports
-if sys.version_info.major < 3:
- import urllib
-else:
- import urllib.request
-
-sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))), "scripts"))
-from coreclr_arguments import *
-
-##########################################################################
-# Globals
-##########################################################################
-
-testing = False
-
-Coreclr_url = 'https://github.com/dotnet/coreclr.git'
-Jitutils_url = 'https://github.com/dotnet/jitutils.git'
-
-# The Docker file and possibly options should be hoisted out to a text file to be shared between scripts.
-
-Docker_name_arm32 = 'mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-14.04-cross-e435274-20180426002420'
-Docker_opts_arm32 = '-e ROOTFS_DIR=/crossrootfs/arm'
-
-Docker_name_arm64 = 'mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-a3ae44b-20180315221921'
-Docker_opts_arm64 = '-e ROOTFS_DIR=/crossrootfs/arm64'
-
-Is_illumos = ('illumos' in subprocess.Popen(["uname", "-o"], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0].decode('utf-8'))
-
-# This should be factored out of build.sh
-Unix_name_map = {
- 'Linux': 'Linux',
- 'Darwin': 'OSX',
- 'FreeBSD': 'FreeBSD',
- 'OpenBSD': 'OpenBSD',
- 'NetBSD': 'NetBSD',
- 'SunOS': 'illumos' if Is_illumos else 'Solaris'
-}
-
-Is_windows = (os.name == 'nt')
-Clr_os = 'windows' if Is_windows else Unix_name_map[os.uname()[0]]
-
-##########################################################################
-# Delete protocol
-##########################################################################
-
-def del_rw(action, name, exc):
- os.chmod(name, 0o651)
- os.remove(name)
-
-##########################################################################
-# Argument Parser
-##########################################################################
-
-description = 'Tool to generate JIT assembly diffs from the CoreCLR repo'
-
-parser = argparse.ArgumentParser(description=description)
-
-# base_root is normally expected to be None, in which case we'll clone the
-# coreclr tree and build it. If base_root is passed, we'll use it, and not
-# clone or build the base.
-
-parser.add_argument('-arch', dest='arch', default='x64')
-parser.add_argument('-ci_arch', dest='ci_arch', default=None)
-parser.add_argument('-build_type', dest='build_type', default='Checked')
-parser.add_argument('-base_root', dest='base_root', default=None)
-parser.add_argument('-diff_root', dest='diff_root', default=None)
-parser.add_argument('-scratch_root', dest='scratch_root', default=None)
-parser.add_argument('--skip_baseline_build', dest='skip_baseline_build', action='store_true', default=False)
-parser.add_argument('--skip_diffs', dest='skip_diffs', action='store_true', default=False)
-parser.add_argument('-target_branch', dest='target_branch', default='main')
-parser.add_argument('-commit_hash', dest='commit_hash', default=None)
-
-##########################################################################
-# Class to change the current directory, and automatically restore the
-# directory back to what it used to be, on exit.
-##########################################################################
-
-class ChangeDir:
- def __init__(self, dir):
- self.dir = dir
- self.cwd = None
-
- def __enter__(self):
- self.cwd = os.getcwd()
- log('[cd] %s' % self.dir)
- if not testing:
- os.chdir(self.dir)
-
- def __exit__(self, exc_type, exc_val, exc_tb):
- log('[cd] %s' % self.cwd)
- if not testing:
- os.chdir(self.cwd)
-
-##########################################################################
-# Helper Functions
-##########################################################################
-
-def validate_args(args):
- """ Validate all of the arguments parsed.
- Args:
- args (argparser.ArgumentParser) : Args parsed by the argument parser.
- Returns:
- args (CoreclrArguments) : Args parsed
- Notes:
- If the arguments are valid then return them all in a tuple. If not,
- raise an exception stating x argument is incorrect.
- """
-
- coreclr_setup_args = CoreclrArguments(args,
- require_built_test_dir=False,
- require_built_core_root=True,
- require_built_product_dir=False)
-
- coreclr_setup_args.verify(args,
- "base_root",
- lambda directory: os.path.isdir(directory) if directory is not None else True,
- "Base root is not a valid directory")
-
- coreclr_setup_args.verify(args,
- "diff_root",
- lambda directory: os.path.isdir(directory) if directory is not None else True,
- "Diff root is not a valid directory",
- modify_arg=lambda directory: nth_dirname(os.path.abspath(sys.argv[0]), 3) if directory is None else os.path.abspath(directory))
-
- coreclr_setup_args.verify(args,
- "scratch_root",
- lambda unused: True,
- "Error setting scratch_root",
- modify_arg=lambda directory: os.path.join(coreclr_setup_args.diff_root, '_', 'pmi') if directory is None else os.path.abspath(directory))
-
- coreclr_setup_args.verify(args,
- "skip_baseline_build",
- lambda unused: True,
- "Error setting baseline build")
-
- coreclr_setup_args.verify(args,
- "skip_diffs",
- lambda unused: True,
- "Error setting skip_diffs")
-
- coreclr_setup_args.verify(args,
- "target_branch",
- lambda unused: True,
- "Error setting target_branch")
-
- coreclr_setup_args.verify(args,
- "commit_hash",
- lambda unused: True,
- "Error setting commit_hash")
-
- coreclr_setup_args.verify(args,
- "ci_arch",
- lambda ci_arch: ci_arch in coreclr_setup_args.valid_arches + ['x86_arm_altjit', 'x64_arm64_altjit'],
- "Error setting ci_arch")
-
- args = (
- coreclr_setup_args.arch,
- coreclr_setup_args.ci_arch,
- coreclr_setup_args.build_type,
- coreclr_setup_args.base_root,
- coreclr_setup_args.diff_root,
- coreclr_setup_args.scratch_root,
- coreclr_setup_args.skip_baseline_build,
- coreclr_setup_args.skip_diffs,
- coreclr_setup_args.target_branch,
- coreclr_setup_args.commit_hash
- )
-
- log('Configuration:')
- log(' arch: %s' % coreclr_setup_args.arch)
- log(' ci_arch: %s' % coreclr_setup_args.ci_arch)
- log(' build_type: %s' % coreclr_setup_args.build_type)
- log(' base_root: %s' % coreclr_setup_args.base_root)
- log(' diff_root: %s' % coreclr_setup_args.diff_root)
- log(' scratch_root: %s' % coreclr_setup_args.scratch_root)
- log(' skip_baseline_build: %s' % coreclr_setup_args.skip_baseline_build)
- log(' skip_diffs: %s' % coreclr_setup_args.skip_diffs)
- log(' target_branch: %s' % coreclr_setup_args.target_branch)
- log(' commit_hash: %s' % coreclr_setup_args.commit_hash)
-
- return args
-
-def nth_dirname(path, n):
- """ Find the Nth parent directory of the given path
- Args:
- path (str): path name containing at least N components
- n (int): num of basenames to remove
- Returns:
- outpath (str): path with the last n components removed
- Notes:
- If n is 0, path is returned unmodified
- """
-
- assert n >= 0
-
- for i in range(0, n):
- path = os.path.dirname(path)
-
- return path
-
-def log(message):
- """ Print logging information
- Args:
- message (str): message to be printed
- """
-
- print('[%s]: %s' % (sys.argv[0], message))
-
-def copy_files(source_dir, target_dir):
- """ Copy any files in the source_dir to the target_dir.
- The copy is not recursive.
- The directories must already exist.
- Args:
- source_dir (str): source directory path
- target_dir (str): target directory path
- Returns:
- Nothing
- """
-
- global testing
- assert os.path.isdir(source_dir)
- assert os.path.isdir(target_dir)
-
- for source_filename in os.listdir(source_dir):
- source_pathname = os.path.join(source_dir, source_filename)
- if os.path.isfile(source_pathname):
- target_pathname = os.path.join(target_dir, source_filename)
- log('Copy: %s => %s' % (source_pathname, target_pathname))
- if not testing:
- shutil.copy2(source_pathname, target_pathname)
-
-def run_command(command, command_env):
- """ Run a command (process) in a given environment. stdout/stderr are output piped through.
- Args:
- command (array): the command to run, with components of the command as separate elements.
- command_env (map): environment in which the command should be run
- Returns:
- The return code of the command.
- """
-
- returncode = 0
-
- log('Invoking: %s' % (' '.join(command)))
- if not testing:
- proc = subprocess.Popen(command, env=command_env)
- output,error = proc.communicate()
- returncode = proc.returncode
- if returncode != 0:
- log('Return code = %s' % returncode)
-
- return returncode
-
-##########################################################################
-# Do baseline build:
-# 1. determine appropriate commit,
-# 2. clone coreclr,
-# 3. do build
-##########################################################################
-
-def baseline_build():
-
- if not testing:
- if os.path.isdir(baseCoreClrPath):
- log('Removing existing tree: %s' % baseCoreClrPath)
- shutil.rmtree(baseCoreClrPath, onerror=del_rw)
-
- # Find the baseline commit
-
- # Clone at that commit
-
- command = 'git clone -b %s --single-branch %s %s' % (
- target_branch, Coreclr_url, baseCoreClrPath)
- log(command)
- returncode = 0 if testing else os.system(command)
- if returncode != 0:
- log('ERROR: git clone failed')
- return 1
-
- # Change directory to the baseline root
-
- with ChangeDir(baseCoreClrPath):
-
- # Set up for possible docker usage
-
- scriptPath = '.'
- buildOpts = ''
- dockerCmd = ''
- if not Is_windows and (arch == 'arm' or arch == 'arm64'):
- # Linux arm and arm64 builds are cross-compilation builds using Docker.
- if arch == 'arm':
- dockerFile = Docker_name_arm32
- dockerOpts = Docker_opts_arm32
- else:
- # arch == 'arm64'
- dockerFile = Docker_name_arm64
- dockerOpts = Docker_opts_arm64
-
- dockerCmd = 'docker run -i --rm -v %s:%s -w %s %s %s ' % (baseCoreClrPath, baseCoreClrPath, baseCoreClrPath, dockerOpts, dockerFile)
- buildOpts = 'cross'
- scriptPath = baseCoreClrPath
-
- # Build a checked baseline jit
-
- if Is_windows:
- command = 'set __TestIntermediateDir=int&&build.cmd %s checked skiptests skipbuildpackages' % arch
- else:
- command = '%s%s/build.sh %s checked skipbuildpackages %s' % (dockerCmd, scriptPath, arch, buildOpts)
- log(command)
- returncode = 0 if testing else os.system(command)
- if returncode != 0:
- log('ERROR: build failed')
- return 1
-
- # Build the layout (Core_Root) directory
- # For Windows, invoke build-test.cmd to restore packages before generating the layout.
-
- if Is_windows:
- command = 'build-test.cmd %s %s skipmanaged skipnative' % (build_type, arch)
- log(command)
- returncode = 0 if testing else os.system(command)
- if returncode != 0:
- log('ERROR: restoring packages failed')
- return 1
-
- if Is_windows:
- command = 'tests\\runtest.cmd %s checked GenerateLayoutOnly' % arch
- else:
- command = '%s%s/build-test.sh %s checked generatelayoutonly' % (dockerCmd, scriptPath, arch)
- log(command)
- returncode = 0 if testing else os.system(command)
- if returncode != 0:
- log('ERROR: generating layout failed')
- return 1
-
- return 0
-
-##########################################################################
-# Do PMI diff run:
-# 1. download dotnet CLI (needed by jitutils)
-# 2. clone jitutils repo
-# 3. build jitutils
-# 4. run PMI asm generation on baseline and diffs
-# 5. run jit-analyze to compare baseline and diff
-##########################################################################
-
-def do_pmi_diffs():
- global baseCoreClrPath
-
- # Setup scratch directories. Names are short to avoid path length problems on Windows.
- dotnetcliPath = os.path.abspath(os.path.join(scratch_root, 'cli'))
- jitutilsPath = os.path.abspath(os.path.join(scratch_root, 'jitutils'))
- asmRootPath = os.path.abspath(os.path.join(scratch_root, 'asm'))
-
- dotnet_tool = 'dotnet.exe' if Is_windows else 'dotnet'
-
- # Make sure the temporary directories do not exist. If they do already, delete them.
-
- if not testing:
- # If we can't delete the dotnet tree, it might be because a previous run failed or was
- # cancelled, and the build servers are still running. Try to stop it if that happens.
- if os.path.isdir(dotnetcliPath):
- try:
- log('Removing existing tree: %s' % dotnetcliPath)
- shutil.rmtree(dotnetcliPath, onerror=del_rw)
- except OSError:
- if os.path.isfile(os.path.join(dotnetcliPath, dotnet_tool)):
- log('Failed to remove existing tree; trying to shutdown the dotnet build servers before trying again.')
-
- # Looks like the dotnet too is still there; try to run it to shut down the build servers.
- temp_env = my_env
- temp_env["PATH"] = dotnetcliPath + os.pathsep + my_env["PATH"]
- log('Shutting down build servers')
- command = ["dotnet", "build-server", "shutdown"]
- returncode = run_command(command, temp_env)
-
- # Try again
- log('Trying again to remove existing tree: %s' % dotnetcliPath)
- shutil.rmtree(dotnetcliPath, onerror=del_rw)
- else:
- log('Failed to remove existing tree')
- return 1
-
- if os.path.isdir(jitutilsPath):
- log('Removing existing tree: %s' % jitutilsPath)
- shutil.rmtree(jitutilsPath, onerror=del_rw)
- if os.path.isdir(asmRootPath):
- log('Removing existing tree: %s' % asmRootPath)
- shutil.rmtree(asmRootPath, onerror=del_rw)
-
- try:
- os.makedirs(dotnetcliPath)
- os.makedirs(jitutilsPath)
- os.makedirs(asmRootPath)
- except OSError:
- if not os.path.isdir(dotnetcliPath):
- log('ERROR: cannot create CLI install directory %s' % dotnetcliPath)
- return 1
- if not os.path.isdir(jitutilsPath):
- log('ERROR: cannot create jitutils install directory %s' % jitutilsPath)
- return 1
- if not os.path.isdir(asmRootPath):
- log('ERROR: cannot create asm directory %s' % asmRootPath)
- return 1
-
- log('dotnet CLI install directory: %s' % dotnetcliPath)
- log('jitutils install directory: %s' % jitutilsPath)
- log('asm directory: %s' % asmRootPath)
-
- # Download .NET CLI
-
- log('Downloading .NET CLI')
-
- dotnetcliUrl = ""
- dotnetcliFilename = ""
-
- if Clr_os == 'Linux' and arch == 'x64':
- dotnetcliUrl = "https://dotnetcli.azureedge.net/dotnet/Sdk/2.1.402/dotnet-sdk-2.1.402-linux-x64.tar.gz"
- elif Clr_os == 'Linux' and arch == 'arm':
- dotnetcliUrl = "https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.4xx/dotnet-sdk-latest-linux-arm.tar.gz"
- elif Clr_os == 'Linux' and arch == 'arm64':
- # Use the latest (3.0) dotnet SDK. Earlier versions don't work.
- dotnetcliUrl = "https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-linux-arm64.tar.gz"
- elif Clr_os == 'OSX':
- dotnetcliUrl = "https://dotnetcli.azureedge.net/dotnet/Sdk/2.1.402/dotnet-sdk-2.1.402-osx-x64.tar.gz"
- elif Clr_os == 'windows':
- dotnetcliUrl = "https://dotnetcli.azureedge.net/dotnet/Sdk/2.1.402/dotnet-sdk-2.1.402-win-x64.zip"
- else:
- log('ERROR: unknown or unsupported OS (%s) architecture (%s) combination' % (Clr_os, arch))
- return 1
-
- if Is_windows:
- dotnetcliFilename = os.path.join(dotnetcliPath, 'dotnetcli-jitutils.zip')
- else:
- dotnetcliFilename = os.path.join(dotnetcliPath, 'dotnetcli-jitutils.tar.gz')
-
- log('Downloading: %s => %s' % (dotnetcliUrl, dotnetcliFilename))
-
- if not testing:
- urlretrieve = urllib.urlretrieve if sys.version_info.major < 3 else urllib.request.urlretrieve
- urlretrieve(dotnetcliUrl, dotnetcliFilename)
-
- if not os.path.isfile(dotnetcliFilename):
- log('ERROR: Did not download .NET CLI')
- return 1
-
- # Install .NET CLI
-
- log('Unpacking .NET CLI')
-
- if not testing:
- if Is_windows:
- with zipfile.ZipFile(dotnetcliFilename, "r") as z:
- z.extractall(dotnetcliPath)
- else:
- tar = tarfile.open(dotnetcliFilename)
- tar.extractall(dotnetcliPath)
- tar.close()
-
- if not os.path.isfile(os.path.join(dotnetcliPath, dotnet_tool)):
- log('ERROR: did not extract .NET CLI from download')
- return 1
-
- # Add dotnet CLI to PATH we'll use to spawn processes.
-
- log('Add %s to my PATH' % dotnetcliPath)
- my_env["PATH"] = dotnetcliPath + os.pathsep + my_env["PATH"]
-
- # To aid diagnosing problems, do "dotnet --info" to output to any capturing logfile.
-
- command = ["dotnet", "--info"]
- returncode = run_command(command, my_env)
-
- # Clone jitutils
-
- command = 'git clone -b main --single-branch %s %s' % (Jitutils_url, jitutilsPath)
- log(command)
- returncode = 0 if testing else os.system(command)
- if returncode != 0:
- log('ERROR: cannot clone jitutils');
- return 1
-
- # We're going to start running dotnet CLI commands. Unfortunately, once you've done that,
- # the dotnet CLI sticks around with a set of build server processes running. Put all this
- # in a try/finally, and stop the build servers under any circumstance.
-
- try:
-
- #
- # Build jitutils, including "dotnet restore"
- #
-
- # Change directory to the jitutils root
-
- with ChangeDir(jitutilsPath):
-
- # Do "dotnet restore"
-
- command = ["dotnet", "restore"]
- returncode = run_command(command, my_env)
-
- # Do build
-
- command = ['build.cmd', '-p'] if Is_windows else ['bash', './build.sh', '-p']
- returncode = run_command(command, my_env)
- if returncode != 0:
- log('ERROR: jitutils build failed')
- return 1
-
- jitutilsBin = os.path.join(jitutilsPath, "bin")
-
- if not testing and not os.path.isdir(jitutilsBin):
- log("ERROR: jitutils not correctly built")
- return 1
-
- jitDiffPath = os.path.join(jitutilsBin, "jit-diff.dll")
- if not testing and not os.path.isfile(jitDiffPath):
- log("ERROR: jit-diff.dll not built")
- return 1
-
- jitAnalyzePath = os.path.join(jitutilsBin, "jit-analyze.dll")
- if not testing and not os.path.isfile(jitAnalyzePath):
- log("ERROR: jit-analyze.dll not built")
- return 1
-
- # Add jitutils bin to path for spawned processes
-
- log('Add %s to my PATH' % jitutilsBin)
- my_env["PATH"] = jitutilsBin + os.pathsep + my_env["PATH"]
-
- #
- # Run PMI asm diffs
- #
-
- # We want this script as a whole to return 0 if it succeeds (even if there are diffs) and only
- # return non-zero if there are any fatal errors.
- #
- # TO DO: figure out how to differentiate fatal errors and a return code indicating there are diffs,
- # and have the invoking netci.groovy code act differently for each case.
-
- # Generate the diffs
- #
- # Invoke command like:
- # dotnet c:\gh\jitutils\artifacts\jit-diff.dll diff --pmi --base --base_root f:\gh\coreclr12 --diff --diff_root f:\gh\coreclr10 --arch x64 --build Checked --tag 1 --noanalyze --output f:\output --corelib
- #
- # We pass --noanalyze and call jit-analyze manually. This isn't really necessary, but it does give us better output
- # due to https://github.com/dotnet/jitutils/issues/175.
-
- altjit_args = []
- if ci_arch is not None and (ci_arch == 'x86_arm_altjit' or ci_arch == 'x64_arm64_altjit'):
- altjit_args = ["--altjit", "protononjit.dll"]
-
- # Over which set of assemblies should we generate asm?
- # TODO: parameterize this
- asm_source_args = ["--frameworks", "--benchmarks"]
-
- command = ["dotnet", jitDiffPath, "diff", "--pmi", "--base", "--base_root", baseCoreClrPath, "--diff", "--diff_root", diff_root, "--arch", arch, "--build", build_type, "--tag", "1", "--noanalyze", "--output", asmRootPath] + asm_source_args + altjit_args
- returncode = run_command(command, my_env)
-
- # We ignore the return code: it is non-zero if there are any diffs. If there are fatal errors here, we will miss them.
- # Question: does jit-diff distinguish between non-zero fatal error code and the existence of diffs?
-
- # Did we get any diffs?
-
- baseOutputDir = os.path.join(asmRootPath, "1", "base")
- if not testing and not os.path.isdir(baseOutputDir):
- log("ERROR: base asm not generated")
- return 1
-
- diffOutputDir = os.path.join(asmRootPath, "1", "diff")
- if not testing and not os.path.isdir(diffOutputDir):
- log("ERROR: diff asm not generated")
- return 1
-
- # Do the jit-analyze comparison:
- # dotnet c:\gh\jitutils\artifacts\jit-analyze.dll --base f:\output\diffs\1\base --recursive --diff f:\output\diffs\1\diff
-
- command = ["dotnet", jitAnalyzePath, "--recursive", "--base", baseOutputDir, "--diff", diffOutputDir]
- returncode = run_command(command, my_env)
- if returncode != 0:
- # This is not a fatal error.
- log('Compare: %s %s' % (baseOutputDir, diffOutputDir))
-
- finally:
-
- # Shutdown the dotnet build servers before cleaning things up
- # TODO: make this shutdown happen anytime after we've run any 'dotnet' commands. I.e., try/finally style.
-
- log('Shutting down build servers')
- command = ["dotnet", "build-server", "shutdown"]
- returncode = run_command(command, my_env)
-
- return 0
-
-##########################################################################
-# Main
-##########################################################################
-
-def main(args):
-
- global arch, ci_arch, build_type, base_root, diff_root, scratch_root, skip_baseline_build, skip_diffs, target_branch, commit_hash
- global my_env
- global base_layout_root
- global diff_layout_root
- global baseCoreClrPath
- global testing
-
- arch, ci_arch, build_type, base_root, diff_root, scratch_root, skip_baseline_build, skip_diffs, target_branch, commit_hash = validate_args(args)
-
- my_env = os.environ
-
- if not testing and not os.path.isdir(diff_root):
- log('ERROR: root directory for coreclr diff tree not found: %s' % diff_root)
- return 1
-
- # Check the diff layout directory before going too far.
-
- diff_layout_root = os.path.join(diff_root,
- 'bin',
- 'tests',
- '%s.%s.%s' % (Clr_os, arch, build_type),
- 'Tests',
- 'Core_Root')
-
- if not testing and not os.path.isdir(diff_layout_root):
- log('ERROR: diff test overlay not found or is not a directory: %s' % diff_layout_root)
- return 1
-
- # Create the scratch root directory
-
- if not testing:
- try:
- os.makedirs(scratch_root)
- except OSError:
- if not os.path.isdir(scratch_root):
- log('ERROR: cannot create scratch directory %s' % scratch_root)
- return 1
-
- # Set up baseline root directory. If one is passed to us, we use it. Otherwise, we create
- # a temporary directory.
-
- if base_root is None:
- # Setup scratch directories. Names are short to avoid path length problems on Windows.
- # No need to create this directory now, as the "git clone" will do it later.
- baseCoreClrPath = os.path.abspath(os.path.join(scratch_root, 'base'))
- else:
- baseCoreClrPath = os.path.abspath(base_root)
- if not testing and not os.path.isdir(baseCoreClrPath):
- log('ERROR: base root directory not found or is not a directory: %s' % baseCoreClrPath)
- return 1
-
- # Do the baseline build, if needed
-
- if not skip_baseline_build and base_root is None:
- returncode = baseline_build()
- if returncode != 0:
- return 1
-
- # Check that the baseline root directory was created.
-
- base_layout_root = os.path.join(baseCoreClrPath,
- 'bin',
- 'tests',
- '%s.%s.%s' % (Clr_os, arch, build_type),
- 'Tests',
- 'Core_Root')
-
- if not testing and not os.path.isdir(base_layout_root):
- log('ERROR: baseline test overlay not found or is not a directory: %s' % base_layout_root)
- return 1
-
- # Do the diff run, if needed
-
- if not skip_diffs:
- returncode = do_pmi_diffs()
- if returncode != 0:
- return 1
-
- return 0
-
-
-##########################################################################
-# setup for Main
-##########################################################################
-
-if __name__ == '__main__':
- Args = parser.parse_args(sys.argv[1:])
- return_code = main(Args)
- log('Exit code: %s' % return_code)
- sys.exit(return_code)
diff --git a/src/tests/Common/scripts/x86_ci_script.sh b/src/tests/Common/scripts/x86_ci_script.sh
deleted file mode 100755
index f4e0fee25bc..00000000000
--- a/src/tests/Common/scripts/x86_ci_script.sh
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/bin/env bash
-
-#Parse command line arguments
-__buildConfig=
-for arg in "$@"
-do
- case $arg in
- --buildConfig=*)
- __buildConfig="$(echo ${arg#*=} | tr "[:upper:]" "[:lower:]")"
- if [[ "$__buildConfig" != "debug" && "$__buildConfig" != "release" && "$__buildConfig" != "checked" ]]; then
- exit_with_error "--buildConfig can be only Debug or Release" true
- fi
- ;;
- *)
- ;;
- esac
-done
-
-#Check if there are any uncommitted changes in the source directory as git adds and removes patches
-if [[ -n $(git status -s) ]]; then
- echo 'ERROR: There are some uncommitted changes. To avoid losing these changes commit them and try again.'
- echo ''
- git status
- exit 1
-fi
-
-#Change build configuration to the capitalized form to create build product paths correctly
-if [[ "$__buildConfig" == "release" ]]; then
- __buildConfig="Release"
-elif [[ "$__buildConfig" == "checked" ]]; then
- __buildConfig="Checked"
-else
- __buildConfig="Debug"
-fi
-__buildDirName="$__targetOS.$__buildArch.$__buildConfig"
-
-set -x
-set -e
-
-__dockerImage="hseok82/dotnet-buildtools-prereqs:ubuntu-16.04-crossx86-ef0ac75-20175511035548"
-
-# Begin cross build
-# We cannot build nuget package yet
-__dockerEnvironmentSet="-e ROOTFS_DIR=/crossrootfs/x86"
-__currentWorkingDir=`pwd`
-__dockerCmd="docker run -i --rm ${__dockerEnvironmentSet} -v $__currentWorkingDir:/opt/code -w /opt/code $__dockerImage"
-__buildCmd="./build.sh x86 cross skipnuget $__buildConfig"
-$__dockerCmd $__buildCmd
-
-# Begin PAL test
-__dockerImage="hseok82/dotnet-buildtools-prereqs:ubuntu1604_x86_test"
-__dockerCmd="docker run -i --rm -v $__currentWorkingDir:/opt/code -w /opt/code $__dockerImage"
-__palTestCmd="./src/pal/tests/palsuite/runpaltests.sh /opt/code/artifacts/obj/Linux.x86.${__buildConfig} /opt/code/artifacts/paltestout"
-$__dockerCmd $__palTestCmd
-
-sudo chown -R $(id -u -n) artifacts/
-
-(set +x; echo 'Build complete')
diff --git a/src/tests/Common/wasm-test-runner/WasmTestRunner.proj b/src/tests/Common/wasm-test-runner/WasmTestRunner.proj
index a692df6a293..c653f98c47b 100644
--- a/src/tests/Common/wasm-test-runner/WasmTestRunner.proj
+++ b/src/tests/Common/wasm-test-runner/WasmTestRunner.proj
@@ -1,6 +1,8 @@
-<!-- This project requires an explicit SDK version number because it is used on Helix,
- and global.json is not available. -->
-<Project Sdk="Microsoft.Build.NoTargets/3.5.0" DefaultTargets="WasmBuildApp">
+<Project DefaultTargets="WasmBuildApp">
+ <PropertyGroup>
+ <IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">$(TestBinDir)\obj\</IntermediateOutputPath>
+ </PropertyGroup>
+
<Import Project="$(CORE_ROOT)\build\WasmApp.InTree.props" />
<PropertyGroup>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
diff --git a/src/tests/Directory.Build.targets b/src/tests/Directory.Build.targets
index a0b4cf6e932..369abf945a3 100644
--- a/src/tests/Directory.Build.targets
+++ b/src/tests/Directory.Build.targets
@@ -383,6 +383,11 @@
<IncludeSubFolders>True</IncludeSubFolders>
</RunTimeArtifactsIncludeFolders>
+ <!-- Used by disasm output verification tests -->
+ <RunTimeArtifactsIncludeFolders Include="SuperFileCheck/">
+ <IncludeSubFolders>True</IncludeSubFolders>
+ </RunTimeArtifactsIncludeFolders>
+
<!-- XUnit runner harness assemblies that we don't want to mix in with the framework in Core_Root -->
<RunTimeArtifactsIncludeFolders Include="xunit/" />
</ItemGroup>
@@ -542,7 +547,7 @@
<IlcReference Include="$(TargetingPackPath)/*.dll" />
</ItemGroup>
- <Import Project="$(CoreCLRBuildIntegrationDir)Microsoft.NETCore.Native.targets" Condition="'$(TestBuildMode)' == 'nativeaot'" />
+ <Import Project="$(CoreCLRBuildIntegrationDir)Microsoft.DotNet.ILCompiler.SingleEntry.targets" Condition="'$(TestBuildMode)' == 'nativeaot'" />
<Target Name="BuildNativeAot"
DependsOnTargets="Build;LinkNativeIfBuildAndRun" />
diff --git a/src/tests/JIT/Regression/JitBlue/ImageSharp_2117/ImageSharp_2117.cs b/src/tests/JIT/Regression/JitBlue/ImageSharp_2117/ImageSharp_2117.cs
new file mode 100644
index 00000000000..415d9b00f5c
--- /dev/null
+++ b/src/tests/JIT/Regression/JitBlue/ImageSharp_2117/ImageSharp_2117.cs
@@ -0,0 +1,37 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Runtime.Intrinsics;
+using System.Runtime.Intrinsics.X86;
+
+public unsafe class ImageSharp_2117
+{
+ public static int Main(string[] args)
+ {
+ if (Sse.IsSupported)
+ {
+ Vector128<float> fnan = Vector128.Create(float.NaN);
+ Vector128<float> res1 = Sse.Max(Sse.LoadVector128((float*)(&fnan)), Vector128<float>.Zero);
+ Vector128<float> res2 = Sse.Min(Sse.LoadVector128((float*)(&fnan)), Vector128<float>.Zero);
+
+ if (float.IsNaN(res1[0]) || float.IsNaN(res2[0]))
+ {
+ return 0;
+ }
+ }
+
+ if (Sse2.IsSupported)
+ {
+ Vector128<double> dnan = Vector128.Create(double.NaN);
+ Vector128<double> res3 = Sse2.Max(Sse2.LoadVector128((double*)(&dnan)), Vector128<double>.Zero);
+ Vector128<double> res4 = Sse2.Min(Sse2.LoadVector128((double*)(&dnan)), Vector128<double>.Zero);
+
+ if (double.IsNaN(res3[0]) || double.IsNaN(res4[0]))
+ {
+ return 0;
+ }
+ }
+
+ return 100;
+ }
+}
diff --git a/src/tests/JIT/Regression/JitBlue/ImageSharp_2117/ImageSharp_2117.csproj b/src/tests/JIT/Regression/JitBlue/ImageSharp_2117/ImageSharp_2117.csproj
new file mode 100644
index 00000000000..e7284d26ab2
--- /dev/null
+++ b/src/tests/JIT/Regression/JitBlue/ImageSharp_2117/ImageSharp_2117.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <PropertyGroup>
+ <DebugType>None</DebugType>
+ <Optimize>True</Optimize>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="$(MSBuildProjectName).cs" />
+ </ItemGroup>
+</Project>
diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_33972/Runtime_33972.cs b/src/tests/JIT/Regression/JitBlue/Runtime_33972/Runtime_33972.cs
index d57bd99e680..44fb1ff1822 100644
--- a/src/tests/JIT/Regression/JitBlue/Runtime_33972/Runtime_33972.cs
+++ b/src/tests/JIT/Regression/JitBlue/Runtime_33972/Runtime_33972.cs
@@ -8,143 +8,167 @@ using System.Runtime.Intrinsics.Arm;
class Program
{
- // CompareEqual
+ // CompareEqual
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector64<byte> AdvSimd_CompareEqual_Vector64_Byte_Zero(Vector64<byte> left)
{
+ // ARM64-FULL-LINE: cmeq v0.8b, v0.8b, #0
return AdvSimd.CompareEqual(left, Vector64<byte>.Zero);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector64<sbyte> AdvSimd_CompareEqual_Vector64_SByte_Zero(Vector64<sbyte> left)
{
+ // ARM64-FULL-LINE: cmeq v0.8b, v0.8b, #0
return AdvSimd.CompareEqual(left, Vector64<sbyte>.Zero);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector64<ushort> AdvSimd_CompareEqual_Vector64_UInt16_Zero(Vector64<ushort> left)
{
+ // ARM64-FULL-LINE: cmeq v0.4h, v0.4h, #0
return AdvSimd.CompareEqual(left, Vector64<ushort>.Zero);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector64<short> AdvSimd_CompareEqual_Vector64_Int16_Zero(Vector64<short> left)
{
+ // ARM64-FULL-LINE: cmeq v0.4h, v0.4h, #0
return AdvSimd.CompareEqual(left, Vector64<short>.Zero);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector64<uint> AdvSimd_CompareEqual_Vector64_UInt32_Zero(Vector64<uint> left)
{
+ // ARM64-FULL-LINE: cmeq v0.2s, v0.2s, #0
return AdvSimd.CompareEqual(left, Vector64<uint>.Zero);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector64<int> AdvSimd_CompareEqual_Vector64_Int32_Zero(Vector64<int> left)
{
+ // ARM64-FULL-LINE: cmeq v0.2s, v0.2s, #0
return AdvSimd.CompareEqual(left, Vector64<int>.Zero);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector64<float> AdvSimd_CompareEqual_Vector64_Single_Zero(Vector64<float> left)
{
+ // ARM64-FULL-LINE: fcmeq v0.2s, v0.2s, #0.0
return AdvSimd.CompareEqual(left, Vector64<float>.Zero);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector64<int> AdvSimd_CompareEqual_Vector64_Int32_CreateZero(Vector64<int> left)
{
+ // ARM64-FULL-LINE: cmeq v0.2s, v0.2s, #0
return AdvSimd.CompareEqual(left, Vector64.Create(0));
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector64<int> AdvSimd_CompareEqual_Vector64_Int32_CreateZeroZero(Vector64<int> left)
{
+ // ARM64-FULL-LINE: cmeq v0.2s, v0.2s, #0
return AdvSimd.CompareEqual(left, Vector64.Create(0, 0));
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector64<float> AdvSimd_CompareEqual_Vector64_Single_CreateZero(Vector64<float> left)
{
+ // ARM64-FULL-LINE: fcmeq v0.2s, v0.2s, #0.0
return AdvSimd.CompareEqual(left, Vector64.Create(0f));
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector64<float> AdvSimd_CompareEqual_Vector64_Single_CreateZeroZero(Vector64<float> left)
{
+ // ARM64-FULL-LINE: fcmeq v0.2s, v0.2s, #0.0
return AdvSimd.CompareEqual(left, Vector64.Create(0f, 0f));
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector128<byte> AdvSimd_CompareEqual_Vector128_Byte_Zero(Vector128<byte> left)
{
+ // ARM64-FULL-LINE: cmeq v0.16b, v0.16b, #0
return AdvSimd.CompareEqual(left, Vector128<byte>.Zero);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector128<sbyte> AdvSimd_CompareEqual_Vector128_SByte_Zero(Vector128<sbyte> left)
{
+ // ARM64-FULL-LINE: cmeq v0.16b, v0.16b, #0
return AdvSimd.CompareEqual(left, Vector128<sbyte>.Zero);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector128<ushort> AdvSimd_CompareEqual_Vector128_UInt16_Zero(Vector128<ushort> left)
{
+ // ARM64-FULL-LINE: cmeq v0.8h, v0.8h, #0
return AdvSimd.CompareEqual(left, Vector128<ushort>.Zero);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector128<short> AdvSimd_CompareEqual_Vector128_Int16_Zero(Vector128<short> left)
{
+ // ARM64-FULL-LINE: cmeq v0.8h, v0.8h, #0
return AdvSimd.CompareEqual(left, Vector128<short>.Zero);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector128<uint> AdvSimd_CompareEqual_Vector128_UInt32_Zero(Vector128<uint> left)
{
+ // ARM64-FULL-LINE: cmeq v0.4s, v0.4s, #0
return AdvSimd.CompareEqual(left, Vector128<uint>.Zero);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector128<int> AdvSimd_CompareEqual_Vector128_Int32_Zero(Vector128<int> left)
{
+ // ARM64-FULL-LINE: cmeq v0.4s, v0.4s, #0
return AdvSimd.CompareEqual(left, Vector128<int>.Zero);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector128<float> AdvSimd_CompareEqual_Vector128_Single_Zero(Vector128<float> left)
{
+ // ARM64-FULL-LINE: fcmeq v0.4s, v0.4s, #0.0
return AdvSimd.CompareEqual(left, Vector128<float>.Zero);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector128<int> AdvSimd_CompareEqual_Vector128_Int32_CreateZero(Vector128<int> left)
{
+ // ARM64-FULL-LINE: cmeq v0.4s, v0.4s, #0
return AdvSimd.CompareEqual(left, Vector128.Create(0));
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector128<int> AdvSimd_CompareEqual_Vector128_Int32_CreateZeroZeroZeroZero(Vector128<int> left)
{
+ // ARM64-FULL-LINE: cmeq v0.4s, v0.4s, #0
return AdvSimd.CompareEqual(left, Vector128.Create(0, 0, 0, 0));
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector128<float> AdvSimd_CompareEqual_Vector128_Single_CreateZero(Vector128<float> left)
{
+ // ARM64-FULL-LINE: fcmeq v0.4s, v0.4s, #0.0
return AdvSimd.CompareEqual(left, Vector128.Create(0f));
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector128<float> AdvSimd_CompareEqual_Vector128_Single_CreateZeroZeroZeroZero(Vector128<float> left)
{
+ // ARM64-FULL-LINE: fcmeq v0.4s, v0.4s, #0.0
return AdvSimd.CompareEqual(left, Vector128.Create(0f, 0f, 0f, 0f));
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector128<float> AdvSimd_CompareEqual_Vector128_Single_CreateZeroZeroZeroZero_AsVariable(Vector128<float> left)
{
+ // 'asVar' should be propagated.
+ // ARM64-FULL-LINE: fcmeq v0.4s, v0.4s, #0.0
var asVar = Vector128.Create(0f, 0f, 0f, 0f);
return AdvSimd.CompareEqual(left, asVar);
}
@@ -154,12 +178,19 @@ class Program
{
Vector128<float> result = default;
var asVar = Vector128.Create(0f, 0f, 0f, 0f);
+ // 'asVar' should be propagated.
+ // 'AdvSimd.CompareEqual' should be hoisted out of the loops.
+ // ARM64-FULL-LINE: fcmeq {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #0.0
+ // ARM64: blt
+ // ARM64-NOT: fcmeq
for (var i = 0; i < 4; i++)
{
result = AdvSimd.CompareEqual(left, asVar);
result = AdvSimd.CompareEqual(left, asVar);
result = AdvSimd.CompareEqual(left, asVar);
result = AdvSimd.CompareEqual(left, asVar);
+ // ARM64: blt
+ // ARM64-NOT: fcmeq
for (var j = 0; j < 4; j++)
{
result = AdvSimd.CompareEqual(left, asVar);
@@ -178,9 +209,18 @@ class Program
Vector128<long> asVar = Vector128.Create((long)0);
Vector128<nint> asVar2 = Vector128.Create((nint)0);
Vector128<long> asVar3 = asVar2.AsInt64();
+ // 'asVar' should be propagated.
+ // 'asVar2' should be propagated.
+ // 'asVar3' should be propagated.
+ // 'AdvSimd.CompareEqual' should be hoisted out of the loops.
+ // ARM64-FULL-LINE: cmeq {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #0
+ // ARM64: blt
+ // ARM64-NOT: cmeq
for (var i = 0; i < 4; i++)
{
result = AdvSimd.Arm64.CompareEqual(left, asVar);
+ // ARM64: blt
+ // ARM64-NOT: cmeq
for (var j = 0; j < 4; j++)
{
result = AdvSimd.Arm64.CompareEqual(left, asVar3);
@@ -192,42 +232,49 @@ class Program
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector128<double> AdvSimd_Arm64_CompareEqual_Vector128_Double_Zero(Vector128<double> left)
{
+ // ARM64-FULL-LINE: fcmeq v0.2d, v0.2d, #0.0
return AdvSimd.Arm64.CompareEqual(left, Vector128<double>.Zero);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector128<ulong> AdvSimd_Arm64_CompareEqual_Vector128_UInt64_Zero(Vector128<ulong> left)
{
+ // ARM64-FULL-LINE: cmeq v0.2d, v0.2d, #0
return AdvSimd.Arm64.CompareEqual(left, Vector128<ulong>.Zero);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector128<long> AdvSimd_Arm64_CompareEqual_Vector128_Int64_Zero(Vector128<long> left)
{
+ // ARM64-FULL-LINE: cmeq v0.2d, v0.2d, #0
return AdvSimd.Arm64.CompareEqual(left, Vector128<long>.Zero);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector64<float> AdvSimd_Arm64_CompareEqualScalar_Vector64_Single_Zero(Vector64<float> left)
{
+ // ARM64-FULL-LINE: fcmeq s0, s0, #0.0
return AdvSimd.Arm64.CompareEqualScalar(left, Vector64<float>.Zero);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector64<double> AdvSimd_Arm64_CompareEqualScalar_Vector64_Double_Zero(Vector64<double> left)
{
+ // ARM64-FULL-LINE: fcmeq d0, d0, #0.0
return AdvSimd.Arm64.CompareEqualScalar(left, Vector64<double>.Zero);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector64<ulong> AdvSimd_Arm64_CompareEqualScalar_Vector64_UInt64_Zero(Vector64<ulong> left)
{
+ // ARM64-FULL-LINE: cmeq d0, d0, #0
return AdvSimd.Arm64.CompareEqualScalar(left, Vector64<ulong>.Zero);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector64<long> AdvSimd_Arm64_CompareEqualScalar_Vector64_Int64_Zero(Vector64<long> left)
{
+ // ARM64-FULL-LINE: cmeq d0, d0, #0
return AdvSimd.Arm64.CompareEqualScalar(left, Vector64<long>.Zero);
}
@@ -236,126 +283,147 @@ class Program
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector64<byte> AdvSimd_CompareEqual_Vector64_Byte_Zero_Swapped(Vector64<byte> right)
{
+ // ARM64-FULL-LINE: cmeq v0.8b, v0.8b, #0
return AdvSimd.CompareEqual(Vector64<byte>.Zero, right);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector64<sbyte> AdvSimd_CompareEqual_Vector64_SByte_Zero_Swapped(Vector64<sbyte> right)
{
+ // ARM64-FULL-LINE: cmeq v0.8b, v0.8b, #0
return AdvSimd.CompareEqual(Vector64<sbyte>.Zero, right);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector64<ushort> AdvSimd_CompareEqual_Vector64_UInt16_Zero_Swapped(Vector64<ushort> right)
{
+ // ARM64-FULL-LINE: cmeq v0.4h, v0.4h, #0
return AdvSimd.CompareEqual(Vector64<ushort>.Zero, right);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector64<short> AdvSimd_CompareEqual_Vector64_Int16_Zero_Swapped(Vector64<short> right)
{
+ // ARM64-FULL-LINE: cmeq v0.4h, v0.4h, #0
return AdvSimd.CompareEqual(Vector64<short>.Zero, right);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector64<uint> AdvSimd_CompareEqual_Vector64_UInt32_Zero_Swapped(Vector64<uint> right)
{
+ // ARM64-FULL-LINE: cmeq v0.2s, v0.2s, #0
return AdvSimd.CompareEqual(Vector64<uint>.Zero, right);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector64<int> AdvSimd_CompareEqual_Vector64_Int32_Zero_Swapped(Vector64<int> right)
{
+ // ARM64-FULL-LINE: cmeq v0.2s, v0.2s, #0
return AdvSimd.CompareEqual(Vector64<int>.Zero, right);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector64<float> AdvSimd_CompareEqual_Vector64_Single_Zero_Swapped(Vector64<float> right)
{
+ // ARM64-FULL-LINE: fcmeq v0.2s, v0.2s, #0.0
return AdvSimd.CompareEqual(Vector64<float>.Zero, right);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector128<byte> AdvSimd_CompareEqual_Vector128_Byte_Zero_Swapped(Vector128<byte> right)
{
+ // ARM64-FULL-LINE: cmeq v0.16b, v0.16b, #0
return AdvSimd.CompareEqual(Vector128<byte>.Zero, right);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector128<sbyte> AdvSimd_CompareEqual_Vector128_SByte_Zero_Swapped(Vector128<sbyte> right)
{
+ // ARM64-FULL-LINE: cmeq v0.16b, v0.16b, #0
return AdvSimd.CompareEqual(Vector128<sbyte>.Zero, right);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector128<ushort> AdvSimd_CompareEqual_Vector128_UInt16_Zero_Swapped(Vector128<ushort> right)
{
+ // ARM64-FULL-LINE: cmeq v0.8h, v0.8h, #0
return AdvSimd.CompareEqual(Vector128<ushort>.Zero, right);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector128<short> AdvSimd_CompareEqual_Vector128_Int16_Zero_Swapped(Vector128<short> right)
{
+ // ARM64-FULL-LINE: cmeq v0.8h, v0.8h, #0
return AdvSimd.CompareEqual(Vector128<short>.Zero, right);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector128<uint> AdvSimd_CompareEqual_Vector128_UInt32_Zero_Swapped(Vector128<uint> right)
{
+ // ARM64-FULL-LINE: cmeq v0.4s, v0.4s, #0
return AdvSimd.CompareEqual(Vector128<uint>.Zero, right);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector128<int> AdvSimd_CompareEqual_Vector128_Int32_Zero_Swapped(Vector128<int> right)
{
+ // ARM64-FULL-LINE: cmeq v0.4s, v0.4s, #0
return AdvSimd.CompareEqual(Vector128<int>.Zero, right);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector128<float> AdvSimd_CompareEqual_Vector128_Single_Zero_Swapped(Vector128<float> right)
{
+ // ARM64-FULL-LINE: fcmeq v0.4s, v0.4s, #0.0
return AdvSimd.CompareEqual(Vector128<float>.Zero, right);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector128<double> AdvSimd_Arm64_CompareEqual_Vector128_Double_Zero_Swapped(Vector128<double> right)
{
+ // ARM64-FULL-LINE: fcmeq v0.2d, v0.2d, #0.0
return AdvSimd.Arm64.CompareEqual(Vector128<double>.Zero, right);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector128<ulong> AdvSimd_Arm64_CompareEqual_Vector128_UInt64_Zero_Swapped(Vector128<ulong> right)
{
+ // ARM64-FULL-LINE: cmeq v0.2d, v0.2d, #0
return AdvSimd.Arm64.CompareEqual(Vector128<ulong>.Zero, right);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector128<long> AdvSimd_Arm64_CompareEqual_Vector128_Int64_Zero_Swapped(Vector128<long> right)
{
+ // ARM64-FULL-LINE: cmeq v0.2d, v0.2d, #0
return AdvSimd.Arm64.CompareEqual(Vector128<long>.Zero, right);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector64<float> AdvSimd_Arm64_CompareEqualScalar_Vector64_Single_Zero_Swapped(Vector64<float> right)
{
+ // ARM64-FULL-LINE: fcmeq s0, s0, #0.0
return AdvSimd.Arm64.CompareEqualScalar(Vector64<float>.Zero, right);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector64<double> AdvSimd_Arm64_CompareEqualScalar_Vector64_Double_Zero_Swapped(Vector64<double> right)
{
+ // ARM64-FULL-LINE: fcmeq d0, d0, #0.0
return AdvSimd.Arm64.CompareEqualScalar(Vector64<double>.Zero, right);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector64<ulong> AdvSimd_Arm64_CompareEqualScalar_Vector64_UInt64_Zero_Swapped(Vector64<ulong> right)
{
+ // ARM64-FULL-LINE: cmeq d0, d0, #0
return AdvSimd.Arm64.CompareEqualScalar(Vector64<ulong>.Zero, right);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector64<long> AdvSimd_Arm64_CompareEqualScalar_Vector64_Int64_Zero_Swapped(Vector64<long> right)
{
+ // ARM64-FULL-LINE: cmeq d0, d0, #0
return AdvSimd.Arm64.CompareEqualScalar(Vector64<long>.Zero, right);
}
@@ -364,48 +432,58 @@ class Program
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector64<byte> AdvSimd_CompareGreaterThan_Vector64_Byte_Zero(Vector64<byte> left)
{
+ // ARM64-FULL-LINE: movi {{v[0-9]+}}.2s, #0
+ // ARM64-FULL-LINE-NEXT: cmhi {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
return AdvSimd.CompareGreaterThan(left, Vector64<byte>.Zero);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector64<float> AdvSimd_CompareGreaterThan_Vector64_Single_Zero(Vector64<float> left)
{
+ // ARM64-FULL-LINE: fcmgt v0.2s, v0.2s, #0.0
return AdvSimd.CompareGreaterThan(left, Vector64<float>.Zero);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector128<byte> AdvSimd_CompareGreaterThan_Vector128_Byte_Zero(Vector128<byte> left)
{
+ // ARM64-FULL-LINE: movi {{v[0-9]+}}.4s, #0
+ // ARM64-FULL-LINE-NEXT: cmhi {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
return AdvSimd.CompareGreaterThan(left, Vector128<byte>.Zero);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector128<float> AdvSimd_CompareGreaterThan_Vector128_Single_Zero(Vector128<float> left)
{
+ // ARM64-FULL-LINE: fcmgt v0.4s, v0.4s, #0.0
return AdvSimd.CompareGreaterThan(left, Vector128<float>.Zero);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector128<double> AdvSimd_Arm64_CompareGreaterThan_Vector128_Double_Zero(Vector128<double> left)
{
+ // ARM64-FULL-LINE: fcmgt v0.2d, v0.2d, #0.0
return AdvSimd.Arm64.CompareGreaterThan(left, Vector128<double>.Zero);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector128<long> AdvSimd_Arm64_CompareGreaterThan_Vector128_Int64_Zero(Vector128<long> left)
{
+ // ARM64-FULL-LINE: cmgt v0.2d, v0.2d, #0
return AdvSimd.Arm64.CompareGreaterThan(left, Vector128<long>.Zero);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector64<double> AdvSimd_Arm64_CompareGreaterThanScalar_Vector64_Double_Zero(Vector64<double> left)
{
+ // ARM64-FULL-LINE: fcmgt d0, d0, #0.0
return AdvSimd.Arm64.CompareGreaterThanScalar(left, Vector64<double>.Zero);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector64<long> AdvSimd_Arm64_CompareGreaterThanScalar_Vector64_Int64_Zero(Vector64<long> left)
{
+ // ARM64-FULL-LINE: cmgt d0, d0, #0
return AdvSimd.Arm64.CompareGreaterThanScalar(left, Vector64<long>.Zero);
}
@@ -414,48 +492,58 @@ class Program
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector64<byte> AdvSimd_CompareGreaterThanOrEqual_Vector64_Byte_Zero(Vector64<byte> left)
{
+ // ARM64-FULL-LINE: movi {{v[0-9]+}}.2s, #0
+ // ARM64-FULL-LINE-NEXT: cmhs {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
return AdvSimd.CompareGreaterThanOrEqual(left, Vector64<byte>.Zero);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector64<float> AdvSimd_CompareGreaterThanOrEqual_Vector64_Single_Zero(Vector64<float> left)
{
+ // ARM64-FULL-LINE: fcmge v0.2s, v0.2s, #0.0
return AdvSimd.CompareGreaterThanOrEqual(left, Vector64<float>.Zero);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector128<byte> AdvSimd_CompareGreaterThanOrEqual_Vector128_Byte_Zero(Vector128<byte> left)
{
+ // ARM64-FULL-LINE: movi {{v[0-9]+}}.4s, #0
+ // ARM64-FULL-LINE-NEXT: cmhs {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
return AdvSimd.CompareGreaterThanOrEqual(left, Vector128<byte>.Zero);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector128<float> AdvSimd_CompareGreaterThanOrEqual_Vector128_Single_Zero(Vector128<float> left)
{
+ // ARM64-FULL-LINE: fcmge v0.4s, v0.4s, #0.0
return AdvSimd.CompareGreaterThanOrEqual(left, Vector128<float>.Zero);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector128<double> AdvSimd_Arm64_CompareGreaterThanOrEqual_Vector128_Double_Zero(Vector128<double> left)
{
+ // ARM64-FULL-LINE: fcmge v0.2d, v0.2d, #0.0
return AdvSimd.Arm64.CompareGreaterThanOrEqual(left, Vector128<double>.Zero);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector128<long> AdvSimd_Arm64_CompareGreaterThanOrEqual_Vector128_Int64_Zero(Vector128<long> left)
{
+ // ARM64-FULL-LINE: cmge v0.2d, v0.2d, #0
return AdvSimd.Arm64.CompareGreaterThanOrEqual(left, Vector128<long>.Zero);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector64<double> AdvSimd_Arm64_CompareGreaterThanOrEqualScalar_Vector64_Double_Zero(Vector64<double> left)
{
+ // ARM64-FULL-LINE: fcmge d0, d0, #0.0
return AdvSimd.Arm64.CompareGreaterThanOrEqualScalar(left, Vector64<double>.Zero);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static Vector64<long> AdvSimd_Arm64_CompareGreaterThanOrEqualScalar_Vector64_Int64_Zero(Vector64<long> left)
{
+ // ARM64-FULL-LINE: cmge d0, d0, #0
return AdvSimd.Arm64.CompareGreaterThanOrEqualScalar(left, Vector64<long>.Zero);
}
diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_33972/Runtime_33972.csproj b/src/tests/JIT/Regression/JitBlue/Runtime_33972/Runtime_33972.csproj
index bf6f589eb32..385de3fef04 100644
--- a/src/tests/JIT/Regression/JitBlue/Runtime_33972/Runtime_33972.csproj
+++ b/src/tests/JIT/Regression/JitBlue/Runtime_33972/Runtime_33972.csproj
@@ -6,8 +6,22 @@
<DebugType>None</DebugType>
<Optimize>True</Optimize>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ <CLRTestBatchPreCommands><![CDATA[
+$(CLRTestBatchPreCommands)
+set COMPlus_TieredCompilation=0
+set COMPlus_JITMinOpts=0
+set COMPlus_EnableHWIntrinsic=1
+]]></CLRTestBatchPreCommands>
+ <BashCLRTestPreCommands><![CDATA[
+$(BashCLRTestPreCommands)
+export COMPlus_TieredCompilation=0
+export COMPlus_JITMinOpts=0
+export COMPlus_EnableHWIntrinsic=1
+]]></BashCLRTestPreCommands>
</PropertyGroup>
<ItemGroup>
- <Compile Include="$(MSBuildProjectName).cs" />
+ <Compile Include="$(MSBuildProjectName).cs">
+ <HasDisasmCheck>true</HasDisasmCheck>
+ </Compile>
</ItemGroup>
</Project>
diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_34937/Runtime_34937.cs b/src/tests/JIT/Regression/JitBlue/Runtime_34937/Runtime_34937.cs
index 9d61a2f13f1..01ff8aafc7f 100644
--- a/src/tests/JIT/Regression/JitBlue/Runtime_34937/Runtime_34937.cs
+++ b/src/tests/JIT/Regression/JitBlue/Runtime_34937/Runtime_34937.cs
@@ -9,12 +9,35 @@ class Program
[MethodImpl(MethodImplOptions.NoInlining)]
static uint PerformMod_1(uint i)
{
+ // X64-FULL-LINE: mov [[REG0:[a-z]+]], [[REG1:[a-z0-9]+]]
+ // X64-FULL-LINE-NEXT: and [[REG0]], 7
+
+ // ARM64-FULL-LINE: and w0, w0, #7
+
return i % 8;
}
[MethodImpl(MethodImplOptions.NoInlining)]
static int PerformMod_2(int i)
{
+ // X64-FULL-LINE: mov [[REG0:[a-z]+]], [[REG1:[a-z]+]]
+ // X64-FULL-LINE-NEXT: sar [[REG0]], 31
+ // X64-FULL-LINE-NEXT: and [[REG0]], 15
+ // X64-FULL-LINE-NEXT: add [[REG0]], [[REG1]]
+ // X64-FULL-LINE-NEXT: and [[REG0]], -16
+ // X64-WINDOWS-FULL-LINE-NEXT: mov [[REG2:[a-z]+]], [[REG1]]
+ // X64-WINDOWS-FULL-LINE-NEXT: sub [[REG2]], [[REG0]]
+ // X64-WINDOWS-FULL-LINE-NEXT: mov [[REG0]], [[REG2]]
+ // X64-LINUX-FULL-LINE-NEXT: sub [[REG1]], [[REG0]]
+ // X64-LINUX-FULL-LINE-NEXT: mov [[REG0]], [[REG1]]
+ // X64-OSX-FULL-LINE-NEXT: sub [[REG1]], [[REG0]]
+ // X64-OSX-FULL-LINE-NEXT: mov [[REG0]], [[REG1]]
+
+ // ARM64-FULL-LINE: and w1, w0, #15
+ // ARM64-FULL-LINE-NEXT: negs w0, w0
+ // ARM64-FULL-LINE-NEXT: and w0, w0, #15
+ // ARM64-FULL-LINE-NEXT: csneg w0, w1, w0, mi
+
return i % 16;
}
@@ -27,6 +50,12 @@ class Program
[MethodImpl(MethodImplOptions.NoInlining)]
static int MSUB(int a, int b, int c)
{
+ // X64-FULL-LINE: imul [[REG0:[a-z]+]], [[REG1:[a-z0-9]+]]
+ // X64-FULL-LINE-NEXT: mov [[REG2:[a-z]+]], [[REG3:[a-z]+]]
+ // X64-FULL-LINE-NEXT: sub [[REG2]], [[REG0]]
+
+ // ARM64-FULL-LINE: msub w0, w1, w2, w0
+
return a - b * c;
}
diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_34937/Runtime_34937.csproj b/src/tests/JIT/Regression/JitBlue/Runtime_34937/Runtime_34937.csproj
index 17923c1464d..a2c782813fb 100644
--- a/src/tests/JIT/Regression/JitBlue/Runtime_34937/Runtime_34937.csproj
+++ b/src/tests/JIT/Regression/JitBlue/Runtime_34937/Runtime_34937.csproj
@@ -6,9 +6,21 @@
<DebugType />
<Optimize>True</Optimize>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ <CLRTestBatchPreCommands><![CDATA[
+$(CLRTestBatchPreCommands)
+set COMPlus_TieredCompilation=0
+set COMPlus_JITMinOpts=0
+]]></CLRTestBatchPreCommands>
+ <BashCLRTestPreCommands><![CDATA[
+$(BashCLRTestPreCommands)
+export COMPlus_TieredCompilation=0
+export COMPlus_JITMinOpts=0
+]]></BashCLRTestPreCommands>
</PropertyGroup>
<ItemGroup>
- <Compile Include="$(MSBuildProjectName).cs" />
+ <Compile Include="$(MSBuildProjectName).cs">
+ <HasDisasmCheck>true</HasDisasmCheck>
+ </Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(TestSourceDir)Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_72767/Runtime_72767.cs b/src/tests/JIT/Regression/JitBlue/Runtime_72767/Runtime_72767.cs
new file mode 100644
index 00000000000..d2999d0afc8
--- /dev/null
+++ b/src/tests/JIT/Regression/JitBlue/Runtime_72767/Runtime_72767.cs
@@ -0,0 +1,88 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+// Generated by Fuzzlyn v1.5 on 2022-07-24 16:52:25
+// Run on X86 Windows
+// Seed: 11775672037815743472
+// Reduced from 302.0 KiB to 1.4 KiB in 00:06:35
+// Hits JIT assert in Release:
+// Assertion failed 'vnWx != NoVN' in 'Program:M71()' during 'Redundant branch opts' (IL size 136; hash 0x996ec7e1; FullOpts)
+//
+// File: D:\a\_work\1\s\src\coreclr\jit\valuenum.cpp Line: 1306
+//
+public struct S0
+{
+ public short F0;
+ public sbyte F1;
+ public S0(short f0, sbyte f1): this()
+ {
+ F0 = f0;
+ F1 = f1;
+ }
+}
+
+public struct S1
+{
+ public ushort F0;
+ public uint F2;
+ public S0 F3;
+ public S0 F4;
+ public int F5;
+ public S1(ushort f0, uint f2, S0 f3, S0 f4, int f5): this()
+ {
+ F0 = f0;
+ F2 = f2;
+ F4 = f4;
+ F5 = f5;
+ }
+}
+
+public class Runtime_72767
+{
+ public static bool[] s_7;
+ public static sbyte s_26;
+ public static S0[] s_44;
+ public static int Main()
+ {
+ s_7 = new bool[1];
+ return M71();
+ }
+
+ public static int M71()
+ {
+ var vr5 = (0 != s_26) || s_7[0];
+ S1 vr20 = default(S1);
+ for (int var15 = 0; var15 < 1; var15++)
+ {
+ return 100;
+ }
+
+ var vr7 = new S0(0, 0);
+ if (!M81(true))
+ {
+ for (int var16 = 0; var16 < 0; var16++)
+ {
+ try
+ {
+ System.Console.WriteLine(vr20.F3.F0);
+ }
+ finally
+ {
+ var vr2 = new S1(0, 0, new S0(0, 0), new S0(0, 0), 0);
+ }
+ }
+ }
+
+ if (s_7[0])
+ {
+ s_44 = null;
+ }
+
+ return -1;
+ }
+
+ public static bool M81(bool arg0)
+ {
+ return arg0;
+ }
+}
diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_72767/Runtime_72767.csproj b/src/tests/JIT/Regression/JitBlue/Runtime_72767/Runtime_72767.csproj
new file mode 100644
index 00000000000..f492aeac9d0
--- /dev/null
+++ b/src/tests/JIT/Regression/JitBlue/Runtime_72767/Runtime_72767.csproj
@@ -0,0 +1,9 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <Optimize>True</Optimize>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="$(MSBuildProjectName).cs" />
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_73681/Runtime_73681.cs b/src/tests/JIT/Regression/JitBlue/Runtime_73681/Runtime_73681.cs
new file mode 100644
index 00000000000..d8321f9e249
--- /dev/null
+++ b/src/tests/JIT/Regression/JitBlue/Runtime_73681/Runtime_73681.cs
@@ -0,0 +1,32 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System;
+using System.Runtime.CompilerServices;
+
+public class Program
+{
+ public static int Main()
+ {
+ Console.WriteLine(CallFoo(new C()));
+ return 100;
+ }
+
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ private static int CallFoo<T>(T val) where T : IFace
+ {
+ // This is testing that a constrained.callvirt through a T variable doesn't use a helper lookup.
+ // CHECK-NOT: CORINFO_HELP
+ return val.Foo();
+ }
+}
+
+public interface IFace
+{
+ int Foo();
+}
+
+public class C : IFace
+{
+ public int Foo() => 0;
+}
diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_73681/Runtime_73681.csproj b/src/tests/JIT/Regression/JitBlue/Runtime_73681/Runtime_73681.csproj
new file mode 100644
index 00000000000..79b88249c47
--- /dev/null
+++ b/src/tests/JIT/Regression/JitBlue/Runtime_73681/Runtime_73681.csproj
@@ -0,0 +1,11 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <Optimize>True</Optimize>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="$(MSBuildProjectName).cs">
+ <HasDisasmCheck>true</HasDisasmCheck>
+ </Compile>
+ </ItemGroup>
+</Project>
diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_75828/Runtime_75828.cs b/src/tests/JIT/Regression/JitBlue/Runtime_75828/Runtime_75828.cs
new file mode 100644
index 00000000000..714359398eb
--- /dev/null
+++ b/src/tests/JIT/Regression/JitBlue/Runtime_75828/Runtime_75828.cs
@@ -0,0 +1,30 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System;
+using System.Runtime.InteropServices;
+
+// Verify that the Jit_Patchpoint helper inserted for OSR preserves last error
+
+class Runtime_75828
+{
+ public static int Main()
+ {
+ Marshal.SetLastSystemError(42);
+
+ int expected = 5_000_000 + 42;
+
+ int result = 0;
+ for (int i = 0; i < 10_000_000; i++)
+ {
+ result += i % 2;
+ }
+
+ result += Marshal.GetLastSystemError();
+
+ Console.WriteLine($"got {result} expected {expected}");
+
+ return result == expected ? 100 : -1;
+ }
+}
+
diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_75828/Runtime_75828.csproj b/src/tests/JIT/Regression/JitBlue/Runtime_75828/Runtime_75828.csproj
new file mode 100644
index 00000000000..f492aeac9d0
--- /dev/null
+++ b/src/tests/JIT/Regression/JitBlue/Runtime_75828/Runtime_75828.csproj
@@ -0,0 +1,9 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <Optimize>True</Optimize>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="$(MSBuildProjectName).cs" />
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_76051/Runtime_76051.cs b/src/tests/JIT/Regression/JitBlue/Runtime_76051/Runtime_76051.cs
new file mode 100644
index 00000000000..c95666b0f83
--- /dev/null
+++ b/src/tests/JIT/Regression/JitBlue/Runtime_76051/Runtime_76051.cs
@@ -0,0 +1,19 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Runtime.CompilerServices;
+
+public class Runtime_76051
+{
+ public static int Main(string[] args)
+ {
+ GetIndex(1);
+ return 100;
+ }
+
+ // This tests an assertion failure (debug)/segfault (release) in
+ // fgMorphModToSubMulDiv due to the use of gtClone that fails for the
+ // complex tree seen for the address-of expression.
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static unsafe int GetIndex(uint cellCount) => (int)((ulong)&cellCount % cellCount);
+}
diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_76051/Runtime_76051.csproj b/src/tests/JIT/Regression/JitBlue/Runtime_76051/Runtime_76051.csproj
new file mode 100644
index 00000000000..0f9eec3d705
--- /dev/null
+++ b/src/tests/JIT/Regression/JitBlue/Runtime_76051/Runtime_76051.csproj
@@ -0,0 +1,10 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <Optimize>True</Optimize>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="$(MSBuildProjectName).cs" />
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_76096/Runtime_76096.cs b/src/tests/JIT/Regression/JitBlue/Runtime_76096/Runtime_76096.cs
new file mode 100644
index 00000000000..605cbb59494
--- /dev/null
+++ b/src/tests/JIT/Regression/JitBlue/Runtime_76096/Runtime_76096.cs
@@ -0,0 +1,63 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Runtime.CompilerServices;
+using System.Diagnostics.CodeAnalysis;
+
+unsafe class Runtime_76096
+{
+ public static int Main(string[] args)
+ {
+ int result = 100;
+ if (ProblemWithMemoryNumbering())
+ {
+ result++;
+ }
+ if (ProblemWithRefArithmetic())
+ {
+ result++;
+ }
+
+ return result;
+ }
+
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ private static bool ProblemWithMemoryNumbering(byte zero = 0)
+ {
+ TwoFieldStruct a = new TwoFieldStruct { FieldOne = { Value = 1 }, FieldTwo = 2 };
+
+ ref int fieldOneRef = ref a.FieldOne.Addr();
+ var fieldOne = fieldOneRef;
+
+ Unsafe.InitBlock(&a, zero, (uint)sizeof(TwoFieldStruct));
+
+ return fieldOne + fieldOneRef != 1;
+ }
+
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ private static bool ProblemWithRefArithmetic()
+ {
+ TwoFieldStruct a = new TwoFieldStruct { FieldOne = { Value = 1 }, FieldTwo = 2 };
+
+ ref int fieldOneRef = ref a.FieldOne.Addr();
+ ref int fieldTwoRef = ref Unsafe.Add(ref fieldOneRef, 1);
+ a.FieldTwo = 0;
+
+ return fieldTwoRef != 0;
+ }
+}
+
+struct OneFieldStruct
+{
+ public int Value;
+
+ [UnscopedRef]
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ public ref int Addr() => ref Value;
+}
+
+struct TwoFieldStruct
+{
+ public OneFieldStruct FieldOne;
+ public int FieldTwo;
+}
diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_76096/Runtime_76096.csproj b/src/tests/JIT/Regression/JitBlue/Runtime_76096/Runtime_76096.csproj
new file mode 100644
index 00000000000..0f9eec3d705
--- /dev/null
+++ b/src/tests/JIT/Regression/JitBlue/Runtime_76096/Runtime_76096.csproj
@@ -0,0 +1,10 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <Optimize>True</Optimize>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="$(MSBuildProjectName).cs" />
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_76273/Runtime_76273.cs b/src/tests/JIT/Regression/JitBlue/Runtime_76273/Runtime_76273.cs
new file mode 100644
index 00000000000..fcb5e7bcb4e
--- /dev/null
+++ b/src/tests/JIT/Regression/JitBlue/Runtime_76273/Runtime_76273.cs
@@ -0,0 +1,73 @@
+// Generated by Fuzzlyn v1.5 on 2022-09-28 20:12:22
+// Run on Arm64 Windows
+// Seed: 2515290859567534747
+// Reduced from 46.0 KiB to 1.5 KiB in 00:02:39
+// Hits JIT assert in Release:
+// Assertion failed '!op1->isUsedFromMemory()' in 'Program:M11(C0,short)' during 'Generate code' (IL size 87; hash 0xb0dcda0a; FullOpts)
+//
+// File: D:\a\_work\1\s\src\coreclr\jit\codegenarm64.cpp Line: 4543
+//
+
+public class C0
+{
+ public int F0;
+ public bool F1;
+}
+
+public class Program
+{
+ public static IRuntime s_rt = new Runtime();
+ public static ulong s_3;
+
+ public static int Main()
+ {
+ CollectibleALC alc = new CollectibleALC();
+
+ System.Reflection.Assembly asm = alc.LoadFromAssemblyPath(System.Reflection.Assembly.GetExecutingAssembly().Location);
+ System.Reflection.MethodInfo mi = asm.GetType(typeof(Program).FullName).GetMethod(nameof(MainInner));
+ System.Type runtimeTy = asm.GetType(typeof(Runtime).FullName);
+
+ mi.Invoke(null, new object[]{System.Activator.CreateInstance(runtimeTy)});
+
+ return 100;
+ }
+
+ public static void MainInner(IRuntime rt)
+ {
+ var vr2 = new C0();
+ M11(vr2, 1);
+ }
+
+ public static void M11(C0 argThis, short arg0)
+ {
+ short var0 = default(short);
+
+ for (int var1 = 0; var1 < 2; var1++)
+ {
+ short var2 = var0++;
+
+ argThis.F1 = (byte)(argThis.F0 ^ arg0) > (ushort)(s_3 % 1);
+ s_rt.WriteLine("c_68", var2);
+
+ int var3 = argThis.F0;
+ s_rt.WriteLine("c_72", var3);
+ }
+ }
+}
+
+public interface IRuntime
+{
+ void WriteLine<T>(string site, T value);
+}
+
+public class Runtime : IRuntime
+{
+ public void WriteLine<T>(string site, T value) => System.Console.WriteLine(value);
+}
+
+public class CollectibleALC : System.Runtime.Loader.AssemblyLoadContext
+{
+ public CollectibleALC(): base(true)
+ {
+ }
+}
diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_76273/Runtime_76273.csproj b/src/tests/JIT/Regression/JitBlue/Runtime_76273/Runtime_76273.csproj
new file mode 100644
index 00000000000..f492aeac9d0
--- /dev/null
+++ b/src/tests/JIT/Regression/JitBlue/Runtime_76273/Runtime_76273.csproj
@@ -0,0 +1,9 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <Optimize>True</Optimize>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="$(MSBuildProjectName).cs" />
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/src/tests/JIT/opt/RedundantBranch/RedundantBranchUnsigned.cs b/src/tests/JIT/opt/RedundantBranch/RedundantBranchUnsigned.cs
new file mode 100644
index 00000000000..788d487af22
--- /dev/null
+++ b/src/tests/JIT/opt/RedundantBranch/RedundantBranchUnsigned.cs
@@ -0,0 +1,42 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System;
+using System.Runtime.CompilerServices;
+
+// Runtime 65327
+// M1 and M2 should generate the same code
+
+public class RedundantBranchUnsigned
+{
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ public ReadOnlySpan<char> M1(ReadOnlySpan<char> span, int i)
+ {
+ // Note `<` here instead of `<=`
+ //
+ if ((uint)i < (uint)span.Length)
+ {
+ return span.Slice(i);
+ }
+ return default;
+ }
+
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ public ReadOnlySpan<char> M2(ReadOnlySpan<char> span, int i)
+ {
+ if ((uint)i <= (uint)span.Length)
+ {
+ return span.Slice(i);
+ }
+ return default;
+ }
+
+ public static int Main()
+ {
+ var rbu = new RedundantBranchUnsigned();
+ var m1 = rbu.M1("hello", 2);
+ var m2 = rbu.M2("hello", 3);
+
+ return m1.Length + m2.Length + 95;
+ }
+}
diff --git a/src/tests/JIT/opt/RedundantBranch/RedundantBranchUnsigned.csproj b/src/tests/JIT/opt/RedundantBranch/RedundantBranchUnsigned.csproj
new file mode 100644
index 00000000000..19781e26c20
--- /dev/null
+++ b/src/tests/JIT/opt/RedundantBranch/RedundantBranchUnsigned.csproj
@@ -0,0 +1,10 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <DebugType />
+ <Optimize>True</Optimize>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="$(MSBuildProjectName).cs" />
+ </ItemGroup>
+</Project>
diff --git a/src/tests/JIT/superpmi/superpmicollect.cs b/src/tests/JIT/superpmi/superpmicollect.cs
index c588d69cd30..2377a3eedb7 100644
--- a/src/tests/JIT/superpmi/superpmicollect.cs
+++ b/src/tests/JIT/superpmi/superpmicollect.cs
@@ -161,6 +161,11 @@ namespace SuperPMICollection
private static int RunProgram(string program, string arguments)
{
+ if (!File.Exists(program))
+ {
+ throw new SpmiException("program " + program + " not found");
+ }
+
// If the program is a script, move the program name into the arguments, and run it
// under the appropriate shell.
if (Global.IsWindows)
@@ -238,7 +243,11 @@ namespace SuperPMICollection
try
{
- RunProgram(testName, "");
+ int retval = RunProgram(testName, "");
+ if (retval != 0)
+ {
+ throw new SpmiException("Test " + testName + " failed");
+ }
}
finally
{
@@ -269,22 +278,9 @@ namespace SuperPMICollection
// Run all the programs from the CoreCLR test binary drop we wish to run while collecting MC files.
private static void RunTestProgramsWhileCollecting()
{
-
- // Run the tests
foreach (string spmiTestPath in GetSpmiTestFullPaths())
{
- try
- {
- RunTest(spmiTestPath);
- }
- catch (SpmiException ex)
- {
- // Ignore failures running the test. We don't really care if they pass or not
- // as long as they generate some .MC files. Plus, I'm not sure how confident
- // we can be in getting a correct error code.
-
- Console.Error.WriteLine("WARNING: test failed (ignoring): " + ex.Message);
- }
+ RunTest(spmiTestPath);
}
}
@@ -603,7 +599,7 @@ namespace SuperPMICollection
Console.WriteLine("If -mch is not given, all generated files are deleted, and the result is simply the exit code");
Console.WriteLine("indicating whether the collection succeeded. This is useful as a test.");
Console.WriteLine("");
- Console.WriteLine("If the COMPlus_JitName variable is already set, it is assumed SuperPMI collection is already happening,");
+ Console.WriteLine("If the COMPlus_JitName or COMPlus_JitPath variable is already set, it is assumed SuperPMI collection is already happening,");
Console.WriteLine("and the program exits with success.");
Console.WriteLine("");
Console.WriteLine("On success, the return code is 100.");
@@ -700,15 +696,19 @@ namespace SuperPMICollection
// Done with argument parsing.
- string jitnamevar = System.Environment.GetEnvironmentVariable("COMPlus_JitName");
- if (!String.IsNullOrEmpty(jitnamevar))
- {
- // Someone already has the COMPlus_JitName variable set. We don't want to override
- // that. Perhaps someone is already doing a SuperPMI collection and invokes this
- // program as part of a full test path in which this program exists.
+ // If someone already has one of the COMPlus_JitName/DOTNET_JitName/COMPlus_JitPath/DOTNET_JitPath variables set,
+ // We don't want to override that. Perhaps someone is already doing a SuperPMI collection and invokes this
+ // program as part of a full test path in which this program exists.
- Console.WriteLine("COMPlus_JitName already exists: skipping SuperPMI collection and returning success");
- return 100;
+ string[] checkVars = { "COMPlus_JitName", "DOTNET_JitName", "COMPlus_JitPath", "DOTNET_JitPath" };
+ foreach (string varName in checkVars)
+ {
+ string envVar = System.Environment.GetEnvironmentVariable(varName);
+ if (!String.IsNullOrEmpty(envVar))
+ {
+ Console.WriteLine($"{varName} already exists (set to {envVar}): skipping SuperPMI collection and returning success");
+ return 100;
+ }
}
int result;
diff --git a/src/tests/JIT/superpmi/superpmicollect.csproj b/src/tests/JIT/superpmi/superpmicollect.csproj
index 86ddca45522..ed252f5785a 100644
--- a/src/tests/JIT/superpmi/superpmicollect.csproj
+++ b/src/tests/JIT/superpmi/superpmicollect.csproj
@@ -24,7 +24,14 @@
<ItemGroup>
<_SpmiTestProjects Include="..\Performance\CodeQuality\Bytemark\Bytemark.csproj" />
+ <_SpmiTestProjects Include="..\Performance\CodeQuality\Roslyn\CscBench.csproj" />
+ <!-- The reference to 10w5d_cs_do.csproj is commented out due to https://github.com/dotnet/runtime/issues/76421:
+ merged tests (those built with BuildAsStandalone=false) don't get .cmd/.sh files, which are needed to
+ run the test by the superpmicollect driver.
+ -->
+ <!--
<_SpmiTestProjects Include="..\Methodical\fp\exgen\10w5d_cs_do.csproj" />
+ -->
<ProjectReference Include="@(_SpmiTestProjects)">
<Targets>Build</Targets>
<OutputItemType>_SpmiTest</OutputItemType>
diff --git a/src/tests/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/OverrideReabstracted.cs b/src/tests/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/OverrideReabstracted.cs
new file mode 100644
index 00000000000..f0f461777e7
--- /dev/null
+++ b/src/tests/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/OverrideReabstracted.cs
@@ -0,0 +1,52 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System;
+
+
+namespace ReproMAUI6811;
+
+public static class Program
+{
+ public static int Main()
+ {
+ Leaf l = new Leaf();
+
+ if (l.getI().ToString() != "Leaf")
+ return 1;
+ if (((Intermediate)l).getI().ToString() != "Leaf")
+ return 2;
+ if (((PseudoBase)l).getI().ToString() != "Leaf")
+ return 3;
+ if (((Base)l).getI().ToString() != "Leaf")
+ return 4;
+ return 100;
+ }
+}
+
+public abstract class Base {
+ public abstract I getI();
+}
+
+public class PseudoBase : Base {
+ public override I getI() => new C ("PseudoBase");
+}
+
+public abstract class Intermediate : PseudoBase {
+ public override abstract I getI();
+}
+
+public class Leaf : Intermediate {
+ public Leaf() {}
+ public override C getI() { return new C ("Leaf"); }
+}
+
+public interface I {}
+
+public class C : I {
+ private readonly string _repr;
+ public C(string s) { _repr = s; }
+ public override string ToString() => _repr;
+}
+
+
diff --git a/src/tests/baseservices/critical_finalization/critical_finalization.csproj b/src/tests/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/OverrideReabstracted.csproj
index 2176ee6765e..570644f1dbc 100644
--- a/src/tests/baseservices/critical_finalization/critical_finalization.csproj
+++ b/src/tests/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/OverrideReabstracted.csproj
@@ -1,9 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
- <CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
<ItemGroup>
- <Compile Include="critical_finalization.cs" />
+ <Compile Include="$(MSBuildProjectName).cs" />
</ItemGroup>
</Project>
diff --git a/src/tests/Regressions/coreclr/GitHub_49826/test49826.csproj b/src/tests/Regressions/coreclr/GitHub_49826/test49826.csproj
index b4093c31ad6..55d1e87b634 100644
--- a/src/tests/Regressions/coreclr/GitHub_49826/test49826.csproj
+++ b/src/tests/Regressions/coreclr/GitHub_49826/test49826.csproj
@@ -3,7 +3,6 @@
<OutputType>Exe</OutputType>
<CLRTestPriority>1</CLRTestPriority>
<Nullable>enable</Nullable>
- <LangVersion>9.0</LangVersion>
<!-- ilasm round-trip testing test failure: https://github.com/dotnet/runtime/issues/49985 -->
<IlasmRoundTripIncompatible>true</IlasmRoundTripIncompatible>
diff --git a/src/tests/Regressions/coreclr/GitHub_49982/test49982.csproj b/src/tests/Regressions/coreclr/GitHub_49982/test49982.csproj
index 4ec25161d26..0264633246c 100644
--- a/src/tests/Regressions/coreclr/GitHub_49982/test49982.csproj
+++ b/src/tests/Regressions/coreclr/GitHub_49982/test49982.csproj
@@ -3,7 +3,6 @@
<OutputType>Exe</OutputType>
<CLRTestPriority>1</CLRTestPriority>
<Nullable>enable</Nullable>
- <LangVersion>9.0</LangVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<!-- This is an explicit crossgen test -->
diff --git a/src/tests/baseservices/critical_finalization/critical_finalization.cs b/src/tests/baseservices/critical_finalization/critical_finalization.cs
deleted file mode 100644
index 49c2de2b37f..00000000000
--- a/src/tests/baseservices/critical_finalization/critical_finalization.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-using System;
-using System.Runtime.ConstrainedExecution;
-
-class P {
-
- static public int count = 0;
-
- ~P () {
- count++;
- }
-}
-
-class Q : CriticalFinalizerObject {
- static public int count = 0;
- static public int first_p_count = -1;
- static public int last_p_count = 0;
- ~Q () {
- count++;
- if (first_p_count < 0)
- first_p_count = P.count;
- last_p_count = P.count;
- }
-}
-
-class T : P {
-
- static void makeP () {
- P p = new P ();
- Q q = new Q ();
- p = null;
- q = null;
- }
-
- static void callMakeP () {
- makeP ();
- }
-
- static int Main () {
- for (int i = 0; i < 100; ++i)
- callMakeP ();
- GC.Collect ();
- GC.WaitForPendingFinalizers ();
- Console.WriteLine (P.count);
- Console.WriteLine (Q.count);
- Console.WriteLine (Q.first_p_count);
- Console.WriteLine (Q.last_p_count);
- if (P.count == 0)
- return 1;
- if (Q.first_p_count < P.count)
- return 1;
- return 0;
- }
-}
diff --git a/src/tests/baseservices/finalization/CriticalFinalizer.cs b/src/tests/baseservices/finalization/CriticalFinalizer.cs
new file mode 100644
index 00000000000..9ea7d56d881
--- /dev/null
+++ b/src/tests/baseservices/finalization/CriticalFinalizer.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+// Tests the weak ordering among normal and critical finalizers: for objects reclaimed by garbage collection
+// at the same time, all the noncritical finalizers must be called before any of the critical finalizers.
+
+using System;
+using System.Collections.Generic;
+using System.Runtime.CompilerServices;
+using System.Runtime.ConstrainedExecution;
+using System.Threading.Tasks;
+
+class Normal
+{
+ public static int Finalized;
+
+ ~Normal() => Finalized++;
+}
+
+class Critical : CriticalFinalizerObject
+{
+ public static int Finalized;
+ public static int NormalFinalizedBeforeFirstCritical;
+
+ ~Critical()
+ {
+ if (++Finalized == 1)
+ NormalFinalizedBeforeFirstCritical = Normal.Finalized;
+ }
+}
+
+static class CriticalFinalizerTest
+{
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static void AllocateObjects(int count)
+ {
+ var arr = new object[checked(count * 2)];
+
+ Parallel.For(0, count, i =>
+ {
+ arr[i * 2] = new Normal();
+ arr[i * 2 + 1] = new Critical();
+ });
+
+ GC.KeepAlive(arr);
+ }
+
+ static int Main()
+ {
+ const int Count = 100;
+
+ // Allocate a bunch of Normal and Critical objects, then unroot them
+ AllocateObjects(Count);
+
+ // Force a garbage collection and wait until all finalizers are executed
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
+
+ // Check that all Normal objects were finalized before all Critical objects
+ int normalFinalized = Normal.Finalized;
+ int criticalFinalized = Critical.Finalized;
+ int normalFinalizedBeforeFirstCritical = Critical.NormalFinalizedBeforeFirstCritical;
+
+ if (normalFinalized != Count || criticalFinalized != Count || normalFinalizedBeforeFirstCritical != Count)
+ {
+ Console.WriteLine($"Finalized {normalFinalized} {nameof(Normal)} and {criticalFinalized} {nameof(Critical)} objects.");
+ Console.WriteLine($"The first {nameof(Critical)} object was finalized after {normalFinalizedBeforeFirstCritical} {nameof(Normal)} objects.");
+ return 101;
+ }
+
+ return 100;
+ }
+}
diff --git a/src/tests/baseservices/finalization/CriticalFinalizer.csproj b/src/tests/baseservices/finalization/CriticalFinalizer.csproj
new file mode 100644
index 00000000000..d83ad37e49f
--- /dev/null
+++ b/src/tests/baseservices/finalization/CriticalFinalizer.csproj
@@ -0,0 +1,8 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="CriticalFinalizer.cs" />
+ </ItemGroup>
+</Project>
diff --git a/src/tests/baseservices/typeequivalence/pia/PIAContract.csproj b/src/tests/baseservices/typeequivalence/pia/PIAContract.csproj
new file mode 100644
index 00000000000..4895e31531d
--- /dev/null
+++ b/src/tests/baseservices/typeequivalence/pia/PIAContract.csproj
@@ -0,0 +1,9 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <OutputType>Library</OutputType>
+ <CLRTestKind>SharedLibrary</CLRTestKind>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="Types.cs" />
+ </ItemGroup>
+</Project>
diff --git a/src/tests/baseservices/typeequivalence/pia/Types.cs b/src/tests/baseservices/typeequivalence/pia/Types.cs
new file mode 100644
index 00000000000..915dc0adca7
--- /dev/null
+++ b/src/tests/baseservices/typeequivalence/pia/Types.cs
@@ -0,0 +1,19 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System;
+using System.Runtime.InteropServices;
+
+[assembly: PrimaryInteropAssembly(1, 0)]
+
+public struct ValueTypeWithStaticMethod
+{
+ public int F;
+ public static void M() { }
+}
+
+public struct ValueTypeWithInstanceMethod
+{
+ public int F;
+ public void M() { }
+} \ No newline at end of file
diff --git a/src/tests/baseservices/typeequivalence/simple/Simple.cs b/src/tests/baseservices/typeequivalence/simple/Simple.cs
index c79f46ce27b..1d1528f3bf1 100644
--- a/src/tests/baseservices/typeequivalence/simple/Simple.cs
+++ b/src/tests/baseservices/typeequivalence/simple/Simple.cs
@@ -5,6 +5,7 @@ using System;
using System.Linq;
using System.Text;
using System.Reflection;
+using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Xunit;
@@ -253,6 +254,20 @@ public class Simple
}
}
+ [MethodImpl (MethodImplOptions.NoInlining)]
+ private static void TestLoadingValueTypesWithMethod()
+ {
+ Console.WriteLine($"{nameof(TestLoadingValueTypesWithMethod)}");
+ Console.WriteLine($"-- {typeof(ValueTypeWithStaticMethod).Name}");
+ Assert.Throws<TypeLoadException>(() => LoadInvalidType());
+ }
+
+ [MethodImpl (MethodImplOptions.NoInlining)]
+ private static void LoadInvalidType()
+ {
+ Console.WriteLine($"-- {typeof(ValueTypeWithInstanceMethod).Name}");
+ }
+
public static int Main(string[] noArgs)
{
if (!OperatingSystem.IsWindows())
@@ -270,6 +285,7 @@ public class Simple
TestGenericClassNonEquivalence();
TestGenericInterfaceEquivalence();
TestTypeEquivalenceWithTypePunning();
+ TestLoadingValueTypesWithMethod();
}
catch (Exception e)
{
diff --git a/src/tests/baseservices/typeequivalence/simple/Simple.csproj b/src/tests/baseservices/typeequivalence/simple/Simple.csproj
index 37e57397b2c..39d83e32fcc 100644
--- a/src/tests/baseservices/typeequivalence/simple/Simple.csproj
+++ b/src/tests/baseservices/typeequivalence/simple/Simple.csproj
@@ -15,6 +15,7 @@
<ProjectReference Include="../impl/TypeImpl.csproj" />
<ProjectReference Include="../impl/PunningLib.ilproj" />
<ProjectReference Include="$(TestSourceDir)Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../pia/PIAContract.csproj" />
</ItemGroup>
<Import Project="$([MSBuild]::GetPathOfFileAbove(TypeEquivalence.targets))" />
</Project>
diff --git a/src/tests/issues.targets b/src/tests/issues.targets
index c709d58ac49..9f8c49da4df 100644
--- a/src/tests/issues.targets
+++ b/src/tests/issues.targets
@@ -11,6 +11,9 @@
<ExcludeList Include="$(XunitTestBinBase)/Interop/PInvoke/Int128/Int128Test/*">
<Issue>https://github.com/dotnet/runtime/issues/74209</Issue>
</ExcludeList>
+ <ExcludeList Include="$(XunitTestBinBase)/baseservices/finalization/CriticalFinalizer/*">
+ <Issue>https://github.com/dotnet/runtime/issues/76041</Issue>
+ </ExcludeList>
</ItemGroup>
<!-- All OS/Arch CoreCLR excludes -->
@@ -51,9 +54,6 @@
<ExcludeList Include="$(XunitTestBinBase)/readytorun/r2rdump/BasicTests/R2RDumpTest/*">
<Issue>https://github.com/dotnet/runtime/issues/10888 https://github.com/dotnet/runtime/issues/11823 </Issue>
</ExcludeList>
- <ExcludeList Include="$(XunitTestBinBase)/JIT/Regression/JitBlue/DevDiv_255294/DevDiv_255294/*">
- <Issue>https://github.com/dotnet/runtime/issues/44341</Issue>
- </ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/JIT/Directed/rvastatics/RVAOrderingTest/*">
<Issue>https://github.com/dotnet/runtime/issues/55966</Issue>
</ExcludeList>
@@ -562,12 +562,6 @@
<ExcludeList Include="$(XunitTestBinBase)/Regressions/coreclr/GitHub_45929/test45929/*">
<Issue>https://github.com/dotnet/runtime/issues/60152</Issue>
</ExcludeList>
- <ExcludeList Include="$(XunitTestBinBase)/GC/API/GC/GetTotalPauseDuration/*">
- <Issue>https://github.com/dotnet/runtime/issues/74631</Issue>
- </ExcludeList>
- <ExcludeList Include="$(XunitTestBinBase)/GC/API/GC/GetGCMemoryInfo/*">
- <Issue>https://github.com/dotnet/runtime/issues/74902</Issue>
- </ExcludeList>
</ItemGroup>
<!-- The following are x64 Unix failures on CoreCLR. -->
@@ -2741,6 +2735,90 @@
<ExcludeList Include = "$(XunitTestBinBase)/JIT/SIMD/VectorConvert_ro_Target_64Bit/**">
<Issue>https://github.com/dotnet/runtime/issues/75359</Issue>
</ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/Aes/**">
+ <Issue>https://github.com/dotnet/runtime/issues/75767</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/Bmi1/**">
+ <Issue>https://github.com/dotnet/runtime/issues/75767</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/Bmi1.X64/**">
+ <Issue>https://github.com/dotnet/runtime/issues/75767</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/Bmi2/**">
+ <Issue>https://github.com/dotnet/runtime/issues/75767</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/Bmi2.X64/**">
+ <Issue>https://github.com/dotnet/runtime/issues/75767</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/General/VectorRet_r/**">
+ <Issue>https://github.com/dotnet/runtime/issues/75767</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/General/VectorRet_ro/**">
+ <Issue>https://github.com/dotnet/runtime/issues/75767</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/General/IsSupported_r/**">
+ <Issue>https://github.com/dotnet/runtime/issues/75767</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/General/IsSupported_ro/**">
+ <Issue>https://github.com/dotnet/runtime/issues/75767</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/General/VectorArray_r/**">
+ <Issue>https://github.com/dotnet/runtime/issues/75767</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/General/VectorArray_ro/**">
+ <Issue>https://github.com/dotnet/runtime/issues/75767</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/Pclmulqdq/**">
+ <Issue>https://github.com/dotnet/runtime/issues/75767</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/Sse1/Shuffle_r/**">
+ <Issue>https://github.com/dotnet/runtime/issues/75767</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/Sse1/Shuffle_ro/**">
+ <Issue>https://github.com/dotnet/runtime/issues/75767</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/Sse1/Sse_r/**">
+ <Issue>https://github.com/dotnet/runtime/issues/75767</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/Sse1/Sse_ro/**">
+ <Issue>https://github.com/dotnet/runtime/issues/75767</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/Sse1.X64/**">
+ <Issue>https://github.com/dotnet/runtime/issues/75767</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/Sse2/Sse2_r/**">
+ <Issue>https://github.com/dotnet/runtime/issues/75767</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/Sse2/Sse2_ro/**">
+ <Issue>https://github.com/dotnet/runtime/issues/75767</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/Sse2.X64/Sse2.X64_r/**">
+ <Issue>https://github.com/dotnet/runtime/issues/75767</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/Sse2.X64/Sse2.X64_ro/**">
+ <Issue>https://github.com/dotnet/runtime/issues/75767</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/Sse3/Sse3_r/**">
+ <Issue>https://github.com/dotnet/runtime/issues/75767</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/Sse3/Sse3_ro/**">
+ <Issue>https://github.com/dotnet/runtime/issues/75767</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/Sse41/**">
+ <Issue>https://github.com/dotnet/runtime/issues/75767</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/Sse41.X64/**">
+ <Issue>https://github.com/dotnet/runtime/issues/75767</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/Sse41_Overloaded/**">
+ <Issue>https://github.com/dotnet/runtime/issues/75767</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/Sse42/**">
+ <Issue>https://github.com/dotnet/runtime/issues/75767</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/Ssse3/**">
+ <Issue>https://github.com/dotnet/runtime/issues/75767</Issue>
+ </ExcludeList>
</ItemGroup>
<ItemGroup Condition="'$(RuntimeFlavor)' == 'mono' and '$(RuntimeVariant)' == 'llvmfullaot' ">
@@ -3045,6 +3123,9 @@
<ExcludeList Include="$(XunitTestBinBase)/JIT/Regression/CLR-x86-JIT/V1.1-M1-Beta1/b143840/b143840/*">
<Issue>https://github.com/dotnet/runtime/issues/48914</Issue>
</ExcludeList>
+ <ExcludeList Include="$(XunitTestBinBase)/JIT/Regression/JitBlue/Runtime_76273/Runtime_76273/**">
+ <Issue>Fuzzlyn</Issue>
+ </ExcludeList>
<ExcludeList Include = "$(XUnitTestBinBase)/JIT/HardwareIntrinsics/X86/X86Base/Pause*/**">
<Issue>https://github.com/dotnet/runtime/issues/73454;https://github.com/dotnet/runtime/pull/61707#issuecomment-973122341</Issue>
</ExcludeList>
@@ -3267,6 +3348,9 @@
<ItemGroup Condition=" '$(TargetArchitecture)' == 'wasm' " >
+ <ExcludeList Include="$(XunitTestBinBase)/baseservices/finalization/CriticalFinalizer/**">
+ <Issue>https://github.com/dotnet/runtime/issues/75756</Issue>
+ </ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/JIT/Intrinsics/TypeIntrinsics_r/**">
<Issue>https://github.com/dotnet/runtime/issues/54867</Issue>
</ExcludeList>
@@ -3410,6 +3494,9 @@
<ExcludeList Include = "$(XunitTestBinBase)/JIT/Regression/JitBlue/Runtime_40444/Runtime_40444/**">
<Issue>https://github.com/dotnet/runtime/issues/41472</Issue>
</ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/JIT/Regression/JitBlue/Runtime_76273/Runtime_76273/**">
+ <Issue>Fuzzlyn</Issue>
+ </ExcludeList>
<ExcludeList Include = "$(XunitTestBinBase)/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b426654/b426654/**">
<Issue>https://github.com/dotnet/runtime/issues/41472</Issue>
</ExcludeList>
@@ -3432,7 +3519,7 @@
<Issue>https://github.com/dotnet/runtime/issues/56804</Issue>
</ExcludeList>
<ExcludeList Include = "$(XunitTestBinBase)/JIT/CheckProjects/CheckProjects/**">
- <Issue>https://github.com/dotnet/runtime/issues/41520</Issue>
+ <Issue>tries to access project source code - not supported on mobile and wasm</Issue>
</ExcludeList>
<ExcludeList Include = "$(XunitTestBinBase)/JIT/Performance/CodeQuality/BenchmarksGame/mandelbrot/mandelbrot-2/**">
<Issue>https://github.com/dotnet/runtime/issues/56814</Issue>
@@ -3717,7 +3804,7 @@
<Issue>https://github.com/dotnet/runtime/issues/70820</Issue>
</ExcludeList>
<ExcludeList Include = "$(XunitTestBinBase)/JIT/CheckProjects/CheckProjects/**">
- <Issue>needs triage</Issue>
+ <Issue>Tries to access project source code - not supported on mobile and wasm</Issue>
</ExcludeList>
<ExcludeList Include="$(XUnitTestBinBase)/JIT/Directed/aliasing_retbuf/**/*">
<Issue>https://github.com/dotnet/runtime/issues/73539</Issue>
@@ -4010,7 +4097,7 @@
</ExcludeList>
<ExcludeList Include = "$(XunitTestBinBase)/JIT/CheckProjects/CheckProjects/*">
- <Issue>CORE_ROOT must be set</Issue>
+ <Issue>Tries to access project source code - not supported on mobile and wasm</Issue>
</ExcludeList>
<ExcludeList Include = "$(XunitTestBinBase)/JIT/Regression/JitBlue/GitHub_25468/GitHub_25468/**">
@@ -4056,6 +4143,72 @@
<ExcludeList Include = "$(XunitTestBinBase)/baseservices/TieredCompilation/BasicTest_QuickJitOn_R2r/*">
<Issue>missing assembly</Issue>
</ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/buffersize/buffersize/**">
+ <Issue>https://github.com/dotnet/runtime/issues/74891</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/providervalidation/providervalidation/**">
+ <Issue>https://github.com/dotnet/runtime/issues/74891</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/bigevent/bigevent/**">
+ <Issue>https://github.com/dotnet/runtime/issues/74891</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/reverse/reverse/**">
+ <Issue>https://github.com/dotnet/runtime/issues/74891</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/providervalidation/providervalidation/**">
+ <Issue>https://github.com/dotnet/runtime/issues/74891</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/processenvironment/processenvironment/**">
+ <Issue>https://github.com/dotnet/runtime/issues/74891</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/processinfo2/processinfo2/**">
+ <Issue>https://github.com/dotnet/runtime/issues/74891</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/rundownvalidation/rundownvalidation/**">
+ <Issue>https://github.com/dotnet/runtime/issues/74891</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/diagnosticport/diagnosticport/**">
+ <Issue>https://github.com/dotnet/runtime/issues/74891</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/pauseonstart/pauseonstart/**">
+ <Issue>https://github.com/dotnet/runtime/issues/74891</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/reverseouter/reverseouter/**">
+ <Issue>https://github.com/dotnet/runtime/issues/74891</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/processinfo/processinfo/**">
+ <Issue>https://github.com/dotnet/runtime/issues/74891</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/Interop/UnmanagedCallersOnlyBasic/UnmanagedCallersOnlyBasicTest/**">
+ <Issue>needs triage</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)//JIT/Methodical/Methodical_d1/**">
+ <Issue>needs triage</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)//JIT/Methodical/Methodical_do/**">
+ <Issue>needs triage</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)//JIT/Methodical/Methodical_others/**">
+ <Issue>needs triage</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)//JIT/Methodical/Methodical_ro/**">
+ <Issue>needs triage</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)//JIT/Methodical/Methodical_d2/**">
+ <Issue>needs triage</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)//JIT/Methodical/Methodical_r1/**">
+ <Issue>needs triage</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)//JIT/Methodical/Methodical_r2/**">
+ <Issue>needs triage</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/JIT/Directed/aliasing_retbuf/aliasing_retbuf/**">
+ <Issue>needs triage</Issue>
+ </ExcludeList>
+ <ExcludeList Include = "$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/Ssse3/Ssse3_r/**">
+ <Issue>needs triage</Issue>
+ </ExcludeList>
</ItemGroup>
<ItemGroup Condition=" '$(TargetArchitecture)' == 'wasm' or ('$(TargetOS)' == 'Android' or '$(TargetOS)' == 'iOSSimulator')">